Library OperatingSystem
Library RequestsLibrary
Resource ../../../libraries/DevstackUtils.robot
+Resource ../../../libraries/DataModels.robot
Resource ../../../libraries/OpenStackOperations.robot
Resource ../../../libraries/SetupUtils.robot
Resource ../../../libraries/Utils.robot
*** Variables ***
+${SECURITY_GROUP} sg-connectivity
@{NETWORKS_NAME} l3_net
@{SUBNETS_NAME} l3_subnet
@{VM_INSTANCES_FLOATING} VmInstanceFloating1 VmInstanceFloating2
${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
Create Vm Instances
[Documentation] Create VM instances using flavor and image names for a network.
- OpenStackOperations.Create Vm Instances @{NETWORKS_NAME}[0] ${VM_INSTANCES_FLOATING} sg=csit
- OpenStackOperations.Create Vm Instances @{NETWORKS_NAME}[0] ${VM_INSTANCES_SNAT} sg=csit
+ OpenStackOperations.Create Vm Instances @{NETWORKS_NAME}[0] ${VM_INSTANCES_FLOATING} sg=${SECURITY_GROUP}
+ OpenStackOperations.Create Vm Instances @{NETWORKS_NAME}[0] ${VM_INSTANCES_SNAT} sg=${SECURITY_GROUP}
Check Vm Instances Have Ip Address
[Documentation] Test case to verify that all created VMs are ready and have received their ip addresses.
# first, ensure all VMs are in ACTIVE state. if not, we can just fail the test case and not waste time polling
# for dhcp addresses
: FOR ${vm} IN @{VM_INSTANCES_FLOATING} @{VM_INSTANCES_SNAT}
- \ Wait Until Keyword Succeeds 15s 5s Verify VM Is ACTIVE ${vm}
+ \ Poll VM Is ACTIVE ${vm}
${status} ${message} Run Keyword And Ignore Error Wait Until Keyword Succeeds 60s 5s Collect VM IP Addresses
... true @{VM_INSTANCES_FLOATING}
${status} ${message} Run Keyword And Ignore Error Wait Until Keyword Succeeds 60s 5s Collect VM IP Addresses
... 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
${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}
: 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