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>
This commit is contained in:
Artem Goncharov
2025年07月24日 13:27:01 +02:00
parent 3ac902ebd9
commit 98505b2aa0

2
.gitignore vendored
View File

@@ -155,3 +155,5 @@ cython_debug/
.stestr/
wrk/
uv.lock

View File

@@ -1194,7 +1194,7 @@ class TypeManager:
+ name
)
some_model.name = new_other_name
unique_models[new_other_name] = some_model
unique_models[new_other_name] = ref
logging.debug(
f"Renaming also {some_model} into"
f"{new_other_name} for consistency"

View File

@@ -1203,12 +1203,21 @@ class OctaviaGenerator(OpenStackServerSourceBase):
if name in [
"LbaasLoadbalancersFailoverFailoverRequest",
"OctaviaAmphoraeConfigConfigRequest",
"OctaviaAmphoraeFailoverFailoverRequest",
]:
schema = openapi_spec.components.schemas.setdefault(
name, TypeSchema(type="null")
)
ref = f"#/components/schemas/{name}"
if name in [
"LbaasLoadbalancersFailoverResponse",
"OctaviaAmphoraeConfigResponse",
"OctaviaAmphoraeFailoverResponse",
]:
# No body
ref = None
mime_type = None
else:
(ref, mime_type) = super()._get_schema_ref(
openapi_spec,

4435
uv.lock generated

File diff suppressed because it is too large Load Diff
Reference in New Issue
openstack/codegenerator
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.

The note is not visible to the blocked user.