1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128
|
===========================
Resource provider inventory
===========================
See `Resource provider inventories`_ for a description.
This group of API calls works with a single inventory identified by ``resource_class``.
One inventory can be listed, created, updated and deleted per each call.
Show resource provider inventory
================================
.. rest_method:: GET /resource_providers/{uuid}/inventories/{resource_class}
Normal Response Codes: 200
Error response codes: itemNotFound(404)
Request
-------
.. rest_parameters:: parameters.yaml
- uuid: resource_provider_uuid_path
- resource_class: resource_class_path
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:: ./samples/inventories/get-inventory.json
: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
- total: total
- allocation_ratio: allocation_ratio_opt
- max_unit: max_unit_opt
- min_unit: min_unit_opt
- reserved: reserved_opt
- step_size: step_size_opt
Request example
---------------
.. literalinclude:: ./samples/inventories/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:: ./samples/inventories/update-inventory.json
:language: javascript
Delete resource provider inventory
==================================
Delete the inventory record of the `{resource_class}` for
the resource provider identified by `{uuid}`.
See `Troubleshooting`_ section in ``Delete resource provider
inventories`` for a description. In addition, the request returns
HTTP 409 when there are allocations for the specified resource
provider and resource class.
.. _Troubleshooting: ?expanded=delete-resource-provider-inventories-detail#delete-resource-provider-inventories
.. rest_method:: DELETE /resource_providers/{uuid}/inventories/{resource_class}
Normal Response Codes: 204
Error response codes: itemNotFound(404), conflict(409)
Request
-------
.. rest_parameters:: parameters.yaml
- uuid: resource_provider_uuid_path
- resource_class: resource_class_path
Response
--------
No body content is returned on a successful DELETE.
|