]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Return 400 if create volume snapshot force parameter is invalid
authorRongze Zhu <zrzhit@gmail.com>
Wed, 12 Sep 2012 10:18:31 +0000 (10:18 +0000)
committerJohn Griffith <john.griffith@solidfire.com>
Fri, 21 Sep 2012 18:01:29 +0000 (12:01 -0600)
commit418ad3ef2dd52200f6d6c26687e64f023c7ba107
tree0c7fb1a1bb4072b70308c6300bcaf53a2c7e88ab
parent4edc1e82bc13e2d234333956db5bf6e551b7bb89
Return 400 if create volume snapshot force parameter is invalid

Fixes bug #1014689

* Add is_valid_boolstr function in utils.py
* Add force parameter check in SnapshotsController.create()
* Add unittest for invalid force parameter.

Change-Id: I0f64326f33eb4fad1cf384bd825f56f09e935f40
(cherry picked from commit c678b045c9839ed30e13fe5e7e655e3cb2e2c3f9)
cinder/api/openstack/volume/snapshots.py
cinder/tests/api/openstack/volume/test_snapshots.py
cinder/utils.py