path: root/openshift-storage-libs/openshiftstoragelibs/
diff options
authorValerii Ponomarov <>2019-05-24 17:58:01 +0530
committervponomar <>2019-05-29 09:54:03 +0000
commitffdc9f4ea59131de97f8c41784ee6c79d654662f (patch)
tree5a935f0ff3d97d218c773c8529fbaecf81754ab1 /openshift-storage-libs/openshiftstoragelibs/
parent0e5dc8cd5053fd9fd3582221b1bd6c211a643778 (diff)
Use 'cmd_run' func instead of '' func in
It will allow us to recreate SSH connections when it is broken. Also, do following additional things: - Fix 'podcmd' module, where 'user' argument for '' is missing in it's wrapper. - Use "g.log.error" command to log errors when they appear inside of the 'cmd_run' func. - Delete several unused commands, instead of fixing them. - Update several test cases's logic due to the changes in the libraries. Change-Id: I908e5adcff739b6ab3a4aefaebfe46abdee22655
Diffstat (limited to 'openshift-storage-libs/openshiftstoragelibs/')
1 files changed, 5 insertions, 5 deletions
diff --git a/openshift-storage-libs/openshiftstoragelibs/ b/openshift-storage-libs/openshiftstoragelibs/
index 1787bf3..83f49ca 100644
--- a/openshift-storage-libs/openshiftstoragelibs/
+++ b/openshift-storage-libs/openshiftstoragelibs/
@@ -58,7 +58,7 @@ from openshiftstoragelibs import openshift_ops
Pod = namedtuple('Pod', 'node podname')
-def run(target, command, log_level=None,
+def run(target, command, user=None, log_level=None,
"""Function that runs a command on a host or in a pod via a host.
Wraps glusto's run function.
@@ -73,8 +73,8 @@ def run(target, command, log_level=None,
If 'target' is of the 'Pod' type,
then command will run on the specified POD.
command (str|list): Command to run.
- log_level (str|None): log level to be passed on to glusto's
- run method
+ user (str|None): user to be passed on to glusto's run method
+ log_level (str|None): log level to be passed on to glusto's run method
orig_run (function): The default implementation of the
run method. Will be used when target is not a pod.
@@ -102,9 +102,9 @@ def run(target, command, log_level=None,
# unpack the tuple to make sure our return value exactly matches
# our docstring
- return, cmd, log_level=log_level)
+ return, cmd, user=user, log_level=log_level)
- return orig_run(target, command, log_level=log_level)
+ return orig_run(target, command, user=user, log_level=log_level)
class GlustoPod(object):