808323e0c5
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