Library OperatingSystem
Library RequestsLibrary
Resource ../../../libraries/DevstackUtils.robot
+Resource ../../../libraries/DataModels.robot
Resource ../../../libraries/OpenStackOperations.robot
Resource ../../../libraries/SetupUtils.robot
Resource ../../../libraries/Utils.robot
Resource ../../../variables/netvirt/Variables.robot
*** Variables ***
+${SECURITY_GROUP} sg-connectivity
@{NETWORKS_NAME} network_1 network_2 network_3
@{SUBNETS_NAME} subnet_1 subnet_2 subnet_3
@{NET_1_VM_INSTANCES} l3_instance_net_1_1 l3_instance_net_1_2 l3_instance_net_1_3
\ ${feature_check_status}= Run Keyword And Return Status Verify Feature Is Installed ${feature_name}
\ Exit For Loop If '${feature_check_status}' == 'True'
Run Keyword If '${feature_check_status}' == 'True' Create Network @{NETWORKS_NAME}[0]
- ... ELSE Create Network @{NETWORKS_NAME}[0] --provider:network_type=vlan --provider:physical_network=${PUBLIC_PHYSICAL_NETWORK} --provider:segmentation_id=${network1_vlan_id}
+ ... ELSE Create Network @{NETWORKS_NAME}[0] --provider-network-type vlan --provider-physical-network ${PUBLIC_PHYSICAL_NETWORK} --provider-segment ${network1_vlan_id}
Create VXLAN Network (network_2)
[Documentation] Create Network with neutron request.
Create Vm Instances For network_1
[Documentation] Create Four Vm instances using flavor and image names for a network.
- Create Vm Instances network_1 ${NET_1_VM_INSTANCES} sg=csit
+ Create Vm Instances network_1 ${NET_1_VM_INSTANCES} sg=${SECURITY_GROUP}
Create Vm Instances For network_2
[Documentation] Create Four Vm instances using flavor and image names for a network.
- Create Vm Instances network_2 ${NET_2_VM_INSTANCES} sg=csit
+ Create Vm Instances network_2 ${NET_2_VM_INSTANCES} sg=${SECURITY_GROUP}
Create Vm Instances For network_3
[Documentation] Create Four Vm instances using flavor and image names for a network.
- Create Vm Instances network_3 ${NET_3_VM_INSTANCES} sg=csit
+ Create Vm Instances network_3 ${NET_3_VM_INSTANCES} 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 @{NET_1_VM_INSTANCES} @{NET_2_VM_INSTANCES} @{NET_3_VM_INSTANCES}
- \ 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 @{NET_1_VM_INSTANCES}
${status} ${message} Run Keyword And Ignore Error Wait Until Keyword Succeeds 60s 5s Collect VM IP Addresses
${LOOP_COUNT} Get Length ${VM_INSTANCES}
: FOR ${index} IN RANGE 0 ${LOOP_COUNT}
\ ${status} ${message} Run Keyword And Ignore Error Should Not Contain @{VM_IPS}[${index}] None
- \ Run Keyword If '${status}' == 'FAIL' Write Commands Until Prompt nova console-log @{VM_INSTANCES}[${index}] 30s
+ \ Run Keyword If '${status}' == 'FAIL' Write Commands Until Prompt openstack console log show @{VM_INSTANCES}[${index}] 30s
Set Suite Variable ${NET1_L3_VM_IPS}
Set Suite Variable ${NET1_DHCP_IP}
Set Suite Variable ${NET2_L3_VM_IPS}
[Documentation] Delete Networks with neutron request.
: FOR ${NetworkElement} IN @{NETWORKS_NAME}
\ Delete Network ${NetworkElement}
+
+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