X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=csit%2Flibraries%2FBGPSpeaker.robot;h=9b853bd4b38d130ce4ddac0e288a169af0693932;hb=4b2f0074adbfe9816444cafb6476e2ea7ef634f4;hp=053debd06aea0929313a86a45e07ced470d44640;hpb=708d4a729dc6a8d0d04006d740964f5eb5cfa72c;p=integration%2Ftest.git diff --git a/csit/libraries/BGPSpeaker.robot b/csit/libraries/BGPSpeaker.robot index 053debd06a..9b853bd4b3 100644 --- a/csit/libraries/BGPSpeaker.robot +++ b/csit/libraries/BGPSpeaker.robot @@ -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}