2 Documentation Test suite to verify packet flows between vm instances.
3 Suite Setup Devstack Suite Setup source_pwd=yes
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 Variables ../../../variables/Variables.py
21 ${SECURITY_GROUP} cl2_sg
22 @{NETWORKS} cl2_net_1 cl2_net_2
23 @{SUBNETS} cl2_sub_1 cl2_sub_2
24 @{NET_1_VMS} cl2_net_1_vm_1 cl2_net_1_vm_2 cl2_net_1_vm_3
25 @{NET_2_VMS} cl2_net_2_vm_1 cl2_net_2_vm_2 cl2_net_2_vm_3
26 @{SUBNET_CIDRS} 26.0.0.0/24 27.0.0.0/24
27 @{CLUSTER_DOWN_LIST} ${1} ${2}
30 Create All Controller Sessions
31 [Documentation] Create sessions for all three contorllers.
32 ClusterManagement.ClusterManagement Setup
35 [Documentation] Create Network with neutron request.
36 OpenStackOperations.Create Network @{NETWORKS}[0]
38 Create Subnet For net_1
39 [Documentation] Create Sub Net for the Network with neutron request.
40 OpenStackOperations.Create SubNet @{NETWORKS}[0] @{SUBNETS}[0] @{SUBNET_CIDRS}[0]
43 [Documentation] Create Network with neutron request.
44 OpenStackOperations.Create Network @{NETWORKS}[1]
46 Create Subnet For net_2
47 [Documentation] Create Sub Net for the Network with neutron request.
48 OpenStackOperations.Create SubNet @{NETWORKS}[1] @{SUBNETS}[1] @{SUBNET_CIDRS}[1]
50 Add Ssh Allow All Rule
51 [Documentation] Allow all TCP/UDP/ICMP packets for this suite
52 OpenStackOperations.Create Allow All SecurityGroup ${SECURITY_GROUP}
54 Create Bridge Manually and Verify Before Fail
55 [Documentation] Create bridge with OVS command and verify it gets applied from all instances.
56 ClusterOvsdb.Create Sample Bridge Manually And Verify ${OS_CONTROL_NODE_IP}
58 Add Tap Device Manually and Verify Before Fail
59 [Documentation] Add tap devices to the bridge with OVS command and verify it gets applied from all instances.
60 ClusterOvsdb.Add Sample Tap Device To The Manual Bridge And Verify ${OS_CONTROL_NODE_IP}
62 Delete the Bridge Manually and Verify Before Fail
63 [Documentation] Delete bridge with OVS command and verify it gets deleted from all instances.
64 ClusterOvsdb.Delete Sample Bridge Manually And Verify ${OS_CONTROL_NODE_IP}
67 [Documentation] Kill the karaf in First Controller
68 ${new_cluster_list} = ClusterManagement.Kill Single Member 1
69 BuiltIn.Set Suite Variable ${new_cluster_list}
71 Create Bridge Manually and Verify After Fail
72 [Documentation] Create bridge with OVS command and verify it gets applied from all instances.
73 ClusterOvsdb.Create Sample Bridge Manually And Verify ${OS_CONTROL_NODE_IP} ${new_cluster_list}
75 Add Tap Device Manually and Verify After Fail
76 [Documentation] Add tap devices to the bridge with OVS command and verify it gets applied from all instances.
77 ClusterOvsdb.Add Sample Tap Device To The Manual Bridge And Verify ${OS_CONTROL_NODE_IP} ${new_cluster_list}
79 Delete the Bridge Manually and Verify After Fail
80 [Documentation] Delete bridge with OVS command and verify it gets deleted from all instances.
81 ClusterOvsdb.Delete Sample Bridge Manually And Verify ${OS_CONTROL_NODE_IP} ${new_cluster_list}
84 [Documentation] Bring up ODL1 again
85 ClusterManagement.Start Single Member 1
87 Create Bridge Manually and Verify After Recover
88 [Documentation] Create bridge with OVS command and verify it gets applied from all instances.
89 ClusterOvsdb.Create Sample Bridge Manually And Verify ${OS_CONTROL_NODE_IP}
91 Add Tap Device Manually and Verify After Recover
92 [Documentation] Add tap devices to the bridge with OVS command and verify it gets applied from all instances.
93 ClusterOvsdb.Add Sample Tap Device To The Manual Bridge And Verify ${OS_CONTROL_NODE_IP}
95 Delete the Bridge Manually and Verify After Recover
96 [Documentation] Delete bridge with OVS command and verify it gets deleted from all instances.
97 ClusterOvsdb.Delete Sample Bridge Manually And Verify ${OS_CONTROL_NODE_IP}
100 [Documentation] Kill the karaf in Second Controller
101 ClusterManagement.Kill Single Member 2
103 Create Vm Instances For net_1
104 [Documentation] Create Vm instances using flavor and image names for a network.
105 BuiltIn.Log ${devstack_conn_id}
106 OpenStackOperations.Create Vm Instances @{NETWORKS}[0] ${NET_1_VMS} sg=${SECURITY_GROUP}
108 Create Vm Instances For net_2
109 [Documentation] Create Vm instances using flavor and image names for a network.
110 OpenStackOperations.Create Vm Instances @{NETWORKS}[1] ${NET_2_VMS} sg=${SECURITY_GROUP}
112 Check Vm Instances Have Ip Address
113 @{NET_1_VM_IPS} ${NET_1_DHCP_IP} = OpenStackOperations.Get VM IPs @{NET_1_VMS}
114 @{NET_2_VM_IPS} ${NET_2_DHCP_IP} = OpenStackOperations.Get VM IPs @{NET_2_VMS}
115 BuiltIn.Set Suite Variable @{NET_1_VM_IPS}
116 BuiltIn.Set Suite Variable @{NET_2_VM_IPS}
117 BuiltIn.Should Not Contain ${NET_1_VM_IPS} None
118 BuiltIn.Should Not Contain ${NET_2_VM_IPS} None
119 BuiltIn.Should Not Contain ${NET_1_DHCP_IP} None
120 BuiltIn.Should Not Contain ${NET_2_DHCP_IP} None
121 [Teardown] BuiltIn.Run Keywords OpenStackOperations.Show Debugs @{NET_1_VMS} @{NET_2_VMS}
122 ... AND OpenStackOperations.Get Test Teardown Debugs
125 [Documentation] Bring up ODL2 again
126 ClusterManagement.Start Single Member 2
128 Ping Vm Instance1 In net_1
129 [Documentation] Check reachability of vm instances by pinging to them.
130 OpenStackOperations.Ping Vm From DHCP Namespace @{NETWORKS}[0] @{NET_1_VM_IPS}[0]
132 Ping Vm Instance2 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}[1]
136 Ping Vm Instance3 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}[2]
140 Ping Vm Instance1 In net_2
141 [Documentation] Check reachability of vm instances by pinging to them.
142 OpenStackOperations.Ping Vm From DHCP Namespace @{NETWORKS}[1] @{NET_2_VM_IPS}[0]
144 Ping Vm Instance2 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}[1]
148 Ping Vm Instance3 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}[2]
153 [Documentation] Kill the karaf in Third Controller
154 ClusterManagement.Kill Single Member 3
156 Connectivity Tests From Vm Instance1 In net_1
157 [Documentation] Logging to the vm instance using generated key pair.
158 OpenStackOperations.Test Operations From Vm Instance @{NETWORKS}[0] @{NET_1_VM_IPS}[0] ${NET_1_VM_IPS}
160 Connectivity Tests From Vm Instance2 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}[1] ${NET_1_VM_IPS}
164 Connectivity Tests From Vm Instance3 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}[2] ${NET_1_VM_IPS}
169 [Documentation] Bring up ODL3 again
170 ClusterManagement.Start Single Member 3
172 Take Down ODL1 and ODL2
173 [Documentation] Kill the karaf in First and Second Controller
174 ClusterManagement.Kill Members From List Or All ${CLUSTER_DOWN_LIST}
176 Connectivity Tests From Vm Instance1 In net_2
177 [Documentation] Logging to the vm instance using generated key pair.
178 OpenStackOperations.Test Operations From Vm Instance @{NETWORKS}[1] @{NET_2_VM_IPS}[0] ${NET_2_VM_IPS}
180 Connectivity Tests From Vm Instance2 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}[1] ${NET_2_VM_IPS}
184 Connectivity Tests From Vm Instance3 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}[2] ${NET_2_VM_IPS}
188 Bring Up ODL1 and ODL2
189 [Documentation] Bring up ODL1 and ODL2 again.
190 ClusterManagement.Start Members From List Or All ${CLUSTER_DOWN_LIST}
193 [Documentation] Delete Vm instances using instance names.
194 OpenStackOperations.Delete Vm Instance @{NET_1_VMS}[0]
196 No Ping For Deleted Vm
197 [Documentation] Check non reachability of deleted vm instances by pinging to them.
198 ${output} = OpenStackOperations.Ping From DHCP Should Not Succeed @{NETWORKS}[0] @{NET_1_VM_IPS}[0]
200 Delete Vm Instances In net_1
201 [Documentation] Delete Vm instances using instance names in network_1.
202 : FOR ${vm} IN @{NET_1_VMS}
203 \ OpenStackOperations.Delete Vm Instance ${vm}
205 Delete Vm Instances In net_2
206 [Documentation] Delete Vm instances using instance names in network_2.
207 : FOR ${vm} IN @{NET_2_VMS}
208 \ OpenStackOperations.Delete Vm Instance ${vm}
210 Delete Sub Networks In net_1
211 [Documentation] Delete Sub Nets for the Networks with neutron request.
212 OpenStackOperations.Delete SubNet @{SUBNETS}[0]
214 Delete Sub Networks In net_2
215 [Documentation] Delete Sub Nets for the Networks with neutron request.
216 OpenStackOperations.Delete SubNet @{SUBNETS}[1]
219 [Documentation] Delete Networks with neutron request.
220 : FOR ${network} IN @{NETWORKS}
221 \ OpenStackOperations.Delete Network ${network}
223 Delete Security Group
224 [Documentation] Delete security groups with neutron request
225 OpenStackOperations.Delete SecurityGroup ${SECURITY_GROUP}
228 [Documentation] Verify that flows have been cleaned up properly after removing all neutron configurations
229 DataModels.Verify Flows Are Cleaned Up On All OpenStack Nodes