]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Fix volume migration VolumeType exception
authorRyan McNair <rdmcnair@us.ibm.com>
Mon, 14 Mar 2016 17:37:35 +0000 (17:37 +0000)
committerRyan McNair <rdmcnair@us.ibm.com>
Mon, 14 Mar 2016 17:44:57 +0000 (17:44 +0000)
commit96f4529dd6a884694840f1678d475b4004d3429d
tree4cf30676d2748fa54e2add5b1711a836bcedfb0f
parent492b350a3fec957263430a1e67457a7386254c61
Fix volume migration VolumeType exception

Since Iabf9c3fab56ffef50695ce45745f193273822b39 modified the default
loaded attributes, the obj_attr_is_set check in finish_volume_migration
is now True for VolumeType. This should not get copied to the new
volume (since it's lazy-loaded based on the volume_type_id), so
this patch adds volume_type to the list of keys to ignore. To get
test coverage, test_finish_volume_migration is updated to use the
default expected_attributes and dict comprehension is updated so
it succeeds without glance_metadata being present.

Change-Id: Id3670dba79afb0d9d1b686ac2772c955372e97af
Closes-Bug: #1555862
Depends-On: I2caf4d3f4aa088d099548e6e88d1776b4cc5810c
cinder/objects/volume.py
cinder/tests/unit/objects/test_volume.py