Configure timeout in Open_Connection_* keywords 60/39360/5
authorVratko Polak <vrpolak@cisco.com>
Fri, 24 Mar 2017 17:40:30 +0000 (18:40 +0100)
committerJamo Luhrsen <jluhrsen@redhat.com>
Fri, 24 Mar 2017 19:03:37 +0000 (19:03 +0000)
The value of this timeout argument is passed "as is" to the
"Open Connection" keyword invocation that is inside of these
keywords. This is needed by suites that require a different
timeout from the default one.

Change-Id: I6681343be3bfbb43e198e347814a16a4cde9d19e
Signed-off-by: Jozef Behran <jbehran@cisco.com>
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
csit/libraries/SSHKeywords.robot

index 7dc93128beec5054553d0c9402d4e4c5420306b1..317c9826c04d40859118861c32624db275269285 100644 (file)
@@ -24,16 +24,16 @@ ${SSHKeywords__current_venv_path}    /tmp/defaultvenv
 
 *** Keywords ***
 Open_Connection_To_ODL_System
-    [Arguments]    ${ip_address}=${ODL_SYSTEM_IP}
+    [Arguments]    ${ip_address}=${ODL_SYSTEM_IP}    ${timeout}=10s
     [Documentation]    Open a connection to the ODL system at ${ip_address} and return its identifier.
-    ${odl_connection} =    SSHLibrary.Open_Connection    ${ip_address}    prompt=${ODL_SYSTEM_PROMPT}    timeout=10s
+    ${odl_connection} =    SSHLibrary.Open_Connection    ${ip_address}    prompt=${ODL_SYSTEM_PROMPT}    timeout=${timeout}
     Utils.Flexible_Controller_Login
     [Return]    ${odl_connection}
 
 Open_Connection_To_Tools_System
-    [Arguments]    ${ip_address}=${TOOLS_SYSTEM_IP}
+    [Arguments]    ${ip_address}=${TOOLS_SYSTEM_IP}    ${timeout}=10s
     [Documentation]    Open a connection to the tools system at ${ip_address} and return its identifier.
-    ${tools_connection} =    SSHLibrary.Open_Connection    ${ip_address}    prompt=${TOOLS_SYSTEM_PROMPT}
+    ${tools_connection} =    SSHLibrary.Open_Connection    ${ip_address}    prompt=${TOOLS_SYSTEM_PROMPT}    timeout=${timeout}
     Utils.Flexible_Mininet_Login
     [Return]    ${tools_connection}