From bb703a9f4df4766d48c2aac7dcc5cae44068632c Mon Sep 17 00:00:00 2001 From: zhufl Date: Sat, 29 Sep 2018 15:45:12 +0800 Subject: [PATCH] api-ref: add missing response body for groups 1. https://developer.openstack.org/api-ref/block-storage/v3/#create-group "Create group" should have response body, like { "group": { "id": "2c311e17-9daa-4229-926a-cb9e233f06b0", "name": "tempest-GroupsTest-Group-938181552" } } 2. https://developer.openstack.org/api-ref/block-storage/v3/#create-group-from-source "Create group from source" should have response body, like { "group": { "id": "2c311e17-9daa-4229-926a-cb9e233f06b0", "name": "tempest-GroupsTest-Group-938181552" } } 3. https://developer.openstack.org/api-ref/block-storage/v3/#show-group-details group_type in "Show group details" or "List groups with details" or "Create group" should be an uuid string, not object. 4. group_snapshot_id and source_group_id should be optional in the response of "Show group details". Change-Id: Iea0c8f0f6fec1b8460c4ea53ed6468adbc31abf2 --- api-ref/source/v3/groups.inc | 38 +++++++++++++++++-- api-ref/source/v3/parameters.yaml | 12 ++++++ .../group-create-from-src-response.json | 6 +++ 3 files changed, 53 insertions(+), 3 deletions(-) create mode 100644 api-ref/source/v3/samples/group-create-from-src-response.json diff --git a/api-ref/source/v3/groups.inc b/api-ref/source/v3/groups.inc index 30bd02128ff..883a4fbdb73 100644 --- a/api-ref/source/v3/groups.inc +++ b/api-ref/source/v3/groups.inc @@ -95,7 +95,7 @@ Request - group: group - description: description_group_false - availability_zone: availability_zone - - group_type: group_type + - group_type: group_type_id_2 - volume_types: volume_types - name: group_name @@ -105,6 +105,20 @@ Request Example .. literalinclude:: ./samples/group-create-request.json :language: javascript +Response Parameters +------------------- + +.. rest_parameters:: parameters.yaml + + - id: group_id + - name: group_name + +Response Example +---------------- + +.. literalinclude:: ./samples/group-create-response.json + :language: javascript + Show group details ~~~~~~~~~~~~~~~~~~ @@ -143,7 +157,9 @@ Response Parameters - description: description_group_true - availability_zone: availability_zone - created_at: created_at - - group_type: group_type + - group_type: group_type_id_2 + - group_snapshot_id: group_snapshot_id_2 + - source_group_id: source_group_id_2 - volume_types: volume_types - id: id - name: group_name @@ -196,6 +212,20 @@ Request Example .. literalinclude:: ./samples/group-create-from-src-request.json :language: javascript +Response Parameters +------------------- + +.. rest_parameters:: parameters.yaml + + - id: group_id + - name: group_name + +Response Example +---------------- + +.. literalinclude:: ./samples/group-create-from-src-response.json + :language: javascript + Delete group ~~~~~~~~~~~~ @@ -279,7 +309,9 @@ Response Parameters - description: description_group_true - availability_zone: availability_zone - created_at: created_at - - group_type: group_type + - group_type: group_type_id_2 + - group_snapshot_id: group_snapshot_id_2 + - source_group_id: source_group_id_2 - volume_types: volume_types - id: group_id - name: name diff --git a/api-ref/source/v3/parameters.yaml b/api-ref/source/v3/parameters.yaml index 687323bfb44..6858f52fd42 100644 --- a/api-ref/source/v3/parameters.yaml +++ b/api-ref/source/v3/parameters.yaml @@ -1191,6 +1191,12 @@ group_snapshot_id_1: in: body required: true type: string +group_snapshot_id_2: + description: | + The ID of the group snapshot. + in: body + required: false + type: string group_snapshots: description: | A collection of group snapshots. @@ -2646,6 +2652,12 @@ source_group_id: in: body required: true type: string +source_group_id_2: + description: | + The UUID of the source group. + in: body + required: false + type: string source_reference: description: | The snapshot's origin volume information. diff --git a/api-ref/source/v3/samples/group-create-from-src-response.json b/api-ref/source/v3/samples/group-create-from-src-response.json new file mode 100644 index 00000000000..b280d32ccc5 --- /dev/null +++ b/api-ref/source/v3/samples/group-create-from-src-response.json @@ -0,0 +1,6 @@ +{ + "group": { + "id": "6f519a48-3183-46cf-a32f-41815f816666", + "name": "first_group" + } +}