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:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -155,3 +155,5 @@ cython_debug/
|
||||
.stestr/
|
||||
|
||||
wrk/
|
||||
|
||||
uv.lock
|
||||
|
@@ -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"
|
||||
|
@@ -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,
|
||||
|
Reference in New Issue
Block a user