When an allocation is created with PUT /allocations/{consumer_uuid} the
consumer_uuid is not validated as UUID in the API and the DB schema only
checks that is fits into String(36). However the Consumer object stores
this value in a UUIDField oslo only raises a warning today.
This patch adds a UUID validation for that URL path.
Reviewed: https:/ /review. openstack. org/580373 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=928746a7bba b829539e5321198 22e44a932adad8
Committed: https:/
Submitter: Zuul
Branch: master
commit 928746a7bbab829 539e532119822e4 4a932adad8
Author: Balazs Gibizer <email address hidden>
Date: Thu Jul 5 14:55:43 2018 +0200
Add UUID validation for consumer_uuid
When an allocation is created with PUT /allocations/ {consumer_ uuid} the
consumer_uuid is not validated as UUID in the API and the DB schema only
checks that is fits into String(36). However the Consumer object stores
this value in a UUIDField oslo only raises a warning today.
This patch adds a UUID validation for that URL path.
Change-Id: Idedd85ca9266f1 0ce09231c34cab7 ca43029a56c
Closes-Bug: #1780238