2 Documentation Test suite to verify packet flows between vm instances.
3 Suite Setup Devstack Suite Setup Tests source_pwd=yes
4 Suite Teardown Close All Connections
6 Library OperatingSystem
7 Library RequestsLibrary
9 Resource ../../../libraries/Utils.robot
10 Resource ../../../libraries/OpenStackOperations.robot
11 Resource ../../../libraries/DevstackUtils.robot
12 Resource ../../../libraries/OVSDB.robot
13 Resource ../../../libraries/ClusterOvsdb.robot
14 Resource ../../../libraries/ClusterManagement.robot
15 Variables ../../../variables/Variables.py
18 @{NETWORKS_NAME} l2_net_1 l2_net_2
19 @{SUBNETS_NAME} l2_sub_net_1 l2_sub_net_2
20 @{NET_1_VM_INSTANCES} VmInstance1_l2_net_1 VmInstance2_net_1 VmInstance3_net_1
21 @{NET_2_VM_INSTANCES} VmInstance1_l2_net_2 VmInstance2_net_2 VmInstance3_net_2
22 @{NET_1_VM_IPS} 70.0.0.3 70.0.0.4 70.0.0.5
23 @{NET_2_VM_IPS} 80.0.0.3 80.0.0.4 80.0.0.5
24 @{VM_IPS_NOT_DELETED} 70.0.0.4
25 @{GATEWAY_IPS} 70.0.0.1 80.0.0.1
26 @{DHCP_IPS} 70.0.0.2 80.0.0.2
27 @{cluster_down_list} ${1} ${2}
28 @{SUBNETS_RANGE} 70.0.0.0/24 80.0.0.0/24
31 Create All Controller Sessions
32 [Documentation] Create sessions for all three contorllers.
33 ClusterManagement.ClusterManagement Setup
35 Check OVS Manager Connection Status
36 [Documentation] This will verify if the OVS manager is connected
37 ${output}= Wait Until Keyword Succeeds 5s 1s Ovsdb.Verify OVS Reports Connected ${OS_CONTROL_NODE_IP}
39 Set Suite Variable ${status} is_connected: true
40 ${dictionary}= Create Dictionary ${status}=9
41 Utils.Check Item Occurrence ${output} ${dictionary}
44 [Documentation] Create Network with neutron request.
45 : FOR ${NetworkElement} IN @{NETWORKS_NAME}
46 \ OpenStackOperations.Create Network ${NetworkElement}
48 Create Subnets For l2_net_1
49 [Documentation] Create Sub Nets for the Networks with neutron request.
50 OpenStackOperations.Create SubNet l2_net_1 l2_sub_net_1 @{SUBNETS_RANGE}[0]
52 Create Subnets For l2_net_2
53 [Documentation] Create Sub Nets for the Networks with neutron request.
54 OpenStackOperations.Create SubNet l2_net_2 l2_sub_net_2 @{SUBNETS_RANGE}[1]
56 Create Bridge Manually and Verify Before Fail
57 [Documentation] Create bridge with OVS command and verify it gets applied from all instances.
58 ClusterOvsdb.Create Sample Bridge Manually And Verify ${OS_CONTROL_NODE_IP}
60 Add Tap Device Manually and Verify Before Fail
61 [Documentation] Add tap devices to the bridge with OVS command and verify it gets applied from all instances.
62 ClusterOvsdb.Add Sample Tap Device To The Manual Bridge And Verify ${OS_CONTROL_NODE_IP}
64 Delete the Bridge Manually and Verify Before Fail
65 [Documentation] Delete bridge with OVS command and verify it gets deleted from all instances.
66 ClusterOvsdb.Delete Sample Bridge Manually And Verify ${OS_CONTROL_NODE_IP}
69 [Documentation] Kill the karaf in First Controller
70 ${new_cluster_list} = ClusterManagement.Kill Single Member 1
71 Set Suite Variable ${new_cluster_list}
73 Create Bridge Manually and Verify After Fail
74 [Documentation] Create bridge with OVS command and verify it gets applied from all instances.
75 ClusterOvsdb.Create Sample Bridge Manually And Verify ${OS_CONTROL_NODE_IP} ${new_cluster_list}
77 Add Tap Device Manually and Verify After Fail
78 [Documentation] Add tap devices to the bridge with OVS command and verify it gets applied from all instances.
79 ClusterOvsdb.Add Sample Tap Device To The Manual Bridge And Verify ${OS_CONTROL_NODE_IP} ${new_cluster_list}
81 Delete the Bridge Manually and Verify After Fail
82 [Documentation] Delete bridge with OVS command and verify it gets deleted from all instances.
83 ClusterOvsdb.Delete Sample Bridge Manually And Verify ${OS_CONTROL_NODE_IP} ${new_cluster_list}
85 Create Vm Instances For l2_net_1
86 [Documentation] Create Vm instances using flavor and image names for a network.
87 Log ${devstack_conn_id}
88 OpenStackOperations.Create Vm Instances l2_net_1 ${NET_1_VM_INSTANCES} sg=csit
89 [Teardown] OpenStackOperations.Show Debugs ${NET_1_VM_INSTANCES}
92 [Documentation] Bring up ODL1 again
93 ClusterManagement.Start Single Member 1
95 Create Bridge Manually and Verify After Recover
96 [Documentation] Create bridge with OVS command and verify it gets applied from all instances.
97 ClusterOvsdb.Create Sample Bridge Manually And Verify ${OS_CONTROL_NODE_IP}
99 Add Tap Device Manually and Verify After Recover
100 [Documentation] Add tap devices to the bridge with OVS command and verify it gets applied from all instances.
101 ClusterOvsdb.Add Sample Tap Device To The Manual Bridge And Verify ${OS_CONTROL_NODE_IP}
103 Delete the Bridge Manually and Verify After Recover
104 [Documentation] Delete bridge with OVS command and verify it gets deleted from all instances.
105 ClusterOvsdb.Delete Sample Bridge Manually And Verify ${OS_CONTROL_NODE_IP}
108 [Documentation] Kill the karaf in Second Controller
109 ClusterManagement.Kill Single Member 2
111 Create Vm Instances For l2_net_2
112 [Documentation] Create Vm instances using flavor and image names for a network.
113 OpenStackOperations.Create Vm Instances l2_net_2 ${NET_2_VM_INSTANCES} sg=csit
114 [Teardown] OpenStackOperations.Show Debugs ${NET_2_VM_INSTANCES}
117 [Documentation] Bring up ODL2 again
118 ClusterManagement.Start Single Member 2
120 Ping Vm Instance1 In l2_net_1
121 [Documentation] Check reachability of vm instances by pinging to them.
122 OpenStackOperations.Ping Vm From DHCP Namespace l2_net_1 @{NET_1_VM_IPS}[0]
124 Ping Vm Instance2 In l2_net_1
125 [Documentation] Check reachability of vm instances by pinging to them.
126 OpenStackOperations.Ping Vm From DHCP Namespace l2_net_1 @{NET_1_VM_IPS}[1]
128 Ping Vm Instance3 In l2_net_1
129 [Documentation] Check reachability of vm instances by pinging to them.
130 OpenStackOperations.Ping Vm From DHCP Namespace l2_net_1 @{NET_1_VM_IPS}[2]
132 Ping Vm Instance1 In l2_net_2
133 [Documentation] Check reachability of vm instances by pinging to them.
134 OpenStackOperations.Ping Vm From DHCP Namespace l2_net_2 @{NET_2_VM_IPS}[0]
136 Ping Vm Instance2 In l2_net_2
137 [Documentation] Check reachability of vm instances by pinging to them.
138 OpenStackOperations.Ping Vm From DHCP Namespace l2_net_2 @{NET_2_VM_IPS}[1]
140 Ping Vm Instance3 In l2_net_2
141 [Documentation] Check reachability of vm instances by pinging to them.
142 OpenStackOperations.Ping Vm From DHCP Namespace l2_net_2 @{NET_2_VM_IPS}[2]
145 [Documentation] Kill the karaf in Third Controller
146 ClusterManagement.Kill Single Member 3
148 Connectivity Tests From Vm Instance1 In l2_net_1
149 [Documentation] Logging to the vm instance using generated key pair.
150 ${dst_ip_list}= Create List @{NET_1_VM_IPS}[1] @{DHCP_IPS}[0] @{NET_1_VM_IPS}[2]
152 OpenStackOperations.Test Operations From Vm Instance l2_net_1 @{NET_1_VM_IPS}[0] ${dst_ip_list}
154 Connectivity Tests From Vm Instance2 In l2_net_1
155 [Documentation] Logging to the vm instance using generated key pair.
156 ${dst_ip_list}= Create List @{NET_1_VM_IPS}[0] @{DHCP_IPS}[0] @{NET_1_VM_IPS}[2]
158 OpenStackOperations.Test Operations From Vm Instance l2_net_1 @{NET_1_VM_IPS}[1] ${dst_ip_list}
160 Connectivity Tests From Vm Instance3 In l2_net_1
161 [Documentation] Logging to the vm instance using generated key pair.
162 ${dst_ip_list}= Create List @{NET_1_VM_IPS}[0] @{DHCP_IPS}[0] @{NET_1_VM_IPS}[1]
164 OpenStackOperations.Test Operations From Vm Instance l2_net_1 @{NET_1_VM_IPS}[2] ${dst_ip_list}
167 [Documentation] Bring up ODL3 again
168 ClusterManagement.Start Single Member 3
170 Take Down ODL1 and ODL2
171 [Documentation] Kill the karaf in First and Second Controller
172 ClusterManagement.Kill Members From List Or All ${cluster_down_list}
174 Connectivity Tests From Vm Instance1 In l2_net_2
175 [Documentation] Logging to the vm instance using generated key pair.
176 ${dst_ip_list}= Create List @{NET_2_VM_IPS}[1] @{DHCP_IPS}[1] @{NET_2_VM_IPS}[2]
178 OpenStackOperations.Test Operations From Vm Instance l2_net_2 @{NET_2_VM_IPS}[0] ${dst_ip_list}
180 Connectivity Tests From Vm Instance2 In l2_net_2
181 [Documentation] Logging to the vm instance using generated key pair.
182 ${dst_ip_list}= Create List @{NET_2_VM_IPS}[0] @{DHCP_IPS}[1] @{NET_2_VM_IPS}[2]
184 OpenStackOperations.Test Operations From Vm Instance l2_net_2 @{NET_2_VM_IPS}[1] ${dst_ip_list}
186 Connectivity Tests From Vm Instance3 In l2_net_2
187 [Documentation] Logging to the vm instance using generated key pair.
188 ${dst_ip_list}= Create List @{NET_2_VM_IPS}[0] @{DHCP_IPS}[1] @{NET_2_VM_IPS}[1]
190 OpenStackOperations.Test Operations From Vm Instance l2_net_2 @{NET_2_VM_IPS}[2] ${dst_ip_list}
192 Bring Up ODL1 and ODL2
193 [Documentation] Bring up ODL1 and ODL2 again.
194 ClusterManagement.Start Members From List Or All ${cluster_down_list}
197 [Documentation] Delete Vm instances using instance names.
198 OpenStackOperations.Delete Vm Instance VmInstance1_l2_net_1
200 No Ping For Deleted Vm
201 [Documentation] Check non reachability of deleted vm instances by pinging to them.
202 ${output}= OpenStackOperations.Ping From DHCP Should Not Succeed l2_network_1 @{NET_1_VM_IPS}[0]
204 Delete Vm Instances In network_1
205 [Documentation] Delete Vm instances using instance names in network_1.
206 : FOR ${VmElement} IN @{NET_1_VM_INSTANCES}
207 \ OpenStackOperations.Delete Vm Instance ${VmElement}
209 Delete Vm Instances In network_2
210 [Documentation] Delete Vm instances using instance names in network_2.
211 : FOR ${VmElement} IN @{NET_2_VM_INSTANCES}
212 \ OpenStackOperations.Delete Vm Instance ${VmElement}
214 Delete Sub Networks In network_1
215 [Documentation] Delete Sub Nets for the Networks with neutron request.
216 OpenStackOperations.Delete SubNet l2_sub_net_1
218 Delete Sub Networks In network_2
219 [Documentation] Delete Sub Nets for the Networks with neutron request.
220 OpenStackOperations.Delete SubNet l2_sub_net_2
223 [Documentation] Delete Networks with neutron request.
224 : FOR ${NetworkElement} IN @{NETWORKS_NAME}
225 \ OpenStackOperations.Delete Network ${NetworkElement}