Place VMs deterministically
[integration/test.git] / csit / libraries / ExaBgpLib.robot
index 4e8e4de0eac8bceb55484509521be7065811f0be..7d4269b52e82fdc4f604f421d1b51f7768ca4791 100644 (file)
@@ -10,9 +10,11 @@ Documentation     Robot keyword library (Resource) for handling the ExaBgp tool.
 ...
 ...               This library assumes that a SSH connection exists (and is switched to)
 ...               to a Linux machine (usualy TOOLS_SYSTEM) where the ExaBgp should be run.
+...
+...               TODO: RemoteBash.robot contains logic which could be reused here.
 Library           SSHLibrary
 Resource          ${CURDIR}/SSHKeywords.robot
-Resource          ${CURDIR}/Utils.robot
+Resource          ${CURDIR}/RemoteBash.robot
 
 *** Variables ***
 ${CMD}            env exabgp.tcp.port=1790 exabgp --debug
@@ -33,16 +35,16 @@ Stop_ExaBgp
     [Documentation]    Stops the ExaBgp by sending ctrl+c
     ${output}=    SSHLibrary.Read
     BuiltIn.Log    ${output}
-    Utils.Write_Bare_Ctrl_C
+    RemoteBash.Write_Bare_Ctrl_C
     ${output}=    SSHLibrary.Read_Until_Prompt
     BuiltIn.Log    ${output}
     SSHKeywords.Virtual_Env_Deactivate_On_Current_Session    log_output=${True}
 
 Start_ExaBgp_And_Verify_Connected
-    [Arguments]    ${cfg_file}    ${session}    ${exabgp_ip}    ${connection_retries}=${1}
+    [Arguments]    ${cfg_file}    ${session}    ${exabgp_ip}    ${connection_retries}=${3}
     [Documentation]    Starts the ExaBgp and verifies its connection. The verification is done by checking the presence
     ...    of the peer in the bgp rib.
-    : FOR    ${idx}    IN    RANGE    ${connection_retries}
+    : FOR    ${idx}    IN RANGE    ${connection_retries}
     \    Start_ExaBgp    ${cfg_file}
     \    ${status}    ${value}=    BuiltIn.Run_Keyword_And_Ignore_Error    BuiltIn.Wait_Until_Keyword_Succeeds    3x    3s
     \    ...    Verify_ExaBgps_Connection    ${session}    ${exabgp_ip}    connected=${True}