9872d0f5901ae4d8f52fd8fa3ffbe01ae95bd889
Commit Graph

259 Commits

This Branch
This Branch
All Branches
Author SHA1 Message Date
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>
2025年06月04日 13:54:53 +02:00
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
2025年06月03日 11:48:35 +02:00
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>
2025年06月02日 11:19:04 +02:00
Artem Goncharov
5cdd70602e Update pre-commit hooks
Change-Id: I93d5520bc67135db9b0ac9da40dbfb587cb9acad
Signed-off-by: Artem Goncharov <artem.goncharov@gmail.com>
2025年05月30日 18:29:17 +00:00
Artem Goncharov
b74e1a2fbc Adapt to the modified nova query decorator
Change-Id: Ifcd98f8533fe4403c1ff8299bd08ce45bfdb60b9
Signed-off-by: Artem Goncharov <artem.goncharov@gmail.com>
2025年05月30日 19:11:04 +02:00
Zuul
21d4be5484 Merge "Unvendor identity user schema" 2025年05月28日 16:20:15 +00:00
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>
2025年05月28日 11:13:43 +02:00
Zuul
dd95f9da92 Merge "fix dns qp marker parameter name" 2025年05月27日 17:21:52 +00:00
Artem Goncharov
eb390639ab fix dns qp marker parameter name
Fix typo "market" where "marker" should be.
Change-Id: Ic9f94727b6abb33619bde96a610fedad7cc12398
2025年05月27日 15:34:50 +02:00
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>
2025年05月23日 15:58:34 +02:00
Zuul
43bb841c49 Merge "Ensure swift bytes are positive integers" 2025年05月22日 19:00:48 +00:00
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>
2025年05月22日 17:42:37 +02:00
Zuul
6e40a0831b Merge "add missed serde macros in types" 2025年05月21日 20:24:11 +00:00
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
2025年05月21日 18:05:35 +02:00
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
2025年05月19日 15:56:50 +02:00
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
2025年05月17日 13:40:28 +02:00
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
2025年05月17日 12:29:58 +02:00
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
2025年05月13日 16:16:55 +02:00
Zuul
7811367bea Merge "Address explicit nullable types in network" 2025年05月13日 08:22:55 +00:00
Artem Goncharov
8a10a63394 Address explicit nullable types in network
Some conversion schemes missed explicit null support.
Change-Id: I01ed16f2690c78492a0d8673ad86f67de92c80ae
2025年05月13日 08:11:52 +02:00
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
2025年05月08日 15:40:18 +02:00
Artem Goncharov
f193d31dfc Adjust fip.port_details schema
On the response admin_state_up can be only boolean
Change-Id: I2d991491dbc5a97e36446a6d29c52b653b5a1657
2025年05月08日 11:00:35 +02:00
Artem Goncharov
52d3f05969 Fix fip.port_details schema
port_details is an object and not array of objects.
Change-Id: I4095e664d714222d1d1ef8fdac0422393e7c451b
2025年05月07日 17:08:42 +02:00
Artem Goncharov
0120737d06 Add cascade QP for delete octavia loadbalancer
Change-Id: I8f394639f3272d4385618dda6731880e02e85a4e
2025年05月06日 17:18:50 +02:00
Artem Goncharov
752bc74a11 Fix typos in parameter names
Change-Id: I652e8b85632789d5172593154ddd9fef7508f359
2025年05月06日 10:01:16 +02:00
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
2025年05月05日 13:44:44 +02:00
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
2025年04月25日 16:02:38 +02:00
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
2025年04月24日 13:28:19 +02:00
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
2025年04月22日 12:54:52 +02:00
Artem Goncharov
cc9c23449b Add instance_uuid to the instance action schema
Change-Id: I5912a18f1a7f60b6eff96aeb9580eb2d05c3ebb6
2025年04月18日 16:39:15 +02:00
Zuul
eceadd597c Merge "Fix nova instance_action schema" 2025年04月18日 14:04:57 +00:00
Zuul
fe673c0171 Merge "Extend tools for new services" 2025年04月18日 10:46:11 +00:00
Zuul
1bada0488b Merge "Fix BS response schemas" 2025年04月18日 10:40:54 +00:00
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
2025年04月18日 07:46:43 +00:00
Artem Goncharov
b92f142710 Extend tools for new services
Change-Id: I664672f9aca455991f737047d8ca53c844d4058f
2025年04月18日 07:46:27 +00:00
Artem Goncharov
5e697cf6eb Fix BS response schemas
Not all of the fields declared as mandatory are being returned by real
clouds.
Change-Id: I59ed1b1014a6eb91f067b61e3b57a3bb8f4e2b8e
2025年04月18日 07:46:17 +00:00
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
2025年04月18日 07:46:05 +00:00
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
2025年04月17日 14:41:11 +02:00
Zuul
f3093fb583 Merge "Adapt openstack_types to structable_derive 0.2" 2025年04月14日 11:34:50 +00:00
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
2025年04月14日 11:00:26 +02:00
Zuul
f1bbf1cfa4 Merge "Update project readme" 2025年04月11日 17:01:44 +00:00
Zuul
9a00c332b5 Merge "Use dedicated deser helpers in response types" 2025年04月11日 15:59:53 +00:00
Artem Goncharov
2cebebd4d6 Update project readme
- add services added recently
- add info about sdk/cli/tui that are generated using codegenerator.
Change-Id: Id41a3262be58deefd1f127a4c1a0df0b3b2e0aec
2025年04月11日 15:49:47 +02:00
Artem Goncharov
95c77151bc Use dedicated deser helpers in response types
Change-Id: Ibd1272ff55ea36624de2947945376291c460dce3
2025年04月11日 14:28:34 +02:00
Artem Goncharov
952612a5c9 Sort types enum kinds alphabetically
Change-Id: I5e390dbb7ecb79eef0dacca90a6897433ab1851e
2025年04月11日 08:48:03 +02:00
Artem Goncharov
4e919bf8c0 Fix api-ref parsing
openstackdocstheme changes got merged and we need to adopt to it.
Change-Id: I4781e311e332d0837036eb4225a3fcca2116572c
2025年04月10日 20:29:15 +02:00
Artem Goncharov
2c5a228684 Make openstack_types props also public
struct properties should be also public
Change-Id: Id1f706003694e2e8c071a3ea76a24d85010fcec6
2025年04月08日 19:09:22 +02:00
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
2025年04月08日 15:27:13 +02:00
Zuul
6f9d426ba4 Merge "Start building response types in the SDK" 2025年04月08日 11:42:32 +00:00
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
2025年04月08日 10:27:25 +02:00