]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Port IBM driver to Python 3
authorVictor Stinner <vstinner@redhat.com>
Mon, 29 Jun 2015 20:37:29 +0000 (22:37 +0200)
committerVictor Stinner <vstinner@redhat.com>
Sat, 25 Jul 2015 01:01:39 +0000 (03:01 +0200)
* Replace map(None, it1, it2) with zip(it1, it2)
* tox.ini: add the following tests to Python 3.4

  - cinder.tests.unit.test_ibm_flashsystem_iscsi
  - cinder.tests.unit.test_ibmnas

This patch requires Python 3 fixes in os-brick.

Blueprint cinder-python3
Change-Id: I735c39e08cf6e4edd06cf07243fe798b65e8c1a5

cinder/volume/drivers/ibm/flashsystem_common.py
tox.ini

index 678eecb8a5843bc61116d9575eba3536e56e2e32..3d5044a118276cb306a0bf8bbe654fdf84ded5ed 100644 (file)
@@ -386,7 +386,7 @@ class FlashSystemDriver(san.SanDriver):
             (_('_get_hdr_dic: attribute headers and values do not match.\n '
                'Headers: %(header)s\n Values: %(row)s.')
              % {'header': six.text_type(header), 'row': six.text_type(row)}))
-        dic = {a: v for a, v in map(None, attributes, values)}
+        dic = {a: v for a, v in zip(attributes, values)}
         return dic
 
     def _get_host_from_connector(self, connector):
diff --git a/tox.ini b/tox.ini
index f5d87a871333522942f6097b09eecbb5e65051eb..248e88d008dd396da2f7cb6f06a4164a4de6d270 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -68,6 +68,8 @@ commands =
     cinder.tests.unit.test_hplefthand \
     cinder.tests.unit.test_huawei_drivers \
     cinder.tests.unit.test_huawei_drivers_compatibility \
+    cinder.tests.unit.test_ibm_flashsystem_iscsi \
+    cinder.tests.unit.test_ibmnas \
     cinder.tests.unit.test_ibm_xiv_ds8k \
     cinder.tests.unit.test_infortrend_cli \
     cinder.tests.unit.test_netapp_nfs \