Add pagination QP to octavia resources

- add limit/marker/page_reverse
- sort QP alphabetically

Change-Id: I9c8c3e73b8b81827fa26b51ae65337ce93ab5840
This commit is contained in:
Artem Goncharov 2024-11-29 18:43:14 +01:00
parent bbd3efe650
commit db142b81c1

@ -90,33 +90,57 @@ STATUSES: dict[str, Any] = {
LOADBALANCER_QUERY_PARAMETERS: dict[str, Any] = {
"type": "object",
"properties": {
"availability_zone": {
"type": "string",
"description": "An availability zone name.",
},
"created_at": {
"type": "string",
"format": "date-time",
"description": "The UTC date and timestamp when the resource was created.",
},
"description": {
"type": "string",
"description": "A human-readable description for the resource.",
},
"name": {
"type": "string",
"description": "Human-readable name of the resource.",
},
"id": {
"type": "string",
"format": "uuid",
"description": "The ID of the resource",
},
"project_id": {
"type": "string",
"format": "uuid",
"description": "The ID of the project owning this resource.",
},
"flavor_id": {
"type": "string",
"format": "uuid",
"description": "The ID of the flavor.",
},
"id": {
"type": "string",
"format": "uuid",
"description": "The ID of the resource",
},
"limit": {"type": "integer", "description": "Page size"},
"marker": {
"type": "string",
"format": "uuid",
"description": "ID of the last item in the previous list",
},
"name": {
"type": "string",
"description": "Human-readable name of the resource.",
},
"page_reverse": {
"type": "boolean",
"description": "The page direction.",
},
"provider": {
"type": "string",
"description": "Provider name for the load balancer.",
},
"project_id": {
"type": "string",
"format": "uuid",
"description": "The ID of the project owning this resource.",
},
"updated_at": {
"type": "string",
"format": "date-time",
"description": "The UTC date and timestamp when the resource was last updated.",
},
"vip_address": {
"type": "string",
"description": "The IP address of the Virtual IP (VIP).",
@ -141,10 +165,6 @@ LOADBALANCER_QUERY_PARAMETERS: dict[str, Any] = {
"format": "uuid",
"description": "The ID of the QoS Policy which will apply to the Virtual IP (VIP).",
},
"availability_zone": {
"type": "string",
"description": "An availability zone name.",
},
**STATUSES,
**TAGS_PARAMETERS,
},
@ -153,31 +173,70 @@ LOADBALANCER_QUERY_PARAMETERS: dict[str, Any] = {
LISTENER_QUERY_PARAMETERS: dict[str, Any] = {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "The ID of the resource",
"admin_state_up": {
"type": "boolean",
"description": "The administrative state of the resource",
},
"description": {
"alpn_protocols": {
"type": "string",
"description": "A human-readable description for the resource.",
},
"name": {
"type": "string",
"description": "Human-readable name of the resource.",
},
"project_id": {
"type": "string",
"description": "The ID of the project owning this resource.",
"description": "A list of ALPN protocols. Available protocols: http/1.0, http/1.1, h2",
},
"connection_limit": {
"type": "string",
"description": "The maximum number of connections permitted for this listener. Default value is -1 which represents infinite connections or a default value defined by the provider driver.",
},
"created_at": {
"type": "string",
"format": "date-time",
"description": "The UTC date and timestamp when the resource was created.",
},
"default_pool_id": {
"type": "string",
"description": "The ID of the pool used by the listener if no L7 policies match.",
},
"description": {
"type": "string",
"description": "A human-readable description for the resource.",
},
"hsts_include_subdomains": {
"type": "boolean",
"description": "Defines whether the includeSubDomains directive should be added to the Strict-Transport-Security HTTP response header.",
},
"hsts_max_age": {
"type": "integer",
"description": "The value of the max_age directive for the Strict-Transport-Security HTTP response header.",
},
"hsts_preload": {
"type": "boolean",
"description": "Defines whether the preload directive should be added to the Strict-Transport-Security HTTP response header.",
},
"id": {
"type": "string",
"format": "uuid",
"description": "The ID of the resource",
},
"limit": {"type": "integer", "description": "Page size"},
"load_balancer_id": {
"type": "string",
"description": "Load balancer ID",
},
"marker": {
"type": "string",
"format": "uuid",
"description": "ID of the last item in the previous list",
},
"name": {
"type": "string",
"description": "Human-readable name of the resource.",
},
"page_reverse": {
"type": "boolean",
"description": "The page direction.",
},
"project_id": {
"type": "string",
"description": "The ID of the project owning this resource.",
},
"protocol": {
"type": "string",
"description": "The protocol for the resource.",
@ -195,20 +254,6 @@ LISTENER_QUERY_PARAMETERS: dict[str, Any] = {
"type": "integer",
"description": "The protocol port number for the resource.",
},
"created_at": {
"type": "string",
"format": "date-time",
"description": "The UTC date and timestamp when the resource was created.",
},
"updated_at": {
"type": "string",
"format": "date-time",
"description": "The UTC date and timestamp when the resource was last updated.",
},
"load_balancer_id": {
"type": "string",
"description": "Load balancer ID",
},
"timeout_client_data": {
"type": "integer",
"description": "Frontend client inactivity timeout in milliseconds.",
@ -233,25 +278,10 @@ LISTENER_QUERY_PARAMETERS: dict[str, Any] = {
"type": "string",
"description": "A list of TLS protocol versions.",
},
"alpn_protocols": {
"updated_at": {
"type": "string",
"description": "A list of ALPN protocols. Available protocols: http/1.0, http/1.1, h2",
},
"hsts_max_age": {
"type": "integer",
"description": "The value of the max_age directive for the Strict-Transport-Security HTTP response header.",
},
"admin_state_up": {
"type": "boolean",
"description": "The administrative state of the resource",
},
"hsts_include_subdomains": {
"type": "boolean",
"description": "Defines whether the includeSubDomains directive should be added to the Strict-Transport-Security HTTP response header.",
},
"hsts_preload": {
"type": "boolean",
"description": "Defines whether the preload directive should be added to the Strict-Transport-Security HTTP response header.",
"format": "date-time",
"description": "The UTC date and timestamp when the resource was last updated.",
},
**STATUSES,
**TAGS_PARAMETERS,
@ -261,42 +291,51 @@ LISTENER_QUERY_PARAMETERS: dict[str, Any] = {
POOL_QUERY_PARAMETERS: dict[str, Any] = {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "The ID of the resource",
},
"description": {
"type": "string",
"description": "A human-readable description for the resource.",
},
"name": {
"type": "string",
"description": "Human-readable name of the resource.",
},
"project_id": {
"type": "string",
"description": "The ID of the project owning this resource.",
},
"admin_state_up": {
"type": "boolean",
"description": "The administrative state of the resource",
},
"alpn_protocols": {
"type": "string",
"description": "A list of ALPN protocols. Available protocols: http/1.0, http/1.1, h2",
},
"created_at": {
"type": "string",
"format": "date-time",
"description": "The UTC date and timestamp when the resource was created.",
},
"updated_at": {
"description": {
"type": "string",
"format": "date-time",
"description": "The UTC date and timestamp when the resource was last updated.",
"description": "A human-readable description for the resource.",
},
"id": {
"type": "string",
"format": "uuid",
"description": "The ID of the resource",
},
"limit": {"type": "integer", "description": "Page size"},
"loadbalancer_id": {
"type": "string",
"format": "uuid",
"description": "The ID of the load balancer for the pool.",
},
"marker": {
"type": "string",
"format": "uuid",
"description": "ID of the last item in the previous list",
},
"name": {
"type": "string",
"description": "Human-readable name of the resource.",
},
"page_reverse": {
"type": "boolean",
"description": "The page direction.",
},
"project_id": {
"type": "string",
"description": "The ID of the project owning this resource.",
},
"tls_enabled": {"type": "boolean"},
"tls_ciphers": {
"type": "string",
@ -306,9 +345,10 @@ POOL_QUERY_PARAMETERS: dict[str, Any] = {
"type": "string",
"description": "A list of TLS protocol versions.",
},
"alpn_protocols": {
"updated_at": {
"type": "string",
"description": "A list of ALPN protocols. Available protocols: http/1.0, http/1.1, h2",
"format": "date-time",
"description": "The UTC date and timestamp when the resource was last updated.",
},
**STATUSES,
**TAGS_PARAMETERS,
@ -318,40 +358,57 @@ POOL_QUERY_PARAMETERS: dict[str, Any] = {
POOL_MEMBER_QUERY_PARAMETERS: dict[str, Any] = {
"type": "object",
"properties": {
"id": {
"address": {
"type": "string",
"format": "uuid",
"description": "The ID of the resource",
},
"description": {
"type": "string",
"description": "A human-readable description for the resource.",
},
"name": {
"type": "string",
"description": "Human-readable name of the resource.",
},
"project_id": {
"type": "string",
"description": "The ID of the project owning this resource.",
"description": "The IP address of the backend member server.",
},
"admin_state_up": {
"type": "boolean",
"description": "The administrative state of the resource",
},
"backup": {
"type": "boolean",
"description": "Is the member a backup?",
},
"created_at": {
"type": "string",
"format": "date-time",
"description": "The UTC date and timestamp when the resource was created.",
},
"updated_at": {
"description": {
"type": "string",
"format": "date-time",
"description": "The UTC date and timestamp when the resource was last updated.",
"description": "A human-readable description for the resource.",
},
"address": {
"id": {
"type": "string",
"description": "The IP address of the backend member server.",
"format": "uuid",
"description": "The ID of the resource",
},
"limit": {"type": "integer", "description": "Page size"},
"marker": {
"type": "string",
"format": "uuid",
"description": "ID of the last item in the previous list",
},
"monitor_address": {
"type": "string",
"description": "An alternate IP address used for health monitoring a backend member.",
},
"monitor_port": {
"type": "string",
"description": "An alternate protocol port used for health monitoring a backend member.",
},
"name": {
"type": "string",
"description": "Human-readable name of the resource.",
},
"page_reverse": {
"type": "boolean",
"description": "The page direction.",
},
"project_id": {
"type": "string",
"description": "The ID of the project owning this resource.",
},
"protocol_port": {
"type": "integer",
@ -362,22 +419,15 @@ POOL_MEMBER_QUERY_PARAMETERS: dict[str, Any] = {
"format": "uuid",
"description": "The subnet ID the member service is accessible from.",
},
"updated_at": {
"type": "string",
"format": "date-time",
"description": "The UTC date and timestamp when the resource was last updated.",
},
"weight": {
"type": "integer",
"description": "The weight of a member determines the portion of requests or connections it services compared to the other members of the pool.",
},
"monitor_address": {
"type": "string",
"description": "An alternate IP address used for health monitoring a backend member.",
},
"monitor_port": {
"type": "string",
"description": "An alternate protocol port used for health monitoring a backend member.",
},
"backup": {
"type": "boolean",
"description": "Is the member a backup?",
},
**STATUSES,
**TAGS_PARAMETERS,
},
@ -386,23 +436,6 @@ POOL_MEMBER_QUERY_PARAMETERS: dict[str, Any] = {
HEALTHMONITOR_QUERY_PARAMETERS: dict[str, Any] = {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "The ID of the resource",
},
"description": {
"type": "string",
"description": "A human-readable description for the resource.",
},
"name": {
"type": "string",
"description": "Human-readable name of the resource.",
},
"project_id": {
"type": "string",
"description": "The ID of the project owning this resource.",
},
"admin_state_up": {
"type": "boolean",
"description": "The administrative state of the resource",
@ -412,15 +445,14 @@ HEALTHMONITOR_QUERY_PARAMETERS: dict[str, Any] = {
"format": "date-time",
"description": "The UTC date and timestamp when the resource was created.",
},
"updated_at": {
"type": "string",
"format": "date-time",
"description": "The UTC date and timestamp when the resource was last updated.",
},
"delay": {
"type": "integer",
"description": "The time, in seconds, between sending probes to members.",
},
"description": {
"type": "string",
"description": "A human-readable description for the resource.",
},
"expected_codes": {
"type": "string",
"description": "The list of HTTP status codes expected in response from the member to declare it healthy.",
@ -440,6 +472,17 @@ HEALTHMONITOR_QUERY_PARAMETERS: dict[str, Any] = {
"TRACE",
],
},
"id": {
"type": "string",
"format": "uuid",
"description": "The ID of the resource",
},
"limit": {"type": "integer", "description": "Page size"},
"marker": {
"type": "string",
"format": "uuid",
"description": "ID of the last item in the previous list",
},
"max_retries": {
"type": "integer",
"description": "The number of successful checks before changing the operating status of the member to ONLINE. A valid value is from 1 to 10.",
@ -448,7 +491,19 @@ HEALTHMONITOR_QUERY_PARAMETERS: dict[str, Any] = {
"type": "integer",
"description": "The number of allowed check failures before changing the operating status of the member to ERROR. A valid value is from 1 to 10.",
},
"name": {
"type": "string",
"description": "Human-readable name of the resource.",
},
"page_reverse": {
"type": "boolean",
"description": "The page direction.",
},
"pool_id": {"type": "string", "description": "The ID of the pool."},
"project_id": {
"type": "string",
"description": "The ID of the project owning this resource.",
},
"timeout": {
"type": "integer",
"description": "The maximum time, in seconds, that a monitor waits to connect before it times out.",
@ -466,6 +521,11 @@ HEALTHMONITOR_QUERY_PARAMETERS: dict[str, Any] = {
"UDP-CONNECT",
],
},
"updated_at": {
"type": "string",
"format": "date-time",
"description": "The UTC date and timestamp when the resource was last updated.",
},
"url_path": {
"type": "string",
"description": "The HTTP URL path of the request sent by the monitor to test the health of a backend member. Must be a string that begins with a forward slash (/).",
@ -478,45 +538,75 @@ HEALTHMONITOR_QUERY_PARAMETERS: dict[str, Any] = {
AMPHORAE_QUERY_PARAMETERS: dict[str, Any] = {
"type": "object",
"properties": {
"id": {"type": "string", "description": ""},
"loadbalancer_id": {"type": "string", "description": ""},
"compute_id": {"type": "string", "description": ""},
"lb_network_ip": {"type": "string", "description": ""},
"vrrp_ip": {"type": "string", "description": ""},
"ha_ip": {"type": "string", "description": ""},
"vrrp_port_id": {"type": "string", "description": ""},
"ha_port_id": {"type": "string", "description": ""},
"cert_expiration": {"type": "string", "description": ""},
"cached_zone": {"type": "string", "description": ""},
"cert_busy": {"type": "string", "description": ""},
"cert_expiration": {"type": "string", "description": ""},
"compute_id": {"type": "string", "description": ""},
"compute_flavor": {"type": "string", "description": ""},
"created_at": {"type": "string", "description": ""},
"ha_ip": {"type": "string", "description": ""},
"ha_port_id": {"type": "string", "description": ""},
"id": {"type": "string", "description": ""},
"image_id": {"type": "string", "description": ""},
"lb_network_ip": {"type": "string", "description": ""},
"limit": {"type": "integer", "description": "Page size"},
"loadbalancer_id": {"type": "string", "description": ""},
"marker": {
"type": "string",
"format": "uuid",
"description": "ID of the last item in the previous list",
},
"page_reverse": {
"type": "boolean",
"description": "The page direction.",
},
"role": {"type": "string", "description": ""},
"status": {"type": "string", "description": ""},
"updated_at": {"type": "string", "description": ""},
"vrrp_ip": {"type": "string", "description": ""},
"vrrp_port_id": {"type": "string", "description": ""},
"vrrp_interface": {"type": "string", "description": ""},
"vrrp_id": {"type": "string", "description": ""},
"vrrp_priority": {"type": "string", "description": ""},
"cached_zone": {"type": "string", "description": ""},
"created_at": {"type": "string", "description": ""},
"updated_at": {"type": "string", "description": ""},
"image_id": {"type": "string", "description": ""},
"compute_flavor": {"type": "string", "description": ""},
},
}
AVAILABILITY_ZONE_PROFILE_QUERY_PARAMETERS: dict[str, Any] = {
"type": "object",
"properties": {
"id": {"type": "string", "description": ""},
"name": {"type": "string", "description": ""},
"provider_name": {"type": "string", "description": ""},
"availability_zone_data": {"type": "string"},
"id": {"type": "string", "description": ""},
"limit": {"type": "integer", "description": "Page size"},
"marker": {
"type": "string",
"format": "uuid",
"description": "ID of the last item in the previous list",
},
"name": {"type": "string", "description": ""},
"page_reverse": {
"type": "boolean",
"description": "The page direction.",
},
"provider_name": {"type": "string", "description": ""},
},
}
AVAILABILITY_ZONE_QUERY_PARAMETERS: dict[str, Any] = {
"type": "object",
"properties": {
"name": {"type": "string", "description": ""},
"description": {"type": "string", "description": ""},
"availability_zone_profile_id": {"type": "string", "description": ""},
"description": {"type": "string", "description": ""},
"limit": {"type": "integer", "description": "Page size"},
"marker": {
"type": "string",
"format": "uuid",
"description": "ID of the last item in the previous list",
},
"name": {"type": "string", "description": ""},
"page_reverse": {
"type": "boolean",
"description": "The page direction.",
},
"status": {"type": "string"},
},
}
@ -524,21 +614,41 @@ AVAILABILITY_ZONE_QUERY_PARAMETERS: dict[str, Any] = {
FLAVOR_PROFILE_QUERY_PARAMETERS: dict[str, Any] = {
"type": "object",
"properties": {
"id": {"type": "string", "description": ""},
"name": {"type": "string", "description": ""},
"provider_name": {"type": "string", "description": ""},
"flavor_data": {"type": "string", "description": ""},
"id": {"type": "string", "description": ""},
"limit": {"type": "integer", "description": "Page size"},
"marker": {
"type": "string",
"format": "uuid",
"description": "ID of the last item in the previous list",
},
"name": {"type": "string", "description": ""},
"page_reverse": {
"type": "boolean",
"description": "The page direction.",
},
"provider_name": {"type": "string", "description": ""},
},
}
FLAVOR_QUERY_PARAMETERS: dict[str, Any] = {
"type": "object",
"properties": {
"id": {"type": "string", "description": ""},
"name": {"type": "string", "description": ""},
"description": {"type": "string", "description": ""},
"flavor_profile_id": {"type": "string"},
"enabled": {"type": "boolean", "description": ""},
"flavor_profile_id": {"type": "string"},
"id": {"type": "string", "description": ""},
"limit": {"type": "integer", "description": "Page size"},
"marker": {
"type": "string",
"format": "uuid",
"description": "ID of the last item in the previous list",
},
"name": {"type": "string", "description": ""},
"page_reverse": {
"type": "boolean",
"description": "The page direction.",
},
},
}
@ -546,34 +656,54 @@ L7POLICY_QUERY_PARAMETERS: dict[str, Any] = {
"type": "object",
"properties": {
"action": {"type": "string", "description": ""},
"description": {"type": "string", "description": ""},
"listener_id": {"type": "string", "description": ""},
"name": {"type": "string", "description": ""},
"position": {"type": "string", "description": ""},
"redirect_pool_id": {"type": "string", "description": ""},
"redirect_url": {"type": "string", "description": ""},
"provisioning_status": {"type": "string", "description": ""},
"operating_status": {"type": "string", "description": ""},
"redirect_prefix": {"type": "string", "description": ""},
"project_id": {"type": "string", "description": ""},
"admin_state_up": {"type": "boolean", "description": ""},
"description": {"type": "string", "description": ""},
"limit": {"type": "integer", "description": "Page size"},
"listener_id": {"type": "string", "description": ""},
"marker": {
"type": "string",
"format": "uuid",
"description": "ID of the last item in the previous list",
},
"name": {"type": "string", "description": ""},
"operating_status": {"type": "string", "description": ""},
"page_reverse": {
"type": "boolean",
"description": "The page direction.",
},
"position": {"type": "string", "description": ""},
"project_id": {"type": "string", "description": ""},
"provisioning_status": {"type": "string", "description": ""},
"redirect_pool_id": {"type": "string", "description": ""},
"redirect_prefix": {"type": "string", "description": ""},
"redirect_url": {"type": "string", "description": ""},
},
}
L7RULE_QUERY_PARAMETERS: dict[str, Any] = {
"type": "object",
"properties": {
"admin_state_up": {"type": "boolean", "description": ""},
"compare_type": {"type": "string", "description": ""},
"created_at": {"type": "string", "description": ""},
"invert": {"type": "string", "description": ""},
"key": {"type": "string", "description": ""},
"limit": {"type": "integer", "description": "Page size"},
"marker": {
"type": "string",
"format": "uuid",
"description": "ID of the last item in the previous list",
},
"operating_status": {"type": "string", "description": ""},
"page_reverse": {
"type": "boolean",
"description": "The page direction.",
},
"project_id": {"type": "string", "description": ""},
"provisioning_status": {"type": "string", "description": ""},
"rule_value": {"type": "string", "description": ""},
"type": {"type": "string", "description": ""},
"updated_at": {"type": "string", "description": ""},
"rule_value": {"type": "string", "description": ""},
"operating_status": {"type": "string", "description": ""},
"admin_state_up": {"type": "boolean", "description": ""},
},
}
@ -581,7 +711,17 @@ PROVIDER_QUERY_PARAMETERS: dict[str, Any] = {
"type": "object",
"properties": {
"description": {"type": "string", "description": ""},
"limit": {"type": "integer", "description": "Page size"},
"marker": {
"type": "string",
"format": "uuid",
"description": "ID of the last item in the previous list",
},
"name": {"type": "string", "description": ""},
"page_reverse": {
"type": "boolean",
"description": "The page direction.",
},
},
}