From c8b7136d91e97b918775ad2444cc682fb548b279 Mon Sep 17 00:00:00 2001 From: Sam Hague Date: Tue, 23 Jan 2018 18:21:12 -0500 Subject: [PATCH] Create OpenStack wrapper for tcpdump Change-Id: I26981b5c3c5f3daa5b1ad2df09e7fb29c4786e6a Signed-off-by: Sam Hague --- csit/libraries/OpenStackOperations.robot | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/csit/libraries/OpenStackOperations.robot b/csit/libraries/OpenStackOperations.robot index f685829206..666136845e 100644 --- a/csit/libraries/OpenStackOperations.robot +++ b/csit/libraries/OpenStackOperations.robot @@ -10,6 +10,7 @@ Resource L2GatewayOperations.robot Resource OVSDB.robot Resource SetupUtils.robot Resource SSHKeywords.robot +Resource Tcpdump.robot Resource Utils.robot Resource ../variables/Variables.robot Resource ../variables/netvirt/Variables.robot @@ -1179,3 +1180,16 @@ Reset OVS Logging On All OpenStack Nodes Run Keyword If 0 < ${NUM_OS_SYSTEM} OVSDB.Reset OVS Logging ${OS_CNTL_CONN_ID} Run Keyword If 1 < ${NUM_OS_SYSTEM} OVSDB.Reset OVS Logging ${OS_CMP1_CONN_ID} Run Keyword If 2 < ${NUM_OS_SYSTEM} OVSDB.Reset OVS Logging ${OS_CMP2_CONN_ID} + +Start Packet Capture On Nodes + [Arguments] ${tag} ${filter} @{ips} + [Documentation] Wrapper keyword around the TcpDump packet capture that is catered to the Openstack setup. + ... The caller must pass the three arguments with a variable number of ips at the end, + ... but ${EMPTY} can be used for the tag and filter. + ${suite_} = BuiltIn.Evaluate """${SUITE_NAME}""".replace(" ","_").replace("/","_").replace(".","_") + ${tag_} = BuiltIn.Catenate SEPARATOR=__ ${tag} ${suite_} + @{capture_conn_ids} = Tcpdump.Start Packet Capture on Nodes tag=${tag_} filter=${filter} ips=${ips} + BuiltIn.Set Suite Variable @{capture_conn_ids} + +Stop Packet Capture On Nodes + Tcpdump.Stop Packet Capture on Nodes ${capture_conn_ids} -- 2.36.6