]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Fix status comparison for attached volume backup
authorLin Yang <lin.a.yang@intel.com>
Mon, 3 Aug 2015 07:28:15 +0000 (15:28 +0800)
committerLin Yang <lin.a.yang@intel.com>
Mon, 3 Aug 2015 09:40:34 +0000 (17:40 +0800)
commit878007122f6c2590893daea35ab92bb51d624b03
tree7deefcc91daa79fe2570ee3cc000410c3932b14b
parentf4a6c9fd5e66489fd0069baf1e3521ba872fa93f
Fix status comparison for attached volume backup

1) When do backup for an attached volume, its previous_status should be
'in-use' instead of 'in_use'.
2) Added more assertions in corresponding unittest case for this function
to make sure it enter this if-block. Previous test case was passed even
with the incorrect status.

Change-Id: I80385aa593aea5d749409bf591e5a3c5f8ed478f
Closes-Bug: #1480734
cinder/tests/unit/test_volume.py
cinder/volume/driver.py