diff options
author | Andrey Volkov <avolkov@mirantis.com> | 2017-04-10 13:03:20 +0300 |
---|---|---|
committer | Andrey Volkov <avolkov@mirantis.com> | 2017-05-29 09:18:32 +0300 |
commit | f31c79f961507a282bb8362168f59f462b8fa7a6 (patch) | |
tree | a065213836e14a412a535b95a1974634192565c2 /placement-api-ref | |
parent | 59c02f48eefa756dca0e6c04d2774ae4e46e334e (diff) | |
download | nova-f31c79f961507a282bb8362168f59f462b8fa7a6.tar.gz |
[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
Diffstat (limited to 'placement-api-ref')
-rw-r--r-- | placement-api-ref/source/inventory.inc | 52 | ||||
-rw-r--r-- | placement-api-ref/source/update-inventory-request.json | 4 | ||||
-rw-r--r-- | placement-api-ref/source/update-inventory.json | 9 |
3 files changed, 65 insertions, 0 deletions
diff --git a/placement-api-ref/source/inventory.inc b/placement-api-ref/source/inventory.inc index c0704a8d03..aaf5f4cca1 100644 --- a/placement-api-ref/source/inventory.inc +++ b/placement-api-ref/source/inventory.inc @@ -42,3 +42,55 @@ Response Example .. literalinclude:: 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 + - 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
\ No newline at end of file diff --git a/placement-api-ref/source/update-inventory-request.json b/placement-api-ref/source/update-inventory-request.json new file mode 100644 index 0000000000..cee9a2f583 --- /dev/null +++ b/placement-api-ref/source/update-inventory-request.json @@ -0,0 +1,4 @@ +{ + "resource_provider_generation": 7, + "total": 50 +} diff --git a/placement-api-ref/source/update-inventory.json b/placement-api-ref/source/update-inventory.json new file mode 100644 index 0000000000..690b5837a0 --- /dev/null +++ b/placement-api-ref/source/update-inventory.json @@ -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 +} |