2016-04-12 09:03:46 -04:00
|
|
|
.. -*- rst -*-
|
|
|
|
|
|
|
|
======================================================
|
|
|
|
Flavors extra-specs (flavors, os-flavor-extra-specs)
|
|
|
|
======================================================
|
|
|
|
|
|
|
|
Lists, creates, deletes, and updates the extra-specs or keys for a
|
|
|
|
flavor.
|
|
|
|
|
2019-02-06 14:46:47 -05:00
|
|
|
Refer to `Compute Flavors
|
|
|
|
<https://docs.openstack.org/nova/latest/user/flavors.html#extra-specs>`__
|
|
|
|
for available built-in extra specs.
|
|
|
|
|
2016-04-23 21:53:27 +08:00
|
|
|
List Extra Specs For A Flavor
|
|
|
|
=============================
|
2016-04-12 09:03:46 -04:00
|
|
|
|
2016-06-02 08:50:03 -04:00
|
|
|
.. rest_method:: GET /flavors/{flavor_id}/os-extra_specs
|
2016-04-12 09:03:46 -04:00
|
|
|
|
2016-04-23 21:53:27 +08:00
|
|
|
Lists all extra specs for a flavor, by ID.
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
Normal response codes: 200
|
|
|
|
|
2016-04-23 21:53:27 +08:00
|
|
|
Error response codes: unauthorized(401), forbidden(403), itemNotFound(404)
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
Request
|
2016-04-14 13:10:59 -04:00
|
|
|
-------
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
|
2016-06-02 08:50:03 -04:00
|
|
|
|
2016-04-12 09:03:46 -04:00
|
|
|
- flavor_id: flavor_id
|
|
|
|
|
|
|
|
Response
|
2016-04-14 13:10:59 -04:00
|
|
|
--------
|
2016-04-12 09:03:46 -04:00
|
|
|
|
2016-06-23 18:36:38 -07:00
|
|
|
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
|
|
|
|
- extra_specs: extra_specs
|
|
|
|
- key: flavor_extra_spec_key2
|
|
|
|
- value: flavor_extra_spec_value
|
|
|
|
|
2016-04-23 21:53:27 +08:00
|
|
|
**Example List Extra Specs For A Flavor: JSON response**
|
2016-04-12 09:03:46 -04:00
|
|
|
|
2016-04-23 21:53:27 +08:00
|
|
|
.. literalinclude:: ../../doc/api_samples/flavor-extra-specs/flavor-extra-specs-list-resp.json
|
2016-04-12 09:03:46 -04:00
|
|
|
:language: javascript
|
|
|
|
|
2016-04-23 21:53:27 +08:00
|
|
|
Create Extra Specs For A Flavor
|
|
|
|
===============================
|
2016-04-12 09:03:46 -04:00
|
|
|
|
2016-06-02 08:50:03 -04:00
|
|
|
.. rest_method:: POST /flavors/{flavor_id}/os-extra_specs
|
2016-04-12 09:03:46 -04:00
|
|
|
|
2016-04-23 21:53:27 +08:00
|
|
|
Creates extra specs for a flavor, by ID.
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
Normal response codes: 200
|
|
|
|
|
2016-06-23 18:36:38 -07:00
|
|
|
Error response codes: unauthorized(401), forbidden(403), itemNotFound(404),
|
|
|
|
conflict(409)
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
Request
|
2016-04-14 13:10:59 -04:00
|
|
|
-------
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
|
2016-06-02 08:50:03 -04:00
|
|
|
|
2016-04-12 09:03:46 -04:00
|
|
|
- flavor_id: flavor_id
|
2016-06-23 18:36:38 -07:00
|
|
|
- extra_specs: extra_specs
|
|
|
|
- key: flavor_extra_spec_key2
|
|
|
|
- value: flavor_extra_spec_value
|
2016-04-12 09:03:46 -04:00
|
|
|
|
2016-04-23 21:53:27 +08:00
|
|
|
**Example Create Extra Specs For A Flavor: JSON request**
|
|
|
|
|
|
|
|
.. literalinclude:: ../../doc/api_samples/flavor-extra-specs/flavor-extra-specs-create-req.json
|
|
|
|
:language: javascript
|
|
|
|
|
2016-04-12 09:03:46 -04:00
|
|
|
Response
|
2016-04-14 13:10:59 -04:00
|
|
|
--------
|
2016-04-12 09:03:46 -04:00
|
|
|
|
2016-06-23 18:36:38 -07:00
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
|
|
|
|
- extra_specs: extra_specs
|
|
|
|
- key: flavor_extra_spec_key2
|
|
|
|
- value: flavor_extra_spec_value
|
|
|
|
|
2016-04-23 21:53:27 +08:00
|
|
|
**Example Create Extra Specs For A Flavor: JSON response**
|
2016-04-12 09:03:46 -04:00
|
|
|
|
2016-04-23 21:53:27 +08:00
|
|
|
.. literalinclude:: ../../doc/api_samples/flavor-extra-specs/flavor-extra-specs-create-resp.json
|
2016-04-12 09:03:46 -04:00
|
|
|
:language: javascript
|
|
|
|
|
|
|
|
Show An Extra Spec For A Flavor
|
|
|
|
===============================
|
|
|
|
|
2016-06-02 08:50:03 -04:00
|
|
|
.. rest_method:: GET /flavors/{flavor_id}/os-extra_specs/{flavor_extra_spec_key}
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
Shows an extra spec, by key, for a flavor, by ID.
|
|
|
|
|
|
|
|
Normal response codes: 200
|
|
|
|
|
2016-04-23 21:53:27 +08:00
|
|
|
Error response codes: unauthorized(401), forbidden(403), itemNotFound(404)
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
Request
|
2016-04-14 13:10:59 -04:00
|
|
|
-------
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
|
|
|
|
- flavor_id: flavor_id
|
|
|
|
- flavor_extra_spec_key: flavor_extra_spec_key
|
|
|
|
|
2016-06-23 18:36:38 -07:00
|
|
|
|
2016-04-12 09:03:46 -04:00
|
|
|
Response
|
2016-04-14 13:10:59 -04:00
|
|
|
--------
|
2016-04-12 09:03:46 -04:00
|
|
|
|
2016-06-23 18:36:38 -07:00
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
|
|
|
|
- key: flavor_extra_spec_key2
|
|
|
|
- value: flavor_extra_spec_value
|
|
|
|
|
2016-04-19 17:52:18 +09:00
|
|
|
**Example Show An Extra Spec For A Flavor: JSON response**
|
2016-04-12 09:03:46 -04:00
|
|
|
|
2016-03-23 19:56:48 +08:00
|
|
|
.. literalinclude:: ../../doc/api_samples/flavor-extra-specs/flavor-extra-specs-get-resp.json
|
2016-04-12 09:03:46 -04:00
|
|
|
:language: javascript
|
|
|
|
|
|
|
|
Update An Extra Spec For A Flavor
|
|
|
|
=================================
|
|
|
|
|
2016-06-02 08:50:03 -04:00
|
|
|
.. rest_method:: PUT /flavors/{flavor_id}/os-extra_specs/{flavor_extra_spec_key}
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
Updates an extra spec, by key, for a flavor, by ID.
|
|
|
|
|
|
|
|
Normal response codes: 200
|
|
|
|
|
2016-07-12 14:14:38 +02:00
|
|
|
Error response codes: badRequest(400), unauthorized(401), forbidden(403)
|
2016-04-23 21:53:27 +08:00
|
|
|
itemNotFound(404), conflict(409)
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
Request
|
2016-04-14 13:10:59 -04:00
|
|
|
-------
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
|
2016-06-02 08:50:03 -04:00
|
|
|
|
2016-04-12 09:03:46 -04:00
|
|
|
- flavor_id: flavor_id
|
|
|
|
- flavor_extra_spec_key: flavor_extra_spec_key
|
2016-06-23 18:36:38 -07:00
|
|
|
- key: flavor_extra_spec_key2
|
|
|
|
- value: flavor_extra_spec_value
|
|
|
|
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
**Example Update An Extra Spec For A Flavor: JSON request**
|
|
|
|
|
2016-03-23 19:56:48 +08:00
|
|
|
.. literalinclude:: ../../doc/api_samples/flavor-extra-specs/flavor-extra-specs-update-req.json
|
2016-04-12 09:03:46 -04:00
|
|
|
:language: javascript
|
|
|
|
|
|
|
|
Response
|
2016-04-14 13:10:59 -04:00
|
|
|
--------
|
2016-04-12 09:03:46 -04:00
|
|
|
|
2016-06-23 18:36:38 -07:00
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
|
|
|
|
|
|
|
|
- key: flavor_extra_spec_key2
|
|
|
|
- value: flavor_extra_spec_value
|
|
|
|
|
2016-04-19 17:52:18 +09:00
|
|
|
**Example Update An Extra Spec For A Flavor: JSON response**
|
2016-04-12 09:03:46 -04:00
|
|
|
|
2016-03-23 19:56:48 +08:00
|
|
|
.. literalinclude:: ../../doc/api_samples/flavor-extra-specs/flavor-extra-specs-update-resp.json
|
2016-04-12 09:03:46 -04:00
|
|
|
:language: javascript
|
|
|
|
|
|
|
|
Delete An Extra Spec For A Flavor
|
|
|
|
=================================
|
|
|
|
|
2016-06-02 08:50:03 -04:00
|
|
|
.. rest_method:: DELETE /flavors/{flavor_id}/os-extra_specs/{flavor_extra_spec_key}
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
Deletes an extra spec, by key, for a flavor, by ID.
|
|
|
|
|
|
|
|
Normal response codes: 200
|
|
|
|
|
2016-04-23 21:53:27 +08:00
|
|
|
Error response codes: unauthorized(401), forbidden(403), itemNotFound(404)
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
Request
|
2016-04-14 13:10:59 -04:00
|
|
|
-------
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
|
2016-06-02 08:50:03 -04:00
|
|
|
|
2016-04-12 09:03:46 -04:00
|
|
|
- flavor_id: flavor_id
|
|
|
|
- flavor_extra_spec_key: flavor_extra_spec_key
|
|
|
|
|
|
|
|
Response
|
2016-04-14 13:10:59 -04:00
|
|
|
--------
|
2016-04-12 09:03:46 -04:00
|
|
|
|
2016-06-23 18:36:38 -07:00
|
|
|
There is no body content for the response of a successful DELETE action.
|