![]() A new endpoint supporting PUT and DELETE methods with a path of /allocations/{consumer_id} calls set_allocations and delete_allocations to set or delete allocations for one or more resource classes on one or more resource providers. An example JSON body in PUT request takes the following form: {"allocations": [ { "resource_provider": { "uuid": "d4b87fe1-30ca-4a65-8947-dfa3d85f10be" }, "resources": { "MEMORY_MB": 64, "VCPU": 2 } }, { "resource_provider": { "uuid": "3cbe1001-bba9-4ef6-ae9c-feac1c3f9626" }, "resources": { "DISK_GB": 28 } } ]} The body is validated against the JSON schema defined in the ALLOCATION_SCHEMA constant. The API code calls create_all and delete_all on the AllocationList object. create_all() allows an existing allocation to be replaced. Change-Id: Ic1e90636bad44b7dc76b45c5f93c67f3fe3297f7 Partially-Implements: blueprint generic-resource-pools |
||
---|---|---|
.. | ||
compute | ||
placement | ||
__init__.py | ||
api_version_request.py | ||
auth.py | ||
common.py | ||
extensions.py | ||
rest_api_version_history.rst | ||
urlmap.py | ||
versioned_method.py | ||
wsgi.py |