]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Update quota-set throw 500 error
authorling-yun <zengyunling@huawei.com>
Mon, 11 Nov 2013 14:00:03 +0000 (22:00 +0800)
committerling-yun <zengyunling@huawei.com>
Thu, 14 Nov 2013 12:27:35 +0000 (20:27 +0800)
commit2ed2f3aff8eee70e02eb995780af292057cfcad4
treeaeeb33a6a5d101975c75a76ff8585955143897d7
parent26b58e2c10011450725ae644b404fabb4b8b6b7f
Update quota-set throw 500 error

The server doesn't check whether the parameter "quota_set" or
"quota_class_set" is in request
body.So the 500 error has been thrown.

We should catch the KeyError and transfer the KeyError to
400(HTTPBadRequest) instead of 500.

Change-Id: I01260c77efa50324f3d203888689cdb1e94d2c21
Closes-Bug: #1249971
cinder/api/contrib/quota_classes.py
cinder/api/contrib/quotas.py
cinder/tests/api/contrib/test_quotas.py