Reviewed: https://review.openstack.org/491487 Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=c95cd011d01f7e5cbd10346223be995f6507f9e7 Submitter: Jenkins Branch: stable/ocata
commit c95cd011d01f7e5cbd10346223be995f6507f9e7 Author: Chris Dent <email address hidden> Date: Wed Aug 2 21:21:12 2017 +0100
[placement] Require at least one allocation when PUT
When doing a PUT to /allocations/{consumer_uuid} if the list of allocations is empty there is a 500 error coming from an uncaught IndexError.
Adjust the schema to require at least one allocation. If no allocations are provided in the list, the response will be a 400.
This doesn't require a microversion because it is changing a 500 to a useful response.
Change-Id: I361fa1e534d7b20c985558e272b672b84c6fe439 Closes-Bug: #1708260 (cherry picked from commit 9155da345e5d6d1aee293bc66f746da52bca4c79)
Reviewed: https:/ /review. openstack. org/491487 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=c95cd011d01 f7e5cbd10346223 be995f6507f9e7
Committed: https:/
Submitter: Jenkins
Branch: stable/ocata
commit c95cd011d01f7e5 cbd10346223be99 5f6507f9e7
Author: Chris Dent <email address hidden>
Date: Wed Aug 2 21:21:12 2017 +0100
[placement] Require at least one allocation when PUT
When doing a PUT to /allocations/ {consumer_ uuid} if the list of
allocations is empty there is a 500 error coming from an uncaught
IndexError.
Adjust the schema to require at least one allocation. If no allocations
are provided in the list, the response will be a 400.
This doesn't require a microversion because it is changing a 500 to
a useful response.
Change-Id: I361fa1e534d7b2 0c985558e272b67 2b84c6fe439 aee293bc66f746d a52bca4c79)
Closes-Bug: #1708260
(cherry picked from commit 9155da345e5d6d1