Complete verification for api-ref os-flavor-extra-specs

This includes parameter, example, and body verifications
for api-ref os-flavor-extra-specs.

part of bp:api-ref-in-rst

Change-Id: Ifa7766934da95c3b2da20b71a7733883c70f7c80
This commit is contained in:
stewie925 2016-06-23 18:36:38 -07:00
parent 32c4c38719
commit 09701bebbe
2 changed files with 58 additions and 5 deletions

View File

@ -1,7 +1,4 @@
.. -*- rst -*-
.. needs:parameter_verification
.. needs:example_verification
.. needs:body_verification
======================================================
Flavors extra-specs (flavors, os-flavor-extra-specs)
@ -32,6 +29,13 @@ Request
Response
--------
.. rest_parameters:: parameters.yaml
- extra_specs: extra_specs
- key: flavor_extra_spec_key2
- value: flavor_extra_spec_value
**Example List Extra Specs For A Flavor: JSON response**
.. literalinclude:: ../../doc/api_samples/flavor-extra-specs/flavor-extra-specs-list-resp.json
@ -46,7 +50,8 @@ Creates extra specs for a flavor, by ID.
Normal response codes: 200
Error response codes: unauthorized(401), forbidden(403), itemNotFound(404), conflict(409)
Error response codes: unauthorized(401), forbidden(403), itemNotFound(404),
conflict(409)
Request
-------
@ -55,6 +60,9 @@ Request
- flavor_id: flavor_id
- extra_specs: extra_specs
- key: flavor_extra_spec_key2
- value: flavor_extra_spec_value
**Example Create Extra Specs For A Flavor: JSON request**
@ -64,6 +72,12 @@ Request
Response
--------
.. rest_parameters:: parameters.yaml
- extra_specs: extra_specs
- key: flavor_extra_spec_key2
- value: flavor_extra_spec_value
**Example Create Extra Specs For A Flavor: JSON response**
.. literalinclude:: ../../doc/api_samples/flavor-extra-specs/flavor-extra-specs-create-resp.json
@ -85,13 +99,18 @@ Request
.. rest_parameters:: parameters.yaml
- flavor_id: flavor_id
- flavor_extra_spec_key: flavor_extra_spec_key
Response
--------
.. rest_parameters:: parameters.yaml
- key: flavor_extra_spec_key2
- value: flavor_extra_spec_value
**Example Show An Extra Spec For A Flavor: JSON response**
.. literalinclude:: ../../doc/api_samples/flavor-extra-specs/flavor-extra-specs-get-resp.json
@ -117,6 +136,9 @@ Request
- flavor_id: flavor_id
- flavor_extra_spec_key: flavor_extra_spec_key
- key: flavor_extra_spec_key2
- value: flavor_extra_spec_value
**Example Update An Extra Spec For A Flavor: JSON request**
@ -126,6 +148,12 @@ Request
Response
--------
.. rest_parameters:: parameters.yaml
- key: flavor_extra_spec_key2
- value: flavor_extra_spec_value
**Example Update An Extra Spec For A Flavor: JSON response**
.. literalinclude:: ../../doc/api_samples/flavor-extra-specs/flavor-extra-specs-update-resp.json
@ -154,3 +182,4 @@ Request
Response
--------
There is no body content for the response of a successful DELETE action.

View File

@ -1313,6 +1313,14 @@ extensions:
in: body
required: true
type: array
extra_specs:
description: |
A dictionary of the flavor's extra-specs key-and-value pairs. It appears
in the os-extra-specs' "create" REQUEST body, as well as the
os-extra-specs' "create" and "list" RESPONSE body.
in: body
required: true
type: object
fault:
description: |
A fault object. Only displayed in the failed response.
@ -1441,6 +1449,22 @@ flavor_ephem_disk_in:
GiB. Ephemeral disks may be written over on server state
changes. So should only be used as a scratch space for
applications that are aware of it's limitations. Defaults to 0.
flavor_extra_spec_key2:
description: |
The extra spec key of a flavor. It appears in the os-extra-specs'
"create" and "update" REQUEST body, as well as the os-extra-specs'
"create", "list", "show", and "update" RESPONSE body.
in: body
required: true
type: string
flavor_extra_spec_value:
description: |
The extra spec value of a flavor. It appears in the os-extra-specs'
"create" and "update" REQUEST body, as well as the os-extra-specs'
"create", "list", "show", and "update" RESPONSE body.
in: body
required: true
type: string
flavor_id_body:
description: |
The ID of the flavor. While people often make this look like