Added time_out parms to bmc_ssh_utils function definitions
Added time_out parm to os_execute_command and bmc_execute_command
definitions.
Change-Id: If1acdeab14bc40ea5ecd530e0fc5f20ebc93610b
Signed-off-by: Michael Walsh <micwalsh@us.ibm.com>
diff --git a/lib/bmc_ssh_utils.py b/lib/bmc_ssh_utils.py
index 8729fd5..51805c2 100755
--- a/lib/bmc_ssh_utils.py
+++ b/lib/bmc_ssh_utils.py
@@ -20,7 +20,8 @@
ignore_err=0,
fork=0,
quiet=None,
- test_mode=None):
+ test_mode=None,
+ time_out=None):
r"""
Run the given command in an BMC SSH session and return the stdout, stderr
and the return code.
@@ -48,6 +49,10 @@
test_mode If test_mode is set, this function will
not actually run the command. This
defaults to the global test_mode value.
+ time_out The amount of time to allow for the
+ execution of cmd_buf. A value of None
+ means that there is no limit to how long
+ the command may take.
"""
# Get global BMC variable values.
@@ -70,7 +75,7 @@
return grs.execute_ssh_command(cmd_buf, open_connection_args, login_args,
print_out, print_err, ignore_err, fork,
- quiet, test_mode)
+ quiet, test_mode, time_out)
def os_execute_command(cmd_buf,
@@ -79,7 +84,8 @@
ignore_err=0,
fork=0,
quiet=None,
- test_mode=None):
+ test_mode=None,
+ time_out=None):
r"""
Run the given command in an OS SSH session and return the stdout, stderr
and the return code.
@@ -106,6 +112,10 @@
test_mode If test_mode is set, this function will
not actually run the command. This
defaults to the global test_mode value.
+ time_out The amount of time to allow for the
+ execution of cmd_buf. A value of None
+ means that there is no limit to how long
+ the command may take.
"""
# Get global OS variable values.
@@ -127,7 +137,7 @@
return grs.execute_ssh_command(cmd_buf, open_connection_args, login_args,
print_out, print_err, ignore_err, fork,
- quiet, test_mode)
+ quiet, test_mode, time_out)
def xcat_execute_command(cmd_buf,