2017-03-24 18:42:56 +03:00
|
|
|
==================
|
|
|
|
Resource Providers
|
|
|
|
==================
|
|
|
|
|
|
|
|
Resource providers are entities which provide consumable inventory of one or
|
|
|
|
more classes of resource (such as disk or memory). They can be listed (with
|
|
|
|
filters), created, updated and deleted.
|
|
|
|
|
2017-05-24 10:58:42 +03:00
|
|
|
List resource providers
|
2017-03-24 18:42:56 +03:00
|
|
|
=======================
|
|
|
|
|
|
|
|
.. rest_method:: GET /resource_providers
|
|
|
|
|
|
|
|
List an optionally filtered collection of resource providers.
|
|
|
|
|
|
|
|
Normal Response Codes: 200
|
|
|
|
|
2018-02-21 14:36:04 +09:00
|
|
|
Error response codes: badRequest(400)
|
|
|
|
|
|
|
|
A `400 BadRequest` response code will be returned
|
|
|
|
if a resource class specified in ``resources`` request parameter
|
|
|
|
does not exist.
|
|
|
|
|
2017-03-24 18:42:56 +03:00
|
|
|
Request
|
|
|
|
-------
|
|
|
|
|
|
|
|
Several query parameters are available to filter the returned list of
|
|
|
|
resource providers. If multiple different parameters are provided, the results
|
|
|
|
of all filters are merged with a boolean `AND`.
|
|
|
|
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
|
|
|
|
- name: resource_provider_name_query
|
2017-10-30 18:42:47 +09:00
|
|
|
- uuid: resource_provider_uuid_query
|
2019-03-29 06:51:29 +00:00
|
|
|
- member_of: resource_provider_member_of
|
2018-04-25 16:55:58 -05:00
|
|
|
- resources: resources_query_1_4
|
2017-07-06 09:32:49 +01:00
|
|
|
- in_tree: resource_provider_tree_query
|
2018-04-02 10:52:17 +09:00
|
|
|
- required: resource_provider_required_query
|
2017-03-24 18:42:56 +03:00
|
|
|
|
|
|
|
Response
|
|
|
|
--------
|
|
|
|
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
|
|
|
|
- resource_providers: resource_providers
|
|
|
|
- generation: resource_provider_generation
|
|
|
|
- uuid: resource_provider_uuid
|
|
|
|
- links: resource_provider_links
|
|
|
|
- name: resource_provider_name
|
2018-07-02 10:38:28 -04:00
|
|
|
- parent_provider_uuid: resource_provider_parent_provider_uuid_response_1_14
|
2017-12-11 11:19:25 +09:00
|
|
|
- root_provider_uuid: resource_provider_root_provider_uuid_required
|
2017-03-24 18:42:56 +03:00
|
|
|
|
|
|
|
Response Example
|
|
|
|
----------------
|
|
|
|
|
2017-12-25 13:03:17 +09:00
|
|
|
.. literalinclude:: ./samples/resource_providers/get-resource_providers.json
|
2017-03-24 18:42:56 +03:00
|
|
|
:language: javascript
|
2017-05-24 10:58:42 +03:00
|
|
|
|
|
|
|
Create resource provider
|
|
|
|
========================
|
|
|
|
|
|
|
|
.. rest_method:: POST /resource_providers
|
|
|
|
|
|
|
|
Create a new resource provider.
|
|
|
|
|
2018-03-01 12:30:37 +00:00
|
|
|
Normal Response Codes: 201 (microversions 1.0 - 1.19), 200 (microversions
|
|
|
|
1.20 - )
|
2017-05-24 10:58:42 +03:00
|
|
|
|
|
|
|
Error response codes: conflict(409)
|
|
|
|
|
|
|
|
A `409 Conflict` response code will
|
|
|
|
be returned if another resource provider exists with the provided name
|
|
|
|
or uuid.
|
|
|
|
|
|
|
|
Request
|
|
|
|
-------
|
|
|
|
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
|
|
|
|
- name: resource_provider_name
|
|
|
|
- uuid: resource_provider_uuid_opt
|
2018-07-02 10:38:28 -04:00
|
|
|
- parent_provider_uuid: resource_provider_parent_provider_uuid_request
|
2017-05-24 10:58:42 +03:00
|
|
|
|
|
|
|
Request example
|
|
|
|
---------------
|
|
|
|
|
2017-12-25 13:03:17 +09:00
|
|
|
.. literalinclude:: ./samples/resource_providers/create-resource_providers-request.json
|
2017-05-24 10:58:42 +03:00
|
|
|
:language: javascript
|
|
|
|
|
2018-03-01 12:30:37 +00:00
|
|
|
Response (microversions 1.0 - 1.19)
|
|
|
|
-----------------------------------
|
2017-05-24 10:58:42 +03:00
|
|
|
|
2017-11-20 22:33:39 +09:00
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
|
|
|
|
- Location: location
|
|
|
|
|
2017-05-24 10:58:42 +03:00
|
|
|
No body content is returned on a successful POST.
|
2018-03-01 12:30:37 +00:00
|
|
|
|
|
|
|
Response (microversions 1.20 - )
|
|
|
|
--------------------------------
|
|
|
|
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
|
|
|
|
- Location: location
|
|
|
|
- generation: resource_provider_generation
|
|
|
|
- uuid: resource_provider_uuid
|
|
|
|
- links: resource_provider_links_v1_20
|
|
|
|
- name: resource_provider_name
|
2018-07-02 10:38:28 -04:00
|
|
|
- parent_provider_uuid: resource_provider_parent_provider_uuid_required_no_min
|
2018-03-01 12:30:37 +00:00
|
|
|
- root_provider_uuid: resource_provider_root_provider_uuid_no_min
|
|
|
|
|
|
|
|
Response Example (microversions 1.20 - )
|
|
|
|
----------------------------------------
|
|
|
|
|
|
|
|
.. literalinclude:: ./samples/resource_providers/create-resource_provider.json
|
|
|
|
:language: javascript
|