]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Port EMC VMAX to Python 3
authorVictor Stinner <vstinner@redhat.com>
Mon, 9 Nov 2015 11:54:16 +0000 (12:54 +0100)
committerVictor Stinner <vstinner@redhat.com>
Fri, 13 Nov 2015 09:23:15 +0000 (10:23 +0100)
* Fix EMCVMAXMasking._get_storage_group_from_masking_view_instance():
  replace "if groups[0] > 0:" with "if len(groups):"
* tests-py3.txt: add cinder.tests.unit.test_emc_vmax

Partial-Implements: blueprint cinder-python3
Change-Id: I0f6be3cc0873efe683d39c4c70e19d0d0b79beb8

cinder/volume/drivers/emc/emc_vmax_masking.py
tests-py3.txt

index f62a141eeeb9287dd27bf95934a40c417d910bd4..b3b2b98b73ea920c93469fb662ee0c4fd1f9f97d 100644 (file)
@@ -1096,7 +1096,7 @@ class EMCVMAXMasking(object):
         groups = conn.AssociatorNames(
             maskingViewInstance,
             ResultClass='CIM_DeviceMaskingGroup')
-        if groups[0] > 0:
+        if len(groups) > 0:
             foundStorageGroupInstanceName = groups[0]
 
         return foundStorageGroupInstanceName
index 6426844c931afadddc506c5d4c18dc920e4cd64a..727543200814b568a364b02246cbc18e01de8c31 100644 (file)
@@ -56,6 +56,7 @@ cinder.tests.unit.test_dellsc
 cinder.tests.unit.test_dellscapi
 cinder.tests.unit.test_dothill
 cinder.tests.unit.test_drbdmanagedrv
+cinder.tests.unit.test_emc_vmax
 cinder.tests.unit.test_emc_vnxdirect
 cinder.tests.unit.test_emc_xtremio
 cinder.tests.unit.test_eqlx