[dts] [PATCH v1 09/16] framework/ssh_connection: support DUT index argument

Marvin Liu yong.liu at intel.com
Mon Jan 8 03:49:22 CET 2018


Signed-off-by: Marvin Liu <yong.liu at intel.com>

diff --git a/framework/ssh_connection.py b/framework/ssh_connection.py
index 675279b..ce12816 100644
--- a/framework/ssh_connection.py
+++ b/framework/ssh_connection.py
@@ -44,8 +44,8 @@ class SSHConnection(object):
     Implement send_expect/copy function upper SSHPexpet module.
     """
 
-    def __init__(self, host, session_name, username, password=''):
-        self.session = SSHPexpect(host, username, password)
+    def __init__(self, host, session_name, username, password='', dut_id=0):
+        self.session = SSHPexpect(host, username, password, dut_id)
         self.name = session_name
         connection = {}
         connection[self.name] = self.session
@@ -63,7 +63,7 @@ class SSHConnection(object):
 
     def send_command(self, cmds, timeout=1):
         self.logger.info(cmds)
-        out = self.session.send_command(cmds)
+        out = self.session.send_command(cmds, timeout)
         self.logger.debug(out)
         return out
 
-- 
1.9.3



More information about the dts mailing list