diff --git a/nova/api/openstack/placement/handlers/allocation.py b/nova/api/openstack/placement/handlers/allocation.py index cb5a7c528..c06d4db05 100644 --- a/nova/api/openstack/placement/handlers/allocation.py +++ b/nova/api/openstack/placement/handlers/allocation.py @@ -91,7 +91,7 @@ ALLOCATION_SCHEMA_V1_12 = { "allocations": { "type": "object", "minProperties": 1, - # resource provider id + # resource provider uuid "patternProperties": { "^[0-9a-fA-F-]{36}$": { "type": "object", diff --git a/nova/api/openstack/placement/handlers/allocation_candidate.py b/nova/api/openstack/placement/handlers/allocation_candidate.py index 4a842bd7c..94b6b79e0 100644 --- a/nova/api/openstack/placement/handlers/allocation_candidate.py +++ b/nova/api/openstack/placement/handlers/allocation_candidate.py @@ -89,8 +89,9 @@ def _transform_allocation_requests_list(alloc_reqs): """Turn supplied list of AllocationRequest objects into a list of dicts of resources involved in the allocation request. The returned results is intended to be able to be used as the body of a PUT - /allocations/{consumer_uuid} HTTP request, so therefore we return a list of - JSON objects that looks like the following: + /allocations/{consumer_uuid} HTTP request, prior to microversion 1.12, + so therefore we return a list of JSON objects that looks like the + following: [ { diff --git a/nova/api/openstack/placement/microversion.py b/nova/api/openstack/placement/microversion.py index 210acca40..323e68b4d 100644 --- a/nova/api/openstack/placement/microversion.py +++ b/nova/api/openstack/placement/microversion.py @@ -51,7 +51,8 @@ VERSIONS = [ '1.11', # Adds 'allocations' link to the GET /resource_providers response '1.12', # Add project_id and user_id to GET /allocations/{consumer_uuid} # and PUT to /allocations/{consumer_uuid} in the same dict form - # as GET + # as GET. The 'allocation_requests' format in GET + # /allocation_candidates is updated to be the same as well. '1.13', # Adds POST /allocations to set allocations for multiple consumers ] diff --git a/placement-api-ref/source/parameters.yaml b/placement-api-ref/source/parameters.yaml index 5c000a701..8d746ae70 100644 --- a/placement-api-ref/source/parameters.yaml +++ b/placement-api-ref/source/parameters.yaml @@ -151,7 +151,6 @@ allocations_dict: &allocations_dict type: object in: body required: true - min_version: 1.12 description: > A dictionary of resource allocations keyed by resource provider uuid. allocations_dict_empty: diff --git a/releasenotes/notes/bp-symmetric-allocations-6ff7b270c32dcb7d.yaml b/releasenotes/notes/bp-symmetric-allocations-6ff7b270c32dcb7d.yaml index 89986ed20..f847f9a44 100644 --- a/releasenotes/notes/bp-symmetric-allocations-6ff7b270c32dcb7d.yaml +++ b/releasenotes/notes/bp-symmetric-allocations-6ff7b270c32dcb7d.yaml @@ -8,4 +8,4 @@ features: and `project_id` in the request body, these fields are added to the `GET` response. In addition, the response body for ``GET /allocation_candidates`` is updated so the allocations in the - ``alocation_requests`` object work with the new `PUT` format. + ``allocation_requests`` object work with the new `PUT` format.