nova/placement-api-ref/source/resource_classes.inc
Andrey Volkov 60a844cc4d [placement] Add api-ref for resource classes
This provides simple documentation of the path, request and response
body parameters when listing, creating, updating and deleting a resource
class.

Change-Id: I4038d116d53b68344282ef59f9f01753766d2ef8
2017-06-05 14:39:29 +03:00

66 lines
1.2 KiB
PHP

================
Resource Classes
================
Resource classes are entities that indicate standard or
deployer-specific resources that can be provided by a resource
provider.
.. note:: Resource class API calls are availiable starting from version 1.2.
List resource classes
=====================
.. rest_method:: GET /resource_classes
Return a list of all resource classes.
Normal Response Codes: 200
Response
--------
.. rest_parameters:: parameters.yaml
- resource_classes: resource_classes
- links: resource_class_links
- name: resource_class
Response Example
----------------
.. literalinclude:: get-resource_classes.json
:language: javascript
Create resource class
=====================
.. rest_method:: POST /resource_classes
Create a new resource class.
Normal Response Codes: 201
Error response codes: badRequest(400), conflict(409)
A `409 Conflict` response code will
be returned if another resource class exists with the provided name.
Request
-------
.. rest_parameters:: parameters.yaml
- name: resource_class
Request example
---------------
.. literalinclude:: create-resource_classes-request.json
:language: javascript
Response
--------
No body content is returned on a successful POST.