nova/nova/api/openstack/placement/handlers
Chris Dent f441ee55c6 Add support for allocations in placement API
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
2016-09-01 11:39:37 -07:00
..
__init__.py Add initial framing of placement API 2016-07-29 10:31:36 +00:00
allocation.py Add support for allocations in placement API 2016-09-01 11:39:37 -07:00
inventory.py Add support for inventories to placement API 2016-08-18 20:40:30 +00:00
resource_provider.py placement: add filtering by attrs to resource_providers 2016-08-16 13:27:07 +00:00
root.py Add initial framing of placement API 2016-07-29 10:31:36 +00:00
usage.py Add support for usages in the placement API 2016-08-18 21:30:03 +00:00