303001e15e524ab34947e03fe4f2fd90d6523adf
246 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
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> |
||
|
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
|
d3f1f124e5 |
Fix role_assignments command
In the cli generation it was assumed that the first element in the response schema is the object itself. That is used to check whether the response is list or not. Now the role_assignment schema return `links` object first breaking that assumption. Extend the check to first look at the `response_key` that we identified previously. Change-Id: Ib2cf6e394486ebd0a475ed3d9bba97feefcd5205 |
||
|
Artem Goncharov
|
d201f9a6d9 |
Hopefully address nested structures renaming race
Sometimes (and now very often) there is some race in the deep nested structures rename handling. Apparently during renaming the wrong object was modified causing it not to find referred entity later causing some confusions depending on the order in which entities are processed. Additionally when enum with the same name occur we should also look whether the schema hash equals, in which case it is safe to simply skip the schema completely). Change-Id: I1bbb5f1e4f702ab54f72cdb70418b04567047187 |
||
|
Artem Goncharov
|
85c09cd60e |
Add support setting Null for nullable optional args
For primitive types (not arrays and not dicts or similar) when resource
attribute can be explicitly nullable (while also being optional) it is
necessary to allow CLI user to set it to null. The only practical way
found till now is to add additional argument: `device_id / no_device_id`
which can be used to set explicit null. Neither relying on specific
value ("", "null") nor using default value when no value is sustainable
looking at the variations of APIs.
Change-Id: I6d549ffcc5c51a9c3ed849c590777b5ba4f6d721
|
||
|
Zuul
|
7811367bea | Merge "Address explicit nullable types in network" | ||
|
Artem Goncharov
|
8a10a63394 |
Address explicit nullable types in network
Some conversion schemes missed explicit null support. Change-Id: I01ed16f2690c78492a0d8673ad86f67de92c80ae |
||
|
Artem Goncharov
|
d6cbd6dc26 |
Fix server schema
image in the server response may be an empty string if the server was provisioned from a volume. Change-Id: I4ec1d5391d373ec1aaba40b0547b06ebc9629ec2 |
||
|
Artem Goncharov
|
f193d31dfc |
Adjust fip.port_details schema
On the response admin_state_up can be only boolean Change-Id: I2d991491dbc5a97e36446a6d29c52b653b5a1657 |
||
|
Artem Goncharov
|
52d3f05969 |
Fix fip.port_details schema
port_details is an object and not array of objects. Change-Id: I4095e664d714222d1d1ef8fdac0422393e7c451b |
||
|
Artem Goncharov
|
0120737d06 |
Add cascade QP for delete octavia loadbalancer
Change-Id: I8f394639f3272d4385618dda6731880e02e85a4e |
||
|
Artem Goncharov
|
752bc74a11 |
Fix typos in parameter names
Change-Id: I652e8b85632789d5172593154ddd9fef7508f359 |
||
|
Artem Goncharov
|
1e293968c7 |
Copy openapi spec into rust project
In order to do more tests of the sdk/cli/types it is necessary to have a convenient access to the source openapi spec. Copy this into the `openstack_types/data`. Change-Id: Ica1849dc81e77d05f277a14bb00030485c704ba2 |
||
|
Artem Goncharov
|
63632a0ced |
Start populating resource_key in the CLI
Next step of enabling CLI output configuration. This time we add resource_key into the generated CLI code so that we can map config entries. Change-Id: I43460adb71c18516c65ae20cf29a0a42a201a01f |
||
|
Artem Goncharov
|
a0e5529b8a |
Fix few nova response schemas
- keypair create response does not contain ID - server create response has a response_key (server). This is not really true, since creation may return reservation_id, but this is not typical and we can try to find a solution for that later. For now make sure cli server creation works. Change-Id: I3f52f0e6686767dcc8862543c4c3a155f42ead0e |
||
|
Artem Goncharov
|
f4a1f265a3 |
Fix security-group.rule.port_range_xx type
`port_range_min` and `port_range_max` of the security-groups[].rule response has integer/null type Change-Id: I10cfa565bede4c5f77069b6ac47a3b7ca0bc0e25 |
||
|
Artem Goncharov
|
cc9c23449b |
Add instance_uuid to the instance action schema
Change-Id: I5912a18f1a7f60b6eff96aeb9580eb2d05c3ebb6 |
||
|
Zuul
|
eceadd597c | Merge "Fix nova instance_action schema" | ||
|
Zuul
|
fe673c0171 | Merge "Extend tools for new services" | ||
|
Zuul
|
1bada0488b | Merge "Fix BS response schemas" | ||
|
Artem Goncharov
|
2c638bbf44 |
Fix nova instance_action schema
There is case (at least on one cloud) where user_id attribute of the instance_action is null (explicit null and not unset). Change-Id: Ic8ac6416a4d48d13a62b37b4b08c25b425ecc2b7 |
||
|
Artem Goncharov
|
b92f142710 |
Extend tools for new services
Change-Id: I664672f9aca455991f737047d8ca53c844d4058f |
||
|
Artem Goncharov
|
5e697cf6eb |
Fix BS response schemas
Not all of the fields declared as mandatory are being returned by real clouds. Change-Id: I59ed1b1014a6eb91f067b61e3b57a3bb8f4e2b8e |
||
|
Artem Goncharov
|
52eee9df4d |
Repair image container_format and disk_format schema
container_format and disk_format in reality need to be `anyOf[String, Enum]` since it is possible to modify this list on the deployment level. Unfortunately this also means that the CLI (create case) is becoming very tricky. For now prepare, but not enable corresponding changes in the create schema until a good way of handling this in cli has been found. Change-Id: I9162e238d98fd494131c01ff02990e2ddeda4887 |
||
|
Artem Goncharov
|
1ae47e0b0e |
Switch cli to openstack_types
There are lot of changes related to the deduplication caused mostly be lot of data simplifactions done on the cli side for the responses which are not done on openstack_types. This changes were applied manually to the target repository since the changes require also bumping structable version. Some other minor enum sorting and docstring formatting fixes has been applied. Change-Id: Ifc508c54c01bd39af12e3023668e698085829a05 |
||
|
Zuul
|
f3093fb583 | Merge "Adapt openstack_types to structable_derive 0.2" | ||
|
Artem Goncharov
|
abda7a8b6a |
Adapt openstack_types to structable_derive 0.2
Rework StructTable imports to point directly to structable (with additional Options import). On the way drop unnecessary `#[serde(untagged)]` for StringEnum and `serialize` for `Option<String>` Change-Id: Ic9b7b5b319e5a7ea881f7b5e3e9da986276d079b |
||
|
Zuul
|
f1bbf1cfa4 | Merge "Update project readme" | ||
|
Zuul
|
9a00c332b5 | Merge "Use dedicated deser helpers in response types" | ||
|
Artem Goncharov
|
2cebebd4d6 |
Update project readme
- add services added recently - add info about sdk/cli/tui that are generated using codegenerator. Change-Id: Id41a3262be58deefd1f127a4c1a0df0b3b2e0aec |
||
|
Artem Goncharov
|
95c77151bc |
Use dedicated deser helpers in response types
Change-Id: Ibd1272ff55ea36624de2947945376291c460dce3 |
||
|
Artem Goncharov
|
952612a5c9 |
Sort types enum kinds alphabetically
Change-Id: I5e390dbb7ecb79eef0dacca90a6897433ab1851e |
||
|
Artem Goncharov
|
4e919bf8c0 |
Fix api-ref parsing
openstackdocstheme changes got merged and we need to adopt to it. Change-Id: I4781e311e332d0837036eb4225a3fcca2116572c |
||
|
Artem Goncharov
|
2c5a228684 |
Make openstack_types props also public
struct properties should be also public Change-Id: Id1f706003694e2e8c071a3ea76a24d85010fcec6 |
||
|
Artem Goncharov
|
8f2a2d6150 |
Fix wrong enum serde macros
In the previous change new serde macros were added to the reused class what resulted in sdk structs being partly corrupted. Make response structs public Change-Id: Ia53f7b21d58b23cc4647f891b5b9744c7fc5556d |
||
|
Zuul
|
6f9d426ba4 | Merge "Start building response types in the SDK" | ||
|
Artem Goncharov
|
b19ca1d4d5 |
Start building response types in the SDK
Introduce openstack_types crate with certain types that might be helpful. In the current form those cannot be reused from cli or tui since it is necessary to tweak StructableTable to be able to treat different rendering of cli and tui versus the raw structs. Change-Id: I23674e0e9119f75739139e015f44d1100d6d84e2 |
||
|
Zuul
|
83f01f9ff7 |
Merge "Adopt uv instead of pip"
|
||
|
Artem Goncharov
|
91ffe23c7e |
Convert to FakeOpenStackClient in tests
Switch from MockServerClient to FakeOpenStackClient Change-Id: I46c092d3b50158c9e65c865051c50cff8b5d37d4 |
||
|
Artem Goncharov
|
04ae7d1c4e |
Adapt tui generator to the 2024 edition
Code has been adapted on the destination side and now the new generated code cannot be compiled. Apply the same changes to the generator templates. Change-Id: I9fe5e18ba3db240a0adf59c878f8742fb6dfa13a |
||
|
Artem Goncharov
|
e3dda1cbc3 |
Adopt uv instead of pip
- fix pyproject.toml file name (causing few reformats missed previously) - extend pyproject.toml with the info from setup.cfg to make uv work - introduce uv and start using it inside tox - fix unittest that started failing due to that change Change-Id: I461ffc9fee39085f795ced07b7d00ebde28a6034 |
||
|
Artem Goncharov
|
0f870d5a5f |
Import IntString from openstack_sdk
We are moving IntString, NumString, BoolString from cli to sdk so that we can also use them in tui. Change-Id: Ib2dcdd2f54481feacb7848037fb26fae4ef5d738 |
||
|
Artem Goncharov
|
e0f1e9c0b2 |
Format generated Rust code
Change-Id: I75d43d3280d2353d5038b6bce714a186bd9cf956 |
||
|
Artem Goncharov
|
a6002e661b |
Make sensitive fields be SecretString
Enable sensitive handling of certain fields known to contain sensitive data (password, passcode, secret, token.id) Change-Id: Iae8cf9a084b981600fc0b1b94176c0ef4109c5df |
||
|
Zuul
|
51403407d7 | Merge "Replace wrong simplification of vec of vec of strings" | ||
|
Artem Goncharov
|
5d8e2552b1 |
Replace wrong simplification of vec of vec of strings
In Keystone.user MFA rules are vec of vec of strings. Current simplification renders it as vec of strings loosing one level. Also indicate to the user array parameters are actually arrays. Change-Id: I382aa157b4b4286daf91f08af001a5db0247a88f |
||
|
Artem Goncharov
|
7e5438973e |
Replace imported protocol schema
Temporary hardcode protocol schema which is about to be replaced with a proper schema. Change-Id: Iba6eff82645b18c788d6664e2fbc7f0e3d4244f7 |
||
|
Zuul
|
c3b231fb89 | Merge "Actually start building magnum code" | ||
|
Zuul
|
d683219d38 | Merge "Fix network external_gateway_info schema" | ||
|
Artem Goncharov
|
8be0291327 |
Actually start building magnum code
previous change container a typo in the service name and it was silently ignored. Change-Id: I5a037745274e728346140c23b7d17c4e3b151032 |