add wait and check for flow entry for a node 37/86837/26
authorSrinivas Rachakonda <srinivas.rachakonda@gmail.com>
Fri, 10 Jan 2020 08:23:56 +0000 (13:53 +0530)
committerSrinivas Rachakonda <srinivas.rachakonda@gmail.com>
Tue, 14 Jan 2020 02:46:54 +0000 (08:16 +0530)
Test case changes to look for floating IP of
VM instead of SNAT IP.:
1. Verify Floating Ip
Provision And Reachability From External
Network Via Neutron Router Through L3vpn
2. Verify Floating Ip Re-provision And
Reachability From External Network Via
Neutron Router Through L3vpn

Signed-off-by: Srinivas Rachakonda <srinivas.rachakonda@gmail.com>
Change-Id: I3f640f3da4be79a0bf0529f62a76309d429c35e9
Signed-off-by: Srinivas Rachakonda <srinivas.rachakonda@gmail.com>
csit/libraries/OVSDB.robot
csit/suites/netvirt/snatdnat/snat_dnat.robot
csit/variables/netvirt/Variables.robot

index 6414300f05bab959a97de5b4ac36ee44c35f6eb4..c64548e07370b1f4ab55225a6c9233cc28b35246 100644 (file)
@@ -506,3 +506,9 @@ Verify Ovsdb State
     ${output} =    Utils.Run Command On Remote System And Log    ${dpn_ip}    sudo ovsdb-client dump -f list Open_vSwitch Controller | grep state
     BuiltIn.Log    ${output}
     BuiltIn.Should Contain    ${output}    state=${state}
+
+Verify Flows Are Present On Node
+    [Arguments]    ${conn_id}    ${match}
+    [Documentation]    Verify Flows Are Present On The Given Node
+    ${output} =    OVSDB.Get Flow Entries On Node    ${conn_id}
+    BuiltIn.Should Contain    ${output}    ${match}
index c13ec7bb1be79de59b186caf365c75f65c3d845c..a811190688c7225d1333432bb8ae9add58d5cc94 100644 (file)
@@ -77,8 +77,13 @@ Verify Floating Ip Provision And Reachability From External Network Via Neutron
     ${subnetid} =    OpenStackOperations.Get Subnet Id    @{EXTERNAL_SUB_NETWORKS}[0]
     OpenStackOperations.Add Router Gateway    ${ROUTER}    @{EXTERNAL_NETWORKS}[0]    --fixed-ip subnet=${subnetid},ip-address=${ExtIP}
     ${float} =    OpenStackOperations.Create And Associate Floating IPs    @{EXTERNAL_NETWORKS}[0]    @{NET_1_VMS}[0]
-    ${output} =    OVSDB.Get Flow Entries On Node    ${OS_CMP1_CONN_ID}
-    BuiltIn.Should Contain    ${output}    ${ExtIP}
+    ${float} =    BuiltIn.Set Variable    @{float}[0]
+    @{matching_paras} =    BuiltIn.Create List    nw_dst=${float}    goto_table:${DNAT_TABLE}
+    BuiltIn.Wait Until Keyword Succeeds    10s    5s    OVSDB.Verify Dump Flows For Specific Table    ${OS_CMP1_IP}    ${PDNAT_TABLE}    True
+    ...    ${EMPTY}    @{matching_paras}
+    @{matching_paras} =    BuiltIn.Create List    actions=set_field:${float}    goto_table:${SNAT_TABLE}
+    BuiltIn.Wait Until Keyword Succeeds    10s    5s    OVSDB.Verify Dump Flows For Specific Table    ${OS_CMP1_IP}    ${PSNAT_TABLE}    True
+    ...    ${EMPTY}    @{matching_paras}
 
 Verify Floating Ip De-provision And Reachability From External Network Via Neutron Router Through L3vpn
     [Documentation]    Check floating IP should not be present in dump flows after deleting the floating IP
@@ -97,8 +102,13 @@ Verify Floating Ip Re-provision And Reachability From External Network Via Neutr
     ${subnetid} =    OpenStackOperations.Get Subnet Id    @{EXTERNAL_SUB_NETWORKS}[0]
     OpenStackOperations.Add Router Gateway    ${ROUTER}    @{EXTERNAL_NETWORKS}[0]    --fixed-ip subnet=${subnetid},ip-address=${ExtIP}
     ${float} =    OpenStackOperations.Create And Associate Floating IPs    @{EXTERNAL_NETWORKS}[0]    @{NET_1_VMS}[0]
-    ${output} =    OVSDB.Get Flow Entries On Node    ${OS_CMP1_CONN_ID}
-    BuiltIn.Should Contain    ${output}    ${ExtIP}
+    ${float} =    BuiltIn.Set Variable    @{float}[0]
+    @{matching_paras} =    BuiltIn.Create List    nw_dst=${float}    goto_table:${DNAT_TABLE}
+    BuiltIn.Wait Until Keyword Succeeds    10s    5s    OVSDB.Verify Dump Flows For Specific Table    ${OS_CMP1_IP}    ${PDNAT_TABLE}    True
+    ...    ${EMPTY}    @{matching_paras}
+    @{matching_paras} =    BuiltIn.Create List    actions=set_field:${float}    goto_table:${SNAT_TABLE}
+    BuiltIn.Wait Until Keyword Succeeds    10s    5s    OVSDB.Verify Dump Flows For Specific Table    ${OS_CMP1_IP}    ${PSNAT_TABLE}    True
+    ...    ${EMPTY}    @{matching_paras}
 
 Verify Multiple Floating Ip Creation and Association to external network
     [Documentation]    Check Multiple floating IPs should be present in dump flows after creating multiple floating IPs and associating it to external network
index 654320acbd5cbb043d2ead44dab50c37416ec716..b8712903ee6370fd35e3202fb5241c98a7cd2b7d 100644 (file)
@@ -80,6 +80,10 @@ ${DISPATCHER_TABLE}    17
 ${GWMAC_TABLE}    19
 ${L3_TABLE}       21
 ${L3_PUNT_TABLE}    22
+${PDNAT_TABLE}    25
+${PSNAT_TABLE}    26
+${DNAT_TABLE}     27
+${SNAT_TABLE}     28
 ${INTERNAL_TUNNEL_TABLE}    36
 ${IPV6_TABLE}     45
 ${SNAT_PUNT_TABLE}    46