[placement] Add api-ref for PUT resource provider
This provides simple documentation of the request and response body parameters when setting or replacing a resource provider. Change-Id: Ifa3c0bad0ec3f9d85f0f18bfd6f90e0bcb52773d
This commit is contained in:
parent
06141e2064
commit
f5c6af7619
@ -41,3 +41,47 @@ Response Example
|
||||
|
||||
.. literalinclude:: 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
|
||||
|
||||
Request example
|
||||
---------------
|
||||
|
||||
.. literalinclude:: 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
|
||||
|
||||
Response Example
|
||||
----------------
|
||||
|
||||
.. literalinclude:: update-resource_provider.json
|
||||
:language: javascript
|
||||
|
@ -0,0 +1 @@
|
||||
{"name": "Shared storage"}
|
27
placement-api-ref/source/update-resource_provider.json
Normal file
27
placement-api-ref/source/update-resource_provider.json
Normal file
@ -0,0 +1,27 @@
|
||||
{
|
||||
"generation": 0,
|
||||
"links": [
|
||||
{
|
||||
"href": "/placement/resource_providers/33f26ae0-dbf2-485b-a24a-244d8280e29f",
|
||||
"rel": "self"
|
||||
},
|
||||
{
|
||||
"href": "/placement/resource_providers/33f26ae0-dbf2-485b-a24a-244d8280e29f/aggregates",
|
||||
"rel": "aggregates"
|
||||
},
|
||||
{
|
||||
"href": "/placement/resource_providers/33f26ae0-dbf2-485b-a24a-244d8280e29f/inventories",
|
||||
"rel": "inventories"
|
||||
},
|
||||
{
|
||||
"href": "/placement/resource_providers/33f26ae0-dbf2-485b-a24a-244d8280e29f/usages",
|
||||
"rel": "usages"
|
||||
},
|
||||
{
|
||||
"href": "/placement/resource_providers/33f26ae0-dbf2-485b-a24a-244d8280e29f/traits",
|
||||
"rel": "traits"
|
||||
}
|
||||
],
|
||||
"name": "Shared storage",
|
||||
"uuid": "33f26ae0-dbf2-485b-a24a-244d8280e29f"
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user