From 04bfefcf346ea97cf629cde6bdeb9d463b9f6932 Mon Sep 17 00:00:00 2001 From: junboli Date: Tue, 20 Jun 2017 10:42:09 +0800 Subject: [PATCH] Add v2 v3 response example in API doc In the api-ref/source/v2 and api-ref/source/v3, Add response example for some of volumes, backups, consistencygroups doc. Change-Id: I2d89df3cf6f691d6cde2429b1b33b5b16af3269c --- api-ref/source/v2/consistencygroups-v2.inc | 12 ++++++------ api-ref/source/v2/ext-backups.inc | 6 ++++++ api-ref/source/v2/volumes-v2-volumes.inc | 6 ++++-- api-ref/source/v3/ext-backups.inc | 6 ++++++ api-ref/source/v3/group-snapshots.inc | 6 ++++++ .../source/v3/samples/backup-restore-response.json | 3 ++- .../v3/samples/group-snapshots-create-response.json | 7 ++++++- api-ref/source/v3/volumes-v3-volumes.inc | 5 ++++- 8 files changed, 40 insertions(+), 11 deletions(-) diff --git a/api-ref/source/v2/consistencygroups-v2.inc b/api-ref/source/v2/consistencygroups-v2.inc index da8458fb7d3..6ae13f39aa3 100644 --- a/api-ref/source/v2/consistencygroups-v2.inc +++ b/api-ref/source/v2/consistencygroups-v2.inc @@ -74,6 +74,12 @@ Request - volume_types: volume_types_2 - name: name_15 +Request Example +--------------- + +.. literalinclude:: ./samples/consistency-group-create-request.json + :language: javascript + Response -------- @@ -87,12 +93,6 @@ Response - name: name_15 - id: consistencygroup_id_1 -Request Example ---------------- - -.. literalinclude:: ./samples/consistency-group-create-request.json - :language: javascript - Response Example ---------------- diff --git a/api-ref/source/v2/ext-backups.inc b/api-ref/source/v2/ext-backups.inc index 5c14449fc76..cdc429a9ce7 100644 --- a/api-ref/source/v2/ext-backups.inc +++ b/api-ref/source/v2/ext-backups.inc @@ -207,6 +207,12 @@ Response Parameters - volume_id: volume_id - volume_name: volume_name +Response Example +---------------- + +.. literalinclude:: ./samples/backup-restore-response.json + :language: javascript + Create backup ~~~~~~~~~~~~~ diff --git a/api-ref/source/v2/volumes-v2-volumes.inc b/api-ref/source/v2/volumes-v2-volumes.inc index 6e23731da61..90346a98bde 100644 --- a/api-ref/source/v2/volumes-v2-volumes.inc +++ b/api-ref/source/v2/volumes-v2-volumes.inc @@ -223,9 +223,11 @@ Response Parameters - created_at: created_at - volume_type: volume_type +Response Example +---------------- - - +.. literalinclude:: ./samples/volume-create-response.json + :language: javascript List volumes ~~~~~~~~~~~~ diff --git a/api-ref/source/v3/ext-backups.inc b/api-ref/source/v3/ext-backups.inc index 2bf641f0cf2..036497b7a94 100644 --- a/api-ref/source/v3/ext-backups.inc +++ b/api-ref/source/v3/ext-backups.inc @@ -207,6 +207,12 @@ Response Parameters - volume_id: volume_id - volume_name: volume_name +Response Example +---------------- + +.. literalinclude:: ./samples/backup-restore-response.json + :language: javascript + Create a backup ~~~~~~~~~~~~~~~ diff --git a/api-ref/source/v3/group-snapshots.inc b/api-ref/source/v3/group-snapshots.inc index a84791c38bb..57ea2c9d5aa 100644 --- a/api-ref/source/v3/group-snapshots.inc +++ b/api-ref/source/v3/group-snapshots.inc @@ -191,6 +191,12 @@ Response Parameters - id: id - name: name +Response Example +---------------- + +.. literalinclude:: ./samples/group-snapshots-create-response.json + :language: javascript + Reset group snapshot status ~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/api-ref/source/v3/samples/backup-restore-response.json b/api-ref/source/v3/samples/backup-restore-response.json index a344ea56cdc..5c0ac82d969 100644 --- a/api-ref/source/v3/samples/backup-restore-response.json +++ b/api-ref/source/v3/samples/backup-restore-response.json @@ -1,6 +1,7 @@ { "restore": { "backup_id": "2ef47aee-8844-490c-804d-2a8efe561c65", - "volume_id": "795114e8-7489-40be-a978-83797f2c1dd3" + "volume_id": "795114e8-7489-40be-a978-83797f2c1dd3", + "volume_name": "volume01", } } diff --git a/api-ref/source/v3/samples/group-snapshots-create-response.json b/api-ref/source/v3/samples/group-snapshots-create-response.json index 95e8c7e1f1f..f25d1fb6425 100644 --- a/api-ref/source/v3/samples/group-snapshots-create-response.json +++ b/api-ref/source/v3/samples/group-snapshots-create-response.json @@ -1,6 +1,11 @@ { "group_snapshot": { "id": "6f519a48-3183-46cf-a32f-41815f816666", - "name": "first_group_snapshot" + "name": "first_group_snapshot", + "status": "creating", + "group_type_id": "58737af7-786b-48b7-ab7c-2447e74b0ef4", + "created_at": "2017-06-20T07:44:47.000000", + "group_id": "d5577983-23be-47e3-b98b-bf604e5af421", + "description": null } } diff --git a/api-ref/source/v3/volumes-v3-volumes.inc b/api-ref/source/v3/volumes-v3-volumes.inc index ea8ee75fe1d..12fad4e9fab 100644 --- a/api-ref/source/v3/volumes-v3-volumes.inc +++ b/api-ref/source/v3/volumes-v3-volumes.inc @@ -227,8 +227,11 @@ Response Parameters - created_at: created_at - volume_type: volume_type +Response Example +---------------- - +.. literalinclude:: ./samples/volume-create-response.json + :language: javascript List accessible volumes