Upgrade RF syntax for v3.2 compatibility
[integration/test.git] / csit / suites / netvirt / snatdnat / snat_dnat.robot
index 7edc3f79e2e2250d764335f4e2beec58c06fa337..c13ec7bb1be79de59b186caf365c75f65c3d845c 100644 (file)
@@ -31,7 +31,7 @@ ${LOOPBACK_IP}    5.5.5.2
 ${DCGW_RD}        100:1
 ${VPN_NAME}       vpn_1
 ${VPN_INSTANCE_ID}    4ae8cd92-48ca-49b5-94e1-b2921a261442
-${ExtIP}          100.100.100.2
+${ExtIP}          100.100.100.24
 @{NETWORKS}       nat_net_1    nat_net_2
 @{EXTERNAL_NETWORKS}    nat_ext_11    nat_ext_22
 @{EXTERNAL_SUB_NETWORKS}    nat_ext_sub_net_1    nat_ext_sub_net_2
@@ -100,6 +100,20 @@ Verify Floating Ip Re-provision And Reachability From External Network Via Neutr
     ${output} =    OVSDB.Get Flow Entries On Node    ${OS_CMP1_CONN_ID}
     BuiltIn.Should Contain    ${output}    ${ExtIP}
 
+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
+    ...    which is associated to L3VPN
+    ${subnetid} =    OpenStackOperations.Get Subnet Id    @{EXTERNAL_SUB_NETWORKS}[0]
+    OpenStackOperations.Add Router Gateway    ${ROUTER}    @{EXTERNAL_NETWORKS}[0]    --fixed-ip subnet=${subnetid},ip-address=${ExtIP}
+    ${FloatIp1} =    OpenStackOperations.Create And Associate Floating IPs    @{EXTERNAL_NETWORKS}[0]    @{NET_1_VMS}[1]
+    ${FloatIp2} =    OpenStackOperations.Create And Associate Floating IPs    @{EXTERNAL_NETWORKS}[0]    @{NET_1_VMS}[2]
+    ${FloatIp3} =    OpenStackOperations.Create And Associate Floating IPs    @{EXTERNAL_NETWORKS}[0]    @{NET_1_VMS}[3]
+    ${output} =    OVSDB.Get Flow Entries On Node    ${OS_CMP2_CONN_ID}
+    BuiltIn.Should Match Regexp    ${output}    ${ExtIP}
+    BuiltIn.Should Match Regexp    ${output}    .*${FloatIp1}.*
+    BuiltIn.Should Match Regexp    ${output}    .*${FloatIp2}.*
+    BuiltIn.Should Match Regexp    ${output}    .*${FloatIp3}.*
+
 *** Keywords ***
 Suite Setup
     [Documentation]    Test Suite for Subnet_Routing_and_Multicast_Deployments.
@@ -121,19 +135,22 @@ Create Setup
     BgpOperations.Setup BGP Peering On DCGW    ${DCGW_SYSTEM_IP}    ${AS_ID}    ${ODL_SYSTEM_IP}    ${VPN_NAME}    ${DCGW_RD}    ${LOOPBACK_IP}
     OpenStackOperations.Create Router    ${ROUTER}
     OpenStackOperations.Add Router Interface    ${ROUTER}    @{SUBNETS}[0]
+    OpenStackOperations.Add Router Interface    ${ROUTER}    @{SUBNETS}[1]
 
 Create Neutron Networks
     [Documentation]    Create required number of networks
-    : FOR    ${NET}    IN    @{NETWORKS}
-    \    OpenStackOperations.Create Network    ${NET}
+    FOR    ${NET}    IN    @{NETWORKS}
+        OpenStackOperations.Create Network    ${NET}
+    END
     OpenStackOperations.Create Network    @{EXTERNAL_NETWORKS}[0]    --external --provider-network-type ${NETWORK_TYPE}
     BuiltIn.Wait Until Keyword Succeeds    3s    1s    Utils.Check For Elements At URI    ${NETWORK_URL}    ${NETWORKS}
 
 Create Neutron Subnets
     [Documentation]    Create required number of subnets for previously created networks
     ${num_of_networks} =    BuiltIn.Get Length    ${NETWORKS}
-    : FOR    ${index}    IN RANGE    0    ${num_of_networks}
-    \    OpenStackOperations.Create SubNet    @{NETWORKS}[${index}]    @{SUBNETS}[${index}]    @{SUBNET_CIDRS}[${index}]
+    FOR    ${index}    IN RANGE    0    ${num_of_networks}
+        OpenStackOperations.Create SubNet    @{NETWORKS}[${index}]    @{SUBNETS}[${index}]    @{SUBNET_CIDRS}[${index}]
+    END
     BuiltIn.Wait Until Keyword Succeeds    3s    1s    Utils.Check For Elements At URI    ${SUBNETWORK_URL}    ${SUBNETS}
 
 Create Neutron Ports