2 Documentation Test suite to verify packet flows between vm instances.
3 Suite Setup OpenStackOperations.OpenStack Suite Setup
4 Suite Teardown Close All Connections
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
11 Resource ../../../libraries/Utils.robot
12 Resource ../../../libraries/OpenStackOperations.robot
13 Resource ../../../libraries/DevstackUtils.robot
14 Resource ../../../libraries/OVSDB.robot
15 Resource ../../../libraries/ClusterOvsdb.robot
16 Resource ../../../libraries/ClusterManagement.robot
17 Resource ../../../libraries/SetupUtils.robot
18 Resource ../../../variables/Variables.robot
19 Resource ../../../variables/netvirt/Variables.robot
22 ${SECURITY_GROUP} cl2_sg
23 @{NETWORKS} cl2_net_1 cl2_net_2
24 @{SUBNETS} cl2_sub_1 cl2_sub_2
25 @{NET_1_VMS} cl2_net_1_vm_1 cl2_net_1_vm_2 cl2_net_1_vm_3
26 @{NET_2_VMS} cl2_net_2_vm_1 cl2_net_2_vm_2 cl2_net_2_vm_3
27 @{SUBNET_CIDRS} 26.0.0.0/24 27.0.0.0/24
28 @{CLUSTER_DOWN_LIST} ${1} ${2}
31 Create All Controller Sessions
32 [Documentation] Create sessions for all three controllers.
33 ClusterManagement.ClusterManagement Setup
36 [Documentation] Create Network with neutron request.
37 OpenStackOperations.Create Network @{NETWORKS}[0]
39 Create Subnet For net_1
40 [Documentation] Create Sub Net for the Network with neutron request.
41 OpenStackOperations.Create SubNet @{NETWORKS}[0] @{SUBNETS}[0] @{SUBNET_CIDRS}[0]
44 [Documentation] Create Network with neutron request.
45 OpenStackOperations.Create Network @{NETWORKS}[1]
47 Create Subnet For net_2
48 [Documentation] Create Sub Net for the Network with neutron request.
49 OpenStackOperations.Create SubNet @{NETWORKS}[1] @{SUBNETS}[1] @{SUBNET_CIDRS}[1]
51 Add Ssh Allow All Rule
52 [Documentation] Allow all TCP/UDP/ICMP packets for this suite
53 OpenStackOperations.Create Allow All SecurityGroup ${SECURITY_GROUP}
55 Create Bridge Manually and Verify Before Fail
56 [Documentation] Create bridge with OVS command and verify it gets applied from all instances.
57 ClusterOvsdb.Create Sample Bridge Manually And Verify ${OS_CONTROL_NODE_IP}
59 Add Tap Device Manually and Verify Before Fail
60 [Documentation] Add tap devices to the bridge with OVS command and verify it gets applied from all instances.
61 ClusterOvsdb.Add Sample Tap Device To The Manual Bridge And Verify ${OS_CONTROL_NODE_IP}
63 Delete the Bridge Manually and Verify Before Fail
64 [Documentation] Delete bridge with OVS command and verify it gets deleted from all instances.
65 ClusterOvsdb.Delete Sample Bridge Manually And Verify ${OS_CONTROL_NODE_IP}
68 [Documentation] Kill the karaf in First Controller
69 ${new_cluster_list} = ClusterManagement.Kill Single Member 1
70 BuiltIn.Set Suite Variable ${new_cluster_list}
72 Create Bridge Manually and Verify After Fail
73 [Documentation] Create bridge with OVS command and verify it gets applied from all instances.
74 ClusterOvsdb.Create Sample Bridge Manually And Verify ${OS_CONTROL_NODE_IP} ${new_cluster_list}
76 Add Tap Device Manually and Verify After Fail
77 [Documentation] Add tap devices to the bridge with OVS command and verify it gets applied from all instances.
78 ClusterOvsdb.Add Sample Tap Device To The Manual Bridge And Verify ${OS_CONTROL_NODE_IP} ${new_cluster_list}
80 Delete the Bridge Manually and Verify After Fail
81 [Documentation] Delete bridge with OVS command and verify it gets deleted from all instances.
82 ClusterOvsdb.Delete Sample Bridge Manually And Verify ${OS_CONTROL_NODE_IP} ${new_cluster_list}
85 [Documentation] Bring up ODL1 again
86 ClusterManagement.Start Single Member member=1 check_system_status=True service_list=@{NETVIRT_DIAG_SERVICES}
88 Create Bridge Manually and Verify After Recover
89 [Documentation] Create bridge with OVS command and verify it gets applied from all instances.
90 ClusterOvsdb.Create Sample Bridge Manually And Verify ${OS_CONTROL_NODE_IP}
92 Add Tap Device Manually and Verify After Recover
93 [Documentation] Add tap devices to the bridge with OVS command and verify it gets applied from all instances.
94 ClusterOvsdb.Add Sample Tap Device To The Manual Bridge And Verify ${OS_CONTROL_NODE_IP}
96 Delete the Bridge Manually and Verify After Recover
97 [Documentation] Delete bridge with OVS command and verify it gets deleted from all instances.
98 ClusterOvsdb.Delete Sample Bridge Manually And Verify ${OS_CONTROL_NODE_IP}
101 [Documentation] Kill the karaf in Second Controller
102 ClusterManagement.Kill Single Member 2
104 Create Vm Instances For net_1
105 [Documentation] Create Vm instances using flavor and image names for a network.
106 OpenStackOperations.Create Vm Instance On Compute Node @{NETWORKS}[0] @{NET_1_VMS}[0] ${OS_CMP1_HOSTNAME} sg=${SECURITY_GROUP}
107 OpenStackOperations.Create Vm Instance On Compute Node @{NETWORKS}[0] @{NET_1_VMS}[1] ${OS_CMP1_HOSTNAME} sg=${SECURITY_GROUP}
108 OpenStackOperations.Create Vm Instance On Compute Node @{NETWORKS}[0] @{NET_1_VMS}[2] ${OS_CMP2_HOSTNAME} sg=${SECURITY_GROUP}
110 Create Vm Instances For net_2
111 [Documentation] Create Vm instances using flavor and image names for a network.
112 OpenStackOperations.Create Vm Instance On Compute Node @{NETWORKS}[1] @{NET_2_VMS}[0] ${OS_CMP1_HOSTNAME} sg=${SECURITY_GROUP}
113 OpenStackOperations.Create Vm Instance On Compute Node @{NETWORKS}[1] @{NET_2_VMS}[1] ${OS_CMP2_HOSTNAME} sg=${SECURITY_GROUP}
114 OpenStackOperations.Create Vm Instance On Compute Node @{NETWORKS}[1] @{NET_2_VMS}[2] ${OS_CMP2_HOSTNAME} sg=${SECURITY_GROUP}
116 Check Vm Instances Have Ip Address
117 @{NET_1_VM_IPS} ${NET_1_DHCP_IP} = OpenStackOperations.Get VM IPs @{NET_1_VMS}
118 @{NET_2_VM_IPS} ${NET_2_DHCP_IP} = OpenStackOperations.Get VM IPs @{NET_2_VMS}
119 BuiltIn.Set Suite Variable @{NET_1_VM_IPS}
120 BuiltIn.Set Suite Variable @{NET_2_VM_IPS}
121 BuiltIn.Should Not Contain ${NET_1_VM_IPS} None
122 BuiltIn.Should Not Contain ${NET_2_VM_IPS} None
123 BuiltIn.Should Not Contain ${NET_1_DHCP_IP} None
124 BuiltIn.Should Not Contain ${NET_2_DHCP_IP} None
125 [Teardown] BuiltIn.Run Keywords OpenStackOperations.Show Debugs @{NET_1_VMS} @{NET_2_VMS}
126 ... AND OpenStackOperations.Get Test Teardown Debugs
129 [Documentation] Bring up ODL2 again
130 ClusterManagement.Start Single Member member=2 check_system_status=True service_list=@{NETVIRT_DIAG_SERVICES}
132 Ping Vm Instance1 In net_1
133 [Documentation] Check reachability of vm instances by pinging to them.
134 OpenStackOperations.Ping Vm From DHCP Namespace @{NETWORKS}[0] @{NET_1_VM_IPS}[0]
136 Ping Vm Instance2 In net_1
137 [Documentation] Check reachability of vm instances by pinging to them.
138 OpenStackOperations.Ping Vm From DHCP Namespace @{NETWORKS}[0] @{NET_1_VM_IPS}[1]
140 Ping Vm Instance3 In net_1
141 [Documentation] Check reachability of vm instances by pinging to them.
142 OpenStackOperations.Ping Vm From DHCP Namespace @{NETWORKS}[0] @{NET_1_VM_IPS}[2]
144 Ping Vm Instance1 In net_2
145 [Documentation] Check reachability of vm instances by pinging to them.
146 OpenStackOperations.Ping Vm From DHCP Namespace @{NETWORKS}[1] @{NET_2_VM_IPS}[0]
148 Ping Vm Instance2 In net_2
149 [Documentation] Check reachability of vm instances by pinging to them.
150 OpenStackOperations.Ping Vm From DHCP Namespace @{NETWORKS}[1] @{NET_2_VM_IPS}[1]
152 Ping Vm Instance3 In net_2
153 [Documentation] Check reachability of vm instances by pinging to them.
154 OpenStackOperations.Ping Vm From DHCP Namespace @{NETWORKS}[1] @{NET_2_VM_IPS}[2]
157 [Documentation] Kill the karaf in Third Controller
158 ClusterManagement.Kill Single Member 3
160 Connectivity Tests From Vm Instance1 In net_1
161 [Documentation] Logging to the vm instance using generated key pair.
162 OpenStackOperations.Test Operations From Vm Instance @{NETWORKS}[0] @{NET_1_VM_IPS}[0] ${NET_1_VM_IPS}
164 Connectivity Tests From Vm Instance2 In net_1
165 [Documentation] Logging to the vm instance using generated key pair.
166 OpenStackOperations.Test Operations From Vm Instance @{NETWORKS}[0] @{NET_1_VM_IPS}[1] ${NET_1_VM_IPS}
168 Connectivity Tests From Vm Instance3 In net_1
169 [Documentation] Logging to the vm instance using generated key pair.
170 OpenStackOperations.Test Operations From Vm Instance @{NETWORKS}[0] @{NET_1_VM_IPS}[2] ${NET_1_VM_IPS}
173 [Documentation] Bring up ODL3 again
174 ClusterManagement.Start Single Member member=3 check_system_status=True service_list=@{NETVIRT_DIAG_SERVICES}
176 Take Down ODL1 and ODL2
177 [Documentation] Kill the karaf in First and Second Controller
178 ClusterManagement.Kill Members From List Or All ${CLUSTER_DOWN_LIST}
180 Connectivity Tests From Vm Instance1 In net_2
181 [Documentation] Logging to the vm instance using generated key pair.
182 OpenStackOperations.Test Operations From Vm Instance @{NETWORKS}[1] @{NET_2_VM_IPS}[0] ${NET_2_VM_IPS}
184 Connectivity Tests From Vm Instance2 In net_2
185 [Documentation] Logging to the vm instance using generated key pair.
186 OpenStackOperations.Test Operations From Vm Instance @{NETWORKS}[1] @{NET_2_VM_IPS}[1] ${NET_2_VM_IPS}
188 Connectivity Tests From Vm Instance3 In net_2
189 [Documentation] Logging to the vm instance using generated key pair.
190 OpenStackOperations.Test Operations From Vm Instance @{NETWORKS}[1] @{NET_2_VM_IPS}[2] ${NET_2_VM_IPS}
192 Bring Up ODL1 and ODL2
193 [Documentation] Bring up ODL1 and ODL2 again.
194 ClusterManagement.Start Members From List Or All member_index_list=${CLUSTER_DOWN_LIST} check_system_status=True service_list=@{NETVIRT_DIAG_SERVICES}
197 [Documentation] Delete Vm instances using instance names. Also remove the VM from the
198 ... list so that later cleanup will not try to delete it.
199 OpenStackOperations.Delete Vm Instance @{NET_1_VMS}[0]
200 Remove From List ${NET_1_VMS} 0
202 No Ping For Deleted Vm
203 [Documentation] Check non reachability of deleted vm instances by pinging to them.
204 ${output} = OpenStackOperations.Ping From DHCP Should Not Succeed @{NETWORKS}[0] @{NET_1_VM_IPS}[0]
206 Delete Vm Instances In net_1
207 [Documentation] Delete Vm instances using instance names in network_1.
208 : FOR ${vm} IN @{NET_1_VMS}
209 \ OpenStackOperations.Delete Vm Instance ${vm}
211 Delete Vm Instances In net_2
212 [Documentation] Delete Vm instances using instance names in network_2.
213 : FOR ${vm} IN @{NET_2_VMS}
214 \ OpenStackOperations.Delete Vm Instance ${vm}
216 Delete Sub Networks In net_1
217 [Documentation] Delete Sub Nets for the Networks with neutron request.
218 OpenStackOperations.Delete SubNet @{SUBNETS}[0]
220 Delete Sub Networks In net_2
221 [Documentation] Delete Sub Nets for the Networks with neutron request.
222 OpenStackOperations.Delete SubNet @{SUBNETS}[1]
225 [Documentation] Delete Networks with neutron request.
226 : FOR ${network} IN @{NETWORKS}
227 \ OpenStackOperations.Delete Network ${network}
229 Delete Security Group
230 [Documentation] Delete security groups with neutron request
231 OpenStackOperations.Delete SecurityGroup ${SECURITY_GROUP}
234 [Documentation] Verify that flows have been cleaned up properly after removing all neutron configurations
235 DataModels.Verify Flows Are Cleaned Up On All OpenStack Nodes