diff --git a/codegenerator/openapi/octavia.py b/codegenerator/openapi/octavia.py index eea7b28..b959447 100644 --- a/codegenerator/openapi/octavia.py +++ b/codegenerator/openapi/octavia.py @@ -1129,11 +1129,12 @@ class OctaviaGenerator(OpenStackServerSourceBase): operation_name, ) + qp: dict[str, Any] | None = None + if operation_name in ["list", "index"]: # NOTE(gtema) sadly there is no reasonable way how to extract # supported query parameters out of octavia so we need to hardcode # them for now - qp: dict[str, Any] | None = None if path_resource_names == ["lbaas", "loadbalancers"]: qp = LOADBALANCER_QUERY_PARAMETERS elif path_resource_names == ["lbaas", "listeners"]: @@ -1161,8 +1162,22 @@ class OctaviaGenerator(OpenStackServerSourceBase): elif path_resource_names == ["lbaas", "providers"]: qp = PROVIDER_QUERY_PARAMETERS - if qp: - query_params_versions.append((qp, None, None)) + elif operation_name == "delete" and ( + path_resource_names == ["lbaas", "loadbalancer"] + or path_resource_names == ["loadbalancer"] + ): + qp = { + "type": "object", + "properties": { + "cascade": { + "type": "boolean", + "description": "If true will delete all child objects of the load balancer.", + } + }, + } + + if qp: + query_params_versions.append((qp, None, None)) return ( query_params_versions,