]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Remove the reference of volume['instance_uuid']in VNX driver
authorTina <tina.tang@emc.com>
Mon, 16 Mar 2015 22:55:31 +0000 (18:55 -0400)
committerTina <tina.tang@emc.com>
Tue, 17 Mar 2015 02:34:41 +0000 (22:34 -0400)
Multiattach feature removed the column 'instance_uuid' and
'attached_host' from volume DB model. However, these 2 fields are
used by VNX driver to determine the volume's original status
in retype. This patch changed the VNX driver to not use those
removed fields.

Change-Id: I4b4820d93e784913eeb7e485439d5f434141bcb9
Closes-Bug: 1432925

cinder/tests/test_emc_vnxdirect.py
cinder/volume/drivers/emc/emc_vnx_cli.py

index 6628ae8f5f0e85a4f52d3e11b12fd83baec15757..424d8f398c60cd73234a0515df375282a37d1f9e 100644 (file)
@@ -266,10 +266,10 @@ class EMCVNXCLIDriverTestData():
         'deleted': False,
         'host': "host@backendsec#unit_test_pool",
         'source_volid': None, 'provider_auth': None,
-        'display_name': 'vol-test02', 'instance_uuid': None,
+        'display_name': 'vol-test02',
         'attach_status': 'detached',
         'volume_type': [],
-        'attached_host': None,
+        'volume_attachment': [],
         'provider_location':
         'system^FNM11111|type^lun|id^1|version^05.03.00',
         '_name_id': None, 'volume_metadata': []}
@@ -302,7 +302,8 @@ class EMCVNXCLIDriverTestData():
                     'system^FNM11111|type^lun|id^4',
                     'host': 'ubuntu-server12@array_backend_1',
                     'source_volid': None, 'provider_auth': None,
-                    'display_name': 'vol-test02', 'instance_uuid': None,
+                    'display_name': 'vol-test02',
+                    'volume_attachment': [],
                     'attach_status': 'detached',
                     'volume_type': [],
                     '_name_id': None, 'volume_metadata': []}
@@ -320,7 +321,8 @@ class EMCVNXCLIDriverTestData():
                     'system^FNM11111|type^lun|id^5|version^05.02.00',
                     'host': 'ubuntu-server12@array_backend_1#unit_test_pool',
                     'source_volid': None, 'provider_auth': None,
-                    'display_name': 'vol-test05', 'instance_uuid': None,
+                    'display_name': 'vol-test05',
+                    'volume_attachment': [],
                     'attach_status': 'detached',
                     'volume_type': [],
                     '_name_id': None, 'volume_metadata': []}
index b4526f315e2d6c08ceb5ae289ff94d7047b0f5cb..75fce1483310c24664c0a66fff588bd6d9d739b6 100644 (file)
@@ -1584,7 +1584,7 @@ class CommandLineHelper(object):
 class EMCVnxCliBase(object):
     """This class defines the functions to use the native CLI functionality."""
 
-    VERSION = '05.03.02'
+    VERSION = '05.03.03'
     stats = {'driver_version': VERSION,
              'storage_protocol': None,
              'vendor_name': 'EMC',
@@ -1809,8 +1809,7 @@ class EMCVnxCliBase(object):
         self._client.expand_lun_and_wait(volume['name'], new_size)
 
     def _get_original_status(self, volume):
-        if (volume['instance_uuid'] is None and
-                volume['attached_host'] is None):
+        if not volume['volume_attachment']:
             return 'available'
         else:
             return 'in-use'