Add API document for availability zone list

Add missing API document for list availability zone API.

Closes-Bug: #1783495
Change-Id: I04bf2063bd6d03fa509ff71e2fd66c1cb14e0fd5
This commit is contained in:
TommyLike 2018-07-25 16:17:53 +08:00 committed by Tobias Urdin
parent 1185caa9a8
commit 8a80829552
8 changed files with 144 additions and 0 deletions

View File

@ -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

View File

@ -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

View File

@ -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.

View File

@ -0,0 +1,8 @@
{
"availabilityZoneInfo": [{
"zoneState": {
"available": true
},
"zoneName": "nova"
}]
}

View File

@ -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

View File

@ -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

View File

@ -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``.

View File

@ -0,0 +1,8 @@
{
"availabilityZoneInfo": [{
"zoneState": {
"available": true
},
"zoneName": "nova"
}]
}