]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Fix dictionary key error
authorTomas Hancock <tom.hancock@hp.com>
Wed, 2 Dec 2015 15:07:05 +0000 (15:07 +0000)
committerTomas Hancock <tom.hancock@hp.com>
Wed, 2 Dec 2015 17:08:47 +0000 (17:08 +0000)
The key 'multipath' was being referenced in the 'connector' dictionary
in initialize_connection(), even though the key was not always set.

Change-Id: Ia3c7640a24ebe9bedec3402f6cefb7e457c66ecd
Closes-Bug: #1522062

cinder/volume/drivers/hpe/hpe_3par_iscsi.py

index bdd310fffe1355ba8f9f87c1b079980a951f9014..fca82510806489cbdc1b93fa054564c47f56dd71 100644 (file)
@@ -102,10 +102,11 @@ class HPE3PARISCSIDriver(driver.TransferVD,
         3.0.0 - Rebranded HP to HPE.
         3.0.1 - Python 3 support
         3.0.2 - Remove db access for consistency groups
+        3.0.3 - Fix multipath dictionary key error. bug #1522062
 
     """
 
-    VERSION = "3.0.2"
+    VERSION = "3.0.3"
 
     def __init__(self, *args, **kwargs):
         super(HPE3PARISCSIDriver, self).__init__(*args, **kwargs)
@@ -304,7 +305,7 @@ class HPE3PARISCSIDriver(driver.TransferVD,
                 volume,
                 connector)
 
-            if connector['multipath']:
+            if connector.get('multipath'):
                 ready_ports = common.client.getiSCSIPorts(
                     state=common.client.PORT_STATE_READY)