2016-04-12 09:03:46 -04:00
|
|
|
.. -*- rst -*-
|
|
|
|
|
|
|
|
============================================
|
|
|
|
Flavors with extended attributes (flavors)
|
|
|
|
============================================
|
|
|
|
|
|
|
|
Shows information about flavors.
|
|
|
|
|
|
|
|
List Flavors
|
|
|
|
============
|
|
|
|
|
|
|
|
.. rest_method:: GET /v2.1/{tenant_id}/flavors
|
|
|
|
|
|
|
|
Lists flavors.
|
|
|
|
|
|
|
|
Normal response codes: 200
|
|
|
|
|
|
|
|
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
|
|
|
|
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
|
|
|
|
|
|
|
|
Request
|
2016-04-14 13:10:59 -04:00
|
|
|
-------
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
|
|
|
|
- tenant_id: tenant_id
|
|
|
|
|
|
|
|
Query Parameters
|
|
|
|
~~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
|
|
|
|
- minDisk: minDisk
|
|
|
|
- minRam: minRam
|
|
|
|
- sort_key: sort_key
|
|
|
|
- sort_dir: sort_dir
|
|
|
|
- limit: limit
|
|
|
|
- marker: marker
|
|
|
|
|
|
|
|
Response
|
2016-04-14 13:10:59 -04:00
|
|
|
--------
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
**Example List Flavors: JSON request**
|
|
|
|
|
|
|
|
.. literalinclude:: ../../doc/api_samples/flavors/flavors-list-resp.json
|
|
|
|
:language: javascript
|
|
|
|
|
|
|
|
Create Flavor
|
|
|
|
=============
|
|
|
|
|
|
|
|
.. rest_method:: POST /v2.1/{tenant_id}/flavors
|
|
|
|
|
|
|
|
Creates a flavor.
|
|
|
|
|
|
|
|
Normal response codes: 200
|
|
|
|
|
|
|
|
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
|
|
|
|
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
|
|
|
|
|
|
|
|
Request
|
2016-04-14 13:10:59 -04:00
|
|
|
-------
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
|
|
|
|
- tenant_id: tenant_id
|
|
|
|
|
|
|
|
**Example Create Flavor: JSON request**
|
|
|
|
|
|
|
|
.. literalinclude:: ../../doc/api_samples/flavors/flavor-create-req.json
|
|
|
|
:language: javascript
|
|
|
|
|
|
|
|
Response
|
2016-04-14 13:10:59 -04:00
|
|
|
--------
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
**Example Create Flavor: JSON request**
|
|
|
|
|
|
|
|
.. literalinclude:: ../../doc/api_samples/flavors/flavor-create-resp.json
|
|
|
|
:language: javascript
|
|
|
|
|
|
|
|
Show Flavor Details
|
|
|
|
===================
|
|
|
|
|
|
|
|
.. rest_method:: GET /v2.1/{tenant_id}/flavors/{flavor_id}
|
|
|
|
|
|
|
|
Shows details for a flavor.
|
|
|
|
|
|
|
|
Normal response codes: 200
|
|
|
|
|
|
|
|
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
|
|
|
|
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
|
|
|
|
|
|
|
|
Request
|
2016-04-14 13:10:59 -04:00
|
|
|
-------
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
|
|
|
|
- tenant_id: tenant_id
|
|
|
|
- flavor_id: flavor_id
|
|
|
|
|
|
|
|
Response
|
2016-04-14 13:10:59 -04:00
|
|
|
--------
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
**Example Show Flavor Details: JSON request**
|
|
|
|
|
|
|
|
.. literalinclude:: ../../doc/api_samples/flavors/flavor-show-resp.json
|
|
|
|
:language: javascript
|
|
|
|
|
|
|
|
Delete Flavor
|
|
|
|
=============
|
|
|
|
|
|
|
|
.. rest_method:: DELETE /v2.1/{tenant_id}/flavors/{flavor_id}
|
|
|
|
|
|
|
|
Deletes a flavor.
|
|
|
|
|
|
|
|
Normal response codes: 202
|
|
|
|
|
|
|
|
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
|
|
|
|
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
|
|
|
|
|
|
|
|
Request
|
2016-04-14 13:10:59 -04:00
|
|
|
-------
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
|
|
|
|
- tenant_id: tenant_id
|
|
|
|
- flavor_id: flavor_id
|
|
|
|
|
|
|
|
Response
|
2016-04-14 13:10:59 -04:00
|
|
|
--------
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
List Flavors With Details
|
|
|
|
=========================
|
|
|
|
|
|
|
|
.. rest_method:: GET /v2.1/{tenant_id}/flavors/detail
|
|
|
|
|
|
|
|
Lists flavors with details.
|
|
|
|
|
|
|
|
Normal response codes: 200
|
|
|
|
|
|
|
|
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
|
|
|
|
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
|
|
|
|
|
|
|
|
Request
|
2016-04-14 13:10:59 -04:00
|
|
|
-------
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
|
|
|
|
- tenant_id: tenant_id
|
|
|
|
|
|
|
|
Query Parameters
|
|
|
|
~~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
|
|
|
|
- minDisk: minDisk
|
|
|
|
- minRam: minRam
|
|
|
|
- sort_key: sort_key
|
|
|
|
- sort_dir: sort_dir
|
|
|
|
- limit: limit
|
|
|
|
- marker: marker
|
|
|
|
|
|
|
|
Response
|
2016-04-14 13:10:59 -04:00
|
|
|
--------
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
**Example List Flavors With Details: JSON request**
|
|
|
|
|
|
|
|
.. literalinclude:: ../../doc/api_samples/flavors/flavors-list-detail-resp.json
|
|
|
|
:language: javascript
|
|
|
|
|