[placement] Add api-ref for PUT RP inventory
This provides simple documentation of the response body and path parameters when setting or replacing an inventory record for a resource provider. Change-Id: I77d99c174b50eef5d2b72e226ff31f03807e69aa
This commit is contained in:
parent
59c02f48ee
commit
f31c79f961
placement-api-ref/source
@ -42,3 +42,55 @@ Response Example
|
|||||||
|
|
||||||
.. literalinclude:: get-inventory.json
|
.. literalinclude:: get-inventory.json
|
||||||
:language: javascript
|
:language: javascript
|
||||||
|
|
||||||
|
Update resource provider inventory
|
||||||
|
==================================
|
||||||
|
|
||||||
|
Replace the inventory record of the `{resource_class}` for the resource
|
||||||
|
provider identified by `{uuid}`.
|
||||||
|
|
||||||
|
.. rest_method:: PUT /resource_providers/{uuid}/inventories/{resource_class}
|
||||||
|
|
||||||
|
Normal Response Codes: 200
|
||||||
|
|
||||||
|
Error response codes: badRequest(400), itemNotFound(404), conflict(409)
|
||||||
|
|
||||||
|
Request
|
||||||
|
-------
|
||||||
|
|
||||||
|
.. rest_parameters:: parameters.yaml
|
||||||
|
|
||||||
|
- uuid: resource_provider_uuid_path
|
||||||
|
- resource_class: resource_class_path
|
||||||
|
- resource_provider_generation: resource_provider_generation
|
||||||
|
- allocation_ratio: allocation_ratio_opt
|
||||||
|
- max_unit: max_unit_opt
|
||||||
|
- min_unit: min_unit_opt
|
||||||
|
- reserved: reserved_opt
|
||||||
|
- step_size: step_size_opt
|
||||||
|
- total: total
|
||||||
|
|
||||||
|
Request example
|
||||||
|
---------------
|
||||||
|
|
||||||
|
.. literalinclude:: update-inventory-request.json
|
||||||
|
:language: javascript
|
||||||
|
|
||||||
|
Response
|
||||||
|
--------
|
||||||
|
|
||||||
|
.. rest_parameters:: parameters.yaml
|
||||||
|
|
||||||
|
- resource_provider_generation: resource_provider_generation
|
||||||
|
- allocation_ratio: allocation_ratio
|
||||||
|
- max_unit: max_unit
|
||||||
|
- min_unit: min_unit
|
||||||
|
- reserved: reserved
|
||||||
|
- step_size: step_size
|
||||||
|
- total: total
|
||||||
|
|
||||||
|
Response Example
|
||||||
|
----------------
|
||||||
|
|
||||||
|
.. literalinclude:: update-inventory.json
|
||||||
|
:language: javascript
|
4
placement-api-ref/source/update-inventory-request.json
Normal file
4
placement-api-ref/source/update-inventory-request.json
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"resource_provider_generation": 7,
|
||||||
|
"total": 50
|
||||||
|
}
|
9
placement-api-ref/source/update-inventory.json
Normal file
9
placement-api-ref/source/update-inventory.json
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"allocation_ratio": 1.0,
|
||||||
|
"max_unit": 2147483647,
|
||||||
|
"min_unit": 1,
|
||||||
|
"reserved": 0,
|
||||||
|
"resource_provider_generation": 8,
|
||||||
|
"step_size": 1,
|
||||||
|
"total": 50
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user