]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Dell SC: Add check of current value on retype
authorSean McGinnis <sean_mcginnis@dell.com>
Mon, 27 Jul 2015 14:18:44 +0000 (09:18 -0500)
committerSean McGinnis <sean_mcginnis@dell.com>
Tue, 4 Aug 2015 23:10:35 +0000 (18:10 -0500)
commit6dd75f4554ee53649a3be309ecfe27a6a8752b6d
treee6b51bb861e69cc32e00b3a608080ce8ff0fb407
parentd620337353ee9470824d5f07798ee8d01c4c88fc
Dell SC: Add check of current value on retype

The recently merged retype code for the Dell Storage
Center driver does not check if the new Storage Profile
value is different than the currently set value. While
this is mostly harmless since there isn't a lot of overhead
to setting the Storage Profile to its existing value, it
is still extra overhead and API calls that need to be
performed to complete the operation.

This adds a simple check to compare the current value against
the requested value to decide whether or not to perform the
retype operation. We only support retyping of the Storage
Profile, so if they are the same, just return true to
prevent a migration from happening.

Change-Id: I2d16b4129170cc8ecedfd3674b609badb27b9095
cinder/tests/unit/test_dellsc.py
cinder/volume/drivers/dell/dell_storagecenter_common.py