chore: Add description for api params

Add description for api params.

Change-Id: I2f245f52a610dfeb20e8973bcf2b3dec7e000fb8
This commit is contained in:
Boxiang Zhu 2022-08-25 17:41:06 +08:00
parent f3dacbcea7
commit 3ccfeefb6c
5 changed files with 282 additions and 245 deletions

View File

@ -15,7 +15,7 @@
from __future__ import annotations
import asyncio
from typing import Any, List
from typing import List
from fastapi import APIRouter, Header, HTTPException, status
@ -41,7 +41,6 @@ router = APIRouter()
response_description="OK",
)
async def list_keystone_endpoints() -> List[schemas.KeystoneEndpoints]:
"""Contrib List Keystone Endpoints."""
try:
regions = await system.get_regions()
tasks = [asyncio.create_task(get_endpoints(region)) for region in regions]
@ -75,9 +74,7 @@ async def list_domains(
alias=constants.INBOUND_HEADER,
regex=constants.INBOUND_HEADER_REGEX,
),
) -> Any:
"""Contrib List Domain Names."""
) -> List[str]:
try:
regions = await system.get_regions()
except Exception as e:
@ -107,8 +104,7 @@ async def list_domains(
status_code=status.HTTP_200_OK,
response_description="OK",
)
async def list_regions() -> Any:
"""Contrib List Regions."""
async def list_regions() -> List[str]:
try:
return await system.get_regions()
except Exception as e:

View File

@ -46,13 +46,7 @@ STEP = constants.ID_UUID_RANGE_STEP
@router.get(
"/extension/servers",
description="""
List Servers.
*Notes*:
- The `host` of **sort_keys** is only used for admin/system_admin role users.
- The `name` is to support for fuzzy queries.
""",
description="List Servers",
responses={
200: {"model": schemas.ServersResponse},
400: {"model": schemas.BadRequestMessage},
@ -71,64 +65,57 @@ async def list_servers(
alias=constants.INBOUND_HEADER,
regex=constants.INBOUND_HEADER_REGEX,
),
limit: int = Query(None, gt=constants.EXTENSION_API_LIMIT_GT),
marker: str = Query(None),
sort_dirs: schemas.SortDir = Query(None),
sort_keys: List[schemas.ServerSortKey] = Query(None),
all_projects: bool = Query(None),
limit: int = Query(
None,
description=(
"Requests a page size of items. Returns a number of items up to a limit value."
),
gt=constants.EXTENSION_API_LIMIT_GT,
),
marker: str = Query(None, description="The ID of the last-seen item."),
sort_dirs: schemas.SortDir = Query(
None, description="Indicates in which directions to sort."
),
sort_keys: List[schemas.ServerSortKey] = Query(
None,
description=(
"Indicates in which attributes to sort. Host is only used for admin role users"
),
),
all_projects: bool = Query(None, description="List servers for all projects."),
project_id: str = Query(
None,
description="Only works when the all_projects filter is also specified.",
description=(
"Filter the list of servers by the given project ID. "
"Only works when the all_projects filter is also specified."
),
),
project_name: str = Query(
None,
description="Only works when the all_projects filter is also specified.",
description=(
"Filter the list of servers by the given project name. "
"Only works when the all_projects filter is also specified."
),
),
name: str = Query(None),
status: schemas.ServerStatus = Query(None),
host: str = Query(None, description="It will be ignored for non-admin user."),
flavor_id: str = Query(None),
uuid: str = Query(None, description="UUID of server."),
name: str = Query(
None,
description=("Filter the list of servers by the given server name. Support fuzzy query."),
),
status: schemas.ServerStatus = Query(
None, description="Filter the list of servers by the given server status."
),
host: str = Query(
None,
description=(
"Filter the list of servers by the given host. "
"It will be ignored for non-admin user."
),
),
flavor_id: str = Query(
None, description="Filter the list of servers by the given flavor ID."
),
uuid: str = Query(None, description="Filter the list of servers by the given server UUID."),
) -> schemas.ServersResponse:
"""Extension List Servers.
:param profile: Profile object include token, role and so on,
defaults to Depends(deps.get_profile_update_jwt)
:type profile: schemas.Profile, optional
:param limit: Limit count to fetch,
defaults to Query(None, gt=constants.EXTENSION_API_LIMIT_GT)
:type limit: int, optional
:param marker: Marker object to fetch, defaults to None
:type marker: str, optional
:param sort_dirs: Sort order, defaults to None
:type sort_dirs: schemas.SortDir, optional
:param sort_keys: Sort keys, defaults to Query(None)
:type sort_keys: List[schemas.ServerSortKey], optional
:param all_projects: All projects to fetch, defaults to None
:type all_projects: bool, optional
:param project_id: Filter by id of project which server belongs to,
defaults to Query(None, description="
Only works when the all_projects filter is also specified.")
:type project_id: str, optional
:param project_name: Filter by name of project which server belongs to,
defaults to Query(None, description="
Only works when the all_projects filter is also specified.")
:type project_name: str, optional
:param name: Filter by server name, defaults to None
:type name: str, optional
:param status: Filter by server status, defaults to None
:type status: schemas.ServerStatus, optional
:param host: Filter by host which server is located at,
defaults to Query(None, description="It will be ignored for non-admin user.")
:type host: str, optional
:param flavor_id: Filter by id of flavor which server is created by, defaults to None
:type flavor_id: str, optional
:param uuid: Filter by uuid, defaults to Query(None, description="UUID of server.")
:type uuid: str, optional
:raises HTTPException: HTTP Exception
:return: Server List
:rtype: schemas.ServersResponse
"""
if all_projects:
assert_system_admin_or_reader(
profile=profile,
@ -281,13 +268,7 @@ async def list_servers(
@router.get(
"/extension/recycle_servers",
description="""
List Recycle Servers.
*Notes*:
- The `updated_at` of **sort_keys** is used as `deleted_at`.
- The `name` is to support for fuzzy queries.
""",
description="List Recycle Servers",
responses={
200: {"model": schemas.RecycleServersResponse},
400: {"model": schemas.BadRequestMessage},
@ -306,56 +287,46 @@ async def list_recycle_servers(
alias=constants.INBOUND_HEADER,
regex=constants.INBOUND_HEADER_REGEX,
),
limit: int = Query(None, gt=constants.EXTENSION_API_LIMIT_GT),
marker: str = Query(None),
sort_dirs: schemas.SortDir = Query(None),
sort_keys: List[schemas.RecycleServerSortKey] = Query(None),
all_projects: bool = Query(None),
limit: int = Query(
None,
description=(
"Requests a page size of items. Returns a number of items up to a limit value."
),
gt=constants.EXTENSION_API_LIMIT_GT,
),
marker: str = Query(None, description="The ID of the last-seen item."),
sort_dirs: schemas.SortDir = Query(
None, description="Indicates in which directions to sort."
),
sort_keys: List[schemas.RecycleServerSortKey] = Query(
None,
description=("Indicates in which attributes to sort. Updated_at is used as deleted_at"),
),
all_projects: bool = Query(None, description="List recycle servers for all projects."),
project_id: str = Query(
None,
description="Only works when the all_projects filter is also specified.",
description=(
"Filter the list of recycle servers by the given project ID. "
"Only works when the all_projects filter is also specified."
),
),
project_name: str = Query(
None,
description="Only works when the all_projects filter is also specified.",
description=(
"Filter the list of recycle servers by the given project name. "
"Only works when the all_projects filter is also specified."
),
),
name: str = Query(
None,
description=(
"Filter the list of recycle servers by the given server name. Support fuzzy query."
),
),
uuid: str = Query(
None, description="Filter the list of recycle servers by the given recycle server UUID."
),
name: str = Query(None),
uuid: str = Query(None, description="UUID of recycle server."),
) -> schemas.RecycleServersResponse:
"""Extension List Recycle Servers.
:param profile: Profile object include token, role and so on,
defaults to Depends(deps.get_profile_update_jwt)
:type profile: schemas.Profile, optional
:param limit: Limit count to fetch,
defaults to Query(None, gt=constants.EXTENSION_API_LIMIT_GT)
:type limit: int, optional
:param marker: Marker object to fetch, defaults to None
:type marker: str, optional
:param sort_dirs: Sort order, defaults to None
:type sort_dirs: schemas.SortDir, optional
:param sort_keys: Sort keys, defaults to Query(None)
:type sort_keys: List[schemas.RecycleServerSortKey], optional
:param all_projects: All projects to fetch, defaults to None
:type all_projects: bool, optional
:param project_id: Filter by id of project which recycle server belongs to,
defaults to Query(None, description="
Only works when the all_projects filter is also specified.")
:type project_id: str, optional
:param project_name: Filter by name of project which server belongs to,
defaults to Query(None, description="
Only works when the all_projects filter is also specified.")
:type project_name: str, optional
:param name: Filter by recycle server name, defaults to None
:type name: str, optional
:param uuid: Filter by uuid,
defaults to Query(None, description="UUID of recycle server.")
:type uuid: str, optional
:raises HTTPException: HTTP Exception
:return: Recycle server list
:rtype: schemas.RecycleServersResponse
"""
if all_projects:
assert_system_admin_or_reader(
profile=profile,
@ -514,7 +485,7 @@ async def list_recycle_servers(
@router.get(
"/extension/volumes",
description="List Volumes.",
description="List Volumes",
responses={
200: {"model": schemas.VolumesResponse},
401: {"model": schemas.UnauthorizedMessage},
@ -532,52 +503,46 @@ async def list_volumes(
alias=constants.INBOUND_HEADER,
regex=constants.INBOUND_HEADER_REGEX,
),
limit: int = Query(None, gt=constants.EXTENSION_API_LIMIT_GT),
marker: str = Query(None),
sort_dirs: schemas.SortDir = Query(None),
sort_keys: List[schemas.VolumeSortKey] = Query(None),
all_projects: bool = Query(None),
project_id: str = Query(None),
name: str = Query(None),
multiattach: bool = Query(None),
status: schemas.VolumeStatus = Query(None),
bootable: bool = Query(None),
uuid: List[str] = Query(None, description="UUID of volume."),
limit: int = Query(
None,
description=(
"Requests a page size of items. Returns a number of items up to a limit value."
),
gt=constants.EXTENSION_API_LIMIT_GT,
),
marker: str = Query(None, description="The ID of the last-seen item."),
sort_dirs: schemas.SortDir = Query(
None, description="Indicates in which directions to sort."
),
sort_keys: List[schemas.VolumeSortKey] = Query(
None,
description=("Indicates in which attributes to sort. Updated_at is used as deleted_at"),
),
all_projects: bool = Query(None, description="List volumes for all projects."),
project_id: str = Query(
None,
description="Filter the list of volumes by the given project ID.",
),
name: str = Query(
None,
description="Filter the list of volumes by the given server name.",
),
multiattach: bool = Query(
None,
description="Filter the list of volumes by the given multiattach.",
),
status: schemas.VolumeStatus = Query(
None,
description="Filter the list of volumes by the given status.",
),
bootable: bool = Query(
None,
description="Filter the list of volumes by the given bootable.",
),
uuid: List[str] = Query(
None, description="Filter the list of volumes by the given volumes UUID."
),
) -> schemas.VolumesResponse:
"""Extension List Volumes.
:param profile: Profile object include token, role and so on,
defaults to Depends(deps.get_profile_update_jwt)
:type profile: schemas.Profile, optional
:param limit: Limit count to fetch,
defaults to Query(None, gt=constants.EXTENSION_API_LIMIT_GT)
:type limit: int, optional
:param marker: Marker object to fetch, defaults to None
:type marker: str, optional
:param sort_dirs: Sort order, defaults to None
:type sort_dirs: schemas.SortDir, optional
:param sort_keys: Sort keys, defaults to Query(None)
:type sort_keys: List[schemas.VolumeSortKey], optional
:param all_projects: All projects to fetch, defaults to None
:type all_projects: bool, optional
:param project_id: Filter by id of project which volume belongs to,
defaults to None
:type project_id: str, optional
:param name: Filter by volume name, defaults to None
:type name: str, optional
:param multiattach: Filter by multiattach that server is support multiattach or not,
defaults to None
:type multiattach: bool, optional
:param status: Filter by volume status, defaults to None
:type status: schemas.VolumeStatus, optional
:type bootable: Filter by bootable that server be used to create an instance quickly.
:type bootable: bool, optional
:param uuid: Filter by list uuid,
defaults to Query(None, description="UUID of volume.")
:type uuid: List[str], optional
:return: Volume list
:rtype: schemas.VolumesResponse
"""
if all_projects:
assert_system_admin_or_reader(
profile=profile,
@ -1075,7 +1040,7 @@ async def list_ports(
@router.get(
"/extension/compute-services",
description="List compute services.",
description="List compute services",
responses={
200: {"model": schemas.ComputeServicesResponse},
401: {"model": schemas.UnauthorizedMessage},
@ -1093,21 +1058,11 @@ async def compute_services(
alias=constants.INBOUND_HEADER,
regex=constants.INBOUND_HEADER_REGEX,
),
binary: str = Query(None),
host: str = Query(None),
binary: str = Query(
None, description="Filter the list of compute services by the given binary."
),
host: str = Query(None, description="Filter the list of compute services by the given host."),
) -> schemas.ComputeServicesResponse:
"""Extension List Compute Services.
:param profile: Profile object include token, role and so on,
defaults to Depends(deps.get_profile_update_jwt)
:type profile: schemas.Profile, optional
:param binary: Filter by service binary name, defaults to None
:type binary: str, optional
:param host: Filter by host name, defaults to None
:type host: str, optional
:return: Compute service list
:rtype: schemas.ComputeServicesResponse
"""
assert_system_admin_or_reader(
profile=profile,
exception="Not allowed to get compute services.",

View File

@ -143,7 +143,7 @@ async def login(
alias=constants.INBOUND_HEADER,
regex=constants.INBOUND_HEADER_REGEX,
),
):
) -> schemas.Profile:
try:
project_scope, unscope_token = await _get_projects_and_unscope_token(
region=credential.region,
@ -184,9 +184,7 @@ async def login(
status_code=status.HTTP_200_OK,
response_description="OK",
)
async def get_sso(
request: Request,
) -> schemas.SSO:
async def get_sso(request: Request) -> schemas.SSO:
sso = {
"enable_sso": False,
"protocols": [],
@ -286,7 +284,7 @@ async def get_profile(
alias=constants.INBOUND_HEADER,
regex=constants.INBOUND_HEADER_REGEX,
),
):
) -> schemas.Profile:
return await _patch_profile(profile, x_openstack_request_id)
@ -309,7 +307,7 @@ async def logout(
alias=constants.INBOUND_HEADER,
regex=constants.INBOUND_HEADER_REGEX,
),
):
) -> schemas.Message:
if payload:
try:
token = parse_access_token(payload)
@ -343,7 +341,7 @@ async def switch_project(
alias=constants.INBOUND_HEADER,
regex=constants.INBOUND_HEADER_REGEX,
),
):
) -> schemas.Profile:
try:
project_scope_token = await get_project_scope_token(
keystone_token=profile.keystone_token,

View File

@ -107,9 +107,9 @@ def get_prometheus_query_range_response(
response_model_exclude_none=True,
)
async def prometheus_query(
query: str = Query(None),
time: str = Query(None),
timeout: str = Query(None),
query: str = Query(None, description="The query expression of prometheus to filter."),
time: str = Query(None, description="The time to filter."),
timeout: str = Query(None, description="The timeout to filter."),
profile: schemas.Profile = Depends(deps.get_profile_update_jwt),
) -> schemas.PrometheusQueryResponse:
kwargs = {}
@ -152,11 +152,11 @@ async def prometheus_query(
response_model_exclude_none=True,
)
async def prometheus_query_range(
query: str = Query(None),
start: str = Query(None),
end: str = Query(None),
step: str = Query(None),
timeout: str = Query(None),
query: str = Query(None, description="The query expression of prometheus to filter."),
start: str = Query(None, description="The start time to filter."),
end: str = Query(None, description="The end time to filter."),
step: str = Query(None, description="The step to filter."),
timeout: str = Query(None, description="The timeout to filter."),
profile: schemas.Profile = Depends(deps.get_profile_update_jwt),
) -> schemas.PrometheusQueryRangeResponse:
kwargs = {}

View File

@ -320,122 +320,146 @@
"Extension"
],
"summary": "List Servers",
"description": "\nList Servers.\n\n*Notes*:\n- The `host` of **sort_keys** is only used for admin/system_admin role users.\n- The `name` is to support for fuzzy queries.\n",
"description": "List Servers",
"operationId": "list_servers_api_v1_extension_servers_get",
"parameters": [
{
"description": "Requests a page size of items. Returns a number of items up to a limit value.",
"required": false,
"schema": {
"title": "Limit",
"exclusiveMinimum": 0.0,
"type": "integer"
"type": "integer",
"description": "Requests a page size of items. Returns a number of items up to a limit value."
},
"name": "limit",
"in": "query"
},
{
"description": "The ID of the last-seen item.",
"required": false,
"schema": {
"title": "Marker",
"type": "string"
"type": "string",
"description": "The ID of the last-seen item."
},
"name": "marker",
"in": "query"
},
{
"description": "Indicates in which directions to sort.",
"required": false,
"schema": {
"$ref": "#/components/schemas/SortDir"
"allOf": [
{
"$ref": "#/components/schemas/SortDir"
}
],
"description": "Indicates in which directions to sort."
},
"name": "sort_dirs",
"in": "query"
},
{
"description": "Indicates in which attributes to sort. Host is only used for admin role users",
"required": false,
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ServerSortKey"
}
},
"description": "Indicates in which attributes to sort. Host is only used for admin role users"
},
"name": "sort_keys",
"in": "query"
},
{
"description": "List servers for all projects.",
"required": false,
"schema": {
"title": "All Projects",
"type": "boolean"
"type": "boolean",
"description": "List servers for all projects."
},
"name": "all_projects",
"in": "query"
},
{
"description": "Only works when the all_projects filter is also specified.",
"description": "Filter the list of servers by the given project ID. Only works when the all_projects filter is also specified.",
"required": false,
"schema": {
"title": "Project Id",
"type": "string",
"description": "Only works when the all_projects filter is also specified."
"description": "Filter the list of servers by the given project ID. Only works when the all_projects filter is also specified."
},
"name": "project_id",
"in": "query"
},
{
"description": "Only works when the all_projects filter is also specified.",
"description": "Filter the list of servers by the given project name. Only works when the all_projects filter is also specified.",
"required": false,
"schema": {
"title": "Project Name",
"type": "string",
"description": "Only works when the all_projects filter is also specified."
"description": "Filter the list of servers by the given project name. Only works when the all_projects filter is also specified."
},
"name": "project_name",
"in": "query"
},
{
"description": "Filter the list of servers by the given server name. Support fuzzy query.",
"required": false,
"schema": {
"title": "Name",
"type": "string"
"type": "string",
"description": "Filter the list of servers by the given server name. Support fuzzy query."
},
"name": "name",
"in": "query"
},
{
"description": "Filter the list of servers by the given server status.",
"required": false,
"schema": {
"$ref": "#/components/schemas/ServerStatus"
"allOf": [
{
"$ref": "#/components/schemas/ServerStatus"
}
],
"description": "Filter the list of servers by the given server status."
},
"name": "status",
"in": "query"
},
{
"description": "It will be ignored for non-admin user.",
"description": "Filter the list of servers by the given host. It will be ignored for non-admin user.",
"required": false,
"schema": {
"title": "Host",
"type": "string",
"description": "It will be ignored for non-admin user."
"description": "Filter the list of servers by the given host. It will be ignored for non-admin user."
},
"name": "host",
"in": "query"
},
{
"description": "Filter the list of servers by the given flavor ID.",
"required": false,
"schema": {
"title": "Flavor Id",
"type": "string"
"type": "string",
"description": "Filter the list of servers by the given flavor ID."
},
"name": "flavor_id",
"in": "query"
},
{
"description": "UUID of server.",
"description": "Filter the list of servers by the given server UUID.",
"required": false,
"schema": {
"title": "Uuid",
"type": "string",
"description": "UUID of server."
"description": "Filter the list of servers by the given server UUID."
},
"name": "uuid",
"in": "query"
@ -522,94 +546,110 @@
"Extension"
],
"summary": "List Recycle Servers",
"description": "\nList Recycle Servers.\n\n*Notes*:\n- The `updated_at` of **sort_keys** is used as `deleted_at`.\n- The `name` is to support for fuzzy queries.\n",
"description": "List Recycle Servers",
"operationId": "list_recycle_servers_api_v1_extension_recycle_servers_get",
"parameters": [
{
"description": "Requests a page size of items. Returns a number of items up to a limit value.",
"required": false,
"schema": {
"title": "Limit",
"exclusiveMinimum": 0.0,
"type": "integer"
"type": "integer",
"description": "Requests a page size of items. Returns a number of items up to a limit value."
},
"name": "limit",
"in": "query"
},
{
"description": "The ID of the last-seen item.",
"required": false,
"schema": {
"title": "Marker",
"type": "string"
"type": "string",
"description": "The ID of the last-seen item."
},
"name": "marker",
"in": "query"
},
{
"description": "Indicates in which directions to sort.",
"required": false,
"schema": {
"$ref": "#/components/schemas/SortDir"
"allOf": [
{
"$ref": "#/components/schemas/SortDir"
}
],
"description": "Indicates in which directions to sort."
},
"name": "sort_dirs",
"in": "query"
},
{
"description": "Indicates in which attributes to sort. Updated_at is used as deleted_at",
"required": false,
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/RecycleServerSortKey"
}
},
"description": "Indicates in which attributes to sort. Updated_at is used as deleted_at"
},
"name": "sort_keys",
"in": "query"
},
{
"description": "List recycle servers for all projects.",
"required": false,
"schema": {
"title": "All Projects",
"type": "boolean"
"type": "boolean",
"description": "List recycle servers for all projects."
},
"name": "all_projects",
"in": "query"
},
{
"description": "Only works when the all_projects filter is also specified.",
"description": "Filter the list of recycle servers by the given project ID. Only works when the all_projects filter is also specified.",
"required": false,
"schema": {
"title": "Project Id",
"type": "string",
"description": "Only works when the all_projects filter is also specified."
"description": "Filter the list of recycle servers by the given project ID. Only works when the all_projects filter is also specified."
},
"name": "project_id",
"in": "query"
},
{
"description": "Only works when the all_projects filter is also specified.",
"description": "Filter the list of recycle servers by the given project name. Only works when the all_projects filter is also specified.",
"required": false,
"schema": {
"title": "Project Name",
"type": "string",
"description": "Only works when the all_projects filter is also specified."
"description": "Filter the list of recycle servers by the given project name. Only works when the all_projects filter is also specified."
},
"name": "project_name",
"in": "query"
},
{
"description": "Filter the list of recycle servers by the given server name. Support fuzzy query.",
"required": false,
"schema": {
"title": "Name",
"type": "string"
"type": "string",
"description": "Filter the list of recycle servers by the given server name. Support fuzzy query."
},
"name": "name",
"in": "query"
},
{
"description": "UUID of recycle server.",
"description": "Filter the list of recycle servers by the given recycle server UUID.",
"required": false,
"schema": {
"title": "Uuid",
"type": "string",
"description": "UUID of recycle server."
"description": "Filter the list of recycle servers by the given recycle server UUID."
},
"name": "uuid",
"in": "query"
@ -696,102 +736,130 @@
"Extension"
],
"summary": "List Volumes",
"description": "List Volumes.",
"description": "List Volumes",
"operationId": "list_volumes_api_v1_extension_volumes_get",
"parameters": [
{
"description": "Requests a page size of items. Returns a number of items up to a limit value.",
"required": false,
"schema": {
"title": "Limit",
"exclusiveMinimum": 0.0,
"type": "integer"
"type": "integer",
"description": "Requests a page size of items. Returns a number of items up to a limit value."
},
"name": "limit",
"in": "query"
},
{
"description": "The ID of the last-seen item.",
"required": false,
"schema": {
"title": "Marker",
"type": "string"
"type": "string",
"description": "The ID of the last-seen item."
},
"name": "marker",
"in": "query"
},
{
"description": "Indicates in which directions to sort.",
"required": false,
"schema": {
"$ref": "#/components/schemas/SortDir"
"allOf": [
{
"$ref": "#/components/schemas/SortDir"
}
],
"description": "Indicates in which directions to sort."
},
"name": "sort_dirs",
"in": "query"
},
{
"description": "Indicates in which attributes to sort. Updated_at is used as deleted_at",
"required": false,
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/VolumeSortKey"
}
},
"description": "Indicates in which attributes to sort. Updated_at is used as deleted_at"
},
"name": "sort_keys",
"in": "query"
},
{
"description": "List volumes for all projects.",
"required": false,
"schema": {
"title": "All Projects",
"type": "boolean"
"type": "boolean",
"description": "List volumes for all projects."
},
"name": "all_projects",
"in": "query"
},
{
"description": "Filter the list of volumes by the given project ID.",
"required": false,
"schema": {
"title": "Project Id",
"type": "string"
"type": "string",
"description": "Filter the list of volumes by the given project ID."
},
"name": "project_id",
"in": "query"
},
{
"description": "Filter the list of volumes by the given server name.",
"required": false,
"schema": {
"title": "Name",
"type": "string"
"type": "string",
"description": "Filter the list of volumes by the given server name."
},
"name": "name",
"in": "query"
},
{
"description": "Filter the list of volumes by the given multiattach.",
"required": false,
"schema": {
"title": "Multiattach",
"type": "boolean"
"type": "boolean",
"description": "Filter the list of volumes by the given multiattach."
},
"name": "multiattach",
"in": "query"
},
{
"description": "Filter the list of volumes by the given status.",
"required": false,
"schema": {
"$ref": "#/components/schemas/VolumeStatus"
"allOf": [
{
"$ref": "#/components/schemas/VolumeStatus"
}
],
"description": "Filter the list of volumes by the given status."
},
"name": "status",
"in": "query"
},
{
"description": "Filter the list of volumes by the given bootable.",
"required": false,
"schema": {
"title": "Bootable",
"type": "boolean"
"type": "boolean",
"description": "Filter the list of volumes by the given bootable."
},
"name": "bootable",
"in": "query"
},
{
"description": "UUID of volume.",
"description": "Filter the list of volumes by the given volumes UUID.",
"required": false,
"schema": {
"title": "Uuid",
@ -799,7 +867,7 @@
"items": {
"type": "string"
},
"description": "UUID of volume."
"description": "Filter the list of volumes by the given volumes UUID."
},
"name": "uuid",
"in": "query"
@ -1302,23 +1370,27 @@
"Extension"
],
"summary": "Compute Services",
"description": "List compute services.",
"description": "List compute services",
"operationId": "compute_services_api_v1_extension_compute_services_get",
"parameters": [
{
"description": "Filter the list of compute services by the given binary.",
"required": false,
"schema": {
"title": "Binary",
"type": "string"
"type": "string",
"description": "Filter the list of compute services by the given binary."
},
"name": "binary",
"in": "query"
},
{
"description": "Filter the list of compute services by the given host.",
"required": false,
"schema": {
"title": "Host",
"type": "string"
"type": "string",
"description": "Filter the list of compute services by the given host."
},
"name": "host",
"in": "query"
@ -1389,28 +1461,34 @@
"operationId": "prometheus_query_api_v1_query_get",
"parameters": [
{
"description": "The query expression of prometheus to filter.",
"required": false,
"schema": {
"title": "Query",
"type": "string"
"type": "string",
"description": "The query expression of prometheus to filter."
},
"name": "query",
"in": "query"
},
{
"description": "The time to filter.",
"required": false,
"schema": {
"title": "Time",
"type": "string"
"type": "string",
"description": "The time to filter."
},
"name": "time",
"in": "query"
},
{
"description": "The timeout to filter.",
"required": false,
"schema": {
"title": "Timeout",
"type": "string"
"type": "string",
"description": "The timeout to filter."
},
"name": "timeout",
"in": "query"
@ -1470,46 +1548,56 @@
"operationId": "prometheus_query_range_api_v1_query_range_get",
"parameters": [
{
"description": "The query expression of prometheus to filter.",
"required": false,
"schema": {
"title": "Query",
"type": "string"
"type": "string",
"description": "The query expression of prometheus to filter."
},
"name": "query",
"in": "query"
},
{
"description": "The start time to filter.",
"required": false,
"schema": {
"title": "Start",
"type": "string"
"type": "string",
"description": "The start time to filter."
},
"name": "start",
"in": "query"
},
{
"description": "The end time to filter.",
"required": false,
"schema": {
"title": "End",
"type": "string"
"type": "string",
"description": "The end time to filter."
},
"name": "end",
"in": "query"
},
{
"description": "The step to filter.",
"required": false,
"schema": {
"title": "Step",
"type": "string"
"type": "string",
"description": "The step to filter."
},
"name": "step",
"in": "query"
},
{
"description": "The timeout to filter.",
"required": false,
"schema": {
"title": "Timeout",
"type": "string"
"type": "string",
"description": "The timeout to filter."
},
"name": "timeout",
"in": "query"