d1bc821ee6
Due to a regression in I8624e194fe0173531c5aa2119c903e3c68b8c6cd, the min_version on the parent_provider_uuid response parameter was missing and is added back here. For sanity reasons, the variables are renamed and substitution anchor usage is dropped. To recap the microversions: 1.14 ---- parent_provider_uuid and root_provider_uuid were added to the responses for: * GET /resource_providers (list) * GET /resource_providers/{uuid} (show) * PUT /resource_providers/{uuid} (update) parent_provider_uuid was added to the request for: * POST /resource_providers (create) * PUT /resource_providers/{uuid} (update) 1.20 ---- We started returning a response body from POST /resource_providers (create) which included parent_provider_uuid and root_provider_uuid but the parameters are not versioned in that case since the entire response is versioned for 1.20. Change-Id: I6c9a1072fa2a59e408472f1a4b52b3a8c6a9b343 Closes-Bug: #1779700
123 lines
3.0 KiB
PHP
123 lines
3.0 KiB
PHP
=================
|
|
Resource Provider
|
|
=================
|
|
|
|
See `Resource providers`_ for a description.
|
|
This group of API calls works with a single resource provider
|
|
identified by `uuid`. One resource provider can be listed, updated and
|
|
deleted.
|
|
|
|
Show resource provider
|
|
======================
|
|
|
|
.. rest_method:: GET /resource_providers/{uuid}
|
|
|
|
Return a representation of the resource provider identified by `{uuid}`.
|
|
|
|
Normal Response Codes: 200
|
|
|
|
Error response codes: itemNotFound(404)
|
|
|
|
Request
|
|
-------
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
- uuid: resource_provider_uuid_path
|
|
|
|
Response
|
|
--------
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
- generation: resource_provider_generation
|
|
- uuid: resource_provider_uuid
|
|
- links: resource_provider_links
|
|
- name: resource_provider_name
|
|
- parent_provider_uuid: resource_provider_parent_provider_uuid_response_1_14
|
|
- root_provider_uuid: resource_provider_root_provider_uuid_required
|
|
|
|
Response Example
|
|
----------------
|
|
|
|
.. literalinclude:: ./samples/resource_providers/get-resource_provider.json
|
|
:language: javascript
|
|
|
|
Update resource provider
|
|
========================
|
|
|
|
.. rest_method:: PUT /resource_providers/{uuid}
|
|
|
|
Update the name of the resource provider identified by `{uuid}`.
|
|
|
|
Normal Response Codes: 200
|
|
|
|
Error response codes: badRequest(400), itemNotFound(404), conflict(409)
|
|
|
|
A `409 Conflict` response code will be returned if another resource
|
|
provider exists with the provided name.
|
|
|
|
Request
|
|
-------
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
- uuid: resource_provider_uuid_path
|
|
- name: resource_provider_name
|
|
- parent_provider_uuid: resource_provider_parent_provider_uuid_request
|
|
|
|
Request example
|
|
---------------
|
|
|
|
.. literalinclude:: ./samples/resource_providers/update-resource_provider-request.json
|
|
:language: javascript
|
|
|
|
Response
|
|
--------
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
- generation: resource_provider_generation
|
|
- uuid: resource_provider_uuid
|
|
- links: resource_provider_links
|
|
- name: resource_provider_name
|
|
- parent_provider_uuid: resource_provider_parent_provider_uuid_response_1_14
|
|
- root_provider_uuid: resource_provider_root_provider_uuid_required
|
|
|
|
Response Example
|
|
----------------
|
|
|
|
.. literalinclude:: ./samples/resource_providers/update-resource_provider.json
|
|
:language: javascript
|
|
|
|
Delete resource provider
|
|
========================
|
|
|
|
.. rest_method:: DELETE /resource_providers/{uuid}
|
|
|
|
Delete the resource provider identified by `{uuid}`.
|
|
This will also disassociate aggregates and delete inventories.
|
|
|
|
Normal Response Codes: 204
|
|
|
|
Error response codes: itemNotFound(404), conflict(409)
|
|
|
|
A `409 Conflict` response code will be returned if there exist
|
|
allocations records for any of the inventories that would be deleted
|
|
as a result of removing the resource provider.
|
|
|
|
This error code will be also returned if there are existing child resource
|
|
providers under the parent resource provider being deleted.
|
|
|
|
Request
|
|
-------
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
- uuid: resource_provider_uuid_path
|
|
|
|
Response
|
|
--------
|
|
|
|
No body content is returned on a successful DELETE.
|