]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Clean up line continuation in Storwize driver
authorJacob Gregor <jgregor@us.ibm.com>
Thu, 27 Aug 2015 21:40:30 +0000 (16:40 -0500)
committerJacob Gregor <jgregor@us.ibm.com>
Thu, 27 Aug 2015 21:54:57 +0000 (16:54 -0500)
There are multiple places in the Storwize driver where '\' is used
for line  continuation. This patch replaces '\' with '()' to make
the code consistent.

Change-Id: Ic64f0562f1e25e499c4fecd366998e31e8ebee7a

cinder/volume/drivers/ibm/storwize_svc/__init__.py
cinder/volume/drivers/ibm/storwize_svc/helpers.py

index 805af3f6c5ff593547cc4777151a9350fd3b9820..cf400ec42889e4b86422d62c709a93e7ea0407c4 100644 (file)
@@ -207,12 +207,12 @@ class StorwizeSVCDriver(san.SanDriver,
             raise exception.InvalidInput(reason=msg)
 
         # Check if compression is supported
-        self._state['compression_enabled'] = \
-            self._helpers.compression_enabled()
+        self._state['compression_enabled'] = (self._helpers.
+                                              compression_enabled())
 
         # Get the available I/O groups
-        self._state['available_iogrps'] = \
-            self._helpers.get_available_io_groups()
+        self._state['available_iogrps'] = (self._helpers.
+                                           get_available_io_groups())
 
         # Get the iSCSI and FC names of the Storwize/SVC nodes
         self._state['storage_nodes'] = self._helpers.get_node_info()
@@ -461,8 +461,8 @@ class StorwizeSVCDriver(san.SanDriver,
                 if len(conn_wwpns) == 0:
                     # TODO(xqli): Remove storwize_svc_npiv_compatibility_mode
                     # in M release.
-                    npiv_compat = self.configuration.\
-                        storwize_svc_npiv_compatibility_mode
+                    npiv_compat = (self.configuration.
+                                   storwize_svc_npiv_compatibility_mode)
                     if not npiv_compat:
                         msg = (_('Could not get FC connection information for '
                                  'the host-volume connection. Is the host '
index 762229457db0da4d2510a960021798f32381ecf1..b34ed0864140b2d095578c2f33547a2424d18e7b 100644 (file)
@@ -643,9 +643,9 @@ class StorwizeHelpers(object):
                   'secondary': None}
 
         resp = self.ssh.lsvdiskcopy(vdisk)
-        for copy_id, status, sync, primary, mdisk_grp in \
+        for copy_id, status, sync, primary, mdisk_grp in (
             resp.select('copy_id', 'status', 'sync',
-                        'primary', 'mdisk_grp_name'):
+                        'primary', 'mdisk_grp_name')):
             copy = {'copy_id': copy_id,
                     'status': status,
                     'sync': sync,