Add cascade QP for delete octavia loadbalancer
Change-Id: I8f394639f3272d4385618dda6731880e02e85a4e
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user