From 3048a4ae442f8ff6c44b4cd5187caa6280df2a99 Mon Sep 17 00:00:00 2001 From: Ivy Zhang Date: Wed, 2 Mar 2016 02:35:56 -0500 Subject: [PATCH] Fixes running error for storwize _run_ssh Two problems where introduced to the driver: 1. _run_ssh method does not return a value. 2. Passing wrong parameters to _ssh_execute method. This patch fixes _run_ssh to return the appropriate value and fixes the parameters to _ssh_execute. Change-Id: Ia8bbed5abf1a3920af550eb399bf5d96715d1ea5 Closes-Bug: 1552111 --- .../drivers/ibm/storwize_svc/storwize_svc_common.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cinder/volume/drivers/ibm/storwize_svc/storwize_svc_common.py b/cinder/volume/drivers/ibm/storwize_svc/storwize_svc_common.py index 3f32bde35..34ce1a334 100644 --- a/cinder/volume/drivers/ibm/storwize_svc/storwize_svc_common.py +++ b/cinder/volume/drivers/ibm/storwize_svc/storwize_svc_common.py @@ -1999,8 +1999,8 @@ class StorwizeSVCCommonDriver(san.SanDriver, 'not configured.')) raise try: - self._ssh_execute(self.sshpool.command, - check_exit_code, attempts) + return self._ssh_execute(self.sshpool, command, + check_exit_code, attempts) except Exception: # Need to check if creating an SSHPool storwize_san_secondary_ip @@ -2013,8 +2013,8 @@ class StorwizeSVCCommonDriver(san.SanDriver, self.configuration.storwize_san_secondary_ip) self.sshpool = self._set_up_sshpool( self.configuration.storwize_san_secondary_ip) - self._ssh_execute(self.sshpool.command, - check_exit_code, attempts) + return self._ssh_execute(self.sshpool, command, + check_exit_code, attempts) else: LOG.warning(_LW('Unable to execute SSH command. ' 'Not able to use ' -- 2.45.2