Library OperatingSystem
Library RequestsLibrary
Resource ../../../libraries/DevstackUtils.robot
+Resource ../../../libraries/DataModels.robot
Resource ../../../libraries/OpenStackOperations.robot
Resource ../../../libraries/SetupUtils.robot
Resource ../../../libraries/Utils.robot
@{VM_INSTANCES_FLOATING} VmInstanceFloating1 VmInstanceFloating2
@{VM_INSTANCES_SNAT} VmInstanceSnat3 VmInstanceSnat4
@{SUBNETS_RANGE} 90.0.0.0/24
+# Parameter values below are based on releng/builder - changing them requires updates in releng/builder as well
${external_gateway} 10.10.10.250
+${external_pnf} 10.10.10.253
${external_subnet} 10.10.10.0/24
+${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
Should Not Contain ${SNAT_VM_IPS} None
Should Not Contain @{FLOATING_DHCP_IP}[0] None
Should Not Contain @{SNAT_DHCP_IP}[0] None
- [Teardown] Run Keywords Show Debugs ${VM_INSTANCES_FLOATING} ${VM_INSTANCES_SNAT}
+ [Teardown] Run Keywords Show Debugs @{VM_INSTANCES_FLOATING} @{VM_INSTANCES_SNAT}
... 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 Subnet ${external_net_name} ${external_subnet_name} ${external_subnet} --gateway ${external_gateway}
+ 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
[Documentation] Create Router and Add Interface to the subnets.
[Documentation] Create and associate a floating IP for the VM
${VM_FLOATING_IPS} OpenStackOperations.Create And Associate Floating IPs ${external_net_name} @{VM_INSTANCES_FLOATING}
Set Suite Variable ${VM_FLOATING_IPS}
- [Teardown] Run Keywords Show Debugs ${VM_INSTANCES_FLOATING}
+ [Teardown] Run Keywords Show Debugs @{VM_INSTANCES_FLOATING}
... AND Get Test Teardown Debugs
Ping External Gateway From Control Node
[Documentation] Check reachability of external gateway by pinging it from the control node.
- OpenStackOperations.Ping Vm From Control Node ${external_gateway}
+ OpenStackOperations.Ping Vm From Control Node ${external_gateway} additional_args=-I ${external_internet_addr}
Ping Vm Instance1 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}[0]
+ OpenStackOperations.Ping Vm From Control Node @{VM_FLOATING_IPS}[0] additional_args=-I ${external_internet_addr}
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]
+ OpenStackOperations.Ping Vm From Control Node @{VM_FLOATING_IPS}[1] additional_args=-I ${external_internet_addr}
-Prepare SNAT - Install Netcat On Controller
- Install Netcat On Controller
+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
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
: 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