Refactor Is Feature Installed
[integration/test.git] / csit / libraries / Tcpdump.robot
index ffc057044d94cf6dd05406ba89f672904025ef24..748a8714d727688d839f05d268e3ff7e96cf96dd 100644 (file)
@@ -1,7 +1,9 @@
 *** Settings ***
 Documentation     Library to catch traffic/packets using linux tcpdump command
 Library           SSHLibrary
+Resource          SSHKeywords.robot
 Resource          Utils.robot
+Resource          RemoteBash.robot
 Variables         ../variables/Variables.py
 
 *** Variables ***
@@ -18,7 +20,7 @@ Start Tcpdumping
     [Documentation]    Connects to the remote machine via ssh and starts tcpdump linux command
     ${currentcon}=    SSHLibrary.Get Connection    index=True
     SSHLibrary.Open Connection    ${system}    prompt=${prompt}    timeout=${timeout}    alias=${dumpalias}
-    Utils.Flexible SSH Login    ${user}    password=${password}    delay=${timeout}
+    SSHKeywords.Flexible SSH Login    ${user}    password=${password}    delay=${timeout}
     SSHLibrary.Write    ${dumpcmd} -i ${eth} ${more_params}
     Run Keyword If    ${currentcon}==${None}    Return From Keyword
     SSHLibrary.Switch Connection    ${currentcon}
@@ -27,7 +29,7 @@ Stop Tcpdumping And Download
     [Arguments]    ${filename}=${dumppcap}.xz
     [Documentation]    Stops catching packets with tcpdump and download the saved file
     ${oldcon}=    SSHLibrary.Switch Connection    ${dumpalias}
-    Utils.Write_Bare_Ctrl_C
+    RemoteBash.Write_Bare_Ctrl_C
     SSHLibrary.Read
     ${stdout}=    SSHLibrary.Execute Command    xz -9ekvv ${dumppcappath}
     Log    ${stdout}
@@ -44,7 +46,7 @@ Start Packet Capture On Node
     [Documentation]    Connects to the remote machine and starts tcpdump
     ${current_ssh_connection}=    SSHLibrary.Get Connection
     ${conn_id}=    SSHLibrary.Open Connection    ${node_ip}    prompt=${prompt}    timeout=${prompt_timeout}
-    Flexible SSH Login    ${user}    ${password}
+    SSHKeywords.Flexible SSH Login    ${user}    ${password}
     ${cmd} =    Set Variable    sudo /usr/sbin/tcpdump -vvv -ni ${networkAdapter} -w /tmp/${file_Name}.pcap
     ${stdout}    ${stderr} =    SSHLibrary.Start Command    ${cmd}
     Log    ${stderr}