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_CNTL_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_CNTL_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_CNTL_IP}
68 [Documentation] Stop the karaf in First Controller
69 ${new_cluster_list} = ClusterManagement.Stop Single Member 1 msg=up: ODL1, ODL2, ODL3, down=none
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_CNTL_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_CNTL_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_CNTL_IP} ${new_cluster_list}
85 [Documentation] Bring up ODL1 again
86 ClusterManagement.Start Single Member 1 msg=up: ODL2, ODL3, down: ODL1
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_CNTL_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_CNTL_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_CNTL_IP}
101 [Documentation] Stop the karaf in Second Controller
102 ClusterManagement.Stop Single Member 2 msg=up: ODL1, ODL2, ODL3, down=none
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 2 msg=up: ODL1, ODL3, down: ODL2
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] Stop the karaf in Third Controller
158 ClusterManagement.Stop Single Member 3 msg=up: ODL1, ODL2, ODL3, down=none
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 3 msg=up: ODL1, ODL2, down: ODL3
176 Take Down ODL1 and ODL2
177 [Documentation] Stop the karaf in First and Second Controller
178 BuiltIn.Run Keyword And Ignore Error ClusterManagement.Stop Single Member 1 msg=up: ODL1, ODL2, ODL3, down=none
179 BuiltIn.Run Keyword And Ignore Error ClusterManagement.Stop Single Member 2 msg=up: ODL2, ODL3, down=ODL1
181 Connectivity Tests From Vm Instance1 In net_2
182 [Documentation] Logging to the vm instance using generated key pair.
183 OpenStackOperations.Test Operations From Vm Instance @{NETWORKS}[1] @{NET_2_VM_IPS}[0] ${NET_2_VM_IPS}
185 Connectivity Tests From Vm Instance2 In net_2
186 [Documentation] Logging to the vm instance using generated key pair.
187 OpenStackOperations.Test Operations From Vm Instance @{NETWORKS}[1] @{NET_2_VM_IPS}[1] ${NET_2_VM_IPS}
189 Connectivity Tests From Vm Instance3 In net_2
190 [Documentation] Logging to the vm instance using generated key pair.
191 OpenStackOperations.Test Operations From Vm Instance @{NETWORKS}[1] @{NET_2_VM_IPS}[2] ${NET_2_VM_IPS}
193 Bring Up ODL1 and ODL2
194 [Documentation] Bring up ODL1 and ODL2 again. Do not check for cluster sync until all nodes are
195 ... up. akka will not let nodes join until they are all back up if two were down.
196 ClusterManagement.Start Single Member 1 msg=up: ODL3, down: ODL1, ODL2 wait_for_sync=False
197 ClusterManagement.Start Single Member 2 msg=up: ODL1, ODL3, down: ODL2
200 [Documentation] Delete Vm instances using instance names. Also remove the VM from the
201 ... list so that later cleanup will not try to delete it.
202 OpenStackOperations.Delete Vm Instance @{NET_1_VMS}[0]
203 Remove From List ${NET_1_VMS} 0
205 No Ping For Deleted Vm
206 [Documentation] Check non reachability of deleted vm instances by pinging to them.
207 ${output} = OpenStackOperations.Ping From DHCP Should Not Succeed @{NETWORKS}[0] @{NET_1_VM_IPS}[0]
209 Delete Vm Instances In net_1
210 [Documentation] Delete Vm instances using instance names in network_1.
211 : FOR ${vm} IN @{NET_1_VMS}
212 \ OpenStackOperations.Delete Vm Instance ${vm}
214 Delete Vm Instances In net_2
215 [Documentation] Delete Vm instances using instance names in network_2.
216 : FOR ${vm} IN @{NET_2_VMS}
217 \ OpenStackOperations.Delete Vm Instance ${vm}
219 Delete Sub Networks In net_1
220 [Documentation] Delete Sub Nets for the Networks with neutron request.
221 OpenStackOperations.Delete SubNet @{SUBNETS}[0]
223 Delete Sub Networks In net_2
224 [Documentation] Delete Sub Nets for the Networks with neutron request.
225 OpenStackOperations.Delete SubNet @{SUBNETS}[1]
228 [Documentation] Delete Networks with neutron request.
229 : FOR ${network} IN @{NETWORKS}
230 \ OpenStackOperations.Delete Network ${network}
232 Delete Security Group
233 [Documentation] Delete security groups with neutron request
234 OpenStackOperations.Delete SecurityGroup ${SECURITY_GROUP}
237 [Documentation] Verify that flows have been cleaned up properly after removing all neutron configurations
238 DataModels.Verify Flows Are Cleaned Up On All OpenStack Nodes