From: Srinivas Rachakonda Date: Fri, 10 Jan 2020 08:23:56 +0000 (+0530) Subject: add wait and check for flow entry for a node X-Git-Tag: pre-potassium~260 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=commitdiff_plain;h=49ff5eb0847dec007f64ce5c107e868c15f66773;p=integration%2Ftest.git add wait and check for flow entry for a node 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 Change-Id: I3f640f3da4be79a0bf0529f62a76309d429c35e9 Signed-off-by: Srinivas Rachakonda --- diff --git a/csit/libraries/OVSDB.robot b/csit/libraries/OVSDB.robot index 6414300f05..c64548e073 100644 --- a/csit/libraries/OVSDB.robot +++ b/csit/libraries/OVSDB.robot @@ -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} diff --git a/csit/suites/netvirt/snatdnat/snat_dnat.robot b/csit/suites/netvirt/snatdnat/snat_dnat.robot index c13ec7bb1b..a811190688 100644 --- a/csit/suites/netvirt/snatdnat/snat_dnat.robot +++ b/csit/suites/netvirt/snatdnat/snat_dnat.robot @@ -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 diff --git a/csit/variables/netvirt/Variables.robot b/csit/variables/netvirt/Variables.robot index 654320acbd..b8712903ee 100644 --- a/csit/variables/netvirt/Variables.robot +++ b/csit/variables/netvirt/Variables.robot @@ -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