Library SSHLibrary
Library RequestsLibrary
Resource RemoteBash.robot
+Resource ../variables/Variables.robot
*** Variables ***
${BGPSpeaker__OUTPUT_LOG} play.py.out
-${PEER_URL} /restconf/operational/bgp-rib:bgp-rib/rib/example-bgp-rib/peer/bgp:%2F%2F
+${PEER_URL} restconf/operational/bgp-rib:bgp-rib/rib/example-bgp-rib/peer/bgp:%2F%2F
*** Keywords ***
Start_BGP_Speaker
BuiltIn.Return_From_Keyword_If '${status}' == 'PASS'
BuiltIn.Log ${message}
BuiltIn.Fail The prompt was not seen within timeout period.
+
+Kill_All_BGP_Speakers
+ [Documentation] Kill all play.py processes.
+ ${command}= BuiltIn.Set_Variable ps axf | grep play.py | grep -v grep | awk '{print \"kill -9 \" $1}' | sh
+ SSHLibrary.Write ${command}
+ ${output}= SSHLibrary.Read_Until_Prompt
+ BuiltIn.Log ${output}