From 9b34fc57e921f2ee38679ea002c8bf9e0e85364c Mon Sep 17 00:00:00 2001 From: Jacob Gregor Date: Thu, 27 Aug 2015 16:40:30 -0500 Subject: [PATCH] Clean up line continuation in Storwize driver 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 | 12 ++++++------ cinder/volume/drivers/ibm/storwize_svc/helpers.py | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/cinder/volume/drivers/ibm/storwize_svc/__init__.py b/cinder/volume/drivers/ibm/storwize_svc/__init__.py index 805af3f6c5f..cf400ec4288 100644 --- a/cinder/volume/drivers/ibm/storwize_svc/__init__.py +++ b/cinder/volume/drivers/ibm/storwize_svc/__init__.py @@ -207,12 +207,12 @@ def do_setup(self, ctxt): 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 @@ def initialize_connection(self, volume, connector): 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 ' diff --git a/cinder/volume/drivers/ibm/storwize_svc/helpers.py b/cinder/volume/drivers/ibm/storwize_svc/helpers.py index 762229457db..b34ed086414 100644 --- a/cinder/volume/drivers/ibm/storwize_svc/helpers.py +++ b/cinder/volume/drivers/ibm/storwize_svc/helpers.py @@ -643,9 +643,9 @@ def get_vdisk_copies(self, vdisk): '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,