Fix api-ref for v3 volume group types

This patch is mainly to fix api-ref for v3 volume group types,
including:

1. add description and example for the API: show defaut group type
2. fix parameters: 'is_public' and 'description'
3. remove unused sample file: group-type-show-request.json

Change-Id: I29f160d8ed24473debb345b4ea91ee0545d711b1
This commit is contained in:
jeremy.zhang 2018-01-18 16:15:03 +08:00 committed by Jeremy Zhang
parent 5d761327da
commit 6892dd6047
5 changed files with 83 additions and 39 deletions

View File

@ -3,6 +3,8 @@
Group types
===========
To create a generic volume group, you must specify a group type.
Update group type
~~~~~~~~~~~~~~~~~
@ -11,8 +13,6 @@ Update group type
Updates a group type.
To create a generic volume group, you must specify a group type.
Normal response codes: 200
Error response codes: badRequest(400), forbidden(403), itemNotFound(404),
@ -28,8 +28,8 @@ Request
- group_type_id: group_type_id_1
- group_type: group_type
- name: name_16
- description: description_12
- is_public: is_public_2
- description: description_group_type_optional
- is_public: is_public_group_type_optional
Request Example
---------------
@ -45,9 +45,9 @@ Response Parameters
- group_type: group_type
- id: group_type_id_2
- is_public: is_public_1
- is_public: is_public_group_type_required
- group_specs: group_specs
- description: description_12
- description: description_group_type_required
- name: name_16
Response Example
@ -86,9 +86,9 @@ Response Parameters
- group_type: group_type
- id: group_type_id_2
- name: name_16
- is_public: is_public_1
- is_public: is_public_group_type_required
- group_specs: group_specs
- description: description_12
- description: description_group_type_required
Response Example
@ -98,6 +98,46 @@ Response Example
:language: javascript
Show default group type details
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. rest_method:: GET /v3/{project_id}/group_types/default
Shows details for the default group type if configured.
Normal response codes: 200
Error response codes: itemNotFound(404)
Request
-------
.. rest_parameters:: parameters.yaml
- project_id: project_id_path
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- group_type: group_type
- id: group_type_id_2
- name: name_16
- is_public: is_public_group_type_required
- group_specs: group_specs
- description: description_group_type_required
Response Example
----------------
.. literalinclude:: ./samples/group-type-default-response.json
:language: javascript
Delete group type
~~~~~~~~~~~~~~~~~
@ -149,7 +189,7 @@ Response Parameters
- group_types: group_types
- id: group_type_id_2
- group_specs: group_specs_2
- group_specs: group_specs
- name: name_16
Response Example
@ -166,8 +206,6 @@ Create group type
Creates a group type.
To create a generic volume group, you must specify a group type.
Normal response codes: 202
@ -183,8 +221,8 @@ Request
- project_id: project_id_path
- group_type: group_type
- name: name_16
- description: description_12
- is_public: is_public_2
- description: description_group_type_optional
- is_public: is_public_group_type_optional
- group_specs: group_specs
Request Example
@ -201,9 +239,9 @@ Response Parameters
- group_type: group_type
- id: group_type_id_2
- is_public: is_public_1
- is_public: is_public_group_type_required
- group_specs: group_specs
- description: description_12
- description: description_group_type_required
- name: name_16

View File

@ -879,12 +879,6 @@ description_11:
in: body
required: false
type: string
description_12:
description: |
The group type description.
in: body
required: false
type: string
description_13:
description: |
The group description.
@ -964,6 +958,18 @@ description_group_true:
in: body
required: true
type: string
description_group_type_optional:
description: |
The group type description.
in: body
required: false
type: string
description_group_type_required:
description: |
The group type description.
in: body
required: true
type: string
description_volume_type_optional:
description: |
The volume type description.
@ -1409,18 +1415,18 @@ is_incremental:
in: body
required: false
type: boolean
is_public_1:
description:
Whether the group is publicly visible.
in: body
required: false
type: boolean
is_public_2:
description:
is_public_group_type_optional:
description: |
Whether the group type is publicly visible.
in: body
required: false
type: boolean
is_public_group_type_required:
description: |
Whether the group type is publicly visible.
in: body
required: true
type: boolean
is_public_volume_type_optional:
description: |
Whether the volume type is publicly visible.

View File

@ -0,0 +1,9 @@
{
"group_type": {
"id": "7270c56e-6354-4528-8e8b-f54dee2232c8",
"name": "group-type-test",
"description": "default group type",
"is_public": "true",
"group_specs": {}
}
}

View File

@ -1,9 +0,0 @@
{
"group_type": {
"id": "289da7f8-6440-407c-9fb4-7db01ec49164",
"name": "grp-type-001",
"group_specs": {
"consistent_group_snapshot_enabled": "<is> False"
}
}
}

View File

@ -2,6 +2,6 @@
"group_type": {
"name": "grp-type-001",
"description": "group type 0001",
"is_public": true,
"is_public": true
}
}