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
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
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
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
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
- 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
`port_range_min` and `port_range_max` of the security-groups[].rule
response has integer/null type
Change-Id: I10cfa565bede4c5f77069b6ac47a3b7ca0bc0e25
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
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
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
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
- add services added recently
- add info about sdk/cli/tui that are generated using codegenerator.
Change-Id: Id41a3262be58deefd1f127a4c1a0df0b3b2e0aec
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
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
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
- 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
We are moving IntString, NumString, BoolString from cli to sdk so that we can
also use them in tui.
Change-Id: Ib2dcdd2f54481feacb7848037fb26fae4ef5d738
Enable sensitive handling of certain fields known to contain sensitive data
(password, passcode, secret, token.id)
Change-Id: Iae8cf9a084b981600fc0b1b94176c0ef4109c5df
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
Recently validation of the external_gateway_info has been modified in
the Neutron so that we are not able to detect the schema anymore. Adapt
it to how it "look like it is intended".
Change-Id: I8976a019cd11b4cb3d8780553bb72b7ce6627519