]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Improve entity validation in volumes APIs
authorMark McLoughlin <markmc@redhat.com>
Wed, 12 Sep 2012 11:51:40 +0000 (12:51 +0100)
committerMark McLoughlin <markmc@redhat.com>
Thu, 13 Sep 2012 15:11:36 +0000 (16:11 +0100)
commitdcecb586a0578688656d5420c40c26e5a8caa942
tree07d834466b0227ef69ac40ab6a389e72c11fbe89
parent3dcb3fdba791639ab3fe7ab20b3398babcd27512
Improve entity validation in volumes APIs

Fixes bug #1048565

Use the new Controller.is_valid_body() helper to validate the entity
body in various volumes related POST/PUT handlers and return 422
as appropriate.

Change-Id: I04127972981522c1ed81903893396c4f9665bcd3
cinder/api/openstack/volume/contrib/types_extra_specs.py
cinder/api/openstack/volume/contrib/types_manage.py
cinder/api/openstack/volume/snapshots.py
cinder/api/openstack/volume/volumes.py
cinder/tests/api/openstack/volume/contrib/test_types_extra_specs.py
cinder/tests/api/openstack/volume/contrib/test_types_manage.py
cinder/tests/api/openstack/volume/test_snapshots.py
cinder/tests/api/openstack/volume/test_volumes.py