Migrate to Openstack CLI
[integration/test.git] / csit / suites / openstack / connectivity / 03_external_network_tests.robot
index 2c4e36575d929a7c4d4e01c3967135be9ab4010a..3cd40936581af72eec5d46bfab020e7410e69da2 100644 (file)
@@ -9,6 +9,7 @@ Library           SSHLibrary
 Library           OperatingSystem
 Library           RequestsLibrary
 Resource          ../../../libraries/DevstackUtils.robot
+Resource          ../../../libraries/DataModels.robot
 Resource          ../../../libraries/OpenStackOperations.robot
 Resource          ../../../libraries/SetupUtils.robot
 Resource          ../../../libraries/Utils.robot
@@ -27,7 +28,6 @@ ${external_subnet_allocation_pool}    start=10.10.10.2,end=10.10.10.249
 ${external_internet_addr}    10.9.9.9
 ${external_net_name}    external-net
 ${external_subnet_name}    external-subnet
-${network1_vlan_id}    167
 
 *** Test Cases ***
 Create All Controller Sessions
@@ -78,7 +78,7 @@ Check Vm Instances Have Ip Address
     ...    AND    Get Test Teardown Debugs
 
 Create External Network And Subnet
-    Create Network    ${external_net_name} --router:external --provider:network_type=vlan --provider:physical_network=${PUBLIC_PHYSICAL_NETWORK} --provider:segmentation_id=${network1_vlan_id}
+    Create Network    ${external_net_name}    --external --provider-network-type flat --provider-physical-network ${PUBLIC_PHYSICAL_NETWORK}
     Create Subnet    ${external_net_name}    ${external_subnet_name}    ${external_subnet}    --gateway ${external_gateway} --allocation-pool ${external_subnet_allocation_pool}
 
 Create Router
@@ -119,15 +119,18 @@ Ping Vm Instance2 Floating IP From Control Node
     [Documentation]    Check reachability of VM instance through floating IP by pinging them.
     OpenStackOperations.Ping Vm From Control Node    @{VM_FLOATING_IPS}[1]    additional_args=-I ${external_internet_addr}
 
+Ping Vm Instance2 Floating IP From Vm Instance1 With Floating IP (Hairpinning)
+    [Documentation]    Check reachability of VM instance floating IP from another VM instance with FIP (with ttl=1 to make sure no router hops)
+    Pass Execution If    "${ODL_STREAM}" == "boron"    Hairpinning support is not available in boron or earlier
+    ${dst_ip}=    Create List    @{VM_FLOATING_IPS}[1]
+    OpenStackOperations.Test Operations From Vm Instance    @{NETWORKS_NAME}[0]    @{FLOATING_VM_IPS}[0]    ${dst_ip}    ttl=1
+
 Ping External Network PNF from Vm Instance 1
     [Documentation]    Check reachability of External Network PNF from VM instance (with ttl=1 to make sure no router hops)
     Pass Execution If    "${ODL_STREAM}" == "boron"    PNF subnet route support is not available in boron or earlier
     ${dst_ip}=    Create List    ${external_pnf}
     OpenStackOperations.Test Operations From Vm Instance    @{NETWORKS_NAME}[0]    @{FLOATING_VM_IPS}[0]    ${dst_ip}    ttl=1
 
-Prepare SNAT - Install Netcat On Controller
-    Install Netcat On Controller
-
 SNAT - TCP connection to External Gateway From SNAT VM Instance1
     [Documentation]    Login to the VM instance and test TCP connection to the controller via SNAT
     Test Netcat Operations From Vm Instance    @{NETWORKS_NAME}[0]    @{SNAT_VM_IPS}[0]    ${external_gateway}
@@ -175,3 +178,7 @@ Delete Networks
     : FOR    ${NetworkElement}    IN    @{NETWORKS_NAME}
     \    OpenStackOperations.Delete Network    ${NetworkElement}
     OpenStackOperations.Delete Network    ${external_net_name}
+
+Verify Flows Cleanup
+    [Documentation]    Verify that flows have been cleaned up properly after removing all neutron configurations
+    Verify Flows Are Cleaned Up On All OpenStack Nodes