5b912d891c281131bc7c997b019f80d76236028d
294 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
Zuul
|
5b912d891c | Merge "Default to u32 when maximum is unset" | ||
|
Artem Goncharov
|
3cd40046f0 |
Default to u32 when maximum is unset
Few object-store parameters set the format int64 and minimum to 0. Latest changes in the format handling result in u32 params in the generated code. Change the login to default at u32 when format is not specified, but u64 when int64 with min is specified. Additionally improve mentioned object-store schemas. Change-Id: I99f70526f2015beefe43950330b27c564688a69f Signed-off-by: Artem Goncharov <artem.goncharov@gmail.com> |
||
|
gtema
|
413af5eeed |
Start generating keystone-ng code
Change-Id: I84ecfbd26bcfdaf010181ee04a9c2c2e2974a58c Signed-off-by: Artem Goncharov <artem.goncharov@gmail.com> |
||
|
Artem Goncharov
|
99fb44a5b3 |
Fix some typos in type formats comparison
Change-Id: Ie23e1d3b12e2dd11e308e706ca68f93a98908c7f Signed-off-by: Artem Goncharov <artem.goncharov@gmail.com> |
||
|
Artem Goncharov
|
3ac21566ce |
Improve rust integer type definition
Look at minimum and maximum for integers to identify i8/u8/i16/u16/i32/u32 Change-Id: Ie8e934e39f9f45f43739f17a60882ff89ab50d0f Signed-off-by: Artem Goncharov <artem.goncharov@gmail.com> |
||
|
gtema
|
7794508262 |
[rust_cli] Consume result
In the last change we started calling the "show_command_hint" function, but missed to consume it's result. Change-Id: Icbbe52494db088c12d7cf77f8d179dfd9472c8a7 Signed-off-by: gtema <artem.goncharov@gmail.com> |
||
|
Zuul
|
173a5e7132 | Merge "Workaround BS quota api path issues" | ||
|
gtema
|
12eb3dfde3 |
Workaround BS quota api path issues
In cinder quota-set and quota-class-set controllers are not having any decorators and are not very usable to the parameter naming. Implement a post_process fix for that since there are no better points. Change-Id: I09ca1b0882486bede501e4255fafc0d39fab2958 Signed-off-by: gtema <artem.goncharov@gmail.com> |
||
|
Artem Goncharov
|
58e16f21b0 |
Enable command hints in the cli
Enable printing of the command hints by default in all commands. Change-Id: I1e835ba8e32b7abc5094abcb28c130db7d508d5d Signed-off-by: Artem Goncharov <artem.goncharov@gmail.com> |
||
|
Artem Goncharov
|
2bdb13b3d0 |
Add response key hack to the BS quota resources
Change-Id: Ib4ca6f2fce19425aae4485915612c17e0a12565e Signed-off-by: Artem Goncharov <artem.goncharov@gmail.com> |
||
|
Artem Goncharov
|
fefe9f26a0 |
Address new linter warning (MISMATCHED_LIFETIME_SYNTAXES)
Generated code causes linter warning starting from rust 1.89 Change-Id: Ic6dab006dd76d82a505b5e291fca19fb1f970b6a Signed-off-by: Artem Goncharov <artem.goncharov@gmail.com> |
||
|
Zuul
|
76fcfb776f | Merge "Fix octavia operations with empty response body." | ||
|
Artem Goncharov
|
ae4937df75 |
Set header parameters in the cli
Certain API operations support/require additional header parameters to be set with the query (i.e. DNS supports `x-auth-all-projects` and `x-auth-sudo-project-id`). Such supported headers should be known from the OpenAPI spec, so add them in the CLI operation and correspondingly set them into the query. In difference to the `python-designateclient` `x-auth-all-projects` will not be set by default, it is wrong to assume so. Admin user is expected to set this parameter in the CLI invocation explicitly. Change-Id: I49b9c31dc47911e261cbdd880c3e6d7327e50f4b Signed-off-by: Artem Goncharov <artem.goncharov@gmail.com> |
||
|
Artem Goncharov
|
98505b2aa0 |
Fix octavia operations with empty response body.
Certain octavia operations (failover) return 202 with empty body. Address this in the schema, so that also the cli commands do not fail expecting a body. Change-Id: Id19511311c82a9381aa1eb120cc64a644f346f89 Signed-off-by: Artem Goncharov <artem.goncharov@gmail.com> |
||
|
Artem Goncharov
|
3ac902ebd9 |
Header names must be lowercase
Per HTTP/2.0 header names must only contain lowercase characters, numerals and symbols. Change-Id: I62806d01d53754de95afe16e5a8d95580cc8b5a7 Signed-off-by: Artem Goncharov <artem.goncharov@gmail.com> |
||
|
Artem Goncharov
|
171d3b39ad |
Change signature for adding request headers
Static strings are heavily complicating the headers management. Switch to Into<HeaderName> and Into<HeaderValue> instead. Change-Id: Iea470a5dd5950f155469e5de0ec4a3c3f70f39ae Signed-off-by: Artem Goncharov <artem.goncharov@gmail.com> |
||
|
Zuul
|
a14fe0a8a4 | Merge "Add header query params to dns list operations" | ||
|
Zuul
|
b8166a6f14 |
Merge "OpenAPI: Fix arrays without items"
|
||
|
Artem Goncharov
|
df065d731e |
Add header query params to dns list operations
All dns list/get operations support `x-auth-all-projects` and `x-auth-sudo-project-id` headers, which can be used by admins. Change-Id: Ic5a7cd6c0312a6ac28d895c290924621943e598a Signed-off-by: Artem Goncharov <artem.goncharov@gmail.com> |
||
|
Zuul
|
9ea8e742bf | Merge "YAML version support" | ||
|
Gorka Eguileor
|
19fe468358 |
OpenAPI: Fix arrays without items
As explained in the documentation `arrays` have an `items` section, and
arrays that can have arbitrary values are defined like this [1]:
```
type: array
items: {}
```
In the cinder schemas we have a couple of cases where we are defining an
`array` without `items`, all other arrays in the openapi codebase seem
to be right.
In this patch we fix these issues and introduce code in the
`_sanitize_schema` to detect future cases of this issue and fix the
schema automatically for the output.
[1]: https://swagger.io/docs/specification/v3_0/data-models/data-types/#mixed-type-arrays
Change-Id: I49cadcccf64ed9699a4b41674109b4afbfa1e106
|
||
|
Artem Goncharov
|
bd3c647035 |
Make image.locations.metadata not required
Glance defines metadata property of the image location as mandatory while in devstack it is not present. Hardcode a dirty fix for the schema. Change-Id: I15f2f0a543174eccbeb5c0d4da9e5222ce1e5d7a Signed-off-by: Artem Goncharov <artem.goncharov@gmail.com> |
||
|
Zuul
|
72020020c6 | Merge "Improve support for array with prefixItems" | ||
|
Artem Goncharov
|
80a9ec9aa4 |
Improve support for array with prefixItems
Change-Id: Id87bf2700e6ddc9183e924f8c9cf6b9f53a44baa Signed-off-by: Artem Goncharov <artem.goncharov@gmail.com> |
||
|
Stephen Finucane
|
b4ae043f3a |
Add missing name attribute
I assume this is the intention. Change-Id: I622731b4cbd2727c38c82348f47a4692964281b9 Signed-off-by: Stephen Finucane <stephenfin@redhat.com> |
||
|
Zuul
|
447deedfdf | Merge "Improve UX clarity of "limit" query parameter" | ||
|
Artem Goncharov
|
ca752ffa71 |
Improve UX clarity of "limit" query parameter
Rename "limit" query parameter of the list operations to "page-size" for giving precise meaning (keep alias "limit"). This is necessary to finally resolve the conflict that we have in the python-openstackclient where "limit" means a page size and all entries are fetched unless you also specify the marker (which is not something anybody can really understand why). Change-Id: I9a6ddcbe30d92c4d190229ac77a10c28eb0015fb Signed-off-by: Artem Goncharov <artem.goncharov@gmail.com> |
||
|
Artem Goncharov
|
595b37c1b2 |
Make keystone job voting again
The fix was merged so we should enforce the identity openapi job now. Change-Id: Ic482c7e0e8444a415a5fe5e3c3a801884447006f Signed-off-by: Artem Goncharov <artem.goncharov@gmail.com> |
||
|
Zuul
|
916c9241b9 | Merge "OpenAPI: Fix nova examples" | ||
|
Gorka Eguileor
|
643fe11eb9 |
README: Fix missing \
Change-Id: I9d8b5ee8f860c6de6ca2006ec85f9bb8f7a02e47 |
||
|
Gorka Eguileor
|
40b76e1500 |
OpenAPI: Fix nova examples
When generating the nova AZ detail schema we are adding examples to the `hosts` object, but we are doing it wrong: - We are adding a dictionary instead of a list, which is what the plural form of example indicates and also what we can see in the OpenAPI spec documentation [1]. - The contents of the example are wrong, it shouldn't have the `JSON request` key, as we can see in the upstream docs [2]. This patch fixes the examples to be correct. [1]: https://swagger.io/specification/#model-with-example [2]: https://docs.openstack.org/api-ref/compute/#get-detailed-availability-zone-information Change-Id: Ic694ee083f55d44d0ecdb8a72561e24ec1b70583 |
||
|
Artem Goncharov
|
4a711b1a2c |
Ensure schemas are not duplicated
It can happen (in Keystone it does for sure) that certain API method decorators when applied together result in certain schemas being present in multiple decorator processing iterations. This results in some schemas being multiplied. It should be safe to just use `set` instead of a `list` to deduplicate them. While we were working on this Nova "again" changed some decorators breaking us so fix that as well since generated code is broken. Change-Id: I25b2506264d6027f9d605c74297e6f0cc6ab2767 Signed-off-by: Artem Goncharov <artem.goncharov@gmail.com> |
||
|
Artem Goncharov
|
f1e74e7be5 |
Un-vendor identity.group schema
In addition to that fix the new issue in the compute schemas with enum without type. Make identity job to non-voting to temporarily bypass a deadlock and land the fix. Change-Id: I7f5f967824e338477a6979e34c2100433458e7c1 Signed-off-by: Artem Goncharov <artem.goncharov@gmail.com> |
||
|
Gorka Eguileor
|
87ff2fe25e |
YAML version support
When exporting OpenAPI in YAML format we are exporting in YAML version 1.2, which is the latest. The problem with that is that there are tools that use the PyYAML [1] python package to read these files, and that package only supports YAML v1.1, which will lead to reading things incorrectly. An example is with booleans. In v1.1 a lot of values are considered as booleans (case insensitive): true, false, 1, 0, off, on, no, yes... But in v1.2 only true and false are considered booleans, so the others don't need to be quoted. As an example we were generating something like this: ``` os_hypervisors_with_servers: in: query name: with_servers schema: type: - boolean - string enum: - true - 'True' - 'TRUE' - 'true' - '1' - ON - On - on - YES - Yes - yes - false - 'False' - 'FALSE' - 'false' - '0' - OFF - Off - off - NO - No - no x-openstack: min-ver: '2.53' ``` Which is incorrectly interpreted by PyYAML like this: ``` enum: - true - 'True' - 'TRUE' - 'true' - '1' - true - true - true - true - true - true - false - 'False' - 'FALSE' - 'false' - '0' - false - false - false - false - false - false ``` ``` To fix this we enable our tool to output the specs in v1.1 with a new parameter `--yaml-version` so that when it's set to 1.1 it will quote all booleans that in v1.1 could be misinterpreted. [1]: https://pypi.org/project/PyYAML/ Change-Id: I7236f6a94ccb2e92a086c16895efa4dc557460c4 |
||
|
Artem Goncharov
|
721705d837 |
Rename operation_name with action_name in the metadata
Currently we comment the operation_name attribute in the metadata that it is used as an action name. This only creates confusion especially if we want to use something different as the operation_name (i.e. operation_name or opertaion_type for neutron router results in "action"). So in addition to the renaming of the metadata attribute explicitly pass the metadata operation key as operation_name parameters into the generator (when unset). Change-Id: Ic04eafe5b6dea012ca18b9835cd5c86fefa87055 Signed-off-by: Artem Goncharov <artem.goncharov@gmail.com> |
||
|
Artem Goncharov
|
9872d0f590 |
Use operation_type when operation_name is empty
In the metadata operation_name may be empty. In the cli output processor we should fallback to the operation_type when operation_name is empty. Change-Id: Ib7aebca1a6e5982ea5fa32c7dfe62fd382689cc9 Signed-off-by: Artem Goncharov <artem.goncharov@gmail.com> |
||
|
Artem Goncharov
|
0088dd4e17 |
Use operation_name in OutputProcessor data
Using operation_type is not correct since it is simply "action" often. Use the `operation_name` instead as we use in the metadata. Change-Id: I8395df6816d9db25d9395b4372878abeab9c4110 |
||
|
Artem Goncharov
|
1a64217aec |
Update the cli output initialization
Switch to the new cli OutputProcessor initialization interface with resource_key and oepration_type parameters for enabling command specific hints. Change-Id: I67eaef1fd5f9f1ed72a5f11a23e8559739792f8a Signed-off-by: Artem Goncharov <artem.goncharov@gmail.com> |
||
|
Artem Goncharov
|
5cdd70602e |
Update pre-commit hooks
Change-Id: I93d5520bc67135db9b0ac9da40dbfb587cb9acad Signed-off-by: Artem Goncharov <artem.goncharov@gmail.com> |
||
|
Artem Goncharov
|
b74e1a2fbc |
Adapt to the modified nova query decorator
Change-Id: Ifcd98f8533fe4403c1ff8299bd08ce45bfdb60b9 Signed-off-by: Artem Goncharov <artem.goncharov@gmail.com> |
||
|
Zuul
|
21d4be5484 | Merge "Unvendor identity user schema" | ||
|
Artem Goncharov
|
52bfb4e619 |
Unvendor identity user schema
User schema in keystone is now good enough. Drop the hardcode. Change-Id: I718906b0c9c12fd4c7936bdb5047725fa3267b39 Signed-off-by: Artem Goncharov <artem.goncharov@gmail.com> |
||
|
Zuul
|
dd95f9da92 | Merge "fix dns qp marker parameter name" | ||
|
Artem Goncharov
|
eb390639ab |
fix dns qp marker parameter name
Fix typo "market" where "marker" should be. Change-Id: Ic9f94727b6abb33619bde96a610fedad7cc12398 |
||
|
Artem Goncharov
|
138b6b164a |
fix type conversion of const bool
`prop: {const: True}` should be converted to bool and not to integer.
Change-Id: Ic3775a36c138d451dbad7615bc0e446528d8b0be
Signed-off-by: Artem Goncharov <artem.goncharov@gmail.com>
|
||
|
Zuul
|
43bb841c49 | Merge "Ensure swift bytes are positive integers" | ||
|
Artem Goncharov
|
303001e15e |
Ensure swift bytes are positive integers
In swift we service return few integer attributes which can only be positive. Ensure this is incorporated in the schema. Change-Id: I23509ca116f607a2b26fa1c01387dbd4f4df705a Signed-off-by: Artem Goncharov <artem.goncharov@gmail.com> |
||
|
Zuul
|
6e40a0831b | Merge "add missed serde macros in types" | ||
|
Artem Goncharov
|
e9a60ff553 |
add missed serde macros in types
When attribute is being locally renamed we miss the serde macros causing deserialization to fail. Change-Id: Ia8d8298c938ea088d1db62bf97df6defc41d93bc |
||
|
Artem Goncharov
|
2adeedf4fe |
Make openapi specs reproducible
Sort openapi spec to make it possible to put them under the version control not taking care of changed ordering. Change-Id: Ifb999f85a6d77e751cba8587c516c7d2c5c23644 |