]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Migrate volume should check para "host" in request
authorhuangtianhua <huangtianhua@huawei.com>
Fri, 22 Nov 2013 07:22:07 +0000 (15:22 +0800)
committerAvishay Traeger <avishay@il.ibm.com>
Sun, 24 Nov 2013 08:20:46 +0000 (10:20 +0200)
commit58db021240cafb33f602aba50fdaa9060c15d84a
tree44f0a261879fc1f8fbf81448d595649b9fe60d93
parent791f5a0b25fef7aee0ac5ce70e311b4d6c834358
Migrate volume should check para "host" in request

The server doesn't check whether the parameter "host" 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.

Closes-Bug: #1253904
Change-Id: I3fb07113816a87f284b47e32bacd57f78a32676c
cinder/api/contrib/admin_actions.py
cinder/tests/api/contrib/test_admin_actions.py