Added time_out parm to execute_ssh_command definition

Change-Id: I3964b70a130f66d0645280b8587b51c87e5ce2b7
Signed-off-by: Michael Walsh <micwalsh@us.ibm.com>
diff --git a/lib/gen_robot_ssh.py b/lib/gen_robot_ssh.py
index a9db810..0174908 100755
--- a/lib/gen_robot_ssh.py
+++ b/lib/gen_robot_ssh.py
@@ -12,6 +12,8 @@
 import exceptions
 
 import gen_print as gp
+import func_timer as ft
+func_timer = ft.func_timer_class()
 
 from robot.libraries.BuiltIn import BuiltIn
 from SSHLibrary import SSHLibrary
@@ -159,7 +161,8 @@
                         ignore_err=1,
                         fork=0,
                         quiet=None,
-                        test_mode=None):
+                        test_mode=None,
+                        time_out=None):
     r"""
     Run the given command in an SSH session and return the stdout, stderr and
     the return code.
@@ -204,6 +207,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.
     """
 
     gp.lprint_executing()
@@ -262,10 +269,12 @@
                     rc = 0
                 else:
                     stdout, stderr, rc = \
-                        sshlib.execute_command(cmd_buf,
-                                               return_stdout=True,
-                                               return_stderr=True,
-                                               return_rc=True)
+                        func_timer.run(sshlib.execute_command,
+                                       cmd_buf,
+                                       return_stdout=True,
+                                       return_stderr=True,
+                                       return_rc=True,
+                                       time_out=time_out)
         except Exception as execute_exception:
             except_type, except_value, except_traceback = sys.exc_info()
             gp.lprint_var(except_type)