Support the new path option for yang-model-validator
[integration/test.git] / csit / libraries / BGPSpeaker.robot
index 053debd06aea0929313a86a45e07ced470d44640..9b853bd4b38d130ce4ddac0e288a169af0693932 100644 (file)
@@ -26,10 +26,11 @@ Documentation     Robot keyword library (Resource) for handling the BGP speaker
 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
@@ -86,3 +87,10 @@ Kill_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}