2 Documentation Test suite for Ovsdb Southbound Cluster - Owner failover and recover
3 Suite Setup Create Controller Sessions
4 Suite Teardown Delete All Sessions
5 Library RequestsLibrary
6 Resource ../../../libraries/ClusterOvsdb.robot
7 Resource ../../../libraries/ClusterKeywords.robot
8 Variables ../../../variables/Variables.py
11 Create Original Cluster List
12 [Documentation] Create original cluster list.
13 ${original_cluster_list} ClusterKeywords.Create Controller Index List
14 Set Suite Variable ${original_cluster_list}
15 Log ${original_cluster_list}
17 Check Shards Status Before Fail
18 [Documentation] Check Status for all shards in Ovsdb application.
19 ClusterOvsdb.Check Ovsdb Shards Status ${original_cluster_list}
21 Start OVS Multiple Connections
22 [Documentation] Connect OVS to all cluster instances.
23 ${ovsdb_uuid} Ovsdb.Add Multiple Managers to OVS ${TOOLS_SYSTEM_IP} ${original_cluster_list}
24 Set Suite Variable ${ovsdb_uuid}
26 Check Entity Owner Status And Find Owner and Candidate Before Fail
27 [Documentation] Check Entity Owner Status and identify owner and candidate.
28 ${original_owner} ${original_candidates_list} ClusterOvsdb.Get Ovsdb Entity Owner Status For One Device ${original_cluster_list} ovsdb://uuid/${ovsdb_uuid}
29 ${original_candidate}= Get From List ${original_candidates_list} 0
30 Set Suite Variable ${original_owner}
31 Set Suite Variable ${original_candidate}
33 Create Bridge Manually and Verify Before Fail
34 [Documentation] Create bridge with OVS command and verify it gets applied from all instances.
35 ClusterOvsdb.Create Sample Bridge Manually And Verify ${original_cluster_list}
37 Add Port Manually and Verify Before Fail
38 [Documentation] Add port with OVS command and verify it gets applied from all instances.
39 ClusterOvsdb.Add Sample Port To The Manual Bridge And Verify ${original_cluster_list}
41 Delete the Bridge Manually and Verify Before Fail
42 [Documentation] Delete bridge with OVS command and verify it gets deleted from all instances.
43 ClusterOvsdb.Delete Sample Bridge Manually And Verify ${original_cluster_list}
45 Create Bridge In Owner and Verify Before Fail
46 [Documentation] Create Bridge in Owner and verify it gets applied from all instances.
47 ClusterOvsdb.Create Sample Bridge And Verify ${original_cluster_list} ${original_owner}
49 Create Port In Owner and Verify Before Fail
50 [Documentation] Create Port in Owner and verify it gets applied from all instances.
51 ClusterOvsdb.Create Sample Port And Verify ${original_cluster_list} ${original_owner}
53 Modify the destination IP of Port In Owner Before Fail
54 [Documentation] Modify the dst ip of existing port in Owner.
55 ClusterOvsdb.Modify the destination IP of Sample Port ${original_cluster_list} ${original_owner}
57 Verify Port Is Modified Before Fail
58 [Documentation] Verify port is modified in all instances.
59 ClusterOvsdb.Verify Sample Port Is Modified ${original_cluster_list}
61 Delete Port In Owner Before Fail
62 [Documentation] Delete port in Owner and verify it gets deleted from all instances.
63 ClusterOvsdb.Delete Sample Port And Verify ${original_cluster_list} ${original_owner}
65 Delete Bridge In Owner And Verify Before Fail
66 [Documentation] Delete bridge in Owner and verify it gets deleted from all instances.
67 ClusterOvsdb.Delete Sample Bridge And Verify ${original_cluster_list} ${original_owner}
70 [Documentation] Kill Owner Instance and verify it is dead
71 ClusterKeywords.Kill Multiple Controllers ${original_owner}
72 ${new_cluster_list} ClusterKeywords.Create Controller Index List
73 Remove Values From List ${new_cluster_list} ${original_owner}
74 Set Suite Variable ${new_cluster_list}
76 Check Shards Status After Fail
77 [Documentation] Create original cluster list and check Status for all shards in Ovsdb application.
78 ClusterOvsdb.Check Ovsdb Shards Status After Cluster Event ${new_cluster_list}
80 Check Entity Owner Status And Find Owner and Candidate After Fail
81 [Documentation] Check Entity Owner Status and identify owner and candidate.
82 ${new_owner} ${new_candidates_list} ClusterOvsdb.Get Ovsdb Entity Owner Status For One Device ${new_cluster_list} ovsdb://uuid/${ovsdb_uuid}
83 Run Keyword And Continue On Failure List Should Not Contain Value ${new_candidates_list} ${original_owner} Original owner ${original_owner} still in candidate list.
84 Remove Values From List ${new_candidates_list} ${original_owner}
85 ${new_candidate}= Get From List ${new_candidates_list} 0
86 Set Suite Variable ${new_owner}
87 Set Suite Variable ${new_candidate}
89 Create Bridge Manually and Verify After Fail
90 [Documentation] Create bridge with OVS command and verify it gets applied from all instances.
91 ClusterOvsdb.Create Sample Bridge Manually And Verify ${new_cluster_list}
93 Add Port Manually and Verify After Fail
94 [Documentation] Add port with OVS command and verify it gets applied from all instances.
95 ClusterOvsdb.Add Sample Port To The Manual Bridge And Verify ${new_cluster_list}
97 Delete the Bridge Manually and Verify After Fail
98 [Documentation] Delete bridge with OVS command and verify it gets deleted from all instances.
99 ClusterOvsdb.Delete Sample Bridge Manually And Verify ${new_cluster_list}
101 Create Bridge In Owner and Verify After Fail
102 [Documentation] Create Bridge in Owner and verify it gets applied from all instances.
103 ClusterOvsdb.Create Sample Bridge And Verify ${new_cluster_list} ${new_owner}
105 Create Port In Owner and Verify After Fail
106 [Documentation] Create Port in Owner and verify it gets applied from all instances.
107 ClusterOvsdb.Create Sample Port And Verify ${new_cluster_list} ${new_owner}
109 Modify the destination IP of Port In Owner After Fail
110 [Documentation] Modify the dst ip of existing port in Owner.
111 ClusterOvsdb.Modify the destination IP of Sample Port ${new_cluster_list} ${new_owner}
113 Verify Port Is Modified After Fail
114 [Documentation] Verify port is modified in all instances.
115 ClusterOvsdb.Verify Sample Port Is Modified ${new_cluster_list}
117 Start Old Owner Instance
118 [Documentation] Start Owner Instance and verify it is active
119 ClusterKeywords.Start Multiple Controllers 300s ${original_owner}
121 Check Shards Status After Recover
122 [Documentation] Create original cluster list and check Status for all shards in Ovsdb application.
123 ClusterOvsdb.Check Ovsdb Shards Status After Cluster Event ${original_cluster_list}
125 Check Entity Owner Status After Recover
126 [Documentation] Check Entity Owner Status and identify owner and candidate.
127 ${new_owner} ${new_candidates_list} ClusterOvsdb.Get Ovsdb Entity Owner Status For One Device ${original_cluster_list} ovsdb://uuid/${ovsdb_uuid}
128 Set Suite Variable ${new_owner}
130 Create Bridge Manually and Verify After Recover
131 [Documentation] Create bridge with OVS command and verify it gets applied from all instances.
132 ClusterOvsdb.Create Sample Bridge Manually And Verify ${original_cluster_list}
134 Add Port Manually and Verify After Recover
135 [Documentation] Add port with OVS command and verify it gets applied from all instances.
136 ClusterOvsdb.Add Sample Port To The Manual Bridge And Verify ${original_cluster_list}
138 Delete the Bridge Manually and Verify After Recover
139 [Documentation] Delete bridge with OVS command and verify it gets deleted from all instances.
140 ClusterOvsdb.Delete Sample Bridge Manually And Verify ${original_cluster_list}
142 Verify Modified Port After Recover
143 [Documentation] Verify modified port exists in all instances.
144 ClusterOvsdb.Verify Sample Port Is Modified ${original_cluster_list}
146 Delete Port In New Owner After Recover
147 [Documentation] Delete port in Owner and verify it gets deleted from all instances.
148 ClusterOvsdb.Delete Sample Port And Verify ${original_cluster_list} ${new_owner}
150 Delete Bridge In New Owner And Verify After Recover
151 [Documentation] Delete bridge in Owner and verify it gets deleted from all instances.
152 ClusterOvsdb.Delete Sample Bridge And Verify ${original_cluster_list} ${new_owner}
154 Create Bridge In Old Owner and Verify After Recover
155 [Documentation] Create Bridge in Owner and verify it gets applied from all instances.
156 ClusterOvsdb.Create Sample Bridge And Verify ${original_cluster_list} ${original_owner}
158 Create Port In Old Owner and Verify After Recover
159 [Documentation] Create Port in Owner and verify it gets applied from all instances.
160 ClusterOvsdb.Create Sample Port And Verify ${original_cluster_list} ${original_owner}
162 Modify the destination IP of Port In Old Owner After Recover
163 [Documentation] Modify the dst ip of existing port in Owner.
164 ClusterOvsdb.Modify the destination IP of Sample Port ${original_cluster_list} ${original_owner}
166 Verify Port Is Modified After Recover
167 [Documentation] Verify port is modified in all instances.
168 ClusterOvsdb.Verify Sample Port Is Modified ${original_cluster_list}
170 Delete Port In Old Owner After Recover
171 [Documentation] Delete port in Owner and verify it gets deleted from all instances.
172 ClusterOvsdb.Delete Sample Port And Verify ${original_cluster_list} ${original_owner}
174 Delete Bridge In Old Owner And Verify After Recover
175 [Documentation] Delete bridge in Owner and verify it gets deleted from all instances.
176 ClusterOvsdb.Delete Sample Bridge And Verify ${original_cluster_list} ${original_owner}
178 Cleans Up Test Environment For Next Suite
179 [Documentation] Cleans up test environment, close existing sessions in teardown.
180 ClusterOvsdb.Configure Exit OVSDB Connection ${original_cluster_list}