diff --git a/api-ref/source/v2/availability-zones-v2.inc b/api-ref/source/v2/availability-zones-v2.inc new file mode 100644 index 00000000000..827bf126c70 --- /dev/null +++ b/api-ref/source/v2/availability-zones-v2.inc @@ -0,0 +1,45 @@ +.. -*- rst -*- + +Availability zones (os-availability-zone) +========================================= + +List availability zone information. + + +Get Availability Zone Information +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. rest_method:: GET /v2/{project_id}/os-availability-zone + +List availability zone information. + +Response codes +-------------- + +.. rest_status_code:: success ../status.yaml + + - 200 + +Request +------- + +.. rest_parameters:: parameters.yaml + + - project_id: project_id_path + +Response Parameter +------------------ + +.. rest_parameters:: parameters.yaml + + - project_id: project_id + - availabilityZoneInfo: availability_zone_info + - zoneName: availability_zone_3 + - zoneState: availability_zone_state + - available: available + +Response Example +---------------- + +.. literalinclude:: ./samples/availability-zone-list-response.json + :language: javascript diff --git a/api-ref/source/v2/index.rst b/api-ref/source/v2/index.rst index ff8ab1d26a2..b524e6fdb44 100644 --- a/api-ref/source/v2/index.rst +++ b/api-ref/source/v2/index.rst @@ -22,6 +22,7 @@ Block Storage API V2 (REMOVED) .. rest_expand_all:: .. include:: api-versions.inc +.. include:: availability-zones-v2.inc .. include:: ext-backups.inc .. include:: ext-backups-actions-v2.inc .. include:: capabilities-v2.inc diff --git a/api-ref/source/v2/parameters.yaml b/api-ref/source/v2/parameters.yaml index be357736f51..bddd6889150 100644 --- a/api-ref/source/v2/parameters.yaml +++ b/api-ref/source/v2/parameters.yaml @@ -287,6 +287,24 @@ availability_zone_3: in: body required: true type: string +availability_zone_info: + description: | + The list of availability zone information. + in: body + required: true + type: array +availability_zone_state: + description: | + The current state of the availability zone. + in: body + required: true + type: object +available: + description: | + Whether the availability zone is available for use. + in: body + required: true + type: boolean backup: description: | A ``backup`` object. diff --git a/api-ref/source/v2/samples/availability-zone-list-response.json b/api-ref/source/v2/samples/availability-zone-list-response.json new file mode 100644 index 00000000000..273fd0f1f42 --- /dev/null +++ b/api-ref/source/v2/samples/availability-zone-list-response.json @@ -0,0 +1,8 @@ +{ + "availabilityZoneInfo": [{ + "zoneState": { + "available": true + }, + "zoneName": "nova" + }] +} \ No newline at end of file diff --git a/api-ref/source/v3/availability-zones-v3.inc b/api-ref/source/v3/availability-zones-v3.inc new file mode 100644 index 00000000000..1740d6fc9cc --- /dev/null +++ b/api-ref/source/v3/availability-zones-v3.inc @@ -0,0 +1,45 @@ +.. -*- rst -*- + +Availability zones (os-availability-zone) +========================================= + +List availability zone information. + + +List Availability Zone Information +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. rest_method:: GET /v3/{project_id}/os-availability-zone + +List availability zone information. + +Response codes +-------------- + +.. rest_status_code:: success ../status.yaml + + - 200 + +Request +------- + +.. rest_parameters:: parameters.yaml + + - project_id: project_id_path + +Response Parameter +------------------ + +.. rest_parameters:: parameters.yaml + + - project_id: project_id + - availabilityZoneInfo: availability_zone_info + - zoneName: availability_zone_required + - zoneState: availability_zone_state + - available: available + +Response Example +---------------- + +.. literalinclude:: ./samples/availability-zone-list-response.json + :language: javascript diff --git a/api-ref/source/v3/index.rst b/api-ref/source/v3/index.rst index 780afad2042..3c65a66d923 100644 --- a/api-ref/source/v3/index.rst +++ b/api-ref/source/v3/index.rst @@ -52,6 +52,7 @@ Block Storage API V3 (CURRENT) .. Now the other random things in alphabetical order. .. include:: attachments.inc +.. include:: availability-zones-v3.inc .. include:: os-vol-pool-v3.inc .. include:: ext-backups.inc .. include:: ext-backups-actions-v3.inc diff --git a/api-ref/source/v3/parameters.yaml b/api-ref/source/v3/parameters.yaml index 6badddc24c6..f926241832f 100644 --- a/api-ref/source/v3/parameters.yaml +++ b/api-ref/source/v3/parameters.yaml @@ -714,12 +714,30 @@ availability_zone_backup: required: false type: string min_version: 3.51 +availability_zone_info: + description: | + The list of availability zone information. + in: body + required: true + type: array availability_zone_required: description: | The availability zone name. in: body required: true type: string +availability_zone_state: + description: | + The current state of the availability zone. + in: body + required: true + type: object +available: + description: | + Whether the availability zone is available for use. + in: body + required: true + type: boolean backend_id: description: | ID of backend to failover to. Default is ``None``. diff --git a/api-ref/source/v3/samples/availability-zone-list-response.json b/api-ref/source/v3/samples/availability-zone-list-response.json new file mode 100644 index 00000000000..87fadc43182 --- /dev/null +++ b/api-ref/source/v3/samples/availability-zone-list-response.json @@ -0,0 +1,8 @@ +{ + "availabilityZoneInfo": [{ + "zoneState": { + "available": true + }, + "zoneName": "nova" + }] +} \ No newline at end of file