Add missing api-ref documents for group type specs
Added the missing api-ref documents for group specs APIs. Change-Id: I6c04ec9c073bc227a34a502b42ffd615e689a241
This commit is contained in:
parent
4689591080
commit
4a1d7cc17f
191
api-ref/source/v3/group-type-specs.inc
Normal file
191
api-ref/source/v3/group-type-specs.inc
Normal file
@ -0,0 +1,191 @@
|
||||
.. -*- rst -*-
|
||||
|
||||
Group type specs
|
||||
================
|
||||
|
||||
Create group specs for a group type
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. rest_method:: POST /v3/{project_id}/group_types/{group_type_id}/group_specs
|
||||
|
||||
Create group specs for a group type, if the specification key already exists in group specs,
|
||||
this API will update the specification as well.
|
||||
|
||||
|
||||
Normal response codes: 202
|
||||
Error response codes: badRequest(400), forbidden(403), itemNotFound(404)
|
||||
|
||||
|
||||
Request
|
||||
-------
|
||||
|
||||
.. rest_parameters:: parameters.yaml
|
||||
|
||||
- group_specs: group_specs_2
|
||||
- group_type_id: group_type_id_1
|
||||
- project_id: project_id_path
|
||||
|
||||
Request Example
|
||||
---------------
|
||||
|
||||
.. literalinclude:: ./samples/group-type-specs-create-request.json
|
||||
:language: javascript
|
||||
|
||||
|
||||
|
||||
Response Parameters
|
||||
-------------------
|
||||
|
||||
.. rest_parameters:: parameters.yaml
|
||||
|
||||
- group_specs: group_specs_2
|
||||
|
||||
|
||||
Response Example
|
||||
----------------
|
||||
|
||||
.. literalinclude:: ./samples/group-type-specs-create-response.json
|
||||
:language: javascript
|
||||
|
||||
|
||||
List type specs
|
||||
================
|
||||
|
||||
List group specs for a group type
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. rest_method:: GET /v3/{project_id}/group_types/{group_type_id}/group_specs
|
||||
|
||||
List all the group specs for a group type,
|
||||
|
||||
|
||||
Normal response codes: 200
|
||||
Error response codes: itemNotFound(404), forbidden(403)
|
||||
|
||||
|
||||
Request
|
||||
-------
|
||||
|
||||
.. rest_parameters:: parameters.yaml
|
||||
|
||||
- group_type_id: group_type_id_1
|
||||
- project_id: project_id_path
|
||||
|
||||
|
||||
Response Parameters
|
||||
-------------------
|
||||
|
||||
.. rest_parameters:: parameters.yaml
|
||||
|
||||
- group_specs: group_specs_2
|
||||
|
||||
|
||||
Response Example
|
||||
----------------
|
||||
|
||||
.. literalinclude:: ./samples/group-type-specs-list-response.json
|
||||
:language: javascript
|
||||
|
||||
|
||||
Show type spec
|
||||
==============
|
||||
|
||||
Show one specific group spec for a group type
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. rest_method:: GET /v3/{project_id}/group_types/{group_type_id}/group_specs/{spec_id}
|
||||
|
||||
Show a group spec for a group type,
|
||||
|
||||
|
||||
Normal response codes: 200
|
||||
Error response codes: itemNotFound(404), forbidden(403)
|
||||
|
||||
|
||||
Request
|
||||
-------
|
||||
|
||||
.. rest_parameters:: parameters.yaml
|
||||
|
||||
- group_type_id: group_type_id_1
|
||||
- project_id: project_id_path
|
||||
- spec_id: spec_id
|
||||
|
||||
|
||||
Response Parameters
|
||||
-------------------
|
||||
|
||||
.. rest_parameters:: parameters.yaml
|
||||
|
||||
- spec: spec_value
|
||||
|
||||
Response Example
|
||||
----------------
|
||||
|
||||
.. literalinclude:: ./samples/group-type-specs-show-response.json
|
||||
:language: javascript
|
||||
|
||||
|
||||
Update type spec
|
||||
================
|
||||
|
||||
Update one specific group spec for a group type
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. rest_method:: PUT /v3/{project_id}/group_types/{group_type_id}/group_specs/{spec_id}
|
||||
|
||||
Update a group spec for a group type,
|
||||
|
||||
|
||||
Normal response codes: 202
|
||||
Error response codes: itemNotFound(404), forbidden(403)
|
||||
|
||||
|
||||
Request
|
||||
-------
|
||||
|
||||
.. rest_parameters:: parameters.yaml
|
||||
|
||||
- group_type_id: group_type_id_1
|
||||
- project_id: project_id_path
|
||||
- spec_id: spec_id
|
||||
- spec: spec_value
|
||||
|
||||
|
||||
Response Parameters
|
||||
-------------------
|
||||
|
||||
.. rest_parameters:: parameters.yaml
|
||||
|
||||
- spec: spec_value
|
||||
|
||||
Response Example
|
||||
----------------
|
||||
|
||||
.. literalinclude:: ./samples/group-type-specs-update-response.json
|
||||
:language: javascript
|
||||
|
||||
|
||||
Delete type spec
|
||||
================
|
||||
|
||||
Delete one specific group spec for a group type
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. rest_method:: DELETE /v3/{project_id}/group_types/{group_type_id}/group_specs/{spec_id}
|
||||
|
||||
Delete a group spec for a group type,
|
||||
|
||||
|
||||
Normal response codes: 202
|
||||
Error response codes: itemNotFound(404), forbidden(403)
|
||||
|
||||
|
||||
Request
|
||||
-------
|
||||
|
||||
.. rest_parameters:: parameters.yaml
|
||||
|
||||
- group_type_id: group_type_id_1
|
||||
- project_id: project_id_path
|
||||
- spec_id: spec_id
|
@ -52,55 +52,6 @@ Response Example
|
||||
:language: javascript
|
||||
|
||||
|
||||
Create group specs for a group type
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. rest_method:: POST /v3/{project_id}/group_types/{group_type_id}/group_specs
|
||||
|
||||
Create group specs for a group type.
|
||||
|
||||
|
||||
Normal response codes: 202
|
||||
Error response codes: badRequest(400), forbidden(403), itemNotFound(404)
|
||||
|
||||
|
||||
Request
|
||||
-------
|
||||
|
||||
.. rest_parameters:: parameters.yaml
|
||||
|
||||
- group_specs: group_specs
|
||||
- group_type: group_type
|
||||
- group_type_id: group_type_id
|
||||
- project_id: project_id_path
|
||||
|
||||
Request Example
|
||||
---------------
|
||||
|
||||
.. literalinclude:: ./samples/group-type-specs-create-request.json
|
||||
:language: javascript
|
||||
|
||||
|
||||
|
||||
Response Parameters
|
||||
-------------------
|
||||
|
||||
.. rest_parameters:: parameters.yaml
|
||||
|
||||
- is_public: is_public
|
||||
- group_specs: group_specs
|
||||
- description: description
|
||||
- group_type: group_type
|
||||
- name: name
|
||||
|
||||
|
||||
Response Example
|
||||
----------------
|
||||
|
||||
.. literalinclude:: ./samples/group-type-show-response.json
|
||||
:language: javascript
|
||||
|
||||
|
||||
Show group type details
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
@ -39,6 +39,7 @@ Block Storage API V3 (CURRENT)
|
||||
.. include:: groups.inc
|
||||
.. include:: group-snapshots.inc
|
||||
.. include:: group-types.inc
|
||||
.. include:: group-type-specs.inc
|
||||
.. include:: hosts.inc
|
||||
.. include:: limits.inc
|
||||
.. include:: messages.inc
|
||||
|
@ -80,6 +80,12 @@ group_type_id:
|
||||
in: path
|
||||
required: false
|
||||
type: string
|
||||
group_type_id_1:
|
||||
description: |
|
||||
The UUID for an existing group type.
|
||||
in: path
|
||||
required: true
|
||||
type: string
|
||||
hostname:
|
||||
description: |
|
||||
The name of the host that hosts the storage back
|
||||
@ -357,6 +363,12 @@ sort_key_group_snapshot:
|
||||
required: false
|
||||
type: string
|
||||
min_version: 3.29
|
||||
spec_id:
|
||||
description: |
|
||||
The id (key) of the group specification.
|
||||
in: query
|
||||
required: true
|
||||
type: string
|
||||
status_query:
|
||||
description: |
|
||||
Filters results by a status. Default=None.
|
||||
@ -898,6 +910,13 @@ group_specs:
|
||||
in: body
|
||||
required: false
|
||||
type: object
|
||||
group_specs_2:
|
||||
description: |
|
||||
A set of key and value pairs that contains the
|
||||
specifications for a group type.
|
||||
in: body
|
||||
required: true
|
||||
type: object
|
||||
group_type:
|
||||
description: |
|
||||
A ``group_type`` object.
|
||||
@ -1967,6 +1986,12 @@ source_volid_1:
|
||||
in: body
|
||||
required: true
|
||||
type: string
|
||||
spec_value:
|
||||
description: |
|
||||
The value of the group specification corresponding to the specified key.
|
||||
in: body
|
||||
required: true
|
||||
type: string
|
||||
specs:
|
||||
description: |
|
||||
A ``specs`` object.
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"group_specs": {
|
||||
"key1": "value1",
|
||||
"key2": "value2",
|
||||
"key2": "value2"
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"group_specs": {
|
||||
"key1": "value1",
|
||||
"key2": "value2"
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"group_specs": {
|
||||
"key1": "value1",
|
||||
"key2": "value2"
|
||||
}
|
||||
}
|
@ -0,0 +1,3 @@
|
||||
{
|
||||
"key1": "value1"
|
||||
}
|
@ -0,0 +1,3 @@
|
||||
{
|
||||
"key1": "value1"
|
||||
}
|
Loading…
Reference in New Issue
Block a user