4e1d732f4c
This provides simple documentation of the request and response body parameters when setting or replacing all inventories for a resource provider. Change-Id: I720f5b6792b9f4ced905aef31715a835b07be504
98 lines
2.2 KiB
HTML
98 lines
2.2 KiB
HTML
=============================
|
|
Resource provider inventories
|
|
=============================
|
|
|
|
Each resource provider has inventory records for one or more classes
|
|
of resources. An inventory record contains information about the total
|
|
and reserved amounts of the resource and any consumption constraints
|
|
for that resource against the provider.
|
|
|
|
List resource provider inventories
|
|
==================================
|
|
|
|
.. rest_method:: GET /resource_providers/{uuid}/inventories
|
|
|
|
Normal Response Codes: 200
|
|
|
|
Error response codes: itemNotFound(404)
|
|
|
|
Request
|
|
-------
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
- uuid: resource_provider_uuid_path
|
|
|
|
Response
|
|
--------
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
- inventories: inventories
|
|
- 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:: get-inventories.json
|
|
:language: javascript
|
|
|
|
Update resource provider inventories
|
|
====================================
|
|
|
|
Replaces the set of inventory records for the resource provider identified by `{uuid}`.
|
|
|
|
.. rest_method:: PUT /resource_providers/{uuid}/inventories
|
|
|
|
Normal Response Codes: 200
|
|
|
|
Error response codes: badRequest(400), itemNotFound(404), conflict(409)
|
|
|
|
Request
|
|
-------
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
- uuid: resource_provider_uuid_path
|
|
- resource_provider_generation: resource_provider_generation
|
|
- inventories: inventories
|
|
- 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-inventories-request.json
|
|
:language: javascript
|
|
|
|
Response
|
|
--------
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
- resource_provider_generation: resource_provider_generation
|
|
- inventories: inventories
|
|
- allocation_ratio: allocation_ratio
|
|
- max_unit: max_unit
|
|
- min_unit: min_unit
|
|
- reserved: reserved
|
|
- step_size: step_size
|
|
- total: total
|
|
|
|
Response Example
|
|
----------------
|
|
|
|
.. literalinclude:: update-inventories.json
|
|
:language: javascript
|
|
|