From 3e06a7339e03a6405ce5893c355cb877595da617 Mon Sep 17 00:00:00 2001 From: "jeremy.zhang" Date: Thu, 14 Sep 2017 13:51:55 +0800 Subject: [PATCH] Fix v3 api-ref for updating extra specs of volume type In v3 api-ref for updating extra specs of volume type, the request and response contents are wrongly described, and also the HTTP method and URL are not correct. This patch addes new api-ref for it. Change-Id: I4263c25a0638a68d0d102c7966ebb77604c019fc --- ...type-extra-specs-create-update-request.json | 6 ++++++ ...ype-extra-specs-create-update-response.json | 6 ++++++ api-ref/source/v3/volumes-v3-types.inc | 18 +++++++----------- 3 files changed, 19 insertions(+), 11 deletions(-) create mode 100644 api-ref/source/v3/samples/volume-type-extra-specs-create-update-request.json create mode 100644 api-ref/source/v3/samples/volume-type-extra-specs-create-update-response.json diff --git a/api-ref/source/v3/samples/volume-type-extra-specs-create-update-request.json b/api-ref/source/v3/samples/volume-type-extra-specs-create-update-request.json new file mode 100644 index 00000000000..bf6b022ff92 --- /dev/null +++ b/api-ref/source/v3/samples/volume-type-extra-specs-create-update-request.json @@ -0,0 +1,6 @@ +{ + "extra_specs": { + "key1": "value1", + "key2": "value2" + } +} diff --git a/api-ref/source/v3/samples/volume-type-extra-specs-create-update-response.json b/api-ref/source/v3/samples/volume-type-extra-specs-create-update-response.json new file mode 100644 index 00000000000..bf6b022ff92 --- /dev/null +++ b/api-ref/source/v3/samples/volume-type-extra-specs-create-update-response.json @@ -0,0 +1,6 @@ +{ + "extra_specs": { + "key1": "value1", + "key2": "value2" + } +} diff --git a/api-ref/source/v3/volumes-v3-types.inc b/api-ref/source/v3/volumes-v3-types.inc index ced8c46b27a..b4a3e0d0ab8 100644 --- a/api-ref/source/v3/volumes-v3-types.inc +++ b/api-ref/source/v3/volumes-v3-types.inc @@ -67,12 +67,13 @@ Response Example :language: javascript -Update extra specs for volume type -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Create or update extra specs for volume type +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.. rest_method:: PUT /v3/{project_id}/types/{volume_type_id} +.. rest_method:: POST /v3/{project_id}/types/{volume_type_id}/extra_specs -Updates the extra specifications that are assigned to a volume type. +Adds new extra specifications to a volume type, or updates the extra +specifications that are assigned to a volume type. Normal response codes: 200 @@ -85,13 +86,12 @@ Request - project_id: project_id_path - volume_type_id: volume_type_id - - volume_type: volume_type_1 - extra_specs: extra_specs Request Example --------------- -.. literalinclude:: ./samples/volume-type-update-request.json +.. literalinclude:: ./samples/volume-type-extra-specs-create-update-request.json :language: javascript @@ -101,17 +101,13 @@ Response Parameters .. rest_parameters:: parameters.yaml - - volume_type: volume_type_1 - - is_public: is_public - extra_specs: extra_specs - - description: description_15 - - name: name_7 Response Example ---------------- -.. literalinclude:: ./samples/volume-type-show-response.json +.. literalinclude:: ./samples/volume-type-extra-specs-create-update-response.json :language: javascript