]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Fixes running error for storwize _run_ssh
authorIvy Zhang <shzyu@cn.ibm.com>
Wed, 2 Mar 2016 07:35:56 +0000 (02:35 -0500)
committerJay S Bryant <jsbryant@us.ibm.com>
Wed, 2 Mar 2016 16:31:36 +0000 (10:31 -0600)
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

cinder/volume/drivers/ibm/storwize_svc/storwize_svc_common.py

index 3f32bde35420bd62e1818ac9c98274b21f55c23b..34ce1a334ca330098520131aef01aa3a38341d45 100644 (file)
@@ -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 '