2 Documentation Test suite for Cluster HA - Device Owner failover
3 Suite Setup ClusterManagement Setup
4 Suite Teardown Delete All Sessions
5 Library RequestsLibrary
6 Resource ../../../libraries/ClusterOpenFlow.robot
7 Resource ../../../libraries/MininetKeywords.robot
8 Resource ../../../libraries/ClusterManagement.robot
9 Variables ../../../variables/Variables.py
12 Check Shards Status Before Fail
13 [Documentation] Check Status for all shards in OpenFlow application.
14 ClusterOpenFlow.Check OpenFlow Shards Status
16 Start Mininet Multiple Connections
17 [Documentation] Start mininet tree,2 with connection to all cluster instances.
18 ${mininet_conn_id}= MininetKeywords.Start Mininet Multiple Controllers ${TOOLS_SYSTEM_IP} ${ClusterManagement__member_index_list} --topo tree,2 --switch ovsk,protocols=OpenFlow13
19 Set Suite Variable ${mininet_conn_id}
21 Check Entity Owner Status And Find Owner and Candidate Before Fail
22 [Documentation] Check Entity Owner Status and identify owner and candidate for first switch s1.
23 ${original_owner} ${original_candidate_list} ClusterOpenFlow.Get OpenFlow Entity Owner Status For One Device openflow:1 1
24 ${original_candidate}= Get From List ${original_candidate_list} 0
25 Set Suite Variable ${original_owner}
26 Set Suite Variable ${original_candidate_list}
27 Set Suite Variable ${original_candidate}
29 Reconnect Extra Switches To Candidate And Check Entity Owner
30 [Documentation] Connect switches s2 and s3 to candidate instance.
31 OVSDB.Set Controller In OVS Bridge ${TOOLS_SYSTEM_IP} s2 tcp:${ODL_SYSTEM_${original_candidate}_IP}:6633
32 OVSDB.Set Controller In OVS Bridge ${TOOLS_SYSTEM_IP} s3 tcp:${ODL_SYSTEM_${original_candidate}_IP}:6633
33 ${owner_list}= Create List ${original_candidate}
34 ${owner} ${candidate_list} ClusterOpenFlow.Get OpenFlow Entity Owner Status For One Device openflow:2 1 ${owner_list}
35 Should Be Equal ${owner} ${original_candidate}
36 ${owner} ${candidate_list} ClusterOpenFlow.Get OpenFlow Entity Owner Status For One Device openflow:3 1 ${owner_list}
37 Should Be Equal ${owner} ${original_candidate}
39 Check Network Operational Information Before Fail
40 [Documentation] Check devices in operational inventory and topology in all cluster instances.
41 ClusterOpenFlow.Check OpenFlow Network Operational Information For Sample Topology
43 Add Configuration In Owner and Verify Before Fail
44 [Documentation] Add Flow in Owner and verify it gets applied from all instances.
45 ClusterOpenFlow.Add Sample Flow and Verify ${original_owner}
47 Modify Configuration In Owner and Verify Before Fail
48 [Documentation] Modify Flow in Owner and verify it gets applied from all instances.
49 ClusterOpenFlow.Modify Sample Flow and Verify ${original_owner}
51 Delete Configuration In Owner and Verify Before Fail
52 [Documentation] Delete Flow in Owner and verify it gets applied from all instances.
53 ClusterOpenFlow.Delete Sample Flow and Verify ${original_owner}
55 Add Configuration In Candidate and Verify Before Fail
56 [Documentation] Add Flow in Candidate and verify it gets applied from all instances.
57 ClusterOpenFlow.Add Sample Flow and Verify ${original_candidate}
59 Modify Configuration In Candidate and Verify Before Fail
60 [Documentation] Modify Flow in candidate and verify it gets applied from all instances.
61 ClusterOpenFlow.Modify Sample Flow and Verify ${original_candidate}
63 Delete Configuration In Candidate and Verify Before Fail
64 [Documentation] Delete Flow in Candidate and verify it gets removed from all instances.
65 ClusterOpenFlow.Delete Sample Flow and Verify ${original_candidate}
67 Send RPC Add to Owner and Verify Before Fail
68 [Documentation] Add Flow in Owner and verify it gets applied from all instances.
69 ClusterOpenFlow.Send RPC Add Sample Flow and Verify ${original_owner}
71 Send RPC Delete to Owner and Verify Before Fail
72 [Documentation] Delete Flow in Owner and verify it gets removed from all instances.
73 ClusterOpenFlow.Send RPC Delete Sample Flow and Verify ${original_owner}
75 Send RPC Add to Candidate and Verify Before Fail
76 [Documentation] Add Flow in Candidate and verify it gets applied from all instances.
77 ClusterOpenFlow.Send RPC Add Sample Flow and Verify ${original_candidate}
79 Send RPC Delete to Candidate and Verify Before Fail
80 [Documentation] Delete Flow in Candidate and verify it gets removed from all instances.
81 ClusterOpenFlow.Send RPC Delete Sample Flow and Verify ${original_candidate}
83 Modify Network And Verify Before Fail
84 [Documentation] Take a link down and verify port status in all instances.
85 ClusterOpenFlow.Take OpenFlow Device Link Down and Verify
87 Restore Network And Verify Before Fail
88 [Documentation] Take the link up and verify port status in all instances.
89 ClusterOpenFlow.Take OpenFlow Device Link Up and Verify
92 [Documentation] Kill Owner Instance and verify it is dead
93 ClusterManagement.Kill Single Member ${original_owner}
94 Set Suite Variable ${new_cluster_list} ${original_candidate_list}
96 Check Shards Status After Fail
97 [Documentation] Create original cluster list and check Status for all shards in OpenFlow application.
98 ClusterOpenFlow.Check OpenFlow Shards Status After Cluster Event ${new_cluster_list}
100 Check Entity Owner Status And Find Owner and Candidate After Fail
101 [Documentation] Check Entity Owner Status and identify owner and candidate.
102 ${first_member}= Get From List ${new_cluster_list} 0
103 ${new_owner} ${new_candidate_list} ClusterOpenFlow.Get OpenFlow Entity Owner Status For One Device openflow:1 ${first_member} ${new_cluster_list}
104 ${new_candidate}= Get From List ${new_candidate_list} 0
105 Set Suite Variable ${new_owner}
106 Set Suite Variable ${new_candidate}
108 Check Network Operational Information After Fail
109 [Documentation] Check devices in operational inventory and topology in all cluster instances.
110 ClusterOpenFlow.Check OpenFlow Network Operational Information For Sample Topology ${new_cluster_list}
112 Add Configuration In Owner and Verify After Fail
113 [Documentation] Add Flow in Owner and verify it gets applied from all instances.
114 ClusterOpenFlow.Add Sample Flow and Verify ${new_owner} ${new_cluster_list}
116 Modify Configuration In Owner and Verify After Fail
117 [Documentation] Modify Flow in Owner and verify it gets applied from all instances.
118 ClusterOpenFlow.Modify Sample Flow and Verify ${new_owner} ${new_cluster_list}
120 Delete Configuration In Owner and Verify After Fail
121 [Documentation] Delete Flow in Owner and verify it gets applied from all instances.
122 ClusterOpenFlow.Delete Sample Flow and Verify ${new_owner} ${new_cluster_list}
124 Add Configuration In Candidate and Verify After Fail
125 [Documentation] Add Flow in Candidate and verify it gets applied from all instances.
126 ClusterOpenFlow.Add Sample Flow and Verify ${new_candidate} ${new_cluster_list}
128 Modify Configuration In Candidate and Verify After Fail
129 [Documentation] Modify Flow in Candidate and verify it gets applied from all instances.
130 ClusterOpenFlow.Modify Sample Flow and Verify ${new_candidate} ${new_cluster_list}
132 Delete Configuration In Candidate and Verify After Fail
133 [Documentation] Delete Flow in Candidate and verify it gets applied from all instances.
134 ClusterOpenFlow.Delete Sample Flow and Verify ${new_candidate} ${new_cluster_list}
136 Send RPC Add to Owner and Verify After Fail
137 [Documentation] Add Flow in Owner and verify it gets applied from all instances.
138 ClusterOpenFlow.Send RPC Add Sample Flow and Verify ${new_owner} ${new_cluster_list}
140 Send RPC Delete to Owner and Verify After Fail
141 [Documentation] Delete Flow in Owner and verify it gets removed from all instances.
142 ClusterOpenFlow.Send RPC Delete Sample Flow and Verify ${new_owner} ${new_cluster_list}
144 Send RPC Add to Candidate and Verify After Fail
145 [Documentation] Add Flow in Candidate and verify it gets applied from all instances.
146 ClusterOpenFlow.Send RPC Add Sample Flow and Verify ${new_candidate} ${new_cluster_list}
148 Send RPC Delete to Candidate and Verify After Fail
149 [Documentation] Delete Flow in Candidate and verify it gets removed from all instances.
150 ClusterOpenFlow.Send RPC Delete Sample Flow and Verify ${new_candidate} ${new_cluster_list}
152 Modify Network and Verify After Fail
153 [Documentation] Take a link down and verify port status in all instances.
154 ClusterOpenFlow.Take OpenFlow Device Link Down and Verify ${new_cluster_list}
156 Restore Network and Verify After Fail
157 [Documentation] Take the link up and verify port status in all instances.
158 ClusterOpenFlow.Take OpenFlow Device Link Up and Verify ${new_cluster_list}
160 Start Old Owner Instance
161 [Documentation] Start old Owner Instance and verify it is up
162 ClusterManagement.Start Single Member ${original_owner}
164 Check Shards Status After Recover
165 [Documentation] Create original cluster list and check Status for all shards in OpenFlow application.
166 ClusterOpenFlow.Check OpenFlow Shards Status After Cluster Event
168 Check Entity Owner Status After Recover
169 [Documentation] Check Entity Owner Status and identify owner and candidate.
170 ${new_owner} ${new_candidates_list} ClusterOpenFlow.Get OpenFlow Entity Owner Status For One Device openflow:1 1
171 Set Suite Variable ${new_owner}
173 Check Network Operational Information After Recover
174 [Documentation] Check devices in operational inventory and topology in all cluster instances.
175 ClusterOpenFlow.Check OpenFlow Network Operational Information For Sample Topology
177 Add Configuration In Owner and Verify After Recover
178 [Documentation] Add Flow in Owner and verify it gets applied from all instances.
179 ClusterOpenFlow.Add Sample Flow and Verify ${new_owner}
181 Modify Configuration In Owner and Verify After Recover
182 [Documentation] Modify Flow in Owner and verify it gets applied from all instances.
183 ClusterOpenFlow.Modify Sample Flow and Verify ${new_owner}
185 Delete Configuration In Owner and Verify After Recover
186 [Documentation] Delete Flow in Owner and verify it gets applied from all instances.
187 ClusterOpenFlow.Delete Sample Flow and Verify ${new_owner}
189 Add Configuration In Old Owner and Verify After Recover
190 [Documentation] Add Flow in Owner and verify it gets applied from all instances.
191 ClusterOpenFlow.Add Sample Flow and Verify ${original_owner}
193 Modify Configuration In Old Owner and Verify After Recover
194 [Documentation] Modify Flow in Owner and verify it gets applied from all instances.
195 ClusterOpenFlow.Modify Sample Flow and Verify ${original_owner}
197 Delete Configuration In Old Owner and Verify After Recover
198 [Documentation] Delete Flow in Owner and verify it gets applied from all instances.
199 ClusterOpenFlow.Delete Sample Flow and Verify ${original_owner}
201 Send RPC Add to Owner and Verify After Recover
202 [Documentation] Add Flow in Owner and verify it gets applied from all instances.
203 ClusterOpenFlow.Send RPC Add Sample Flow and Verify ${new_owner}
205 Send RPC Delete to Owner and Verify After Recover
206 [Documentation] Delete Flow in Owner and verify it gets removed from all instances.
207 ClusterOpenFlow.Send RPC Delete Sample Flow and Verify ${new_owner}
209 Send RPC Add to Old Owner and Verify After Recover
210 [Documentation] Add Flow in Owner and verify it gets applied from all instances.
211 ClusterOpenFlow.Send RPC Add Sample Flow and Verify ${original_owner}
213 Send RPC Delete to Old Owner and Verify After Recover
214 [Documentation] Delete Flow in Owner and verify it gets removed from all instances.
215 ClusterOpenFlow.Send RPC Delete Sample Flow and Verify ${original_owner}
217 Modify Network and Verify After Recover
218 [Documentation] Take a link down and verify port status in all instances.
219 ClusterOpenFlow.Take OpenFlow Device Link Down and Verify
221 Restore Network and Verify After Recover
222 [Documentation] Take the link up and verify port status in all instances.
223 ClusterOpenFlow.Take OpenFlow Device Link Up and Verify
225 Stop Mininet and Exit
226 [Documentation] Stop mininet and exit connection.
227 MininetKeywords.Stop Mininet And Exit ${mininet_conn_id}
228 Utils.Clean Mininet System
230 Check No Network Operational Information
231 [Documentation] Check device is not in operational inventory or topology in all cluster instances.
232 ClusterOpenFlow.Check No OpenFlow Network Operational Information