]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Ensure 'status' in update_snapshot_status
authorzhangyanzi <zhangyanzi@huawei.com>
Fri, 22 Nov 2013 08:41:39 +0000 (16:41 +0800)
committerAvishay Traeger <avishay@il.ibm.com>
Sun, 24 Nov 2013 09:55:43 +0000 (11:55 +0200)
commit3aef51279b36a47ec26b958ec6022da4208cc15e
tree6ab4e0b363238a1e5cab3d69f70d32d3327b643a
parentb4a9c2569935a05a4b58f655fda8e30476dd1f96
Ensure 'status' in update_snapshot_status

The function os-update_snapshot_status doesn't check whether the param
"status" is in request body. It throws 500 error. We should catch the
KeyError and return 400 (HTTPBadRequest) instead.

Change-Id: If3775e3c0299cf0edbdda5081a6633b38462011b
cinder/api/contrib/snapshot_actions.py
cinder/tests/api/contrib/test_snapshot_actions.py