[api-ref] Update volume metadata for a specific key (v2)

This patch is to add api-ref for cinder v2 api: update volume metadata
for a specific key.

Change-Id: I6aa92c3b56ed08830c82f7adbbf8dcb36e980162
This commit is contained in:
jeremy.zhang 2017-06-28 15:50:48 +08:00 committed by Jeremy Zhang
parent b60b052c53
commit 49dce5e87b
4 changed files with 65 additions and 0 deletions

View File

@ -71,6 +71,13 @@ key_2:
in: path
required: true
type: string
key_3:
description: |
The metadata key name for the metadata that you
want to update.
in: path
required: true
type: string
project_id_path:
description: |
The UUID of the project in a multi-tenancy cloud.
@ -915,6 +922,12 @@ maxTotalVolumes:
in: body
required: true
type: integer
meta:
description: |
The metadata key and value pair for the volume.
in: body
required: true
type: object
metadata:
description: |
One or more metadata key and value pairs for the

View File

@ -0,0 +1,5 @@
{
"meta": {
"name": "new_name"
}
}

View File

@ -0,0 +1,5 @@
{
"meta": {
"name": "new_name"
}
}

View File

@ -648,3 +648,45 @@ Request
- tenant_id: tenant_id
- volume_id: volume_id_path
- key: key_1
Update volume metadata for a specific key
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. rest_method:: PUT /v2/{project_id}/volumes/{volume_id}/metadata/{key}
Update metadata for a volume for a specific key.
Normal response codes: 200
Request
-------
.. rest_parameters:: parameters.yaml
- project_id: project_id_path
- volume_id: volume_id_path
- key: key_3
- meta: meta
Request Example
---------------
.. literalinclude:: ./samples/volume-metadata-update-key-request.json
:language: javascript
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- meta: meta
Response Example
----------------
.. literalinclude:: ./samples/volume-metadata-update-key-response.json
:language: javascript