diff options
author | Janis Gengeris <janis.gengeris@gmail.com> | 2013-01-01 22:28:41 +0200 |
---|---|---|
committer | Janis Gengeris <janis.gengeris@gmail.com> | 2013-01-02 09:06:19 +0200 |
commit | 2b619e271624eb84947a9a9596745d06efe81b08 (patch) | |
tree | 308b7c7a87defda09a92574f127263e470ea2d54 /nova/notifications.py | |
parent | 97d49f951cd27fba8fd562c3b03d7504fe05b4a8 (diff) | |
download | nova-2b619e271624eb84947a9a9596745d06efe81b08.tar.gz nova-2b619e271624eb84947a9a9596745d06efe81b08.tar.xz nova-2b619e271624eb84947a9a9596745d06efe81b08.zip |
Adds os-volume_attachments 'volume_id' validation
If you POST to os-volume_attachments but give the name of the volume
instead of a UUID, it returns a 404 error; this is invalid HTTP.
404 means that the Request-URI has not been found. In fact, the
Request-URI has been found, but a child attribute has been incorrectly
specified. Some other error could be used.
This fixes the problem by returning 'BadRequest' in place of 'NotFound'.
The 'volumeId' is checked to be a valid UUID string before moving
further.
Fixes bug #1062494
Change-Id: Icc5dbc7ac94051514709997457cafb16e870bea9
Diffstat (limited to 'nova/notifications.py')
0 files changed, 0 insertions, 0 deletions