]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
EMC: Fix use of "_" as variable name
authorVipin Balachandran <vbala@vmware.com>
Thu, 12 Mar 2015 22:21:30 +0000 (15:21 -0700)
committerVipin Balachandran <vbala@vmware.com>
Wed, 18 Mar 2015 13:32:23 +0000 (13:32 +0000)
Variables with name "_" will clash with translation lookup
function "_" in cinder.i18n. This patch fixes usage of "_"
as variable name.

Change-Id: I4f03dcfd7b92dcae78e741486ded7028e481d0ee

cinder/volume/drivers/emc/emc_vmax_common.py
cinder/volume/drivers/emc/emc_vmax_fast.py
cinder/volume/drivers/emc/emc_vmax_masking.py
cinder/volume/drivers/emc/emc_vmax_utils.py

index a9df471692d778dc29782c814d203f5bf8441e77..e7964f07d687e9d78ecd81f47d60c2ee902d2db8 100644 (file)
@@ -1481,7 +1481,7 @@ class EMCVMAXCommon(object):
             LOG.debug("HardwareID instance is: %(hardwareIdInstance)s.",
                       {'hardwareIdInstance': hardwareIdInstance})
             try:
-                _, targetEndpoints = (
+                _rc, targetEndpoints = (
                     self.provision.get_target_endpoints(
                         self.conn, storageHardwareService, hardwareIdInstance))
             except Exception as ex:
@@ -1852,7 +1852,7 @@ class EMCVMAXCommon(object):
         :param extraSpecs: extra specifications
         :returns: volumeInstance -- the volume instance
         """
-        volumeDict, _ = (
+        volumeDict, _rc = (
             self.provision.create_volume_from_pool(
                 self.conn, storageConfigService, volumeName, poolInstanceName,
                 volumeSize, extraSpecs))
@@ -1874,7 +1874,7 @@ class EMCVMAXCommon(object):
         :returns: unboundVolumeInstance -- the unbound volume instance
         """
 
-        _, job = (
+        _rc, job = (
             self.provision.unbind_volume_from_storage_pool(
                 conn, storageConfigService, poolInstanceName,
                 volumeInstanceName,
@@ -2316,7 +2316,7 @@ class EMCVMAXCommon(object):
 
         extraSpecs = self._initial_setup(None, volumeTypeId)
 
-        _, storageSystem = (
+        _poolInstanceName, storageSystem = (
             self._get_pool_and_storage_system(extraSpecs))
 
         self.conn = self._get_ecom_connection()
@@ -2358,7 +2358,7 @@ class EMCVMAXCommon(object):
 
         extraSpecs = self._initial_setup(None, volumeTypeId)
 
-        __, storageSystem = (
+        _poolInstanceName, storageSystem = (
             self._get_pool_and_storage_system(extraSpecs))
 
         try:
@@ -2467,7 +2467,7 @@ class EMCVMAXCommon(object):
         extraSpecs = self._initial_setup(None, volumeTypeId)
         self.conn = self._get_ecom_connection()
 
-        _, storageSystem = (
+        _poolInstanceName, storageSystem = (
             self._get_pool_and_storage_system(extraSpecs))
 
         try:
@@ -2505,12 +2505,12 @@ class EMCVMAXCommon(object):
                     volumeSizeInbits))}
 
                 if extraSpecs[ISV3]:
-                    _, volumeDict, _ = (
+                    _rc, volumeDict, _storageSystemName = (
                         self._create_v3_volume(
                             volume, targetVolumeName, volumeSizeInbits,
                             extraSpecs))
                 else:
-                    _, volumeDict, _ = (
+                    _rc, volumeDict, _storageSystemName = (
                         self._create_composite_volume(
                             volume, targetVolumeName, volumeSizeInbits,
                             extraSpecs))
@@ -2603,7 +2603,7 @@ class EMCVMAXCommon(object):
         extraSpecs = self._initial_setup(None, volumeTypeId)
         self.conn = self._get_ecom_connection()
 
-        __, storageSystem = (
+        _poolInstanceName, storageSystem = (
             self._get_pool_and_storage_system(extraSpecs))
 
         try:
@@ -3664,7 +3664,7 @@ class EMCVMAXCommon(object):
 
         volume = {'size':
                   int(self.utils.convert_bits_to_gbs(volumeSizeInbits))}
-        _, volumeDict, storageSystemName = (
+        _rc, volumeDict, _storageSystemName = (
             self._create_v3_volume(
                 volume, cloneName, volumeSizeInbits, extraSpecs))
         targetInstance = self.utils.find_volume_instance(
@@ -3678,7 +3678,7 @@ class EMCVMAXCommon(object):
             # SyncType 7: snap, VG3R default snapshot is snapVx.
             syncType = self.utils.get_num(7, '16')
 
-        _, job = (
+        _rc, job = (
             self.provisionv3.create_element_replica(
                 self.conn, repServiceInstanceName, cloneName, syncType,
                 sourceInstance, extraSpecs, targetInstance))
@@ -3687,7 +3687,7 @@ class EMCVMAXCommon(object):
 
         cloneVolume['provider_location'] = six.text_type(cloneDict)
 
-        syncInstanceName, _ = (
+        syncInstanceName, _storageSystem = (
             self._find_storage_sync_sv_sv(cloneVolume, sourceVolume, True))
 
         # Detach/dissolve the clone/snap relationship.
index e29b62a5f17a3a80640f11952dbf6e23799b6a99..41a0c99460c3bc71e258d1b1b65dd6b47fd865fe 100644 (file)
@@ -283,7 +283,7 @@ class EMCVMAXFast(object):
 
         volumeName = 'vol1'
         volumeSize = '1'
-        volumeDict, _ = (
+        volumeDict, _rc = (
             self.provision.create_volume_from_pool(
                 conn, storageConfigurationInstanceName, volumeName,
                 poolInstanceName, volumeSize, extraSpecs))
index 09fbeb742ed760a051028dc672e12f758060ccd9..64f218e93244081c3992b409d8f1590dd03e6844 100644 (file)
@@ -1163,7 +1163,7 @@ class EMCVMAXMasking(object):
         :param initiatorGroupInstanceName: the initiator group instance name
         :returns: instance name foundMaskingViewInstanceName
         """
-        _, job = (
+        _rc, job = (
             self._create_masking_view(
                 conn, controllerConfigService, maskingViewName,
                 storageGroupInstanceName, portGroupInstanceName,
index 12f796086206699689b52fdb81048c54c5ccbff1..a5cd5c9931c38aa27ba439b9438797e34e5b17b6 100644 (file)
@@ -1524,7 +1524,7 @@ class EMCVMAXUtils(object):
 
         for srpPoolInstanceName in srpPoolInstanceNames:
             poolInstanceID = srpPoolInstanceName['InstanceID']
-            poolnameStr, _ = (
+            poolnameStr, _systemName = (
                 self.parse_pool_instance_id_v3(poolInstanceID))
 
             if six.text_type(poolName) == six.text_type(poolnameStr):