Add v3 api-ref for showing all/specific extra specs for a volume type

This patch adds v3 api-ref for two APIs:
1. Show all extra specs assigned to a volume type
2. Show specific extra specs assigned to a volume type

Change-Id: Id5771ee7e52748374ae6a3167116589273000297
This commit is contained in:
jeremy.zhang 2017-10-13 00:12:24 +08:00
parent d6cfe5ed88
commit 1a8c229bf6
4 changed files with 74 additions and 4 deletions

View File

@ -109,7 +109,7 @@ key_3:
type: string
key_4:
description: |
The key name for the extra spec that you want to remove.
The key name of the extra spec for a volume type.
in: path
required: true
type: string

View File

@ -0,0 +1,6 @@
{
"extra_specs": {
"key1": "value1",
"key2": "value2"
}
}

View File

@ -0,0 +1,3 @@
{
"key1": "value1"
}

View File

@ -111,12 +111,73 @@ Response Example
:language: javascript
Delete extra spec for volume type
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Show all extra specifications for volume type
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. rest_method:: GET /v3/{project_id}/types/{volume_type_id}/extra_specs
Shows all extra specifications assigned to a volume type.
Normal response codes: 200
Request
-------
.. rest_parameters:: parameters.yaml
- project_id: project_id_path
- volume_type_id: volume_type_id
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- extra_specs: extra_specs
Response Example
----------------
.. literalinclude:: ./samples/volume-type-all-extra-specs-show-response.json
:language: javascript
Show extra specification for volume type
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. rest_method:: GET /v3/{project_id}/types/{volume_type_id}/extra_specs/{key}
Shows the specific extra specification assigned to a volume type.
Normal response codes: 200
Request
-------
.. rest_parameters:: parameters.yaml
- project_id: project_id_path
- volume_type_id: volume_type_id
- key: key_4
Response Example
----------------
.. literalinclude:: ./samples/volume-type-specific-extra-specs-show-response.json
:language: javascript
Delete extra specification for volume type
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. rest_method:: DELETE /v3/{project_id}/types/{volume_type_id}/extra_specs/{key}
Deletes the specific extra spec that assigned to a volume type.
Deletes the specific extra specification assigned to a volume type.
Normal response codes: 202