fa25f3b8f04502f372572eb53fcd65f7b0766aa7
Commit Graph

102 Commits

This Branch
This Branch
All Branches
Author SHA1 Message Date
Artem Goncharov
fa25f3b8f0 Start building Designate specs
Sadly no schemas, but at least first rough structure.
Change-Id: Id2ed7ecfbf20ca522e173cf11f236d00f75871c5
2024年10月01日 20:28:45 +02:00
Artem Goncharov
a9a1a7dee1 Add user_id/project_id/domain_id reference
user_id/project_id/domain_id path parameters passing through the base
openapi class will get reference to the identity resource what enables
id/name/current selector in the cli.
Ensure that codegenerator supports linked resources also for query
parameters.
Change-Id: I1412eedf3b80e5dcd5be122b600ffeaab57b1e2b
2024年10月01日 14:49:59 +02:00
Artem Goncharov
a9e8624e2b fix network.agent property types
- agent.alive is boolean
- agent.configurations is an object
None of them is having any type marker in neutron-lib -> hardcode.
Change-Id: Ib1d394baf9f6375d541b38b21b9b7a30898a1fb3
2024年09月26日 13:47:34 +02:00
Artem Goncharov
cd8ff324cf Update pre-commit tools versions
Change-Id: Ifeb7c1a52b403d89d6e44e425ae935d6a6f43d77
2024年09月24日 10:37:52 +02:00
Artem Goncharov
2326ce5e7b Fix pyproject.toml file name
- rename properly pyproject.toml file
- reformatted files due to rules not being applied before
- address now failing unittest
Change-Id: I189a0c71253fe87c5fa91f6d7f46fb350fe4d0d9
2024年09月19日 09:00:54 +02:00
Artem Goncharov
ca4120cddd Extend user path param with --current-user
Recently support of `--user-id|--user-name` has been added when user_id
is a path parameter of the resource. To make it even more smoother
extend it with `--user-id <ID>|--user-name <NAME>|--current-user` to
allow using current authenticated user while being very explicit (ensure
user precisely decides what is desired.
Change-Id: I0261140572e76799ea54dc0c9544cf5d094c1120
2024年09月17日 20:09:40 +02:00
Artem Goncharov
89c07638cf Switch to ruff
Change-Id: I849dd7c794d4c4a796e1a91c73dcf18a33d03d4d
2024年09月17日 18:21:20 +02:00
Artem Goncharov
f94c527051 Use all resource names for path param naming
for the url `/users/{user_id}/access_rules` and
`/users/{user_id}/access_rules/{id}` param user_id should be named as
`users_access_rules_user_id` to better avoid name shadowing.
Change-Id: Ibe72515cad25009fe5e73afe1a98dc07ec1ac8d4
2024年09月17日 15:04:56 +02:00
Zuul
a3da9ae657 Merge "Add getting started guide to README" 2024年09月10日 16:48:34 +00:00
Artem Goncharov
189d14a902 Escape commit message
When generated content is being commited it uses the same commit message
as for the change triggered it. It is possible that quotes in the
original change break syntax for the `git commit` command and therefore
need to be escaped properly. Use ansible `quote` filter.
Change-Id: Ia71aef06aea9355fb99c6d4bca5288ec14f78814
2024年09月10日 10:58:24 +02:00
Artem Goncharov
a5332a2072 Undo hacking identity auth catalog command
There was a hack of renaming `osc identity auth catalog ...` command to
`osc identity catalog`. That is not useful and should be dropped.
Change-Id: I60c1afcbf462f63128b5c8988d132487b11f846b
2024年09月06日 12:59:02 +02:00
Zuul
8c9894e60b Merge "Add resource link to domain_id path parameter" 2024年09月04日 12:49:00 +00:00
Artem Goncharov
164843fc37 Pin ubuntu-jammy for openapi-identity job
Keystone implicitly requires pillow library which is not having wheels
on ubuntu-noble. In this repo itself this issue is fixed by adding few
libraries into the bindep, but this is not possible when the job is used
in the keystone repo directly.
Change-Id: I59ccfe9fd4e27ce3d5d27f3eb5b179ca16d0a542
2024年09月03日 20:08:05 +02:00
Artem Goncharov
538c610f4a Add resource link to domain_id path parameter
Same way as for user we add resource link to the domain_id path
parameter allowing cli user to use `--domain-id|--domain-name`.
Change-Id: Ibf220ff2b3cd11d639b6b1c5fdff66da6fa80972
2024年09月03日 20:04:04 +02:00
Artem Goncharov
ff6e36843e Add resource link in path parameters
When path_parameter contain something like `user_id` it is more
efficient (and provides a UX with more control) to accept
`user-id|user-name` from the user. This is achieved by introducing
resource links in the path parameters. When link is present parameter is
being processed differently.
Modify Keystone schema generation to insert link to the user everywhere
where `user_id` path parameter is present.
Change-Id: I8bf3d14dc751bdb97111a63dddfd0b604cf06abc
2024年09月03日 11:20:25 +02:00
Stephen Finucane
2006931337 Add getting started guide to README
This is a first pass. As noted in the TODO, we should expand on this
further but that's a job for another day.
Change-Id: Icd44f0665995be66eba9f292e5c030be2ced9ac4
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2024年09月02日 14:18:13 +09:00
Artem Goncharov
76269d0283 Add neutron pagination and sort query parameters
Pagination and sorting is implemented deep inside neutron and is not
directly visible on the resource schemas. Add those by default to every
indexing method (except of extensions where it is known to be ignored).
Change-Id: Ia8055d1edd08581193f2e722f911a50f6a3c63d3
2024年08月22日 12:30:06 +02:00
Zuul
c5461caef2 Merge "Fix QP name for listing volumes" 2024年08月22日 06:13:09 +00:00
Artem Goncharov
06564c64ff Add libjpeg-dev to bindep
Opendev switched base image to ubuntu noble which comes with py3.12 for
which there are no wheels for pillow package. Compilation fails since
libjpeg-dev is missing. Add it not to pin the nodeset.
Change-Id: I045c2952e37f5121e9bff1c2f55aea535ce1de96
2024年08月21日 18:24:33 +00:00
Artem Goncharov
df50f9d845 Fix QP name for listing volumes
There is a typo in a parameter name `all_tenans` where `all_tenants`
should be.
Also set that limit can not be negative.
Change-Id: I11c53ad33911a9b95c419f94c5e406a3b6347226
2024年08月21日 18:44:13 +02:00
Artem Goncharov
fb41208b55 Flip use of UNSET
in the previous change we added support for UNSET to have empty schema.
It is more logical to use UNSET when the schema is not defined and not
when it is empty. Fix that.
Change-Id: I6568ca826d119b42f74d3f2ee9a691ac1278bc26
2024年08月19日 10:14:23 +02:00
Zuul
7ef2c59c7d Merge "Add support for explicit empty schemas" 2024年08月16日 17:45:29 +00:00
Artem Goncharov
8a67801736 Add support for explicit empty schemas
There might be a decorator explicitly stating the schema is empty
meaning there is no body (this is different from schema with type
"null"). In order to differentiate the empty schema from not set add a
similar Sentinet `UNSET` as in OpenStackSDK and generate dummy schemas
only when the schema is really unknown.
Change-Id: I72434afea54af9aa6df205a27a8d66765bb0ffd7
2024年08月16日 11:03:46 +02:00
Zuul
ee3c1e18d3 Merge "Fix network.quota-set and compute.limits schemas" 2024年08月13日 15:17:25 +00:00
Artem Goncharov
3ff379b595 Fix network.quota-set and compute.limits schemas
Change-Id: Icf413ab5b3c6fa2ea44e20c0598fa6fa834052e4
2024年08月13日 15:44:52 +02:00
Artem Goncharov
f1c48c27a4 Hardwire subnetpool.ip_version to be integer
Neutron treats ip_version as integer but the apidef does not tell
anything about that. Implement hard overwrite.
Change-Id: I71a3416bb09325bbe8d8058d2d412023ea3a8c5f
2024年08月13日 10:59:25 +02:00
Artem Goncharov
7931cdee83 Update neutron schema resolution
Neutron treats subnetpool.XXX_prefixlen everywhere as integers including
the database (it is even described like that in neutron api-ref itself).
For some unknown reason it returns it as a string though. Maybe because
in the apidef it is defined like `validate: "type:non_negative",
convert_to: convert_to_int`. Modify api_def processing not to look at
validate OR convert_to, but use convert_to results in update of the
schema.
Change-Id: I52d1d207be54967a0a1b9a3443c661b1fabd69f4
2024年08月07日 18:04:29 +02:00
Artem Goncharov
b19632ddd3 Use non-keyset pagination for object-storage in rust
in rust sdk templates implement required method for a non-keyset based
pagination for object-storage service.
Change-Id: I11fc4a5967ee526bd45b361ecd6f405bb23ce9a1
2024年08月01日 15:14:12 +02:00
Zuul
4693166067 Merge "Add crate-ci/typos for typo correction" 2024年08月01日 11:39:59 +00:00
Artem Goncharov
ceec1ebf1b Add crate-ci/typos for typo correction
There are lots of places in the code where typos might occur. Those even
squeeze into the openapi and as such into the generated code. On the
Rust side we already use `typos` to check that so we need to also invoke
it when we generate openapi specs themselves.
Change-Id: I9d27391492f9eb10a6b65d4c4589b12db2610813
2024年08月01日 11:38:11 +02:00
Artem Goncharov
27daac0ab0 Fix generation of openapi with py310
in py310 response_code decorator refering to http.HTTPStatus result in
enum as such being used in openapi, while py311 does the proper
conversion.
Change-Id: I4726519f2e2e45d23ca91efecb66ac01addfda56
2024年08月01日 09:09:06 +02:00
Zuul
9bf61cfd49 Merge "Stringify response_code decorator" 2024年07月31日 21:18:18 +00:00
Zuul
6e7b6d630c Merge "Fix security_group_rules schema" 2024年07月31日 20:26:51 +00:00
Artem Goncharov
70589d047c Stringify response_code decorator
Cinder refers to the http.HTTPStatus for the response code instead of
explicit string/number. Force conversion to string when consuming.
Change-Id: Ibf839cefad193294f07e7a00f358ff45934cc4ae
2024年07月31日 21:30:06 +02:00
Artem Goncharov
4942cac2c9 Fix security_group_rules schema
sg rules has no information attached to it in neutron-lib. That caused
us to assume it is "string" and as such generate not working CLI code.
Hardcode rules schema.
Rules port_range is at the same time an int/null and not a string.
Change-Id: I3c978c71c4bca40a5adfb9650304ff79b096b895
2024年07月31日 20:46:00 +02:00
Artem Goncharov
6490997f65 Set git push parameters in promote job
Change-Id: I827025613fcb1a40ad37847c2fd0e0598a0ccc46
2024年07月31日 18:27:38 +02:00
Artem Goncharov
5a2fcc56db Accept github newhostkey in promote job.
also use `git am` instead of `git apply` to immediately apply the page
and not only to stage changes.
Change-Id: I9602441bf561bc94b7d325a87a555250fcb2f232
2024年07月31日 16:32:48 +02:00
Artem Goncharov
5c27e5a7ac Fix undefined var in promote job
promote job missed to set the required download_artifact_job variable.
Change-Id: Ia9c7d643a86ddcfa8b7bf56a66766c50e81b5ccb
2024年07月31日 13:33:16 +02:00
Artem Goncharov
612d37f315 Move propose job from post to promote pipeline
A job to push built changes to upstream (github repo) should rather run
in the promote pipeline since that is where we should promote artifacts.
Change-Id: Id3439ebebc7f9e731d80ad3b72c823f11ecf6c4d
2024年07月31日 11:08:52 +02:00
Artem Goncharov
fe58fb9947 Prepare git patch and archive for rust package
Apply the generated sources on top of the target repository and create
patch file. In addition to that save complete content as job artifacts.
post job is pushing changes to the upstream repository (using public SSH
key of repository set by Zuul and added as a deployment key). PR is not
created, since that requires additionally separate API key.
Change-Id: I090b87e05ede95f8542a427207bea711e5cc5df4
2024年07月31日 08:44:09 +02:00
Artem Goncharov
600d7aca5a Drop anyhow in cli templates
- drop anyhow in favor of eyre crate
- fix few things in nova changed in the meanwhile
Change-Id: I919cac5bf92e5279a4d840ddf0196e6daa74d869
2024年07月26日 20:44:14 +02:00
Artem Goncharov
97a82290cd fix network.fip.port_XXX schemas
port_details and port_forwardings are complex schemas. Implement them
through hacks since they are missing in Neutron.
Change-Id: I9a13157053dad2518af4af45ab112bba80c67e54
2024年07月15日 17:38:59 +02:00
Zuul
fde587de5c Merge "Consume decorated Keystone methods" 2024年07月08日 15:18:51 +00:00
Artem Goncharov
d038d9d8d1 Consume decorated Keystone methods
We started decorating Keystone with schema validation similarly to other
services. Since Keystone uses Flask and thus we do not use base
processing split the processing into separate method and call it.
Change-Id: I4e70b85bb16a40cb3dff0d5ddc6004aabe0d1c62
2024年07月08日 14:20:31 +02:00
Artem Goncharov
7eecc0e895 Add neutron dns_assignments schema
Add a workaround for having a correct dns_assignment schema.
Change-Id: I2a21a3179a47c2eaaa4fb676c90f66f9c9e8ae71
2024年07月08日 12:49:50 +02:00
Artem Goncharov
fdf8bda6be Fix nova schema workaround
Nova fixed server_groups schema in that it replaced corrupted policies
array with a new "prefixItems" key what breaks the workaround. Add
additional check into the workaround.
Change-Id: I4bea8419b37d9daf10b2b5891917793c6b3a57ff
2024年07月08日 10:08:38 +02:00
Artem Goncharov
5420dbb0c9 Add job to generate rust code
Change-Id: I322d117a7cce23c96331f2f294374cde87325c99
2024年06月20日 16:50:02 +02:00
Artem Goncharov
c2980a28c4 Add static object-store OpenAPI
Swift API is neither easy to generate from the code, nor is it changing
often to justify the effort doing so. Add a static OpenAPI spec into the
tree and maybe sometime in the future it can be generated from sources
or moved to the Swift itself.
Change-Id: I3a5381705ecce6d28c9bd8d173116614210cb346
2024年06月20日 14:49:46 +02:00
Zuul
7a442dbf3f Merge "Add metadata" 2024年06月19日 17:41:56 +00:00
Artem Goncharov
6e297814f9 Add metadata
Having OpenAPI is not enough to render sdk/cli/etc. A metadata is
necessary describing path to the spec, operation definition in the spec
and what and how to generate out of it. While most of the data can be
"assumed" there are cases where customization is necessary.
For now add metadata into the tree.
Change-Id: Ice129db1ceb2487c95d4c66946c6a0f57c60824e
2024年06月18日 14:01:47 +02:00