GENIUS-157: CSIT Test suite for OF-Tunnels Phase-1
[integration/test.git] / csit / libraries / OVSDB.robot
index 60bbfce40653e3d12bb78caa1add557943e25c92..c2963e621b07a568372addfd716ab6f1a0617d0f 100644 (file)
@@ -378,7 +378,7 @@ Get Bridge Data
     [Documentation]    This keyword returns first bridge name and UUID from list of bridges.
     ${result} =    SSHLibrary.Execute Command    sudo ovs-vsctl show
     ${uuid} =    String.Get Line    ${result}    0
-    ${line}    ${bridge_name}    Builtin.Should Match Regexp    ${result}    Bridge "(\\w+)"
+    ${line}    ${bridge_name}    Builtin.Should Match Regexp    ${result}    Bridge ([\\w-]+)
     [Return]    ${uuid}    ${bridge_name}
 
 Delete OVS Controller
@@ -485,3 +485,11 @@ Verify Vni Packet Count After Traffic
     BuiltIn.Should Be True    ${diff_count_ingress_port1} >= ${DEFAULT_PING_COUNT}
     BuiltIn.Should Be True    ${diff_count_egress_port2} >= ${DEFAULT_PING_COUNT}
     BuiltIn.Should Be True    ${diff_count_ingress_port2} >= ${DEFAULT_PING_COUNT}
+
+Get Flow Entries On Node
+    [Arguments]    ${conn_id}    ${switch}=${INTEGRATION_BRIDGE}
+    [Documentation]    Return flow entries on the given Node.
+    SSHLibrary.Switch Connection    ${conn_id}
+    ${output} =    Utils.Write Commands Until Expected Prompt    sudo ovs-ofctl -O OpenFlow13 dump-flows ${switch}    ${DEFAULT_LINUX_PROMPT_STRICT}
+    BuiltIn.Log    ${output}
+    [Return]    ${output}