nova/nova/api/openstack
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
..
compute Eliminate additional DB queries in nova lists 2016-08-31 18:21:01 +03:00
placement Add support for allocations in placement API 2016-09-01 11:39:37 -07:00
__init__.py remove processing of blacklist/whitelist/corelist extensions 2016-06-10 11:37:09 -04:00
api_version_request.py Return HTTP 400 on list for invalid status 2016-08-17 13:47:53 +00:00
auth.py Move config options from nova/api directory (1) 2016-05-09 19:23:13 +00:00
common.py Strict ImageRef validation to UUID only 2016-08-04 02:22:15 +00:00
extensions.py network: handle unauthorized exception from neutron 2016-07-12 08:20:24 -04:00
rest_api_version_history.rst Return HTTP 400 on list for invalid status 2016-08-17 13:47:53 +00:00
urlmap.py Use of six.PY3 should be forward compatible 2016-01-17 03:32:34 +00:00
versioned_method.py Implement microversion support on api methods 2014-12-05 09:54:41 +08:00
wsgi.py remove support for legacy v2 generator extensions 2016-06-21 14:55:57 -04:00