2 Documentation Test suite to verify packet flows between vm instances.
3 Suite Setup OpenStackOperations.OpenStack Suite Setup
4 Suite Teardown OpenStackOperations.OpenStack Suite Teardown
5 Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
6 Test Teardown OpenStackOperations.Get Test Teardown Debugs
8 Library OperatingSystem
9 Library RequestsLibrary
10 Resource ../../../libraries/DevstackUtils.robot
11 Resource ../../../libraries/DataModels.robot
12 Resource ../../../libraries/OpenStackOperations.robot
13 Resource ../../../libraries/SetupUtils.robot
14 Resource ../../../libraries/Utils.robot
15 Resource ../../../libraries/KarafKeywords.robot
16 Resource ../../../variables/netvirt/Variables.robot
19 ${SECURITY_GROUP} l2_sg
20 @{NETWORKS} l2_net_1 l2_net_2
21 @{SUBNETS} l2_sub_1 l2_sub_2
22 @{NET_1_VMS} l2_net_1_vm_1 l2_net_1_vm_2 l2_net_1_vm_3
23 @{NET_2_VMS} l2_net_2_vm_1 l2_net_2_vm_2 l2_net_2_vm_3
24 @{SUBNET_CIDRS} 21.0.0.0/24 22.0.0.0/24
28 Create VLAN Network net_1
29 [Documentation] Create Network with neutron request.
30 OpenStackOperations.Create Network @{NETWORKS}[0] --provider-network-type vlan --provider-physical-network ${PUBLIC_PHYSICAL_NETWORK} --provider-segment ${NET_1_VLAN_ID}
32 Create Subnet For net_1
33 [Documentation] Create Sub Nets for the Networks with neutron request.
34 OpenStackOperations.Create SubNet @{NETWORKS}[0] @{SUBNETS}[0] @{SUBNET_CIDRS}[0]
36 Create VXLAN Network net_2
37 [Documentation] Create Network with neutron request.
38 OpenStackOperations.Create Network @{NETWORKS}[1]
40 Create Subnet For net_2
41 [Documentation] Create Sub Nets for the Networks with neutron request.
42 OpenStackOperations.Create SubNet @{NETWORKS}[1] @{SUBNETS}[1] @{SUBNET_CIDRS}[1]
44 Add Ssh Allow All Rule
45 [Documentation] Allow all TCP/UDP/ICMP packets for this suite
46 OpenStackOperations.Create Allow All SecurityGroup ${SECURITY_GROUP}
48 Create Vm Instances For net_1
49 [Documentation] Create VM instances using flavor and image names for a network.
50 OpenStackOperations.Create Vm Instance On Compute Node @{NETWORKS}[0] @{NET_1_VMS}[0] ${OS_CMP1_HOSTNAME} sg=${SECURITY_GROUP}
51 OpenStackOperations.Create Vm Instance On Compute Node @{NETWORKS}[0] @{NET_1_VMS}[1] ${OS_CMP1_HOSTNAME} sg=${SECURITY_GROUP}
52 OpenStackOperations.Create Vm Instance On Compute Node @{NETWORKS}[0] @{NET_1_VMS}[2] ${OS_CMP2_HOSTNAME} sg=${SECURITY_GROUP}
54 Create Vm Instances For net_2
55 [Documentation] Create VM instances using flavor and image names for a network.
56 OpenStackOperations.Create Vm Instance On Compute Node @{NETWORKS}[1] @{NET_2_VMS}[0] ${OS_CMP1_HOSTNAME} sg=${SECURITY_GROUP}
57 OpenStackOperations.Create Vm Instance On Compute Node @{NETWORKS}[1] @{NET_2_VMS}[1] ${OS_CMP2_HOSTNAME} sg=${SECURITY_GROUP}
58 OpenStackOperations.Create Vm Instance On Compute Node @{NETWORKS}[1] @{NET_2_VMS}[2] ${OS_CMP2_HOSTNAME} sg=${SECURITY_GROUP}
60 Check Vm Instances Have Ip Address
61 @{NET_1_VM_IPS} ${NET_1_DHCP_IP} = OpenStackOperations.Get VM IPs @{NET_1_VMS}
62 @{NET_2_VM_IPS} ${NET_2_DHCP_IP} = OpenStackOperations.Get VM IPs @{NET_2_VMS}
63 BuiltIn.Set Suite Variable @{NET_1_VM_IPS}
64 BuiltIn.Set Suite Variable @{NET_2_VM_IPS}
65 BuiltIn.Should Not Contain ${NET_1_VM_IPS} None
66 BuiltIn.Should Not Contain ${NET_2_VM_IPS} None
67 BuiltIn.Should Not Contain ${NET_1_DHCP_IP} None
68 BuiltIn.Should Not Contain ${NET_2_DHCP_IP} None
69 [Teardown] BuiltIn.Run Keywords OpenStackOperations.Show Debugs @{NET_1_VMS} @{NET_2_VMS}
70 ... AND OpenStackOperations.Get Test Teardown Debugs
72 Ping Vm Instance1 In net_1
73 [Documentation] Check reachability of vm instances by pinging to them.
74 OpenStackOperations.Ping Vm From DHCP Namespace @{NETWORKS}[0] @{NET_1_VM_IPS}[0]
76 Ping Vm Instance2 In net_1
77 [Documentation] Check reachability of vm instances by pinging to them.
78 OpenStackOperations.Ping Vm From DHCP Namespace @{NETWORKS}[0] @{NET_1_VM_IPS}[1]
80 Ping Vm Instance3 In net_1
81 [Documentation] Check reachability of vm instances by pinging to them.
82 OpenStackOperations.Ping Vm From DHCP Namespace @{NETWORKS}[0] @{NET_1_VM_IPS}[2]
84 Ping Vm Instance1 In net_2
85 [Documentation] Check reachability of vm instances by pinging to them.
86 OpenStackOperations.Ping Vm From DHCP Namespace @{NETWORKS}[1] @{NET_2_VM_IPS}[0]
88 Ping Vm Instance2 In net_2
89 [Documentation] Check reachability of vm instances by pinging to them.
90 OpenStackOperations.Ping Vm From DHCP Namespace @{NETWORKS}[1] @{NET_2_VM_IPS}[1]
92 Ping Vm Instance3 In net_2
93 [Documentation] Check reachability of vm instances by pinging to them.
94 OpenStackOperations.Ping Vm From DHCP Namespace @{NETWORKS}[1] @{NET_2_VM_IPS}[2]
96 Connectivity Tests From Vm Instance1 In net_1
97 [Documentation] Login to the vm instance and test some operations
98 OpenStackOperations.Test Operations From Vm Instance @{NETWORKS}[0] @{NET_1_VM_IPS}[0] ${NET_1_VM_IPS}
100 Connectivity Tests From Vm Instance2 In net_1
101 [Documentation] Login to the vm instance and test operations
102 OpenStackOperations.Test Operations From Vm Instance @{NETWORKS}[0] @{NET_1_VM_IPS}[1] ${NET_1_VM_IPS}
104 Connectivity Tests From Vm Instance3 In net_1
105 [Documentation] Login to the vm instance and test operations
106 OpenStackOperations.Test Operations From Vm Instance @{NETWORKS}[0] @{NET_1_VM_IPS}[2] ${NET_1_VM_IPS}
108 Connectivity Tests From Vm Instance1 In net_2
109 [Documentation] Login to the vm instance and test operations
110 OpenStackOperations.Test Operations From Vm Instance @{NETWORKS}[1] @{NET_2_VM_IPS}[0] ${NET_2_VM_IPS}
112 Connectivity Tests From Vm Instance2 In net_2
113 [Documentation] Logging to the vm instance using generated key pair.
114 OpenStackOperations.Test Operations From Vm Instance @{NETWORKS}[1] @{NET_2_VM_IPS}[1] ${NET_2_VM_IPS}
116 Connectivity Tests From Vm Instance3 In net_2
117 [Documentation] Login to the vm instance using generated key pair.
118 OpenStackOperations.Test Operations From Vm Instance @{NETWORKS}[1] @{NET_2_VM_IPS}[2] ${NET_2_VM_IPS}
121 [Documentation] Delete Vm instances using instance names. Also remove the VM from the
122 ... list so that later cleanup will not try to delete it.
123 OpenStackOperations.Delete Vm Instance @{NET_1_VMS}[0]
124 Remove From List ${NET_1_VMS} 0
126 No Ping For Deleted Vm
127 [Documentation] Check non reachability of deleted vm instances by pinging to them.
128 OpenStackOperations.Ping From DHCP Should Not Succeed @{NETWORKS}[0] @{NET_1_VM_IPS}[0]
130 Delete Vm Instances In net_1
131 [Documentation] Delete Vm instances using instance names in net_1.
132 : FOR ${vm} IN @{NET_1_VMS}
133 \ OpenStackOperations.Delete Vm Instance ${vm}
135 Delete Vm Instances In net_2
136 [Documentation] Delete Vm instances using instance names in net_2.
137 : FOR ${vm} IN @{NET_2_VMS}
138 \ OpenStackOperations.Delete Vm Instance ${vm}
140 Delete Sub Network In net_1
141 [Documentation] Delete Sub Net for the Networks with neutron request.
142 OpenStackOperations.Delete SubNet @{SUBNETS}[0]
144 Delete Sub Network In net_2
145 [Documentation] Delete Sub Net for the Networks with neutron request.
146 OpenStackOperations.Delete SubNet @{SUBNETS}[1]
149 [Documentation] Delete Networks with neutron request.
150 : FOR ${networks} IN @{NETWORKS}
151 \ OpenStackOperations.Delete Network ${networks}
153 Delete Security Group
154 [Documentation] Delete security group with neutron request
155 OpenStackOperations.Delete SecurityGroup ${SECURITY_GROUP}
158 [Documentation] Verify that flows have been cleaned up properly after removing all neutron configurations
159 ${feature_check_status}= Run Keyword And Return Status Verify Feature Is Installed odl-vtn-manager-neutron
160 BuiltIn.Run Keyword If '${feature_check_status}' != 'True' DataModels.Verify Flows Are Cleaned Up On All OpenStack Nodes