]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Cinder os-attach api returns 500
authorPranaliDeore <pranali11.deore@nttdata.com>
Mon, 27 Apr 2015 11:52:46 +0000 (04:52 -0700)
committerAbhijeet Malawade <Abhijeet.Malawade@nttdata.com>
Thu, 7 May 2015 10:59:50 +0000 (03:59 -0700)
commit42d4d1cc7fe8b2f5eb797905baf3a82220c1d711
tree3cbd6269cbc93a9fe4048ff9993cd675379a74c9
parentdaa751a62e46befed0982c6ce16b26f080040c38
Cinder os-attach api returns 500

If volume is in 'in-use' state or invalid instance UUID
is passed to cinder os-attach api, then it returns 500 error
because InvalidVolume and InvalidUUID exceptions are raised
from manager, but not caught at api level.

Caught RemoteError exception in the api and returned 400 error
code if user passes invalid information of the volume or invalid
instance UUID.

Closes-Bug: 1449454
Change-Id: I2121b03b9f2310c40e0158627b7d4b9ba73a8f5d
cinder/api/contrib/volume_actions.py
cinder/tests/unit/api/contrib/test_volume_actions.py