
In the sphinx document h3 is supposed to be '-' not '^': =, for sections -, for subsections ^, for subsubsections We have to enforce consistency here because we're processing included files which all have to agree, otherwise it's a sphinx error. Part of bp:api-ref-in-rst Change-Id: Ic6eef5cacb07870f161b04b031e332f2b87aeedc
170 lines
3.3 KiB
ReStructuredText
170 lines
3.3 KiB
ReStructuredText
.. -*- 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
|
|
-------
|
|
|
|
.. 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
|
|
--------
|
|
|
|
**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
|
|
-------
|
|
|
|
.. 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
|
|
--------
|
|
|
|
**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
|
|
-------
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
- tenant_id: tenant_id
|
|
- flavor_id: flavor_id
|
|
|
|
Response
|
|
--------
|
|
|
|
**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
|
|
-------
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
- tenant_id: tenant_id
|
|
- flavor_id: flavor_id
|
|
|
|
Response
|
|
--------
|
|
|
|
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
|
|
-------
|
|
|
|
.. 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
|
|
--------
|
|
|
|
**Example List Flavors With Details: JSON request**
|
|
|
|
.. literalinclude:: ../../doc/api_samples/flavors/flavors-list-detail-resp.json
|
|
:language: javascript
|
|
|