Remove ODL_STREAM variable from libraries/ChangeCounter.robot
[integration/test.git] / csit / libraries / VpnOperations.robot
index 8c54061d3f5200b4a5398de21c2b37c3a80ec687..dba38bbf48af2186f77d134ea0c6ca205c9d14ed 100644 (file)
@@ -7,13 +7,13 @@ Resource          ../variables/Variables.robot
 Library           Collections
 Library           String
 Library           OperatingSystem
-Variables         ../variables/Variables.py
 
 *** Variables ***
 &{ITM_CREATE_DEFAULT}    tunneltype=vxlan    vlanid=0    prefix=1.1.1.1/24    gateway=0.0.0.0    dpnid1=1    portname1=BR1-eth1    ipaddress1=2.2.2.2
 ...               dpnid2=2    portname2= BR2-eth1    ipaddress2=3.3.3.3
 &{L3VPN_CREATE_DEFAULT}    vpnid=4ae8cd92-48ca-49b5-94e1-b2921a261111    name=vpn1    rd=["2200:1"]    exportrt=["2200:1","8800:1"]    importrt=["2200:1","8800:1"]    tenantid=6c53df3a-3456-11e5-a151-feff819cdc9f
 ${VAR_BASE}       ${CURDIR}/../variables/vpnservice/
+${ODL_FLOWTABLE_L3VPN}    21
 
 *** Keywords ***
 VPN Create L3VPN
@@ -78,3 +78,14 @@ ITM Delete Tunnel
     Log    ${resp.content}
     Should Be Equal As Strings    ${resp.status_code}    200
     [Return]    ${resp.content}
+
+Verify Flows Are Present For L3VPN
+    [Arguments]    ${ip}    ${vm_ips}
+    [Documentation]    Verify Flows Are Present For L3VPN
+    ${flow_output}=    Run Command On Remote System    ${ip}    sudo ovs-ofctl -O OpenFlow13 dump-flows br-int
+    Log    ${flow_output}
+    Should Contain    ${flow_output}    table=${ODL_FLOWTABLE_L3VPN}
+    ${l3vpn_table} =    Get Lines Containing String    ${flow_output}    table=${ODL_FLOWTABLE_L3VPN}
+    Log    ${l3vpn_table}
+    : FOR    ${i}    IN    @{vm_ips}
+    \    ${resp}=    Should Contain    ${l3vpn_table}    ${i}