nova/nova/api
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
..
ec2 Remove unnecessary code added for ec2 deprecation 2016-07-20 23:37:11 +05:30
metadata Merge "Add more vd2 unit tests" 2016-08-30 21:14:30 +00:00
openstack Add support for allocations in placement API 2016-09-01 11:39:37 -07:00
validation Strict ImageRef validation to UUID only 2016-08-04 02:22:15 +00:00
__init__.py Remove unused copyright from nova.api.__init__ 2014-01-10 16:24:50 +08:00
auth.py Use from_environ when creating a context 2016-07-14 12:04:21 +10:00
compute_req_id.py Remove 'v3' from comments in Nova API code 2015-09-14 14:10:58 +00:00
manager.py Remove vi modelines 2014-02-03 14:19:44 +00:00