valence/api-ref/source/valence-api-v1-flavors.inc
Nate Potter 78da85116a Implement flavors
This patch implements flavors, allowing users to save composition
requirements to the database to be used at any time. Parameters
included are the flavor's name, RAM, number of CPU cores, and
processor model.

Change-Id: I356ca9162559598bf1415d2c3b151596f111ac0c
Implements: blueprint flavor
2017-01-25 16:13:55 -08:00

110 lines
1.7 KiB
ReStructuredText

.. -*- rst -*-
============
Flavors
============
List, Searching of Flavors through the ``/v1/flavors``
List Flavors
============
.. rest_method:: GET /v1/flavors/
Normal response codes: 200
Error response codes: badRequest(400), unauthorized(401), forbidden(403)
Request
-------
Response
--------
**Example list of Flavor :**
.. literalinclude:: mockup/flavor-list-response.json
:language: javascript
Create Flavor
=============
.. rest_method:: POST /v1/flavors
Normal response codes: 200
Error response codes: badRequest(400), unauthorized(401), forbidden(403), 404, 409
Request
-------
.. rest_parameters:: parameters.yaml
- name: flavor_name
- ram: flavor_ram
- processor_model: flavor_processor_model
- cores: flavor_cores
**Example generate flavor :**
.. literalinclude:: mockup/flavor-post.json
:language: javascript
Response
---------
**Example list of Flavor :**
.. literalinclude:: mockup/flavor-post-response.json
:language: javascript
Update Flavor
=============
.. rest_method:: PATCH /v1/flavors/{flavor_uuid}
Updates the information stored about a flavor.
Normal response codes: 200
Error response codes: badRequest(400), unauthorized(401), forbidden(403), 404
Request
-------
.. rest_parameters:: parameters.yaml
- flavor_uuid: flavor_uuid
Response
--------
.. rest_parameters:: parameters.yaml
- uuid: flavor_uuid
- name: flavor_name
- ram: flavor_ram
- processor_model: flavor_processor_model
- cores: flavor_cores
Delete Flavor
=============
.. rest_method:: DELETE /v1/flavors/{flavor_uuid}
Deletes a flavor.
Normal response codes: 204
Error response codes: 401, 403, 404, 409
Request
-------
.. rest_parameters:: parameters.yaml
- flavor_ident: flavor_ident