
In a new microversion, 1.12, include project_id and user_id in the output of GET /allocations/{consumer_uuid} and add JSON schema to enable PUT to /allocations/{consumer_uuid} using the same dict-based format for request body that is used in the GET response. In later commits a similar format will be used in POST /allocations. This symmetry is general good form and also will make client code a little easier. Since GET /allocation_candiates includes objects which are capable of being PUT to /allocations/{consumer_uuid}, its response body has been updated as well, to change the 'allocation_requests' object to use the dict-based format. Internally to handlers/allocation.py the same method (_set_allocations) is used for every microversion. Any previous data structure is transformed into the dict-ish form. This means that pre-existing tests (like allocation-bad-class.yaml) continue to exercise the problems it was made for, but needs to be pinned to an older microversion, rather than being latest. Info about these changes is added to placement-api-ref, rest_api_version_history and a reno. Change-Id: I49f5680c15413bce27f2abba68b699f3ea95dcdc Implements: bp symmetric-allocations Closes-Bug: #1708204
12 lines
581 B
YAML
12 lines
581 B
YAML
---
|
|
features:
|
|
- |
|
|
The 1.12 version of the placement API changes handling of the `PUT
|
|
/allocations/{consumer_uuid}` request to use a dict-based structure for
|
|
the JSON request body to make it more aligned with the response body of
|
|
`GET /allocations/{consumer_uuid}`. Because `PUT` requires `user_id`
|
|
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.
|