blob: c50c3ca74151c2bb3ef2c08a5d4d9ea3507ec94d [file] [log] [blame]
Gayathri.Selvan283a63c2020-01-23 04:09:18 +00001# Copyright 2017 - present Open Networking Foundation
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
Gayathri.Selvan283a63c2020-01-23 04:09:18 +000014
15*** Settings ***
HungWei Chiu87edb1f2020-01-28 00:10:58 +000016Documentation Test various failure scenarios
HungWei Chiu1408fb92020-03-03 19:43:30 -050017Suite Setup Setup Suite
Gayathri.Selvan283a63c2020-01-23 04:09:18 +000018Test Setup Setup
19Test Teardown Teardown
20#Suite Teardown Teardown Suite
21Library Collections
22Library String
23Library OperatingSystem
24Library XML
25Library RequestsLibrary
26Library ../../libraries/DependencyLibrary.py
27Resource ../../libraries/onos.robot
28Resource ../../libraries/voltctl.robot
29Resource ../../libraries/voltha.robot
30Resource ../../libraries/utils.robot
31Resource ../../libraries/k8s.robot
32Resource ../../variables/variables.robot
HungWei Chiu87edb1f2020-01-28 00:10:58 +000033Resource ../../libraries/power_switch.robot
Hardik Windlassc082c422021-03-16 15:44:10 +000034Resource ../../libraries/bbsim.robot
Gayathri.Selvan283a63c2020-01-23 04:09:18 +000035
36*** Variables ***
37${POD_NAME} flex-ocp-cord
38${KUBERNETES_CONF} ${KUBERNETES_CONFIGS_DIR}/${POD_NAME}.conf
39${KUBERNETES_CONFIGS_DIR} ~/pod-configs/kubernetes-configs
40#${KUBERNETES_CONFIGS_DIR} ${KUBERNETES_CONFIGS_DIR}/${POD_NAME}.conf
41${KUBERNETES_YAML} ${KUBERNETES_CONFIGS_DIR}/${POD_NAME}.yml
42${HELM_CHARTS_DIR} ~/helm-charts
43${VOLTHA_POD_NUM} 8
44${NAMESPACE} voltha
Suchitra Vemurica1c5d32020-04-09 18:45:29 -070045${DEFAULTSPACE} default
Gayathri.Selvan283a63c2020-01-23 04:09:18 +000046# For below variable value, using deployment name as using grep for
47# parsing radius pod name, we can also use full radius pod name
48${RESTART_POD_NAME} radius
49${timeout} 60s
50${of_id} 0
51${logical_id} 0
Suchitra Vemuri109feb12020-01-23 16:25:02 -080052${has_dataplane} True
Gayathri.Selvan283a63c2020-01-23 04:09:18 +000053${teardown_device} False
54${scripts} ../../scripts
55
Andy Bavierabeba262020-02-07 16:22:16 -070056# Per-test logging on failure is turned off by default; set this variable to enable
57${container_log_dir} ${None}
58
Gayathri.Selvan283a63c2020-01-23 04:09:18 +000059*** Test Cases ***
Suchitra Vemuri60be98b2020-02-19 16:41:21 -080060Verify ONU after rebooting physically
61 [Documentation] Test the ONU functionality by physically turning on/off ONU.
62 ... Prerequisite : Subscriber are authenticated/DHCP/pingable state
63 ... Test case runs only on the PODs that are configured with PowerSwitch that
64 ... controls the power off/on ONUs/OLT remotely (simulating a physical reboot)
65 ... VOL-2634
66 [Tags] functional PowerSwitch
Andy Baviere187eda2020-04-20 15:00:02 -070067 [Setup] Start Logging ONUreboot_PowerSwitch
Suchitra Vemuri60be98b2020-02-19 16:41:21 -080068 [Teardown] Run Keywords Collect Logs
Suchitra Vemuri9a6dd6d2020-02-28 17:46:26 -080069 ... AND Stop Logging ONUreboot_PowerSwitch
Suchitra Vemuria6879aa2020-11-03 11:03:11 -080070 ... AND Delete All Devices and Verify
Suchitra Vemuri60be98b2020-02-19 16:41:21 -080071 # Add OLT device
72 setup
73 # Performing Sanity Test to make sure subscribers are all AUTH+DHCP and pingable
74 Run Keyword If ${has_dataplane} Clean Up Linux
75 Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test
76 Power Switch Connection Suite ${web_power_switch.ip} ${web_power_switch.user} ${web_power_switch.password}
Suchitra Vemuria6879aa2020-11-03 11:03:11 -080077 FOR ${I} IN RANGE 0 ${num_all_onus}
Suchitra Vemuri60be98b2020-02-19 16:41:21 -080078 ${src}= Set Variable ${hosts.src[${I}]}
79 ${dst}= Set Variable ${hosts.dst[${I}]}
Suchitra Vemuria6879aa2020-11-03 11:03:11 -080080 ${of_id}= Get ofID From OLT List ${src['olt']}
Hardik Windlass0560f802020-05-06 23:06:53 +053081 ${onu_device_id}= Get Device ID From SN ${src['onu']}
Suchitra Vemuri60be98b2020-02-19 16:41:21 -080082 ${onu_port}= Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s
83 ... Get ONU Port in ONOS ${src['onu']} ${of_id}
84 Disable Switch Outlet ${src['power_switch_port']}
85 Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure
86 ... Wait Until Keyword Succeeds 60s 2s
87 ... Check Ping False ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']}
88 ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
Hardik Windlass7c801e62020-05-04 19:33:21 +053089 # Remove Subscriber Access (To replicate ATT workflow)
90 Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command ${ONOS_SSH_IP}
91 ... ${ONOS_SSH_PORT} volt-remove-subscriber-access ${of_id} ${onu_port}
Suchitra Vemuri60be98b2020-02-19 16:41:21 -080092
93 Enable Switch Outlet ${src['power_switch_port']}
94 # Check ONU port is Enabled in ONOS
95 Run Keyword And Continue On Failure Wait Until Keyword Succeeds 120s 2s
Suchitra Vemuri760bdd32020-06-17 12:34:48 -070096 ... Verify ONU Port Is Enabled ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${src['onu']}
Suchitra Vemuri60be98b2020-02-19 16:41:21 -080097 # Verify EAPOL flows are added for the ONU port
98 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s
ubuntu6b6e7d42020-03-02 12:35:42 -080099 ... Verify Eapol Flows Added For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port}
Suchitra Vemuri60be98b2020-02-19 16:41:21 -0800100 # Verify ONU state in voltha
Suchitra Vemuricdc32d82020-07-17 12:24:46 -0700101 Run Keyword And Continue On Failure Wait Until Keyword Succeeds 360s 5s Validate Device
Suchitra Vemuri60be98b2020-02-19 16:41:21 -0800102 ... ENABLED ACTIVE REACHABLE
103 ... ${src['onu']} onu=True onu_reason=omci-flows-pushed
Hardik Windlass7c801e62020-05-04 19:33:21 +0530104 Run Keyword If ${has_dataplane} Clean Up Linux
105 # Perform Authentication
106 ${wpa_log}= Run Keyword If ${has_dataplane} Catenate SEPARATOR=.
107 ... /tmp/wpa ${src['dp_iface_name']} log
108 Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Validate Authentication True
109 ... ${src['dp_iface_name']} wpa_supplicant.conf ${src['ip']} ${src['user']} ${src['pass']}
110 ... ${src['container_type']} ${src['container_name']} ${wpa_log}
111 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2
112 ... Verify ONU in AAA-Users ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port}
113 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2
114 ... Execute ONOS CLI Command ${ONOS_SSH_IP} ${ONOS_SSH_PORT}
115 ... volt-add-subscriber-access ${of_id} ${onu_port}
116 # Verify that no pending flows exist for the ONU port
117 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s
118 ... Verify No Pending Flows For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port}
Hardik Windlass21807632020-04-14 16:24:55 +0530119 # Verify subscriber access flows are added for the ONU port
120 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s
121 ... Verify Subscriber Access Flows Added For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id}
122 ... ${onu_port} ${nni_port} ${src['c_tag']} ${src['s_tag']}
Hardik Windlass7c801e62020-05-04 19:33:21 +0530123 Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Validate DHCP and Ping True
124 ... True ${src['dp_iface_name']} ${src['s_tag']} ${src['c_tag']} ${dst['dp_iface_ip_qinq']}
Suchitra Vemuri60be98b2020-02-19 16:41:21 -0800125 ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
Hardik Windlass7c801e62020-05-04 19:33:21 +0530126 ... ${dst['dp_iface_name']} ${dst['ip']} ${dst['user']} ${dst['pass']} ${dst['container_type']}
127 ... ${dst['container_name']}
128 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s
129 ... Validate Subscriber DHCP Allocation ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port}
Suchitra Vemuri60be98b2020-02-19 16:41:21 -0800130 END
Suchitra Vemurid7096132020-02-21 14:50:47 -0800131 # Deleting OLT after tests completes independently (as this test doesn't not run on each POD)
Suchitra Vemuri0656bc22020-03-21 19:07:49 -0700132 #Run Keyword If ${has_dataplane} Delete Device and Verify
Suchitra Vemuria7dae322020-02-19 22:38:18 -0800133
Suchitra Vemuri784e1ae2020-03-16 18:40:25 -0700134Verify OLT after rebooting physically
135 [Documentation] Test the physical reboot of the OLT
136 ... Prerequisite : Subscriber are authenticated/DHCP/pingable state
137 ... Test performs a physical reboot, performs "reboot" from the OLT CLI
138 ... VOL-1956
139 [Tags] functional PhysicalOLTReboot
Andy Baviere187eda2020-04-20 15:00:02 -0700140 [Setup] Start Logging PhysicalOLTReboot
Suchitra Vemuri784e1ae2020-03-16 18:40:25 -0700141 [Teardown] Run Keywords Collect Logs
142 ... AND Stop Logging PhysicalOLTReboot
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800143 ... AND Delete All Devices and Verify
Suchitra Vemuri784e1ae2020-03-16 18:40:25 -0700144 # Add OLT device
145 setup
146 # Performing Sanity Test to make sure subscribers are all AUTH+DHCP and pingable
147 Run Keyword If ${has_dataplane} Clean Up Linux
148 Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test
149 # Reboot the OLT from the OLT CLI
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800150 FOR ${I} IN RANGE 0 ${olt_count}
151 ${olt_user}= Get From Dictionary ${list_olts}[${I}] user
152 ${olt_pass}= Get From Dictionary ${list_olts}[${I}] pass
153 ${olt_ssh_ip}= Get From Dictionary ${list_olts}[${I}] sship
154 ${olt_serial_number}= Get From Dictionary ${list_olts}[${I}] sn
155 ${olt_device_id}= Get OLTDeviceID From OLT List ${olt_serial_number}
156 Run Keyword If ${has_dataplane} Login And Run Command On Remote System
Andrea Campanella5ef88142021-02-02 14:34:50 +0100157 ... reboot ${olt_ssh_ip} ${olt_user} ${olt_pass} prompt=#
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800158 END
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800159 FOR ${I} IN RANGE 0 ${num_all_onus}
Suchitra Vemuri784e1ae2020-03-16 18:40:25 -0700160 ${src}= Set Variable ${hosts.src[${I}]}
161 ${dst}= Set Variable ${hosts.dst[${I}]}
162 Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure
163 ... Wait Until Keyword Succeeds 60s 2s
164 ... Check Ping False ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']}
165 ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
166 END
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800167 # Wait for the OLTs to come back up
168 FOR ${I} IN RANGE 0 ${olt_count}
169 ${olt_serial_number}= Get From Dictionary ${olt_ids}[${I}] sn
170 ${olt_user}= Get From Dictionary ${list_olts}[${I}] user
171 ${olt_pass}= Get From Dictionary ${list_olts}[${I}] pass
172 ${olt_ssh_ip}= Get From Dictionary ${list_olts}[${I}] sship
173 ${olt_device_id}= Get OLTDeviceID From OLT List ${olt_serial_number}
174 Run Keyword If ${has_dataplane} Wait Until Keyword Succeeds 120s 10s
175 ... Check Remote System Reachability True ${olt_ssh_ip}
176 Run Keyword And Continue On Failure Wait Until Keyword Succeeds 360s 5s
177 ... Validate OLT Device ENABLED ACTIVE
178 ... REACHABLE ${olt_serial_number}
179 END
Suchitra Vemuri64db9652020-03-22 21:11:13 -0700180 # Waiting extra time for the ONUs to come up
181 Sleep 60s
Suchitra Vemuri784e1ae2020-03-16 18:40:25 -0700182 Run Keyword If ${has_dataplane} Clean Up Linux
183 Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test
184 # Deleting OLT after test completes
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800185 #Run Keyword If ${has_dataplane} Delete All Devices and Verify
Suchitra Vemuri784e1ae2020-03-16 18:40:25 -0700186
Suchitra Vemuri05180cb2020-03-26 13:13:27 -0700187Verify restart openolt-adapter container after subscriber provisioning
Suchitra Vemuria7dae322020-02-19 22:38:18 -0800188 [Documentation] Restart openolt-adapter container after VOLTHA is operational.
189 ... Prerequisite : ONUs are authenticated and pingable.
Suchitra Vemurif7a033c2020-02-26 17:22:41 -0800190 [Tags] functional VOL-1958 Restart-OpenOlt released
Andy Baviere187eda2020-04-20 15:00:02 -0700191 [Setup] Start Logging Restart-OpenOlt
Suchitra Vemuria7dae322020-02-19 22:38:18 -0800192 [Teardown] Run Keywords Collect Logs
Suchitra Vemurif7a033c2020-02-26 17:22:41 -0800193 ... AND Stop Logging Restart-OpenOlt
Suchitra Vemuria7dae322020-02-19 22:38:18 -0800194 # Add OLT device
195 setup
196 # Performing Sanity Test to make sure subscribers are all AUTH+DHCP and pingable
197 Run Keyword If ${has_dataplane} Clean Up Linux
198 Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test
199 ${waitforRestart} Set Variable 120s
200 ${podStatusOutput}= Run kubectl get pods -n ${NAMESPACE}
201 Log ${podStatusOutput}
202 ${countBforRestart}= Run kubectl get pods -n ${NAMESPACE} | grep Running | wc -l
Andrea Campanella3dcce272021-01-15 16:04:47 +0100203 ${podName} Set Variable ${OLT_ADAPTER_APP_LABEL}
Hardik Windlass79b40ff2020-06-11 22:55:47 +0530204 Wait Until Keyword Succeeds ${timeout} 15s Delete K8s Pods By Label ${NAMESPACE} app ${podName}
Hardik Windlass79b40ff2020-06-11 22:55:47 +0530205 Wait Until Keyword Succeeds ${timeout} 2s Validate Pods Status By Label ${NAMESPACE}
206 ... app ${podName} Running
Suchitra Vemuri312bfe02020-03-16 16:11:34 -0700207 # Wait for 1min after openolt adapter is restarted
Hardik Windlass5e214b22021-02-26 10:37:14 +0000208 # TBD: Need for this Sleep
Suchitra Vemuri312bfe02020-03-16 16:11:34 -0700209 Sleep 60s
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800210 Run Keyword If ${has_dataplane} Clean Up Linux
211 Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test
Suchitra Vemuria7dae322020-02-19 22:38:18 -0800212 ${podStatusOutput}= Run kubectl get pods -n ${NAMESPACE}
213 Log ${podStatusOutput}
214 ${countAfterRestart}= Run kubectl get pods -n ${NAMESPACE} | grep Running | wc -l
215 Should Be Equal As Strings ${countAfterRestart} ${countBforRestart}
216 Log to console Pod ${podName} restarted and sanity checks passed successfully
Suchitra Vemuri60be98b2020-02-19 16:41:21 -0800217
Suchitra Vemurif7a033c2020-02-26 17:22:41 -0800218Check OLT/ONU Authentication After Radius Pod Restart
219 [Documentation] After radius restart, triggers reassociation, checks status and
220 ... authentication, validates dhcp and ping. Note : wpa reassociate works only when
221 ... wpa supplicant is running in background hence it is recommended to remove
222 ... teardown from previous test or uncomment 'Teardown None'.
223 ... Assuming that test1 was executed where all the ONUs are authenticated/DHCP/pingable
224 [Tags] functional RadiusRestart released
Andy Baviere187eda2020-04-20 15:00:02 -0700225 [Setup] Start Logging RadiusRestart
Suchitra Vemurif7a033c2020-02-26 17:22:41 -0800226 [Teardown] Run Keywords Collect Logs
227 ... AND Stop Logging RadiusRestart
Suchitra Vemurif7a033c2020-02-26 17:22:41 -0800228 ${waitforRestart} Set Variable 120s
Hardik Windlass79b40ff2020-06-11 22:55:47 +0530229 ${podName} Set Variable radius
230 Wait Until Keyword Succeeds ${timeout} 15s Delete K8s Pods By Label ${DEFAULTSPACE} app ${podName}
Hardik Windlass79b40ff2020-06-11 22:55:47 +0530231 Wait Until Keyword Succeeds ${waitforRestart} 2s Validate Pods Status By Label ${DEFAULTSPACE}
232 ... app ${podName} Running
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800233 FOR ${I} IN RANGE 0 ${num_all_onus}
Suchitra Vemurif7a033c2020-02-26 17:22:41 -0800234 ${src}= Set Variable ${hosts.src[${I}]}
235 ${dst}= Set Variable ${hosts.dst[${I}]}
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800236 ${of_id}= Get ofID From OLT List ${src['olt']}
Suchitra Vemurif7a033c2020-02-26 17:22:41 -0800237 ${onu_device_id}= Get Device ID From SN ${src['onu']}
238 ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s
239 ... Get ONU Port in ONOS ${src['onu']} ${of_id}
240 Wait Until Keyword Succeeds ${timeout} 2s
ubuntu6b6e7d42020-03-02 12:35:42 -0800241 ... Verify Eapol Flows Added For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port}
Suchitra Vemurif7a033c2020-02-26 17:22:41 -0800242 Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure
243 ... Validate Authentication After Reassociate True ${src['dp_iface_name']}
244 ... ${src['ip']} ${src['user']} ${src['pass']}
245 ... ${src['container_type']} ${src['container_name']}
ubuntu6b6e7d42020-03-02 12:35:42 -0800246 Wait Until Keyword Succeeds ${timeout} 2s Verify ONU in AAA-Users ${ONOS_SSH_IP}
Suchitra Vemurif7a033c2020-02-26 17:22:41 -0800247 ... ${ONOS_SSH_PORT} ${onu_port}
248 Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure
249 ... Validate DHCP and Ping True True ${src['dp_iface_name']}
250 ... ${src['s_tag']} ${src['c_tag']} ${dst['dp_iface_ip_qinq']}
251 ... ${src['ip']} ${src['user']} ${src['pass']}
252 ... ${src['container_type']} ${src['container_name']}
253 ... ${dst['dp_iface_name']} ${dst['ip']} ${dst['user']}
254 ... ${dst['pass']} ${dst['container_type']} ${dst['container_name']}
255 Wait Until Keyword Succeeds ${timeout} 2s Run Keyword And Continue On Failure
ubuntu6b6e7d42020-03-02 12:35:42 -0800256 ... Validate Subscriber DHCP Allocation ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port}
Suchitra Vemurif7a033c2020-02-26 17:22:41 -0800257 END
258
Suchitra Vemuri05180cb2020-03-26 13:13:27 -0700259Verify openolt adapter restart before subscriber provisioning
Suchitra Vemurif7a033c2020-02-26 17:22:41 -0800260 [Documentation] Deploys an device instance and waits for it to authenticate. After
261 ... authentication is successful the rw-core deployment is scaled to 0 instances to
262 ... simulate a POD crash. The test then scales the rw-core back to a single instance
263 ... and configures ONOS for access. The test succeeds if the device is able to
264 ... complete the DHCP sequence.
Hung-Wei Chiud3576762020-03-25 18:06:26 -0700265 [Tags] functional olt-adapter-restart
Andy Baviere187eda2020-04-20 15:00:02 -0700266 [Setup] Start Logging OltAdapterRestart
Suchitra Vemuria0c086f2020-03-29 19:14:13 -0700267 #... AND Clear All Devices Then Create New Device
Suchitra Vemurif7a033c2020-02-26 17:22:41 -0800268 [Teardown] Run Keywords Collect Logs
269 ... AND Stop Logging OltAdapterRestart
Hung-Wei Chiud3576762020-03-25 18:06:26 -0700270 # Add OLT and perform sanity test
Suchitra Vemuri59ad2772020-03-26 22:27:27 -0700271 #setup
Suchitra Vemuri91537c82020-03-29 15:03:26 -0700272 Run Keyword If ${has_dataplane} Clean Up Linux
Suchitra Vemuri59ad2772020-03-26 22:27:27 -0700273 #Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800274 #Set Global Variable ${of_id}
Suchitra Vemurif7a033c2020-02-26 17:22:41 -0800275
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800276 FOR ${I} IN RANGE 0 ${num_all_onus}
Suchitra Vemurif7a033c2020-02-26 17:22:41 -0800277 ${src}= Set Variable ${hosts.src[${I}]}
278 ${dst}= Set Variable ${hosts.dst[${I}]}
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800279 ${of_id}= Get ofID From OLT List ${src['olt']}
Suchitra Vemurif7a033c2020-02-26 17:22:41 -0800280 ${onu_device_id}= Get Device ID From SN ${src['onu']}
281 ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']}
282 ... ${of_id}
283
284 # Bring up the device and verify it authenticates
Suchitra Vemuricdc32d82020-07-17 12:24:46 -0700285 Wait Until Keyword Succeeds 360s 5s Validate Device ENABLED ACTIVE REACHABLE
Suchitra Vemurif7a033c2020-02-26 17:22:41 -0800286 ... ${onu_device_id} onu=True onu_reason=omci-flows-pushed
ubuntu6b6e7d42020-03-02 12:35:42 -0800287 Wait Until Keyword Succeeds ${timeout} 2s Verify Eapol Flows Added For ONU ${ONOS_SSH_IP}
Suchitra Vemurif7a033c2020-02-26 17:22:41 -0800288 ... ${ONOS_SSH_PORT} ${onu_port}
Andy Bavier84834d42020-02-25 13:49:50 -0700289 ${wpa_log}= Run Keyword If ${has_dataplane} Catenate SEPARATOR=.
290 ... /tmp/wpa ${src['dp_iface_name']} log
Suchitra Vemurif7a033c2020-02-26 17:22:41 -0800291 Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Validate Authentication True
292 ... ${src['dp_iface_name']} wpa_supplicant.conf ${src['ip']} ${src['user']} ${src['pass']}
Andy Bavier84834d42020-02-25 13:49:50 -0700293 ... ${src['container_type']} ${src['container_name']} ${wpa_log}
ubuntu6b6e7d42020-03-02 12:35:42 -0800294 Wait Until Keyword Succeeds ${timeout} 2s Verify ONU in AAA-Users ${ONOS_SSH_IP}
Suchitra Vemurif7a033c2020-02-26 17:22:41 -0800295 ... ${ONOS_SSH_PORT} ${onu_port}
296 END
297 # Scale down the open OLT adapter deployment to 0 PODs and once confirmed, scale it back to 1
Andrea Campanella3dcce272021-01-15 16:04:47 +0100298 Scale K8s Deployment by Pod Label ${NAMESPACE} app ${OLT_ADAPTER_APP_LABEL} 0
299 Wait Until Keyword Succeeds ${timeout} 2s Pods Do Not Exist By Label ${NAMESPACE} app
300 ... ${OLT_ADAPTER_APP_LABEL}
Suchitra Vemurif7a033c2020-02-26 17:22:41 -0800301 # Scale up the open OLT adapter deployment and make sure both it and the ofagent deployment are back
Andrea Campanella3dcce272021-01-15 16:04:47 +0100302 Scale K8s Deployment by Pod Label ${NAMESPACE} app ${OLT_ADAPTER_APP_LABEL} 1
Suchitra Vemurif7a033c2020-02-26 17:22:41 -0800303 Wait Until Keyword Succeeds ${timeout} 2s
Andrea Campanella3dcce272021-01-15 16:04:47 +0100304 ... Check Expected Available Deployment Replicas By Pod Label ${NAMESPACE} app ${OLT_ADAPTER_APP_LABEL} 1
Suchitra Vemurif7a033c2020-02-26 17:22:41 -0800305
306 # Ensure the device is available in ONOS, this represents system connectivity being restored
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800307 FOR ${I} IN RANGE 0 ${olt_count}
308 ${olt_serial_number}= Get From Dictionary ${olt_ids}[${I}] sn
309 ${olt_device_id}= Get OLTDeviceID From OLT List ${olt_serial_number}
310 ${of_id}= Wait Until Keyword Succeeds ${timeout} 15s Validate OLT Device in ONOS
311 ... ${olt_serial_number}
312 Wait Until Keyword Succeeds ${timeout} 2s Device Is Available In ONOS
313 ... http://karaf:karaf@${ONOS_REST_IP}:${ONOS_REST_PORT} ${of_id}
314 END
Suchitra Vemurif7a033c2020-02-26 17:22:41 -0800315
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800316 FOR ${I} IN RANGE 0 ${num_all_onus}
317 ${src}= Set Variable ${hosts.src[${I}]}
318 ${dst}= Set Variable ${hosts.dst[${I}]}
319 ${of_id}= Get ofID From OLT List ${src['olt']}
320 ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']}
321 ... ${of_id}
Suchitra Vemurif7a033c2020-02-26 17:22:41 -0800322 # Add subscriber access and verify that DHCP completes to ensure system is still functioning properly
ubuntu6b6e7d42020-03-02 12:35:42 -0800323 Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command ${ONOS_SSH_IP}
Suchitra Vemurif7a033c2020-02-26 17:22:41 -0800324 ... ${ONOS_SSH_PORT} volt-add-subscriber-access ${of_id} ${onu_port}
Hardik Windlass21807632020-04-14 16:24:55 +0530325 # Verify subscriber access flows are added for the ONU port
326 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s
327 ... Verify Subscriber Access Flows Added For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id}
328 ... ${onu_port} ${nni_port} ${src['c_tag']} ${src['s_tag']}
Suchitra Vemurif7a033c2020-02-26 17:22:41 -0800329 Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Validate DHCP and Ping True
330 ... True ${src['dp_iface_name']} ${src['s_tag']} ${src['c_tag']} ${dst['dp_iface_ip_qinq']}
331 ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
332 ... ${dst['dp_iface_name']} ${dst['ip']} ${dst['user']} ${dst['pass']} ${dst['container_type']}
333 ... ${dst['container_name']}
334 Wait Until Keyword Succeeds ${timeout} 2s Run Keyword And Continue On Failure
ubuntu6b6e7d42020-03-02 12:35:42 -0800335 ... Validate Subscriber DHCP Allocation ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port}
Suchitra Vemurif7a033c2020-02-26 17:22:41 -0800336 END
337
hwchiu14c05102020-03-27 00:44:30 +0000338Verify restart ofagent container after subscriber is provisioned
Gayathri.Selvanb6a2b542020-01-24 07:24:23 +0000339 [Documentation] Restart ofagent container after VOLTHA is operational.
Gayathri.Selvanb6a2b542020-01-24 07:24:23 +0000340 ... Prerequisite : ONUs are authenticated and pingable.
Hardik Windlass7a846662020-03-19 20:42:59 +0530341 [Tags] functional VOL-2409 ofagentRestart
Andy Baviere187eda2020-04-20 15:00:02 -0700342 [Setup] Start Logging ofagentRestart
Andy Bavier4a8450e2020-02-04 08:58:37 -0700343 [Teardown] Run Keywords Collect Logs
Andy Bavierabeba262020-02-07 16:22:16 -0700344 ... AND Stop Logging ofagentRestart
Hardik Windlass79b40ff2020-06-11 22:55:47 +0530345 ... AND Scale K8s Deployment ${NAMESPACE} voltha-voltha-ofagent 1
Suchitra Vemuriceb002a2020-03-25 13:36:21 -0700346 # set timeout value
Gayathri.Selvanb6a2b542020-01-24 07:24:23 +0000347 ${waitforRestart} Set Variable 120s
Andy Bavier4a8450e2020-02-04 08:58:37 -0700348 ${podStatusOutput}= Run kubectl get pods -n ${NAMESPACE}
Gayathri.Selvanb6a2b542020-01-24 07:24:23 +0000349 Log ${podStatusOutput}
Andy Bavier4a8450e2020-02-04 08:58:37 -0700350 ${countBforRestart}= Run kubectl get pods -n ${NAMESPACE} | grep Running | wc -l
Hardik Windlass8f2aadc2020-03-16 20:16:39 +0530351 ${podName} Set Variable ofagent
Hardik Windlass79b40ff2020-06-11 22:55:47 +0530352 Wait Until Keyword Succeeds ${timeout} 15s Delete K8s Pods By Label ${NAMESPACE} app ${podName}
Hardik Windlass79b40ff2020-06-11 22:55:47 +0530353 Wait Until Keyword Succeeds ${timeout} 2s Validate Pods Status By Label ${NAMESPACE}
354 ... app ${podName} Running
Hardik Windlass8f2aadc2020-03-16 20:16:39 +0530355 # Performing Sanity Test to make sure subscribers are all AUTH+DHCP and pingable
356 Run Keyword If ${has_dataplane} Clean Up Linux
357 Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test
Andy Bavier4a8450e2020-02-04 08:58:37 -0700358 ${podStatusOutput}= Run kubectl get pods -n ${NAMESPACE}
Gayathri.Selvanb6a2b542020-01-24 07:24:23 +0000359 Log ${podStatusOutput}
Andy Bavier4a8450e2020-02-04 08:58:37 -0700360 ${countAfterRestart}= Run kubectl get pods -n ${NAMESPACE} | grep Running | wc -l
Gayathri.Selvanb6a2b542020-01-24 07:24:23 +0000361 Should Be Equal As Strings ${countAfterRestart} ${countBforRestart}
Hardik Windlass8f2aadc2020-03-16 20:16:39 +0530362 # Scale Down the Of-Agent Deployment
Hardik Windlass79b40ff2020-06-11 22:55:47 +0530363 Scale K8s Deployment ${NAMESPACE} voltha-voltha-ofagent 0
Hardik Windlass8f2aadc2020-03-16 20:16:39 +0530364 Sleep 30s
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800365 FOR ${I} IN RANGE 0 ${num_all_onus}
Hardik Windlass8f2aadc2020-03-16 20:16:39 +0530366 ${src}= Set Variable ${hosts.src[${I}]}
367 ${dst}= Set Variable ${hosts.dst[${I}]}
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800368 ${of_id}= Get ofID From OLT List ${src['olt']}
Hardik Windlass8f2aadc2020-03-16 20:16:39 +0530369 ${onu_device_id}= Get Device ID From SN ${src['onu']}
370 ${onu_port}= Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s
371 ... Get ONU Port in ONOS ${src['onu']} ${of_id}
372 # Verify ONU state in voltha
Suchitra Vemuricdc32d82020-07-17 12:24:46 -0700373 Run Keyword And Continue On Failure Wait Until Keyword Succeeds 360s 5s Validate Device
Hardik Windlass8f2aadc2020-03-16 20:16:39 +0530374 ... ENABLED ACTIVE REACHABLE
375 ... ${src['onu']} onu=True onu_reason=omci-flows-pushed
376 # Check ONU port is Disabled in ONOS
377 Run Keyword And Continue On Failure Wait Until Keyword Succeeds 120s 2s
Suchitra Vemuri760bdd32020-06-17 12:34:48 -0700378 ... Verify ONU Port Is Disabled ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${src['onu']}
Hardik Windlass8f2aadc2020-03-16 20:16:39 +0530379 # Verify EAPOL flows are present for the ONU port
380 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s
381 ... Verify Eapol Flows Added For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port}
382 # Verify ONU in AAA-Users
383 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2
384 ... Verify ONU in AAA-Users ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port}
385 # Verify DHCP-Allocations
386 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s
387 ... Validate Subscriber DHCP Allocation ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port}
Hardik Windlass21807632020-04-14 16:24:55 +0530388 # Verify subscriber access flows are added for the ONU port
389 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s
390 ... Verify Subscriber Access Flows Added For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id}
391 ... ${onu_port} ${nni_port} ${src['c_tag']} ${src['s_tag']}
Hardik Windlass8f2aadc2020-03-16 20:16:39 +0530392 # Verify Ping
393 Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Check Ping True
394 ... ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']} ${src['ip']}
395 ... ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
Hardik Windlass8f2aadc2020-03-16 20:16:39 +0530396 END
397 # Scale Up the Of-Agent Deployment
Hardik Windlass79b40ff2020-06-11 22:55:47 +0530398 Scale K8s Deployment ${NAMESPACE} voltha-voltha-ofagent 1
Hardik Windlass8f2aadc2020-03-16 20:16:39 +0530399 Wait Until Keyword Succeeds ${waitforRestart} 2s Validate Pod Status ofagent ${NAMESPACE}
400 ... Running
401 # Performing Sanity Test to make sure subscribers are all AUTH+DHCP and pingable
402 Run Keyword If ${has_dataplane} Clean Up Linux
403 Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test
404 Log to console Pod ${podName} restarted and sanity checks passed successfully
Gayathri.Selvanb6a2b542020-01-24 07:24:23 +0000405
Gayathri.Selvanc0b37022020-02-06 05:17:00 +0000406Check ONU adapter crash not forcing authentication again
407 [Documentation] After ONU adapter restart, checks wpa log for 'authentication started'
408 ... message count to make sure auth not started again and validates EAP status and ping.
409 ... Assuming that test1 or sanity was executed where all the ONUs are authenticated/DHCP/pingable
hwchiu14c05102020-03-27 00:44:30 +0000410 [Tags] functional ONUAdaptCrash
Andy Baviere187eda2020-04-20 15:00:02 -0700411 [Setup] Start Logging ONUAdaptCrash
Andy Bavierabeba262020-02-07 16:22:16 -0700412 [Teardown] Run Keywords Collect Logs
413 ... AND Stop Logging ONUAdaptCrash
hwchiu14c05102020-03-27 00:44:30 +0000414 # Wait for adapter to resync
Hardik Windlass5e214b22021-02-26 10:37:14 +0000415 # TBD: Need for this Sleep
hwchiu14c05102020-03-27 00:44:30 +0000416 Sleep 60s
417 # Restart the onu
Hardik Windlass79b40ff2020-06-11 22:55:47 +0530418 ${podName} Set Variable adapter-open-onu
Hung-Wei Chiu2bee4d42020-04-24 11:31:50 -0700419 Wait Until Keyword Succeeds ${timeout} 15s Delete K8s Pods By Label ${NAMESPACE} app ${podName}
hwchiu14c05102020-03-27 00:44:30 +0000420 # Validate ONU Ports
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800421 FOR ${I} IN RANGE 0 ${num_all_onus}
Gayathri.Selvanc0b37022020-02-06 05:17:00 +0000422 ${src}= Set Variable ${hosts.src[${I}]}
423 ${dst}= Set Variable ${hosts.dst[${I}]}
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800424 ${of_id}= Get ofID From OLT List ${src['olt']}
Gayathri.Selvanc0b37022020-02-06 05:17:00 +0000425 ${onu_device_id}= Get Device ID From SN ${src['onu']}
426 ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']}
427 ... ${of_id}
hwchiu14c05102020-03-27 00:44:30 +0000428 Run Keyword And Continue On Failure Verify ONU Port Is Enabled ${ONOS_SSH_IP} ${ONOS_SSH_PORT}
Suchitra Vemuri760bdd32020-06-17 12:34:48 -0700429 ... ${src['onu']}
Gayathri.Selvanc0b37022020-02-06 05:17:00 +0000430 ${output}= Run Keyword If ${has_dataplane} Login And Run Command On Remote System
431 ... wpa_cli status | grep SUCCESS ${src['ip']} ${src['user']} ${src['pass']}
432 ... ${src['container_type']} ${src['container_name']}
433 Run Keyword If ${has_dataplane} Should Contain ${output} SUCCESS
Gayathri.Selvanc0b37022020-02-06 05:17:00 +0000434 END
Hung-Wei Chiu2bee4d42020-04-24 11:31:50 -0700435 Wait Until Keyword Succeeds ${timeout} 2s Validate Pods Status By Label ${NAMESPACE}
436 ... app ${podName} Running
hwchiu14c05102020-03-27 00:44:30 +0000437 # Wait for adapter to resync
Hardik Windlass5e214b22021-02-26 10:37:14 +0000438 # TBD: Need for this Sleep
hwchiu14c05102020-03-27 00:44:30 +0000439 Sleep 60s
Andy Bavier8da0e132020-04-13 10:25:16 -0700440 Run Keyword If ${has_dataplane} Clean Up Linux
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800441 # Validate OLTs are active in ONOS
442 FOR ${I} IN RANGE 0 ${olt_count}
443 ${olt_serial_number}= Get From Dictionary ${olt_ids}[${I}] sn
444 ${olt_device_id}= Get OLTDeviceID From OLT List ${olt_serial_number}
445 ${of_id}= Wait Until Keyword Succeeds ${timeout} 15s Validate OLT Device in ONOS
446 ... ${olt_serial_number}
447 END
hwchiu14c05102020-03-27 00:44:30 +0000448 # Perform all steps in Sanity Test except the subscriber addition
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800449 FOR ${I} IN RANGE 0 ${num_all_onus}
hwchiu14c05102020-03-27 00:44:30 +0000450 ${src}= Set Variable ${hosts.src[${I}]}
451 ${dst}= Set Variable ${hosts.dst[${I}]}
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800452 ${of_id}= Get ofID From OLT List ${src['olt']}
hwchiu14c05102020-03-27 00:44:30 +0000453 ${onu_device_id}= Get Device ID From SN ${src['onu']}
454 ${onu_port}= Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s
455 ... Get ONU Port in ONOS ${src['onu']} ${of_id}
456 # Check ONU port is Enabled in ONOS
457 Run Keyword And Continue On Failure Wait Until Keyword Succeeds 120s 2s
Suchitra Vemuri760bdd32020-06-17 12:34:48 -0700458 ... Verify ONU Port Is Enabled ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${src['onu']}
hwchiu14c05102020-03-27 00:44:30 +0000459 # Verify EAPOL flows are added for the ONU port
460 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s
461 ... Verify Eapol Flows Added For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port}
462 # Verify ONU state in voltha
Suchitra Vemuricdc32d82020-07-17 12:24:46 -0700463 Run Keyword And Continue On Failure Wait Until Keyword Succeeds 360s 5s Validate Device
hwchiu14c05102020-03-27 00:44:30 +0000464 ... ENABLED ACTIVE REACHABLE
465 ... ${src['onu']} onu=True onu_reason=omci-flows-pushed
466 # Perform Authentication
467 ${wpa_log}= Run Keyword If ${has_dataplane} Catenate SEPARATOR=.
468 ... /tmp/wpa ${src['dp_iface_name']} log
469 Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Validate Authentication True
470 ... ${src['dp_iface_name']} wpa_supplicant.conf ${src['ip']} ${src['user']} ${src['pass']}
471 ... ${src['container_type']} ${src['container_name']} ${wpa_log}
472 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2
473 ... Verify ONU in AAA-Users ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port}
474 # Verify that no pending flows exist for the ONU port
475 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s
476 ... Verify No Pending Flows For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port}
Hardik Windlass21807632020-04-14 16:24:55 +0530477 # Verify subscriber access flows are added for the ONU port
478 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s
479 ... Verify Subscriber Access Flows Added For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id}
480 ... ${onu_port} ${nni_port} ${src['c_tag']} ${src['s_tag']}
hwchiu14c05102020-03-27 00:44:30 +0000481 Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Validate DHCP and Ping True
482 ... True ${src['dp_iface_name']} ${src['s_tag']} ${src['c_tag']} ${dst['dp_iface_ip_qinq']}
483 ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
484 ... ${dst['dp_iface_name']} ${dst['ip']} ${dst['user']} ${dst['pass']} ${dst['container_type']}
485 ... ${dst['container_name']}
486 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s
487 ... Validate Subscriber DHCP Allocation ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port}
hwchiu14c05102020-03-27 00:44:30 +0000488 END
489
Suchitra Vemuriebf65322020-04-03 10:09:41 -0700490Sanity E2E Test for OLT/ONU on POD With Core Fail and Restart
491 [Documentation] Deploys an device instance and waits for it to authenticate. After
492 ... authentication is successful the rw-core deployment is scaled to 0 instances to
493 ... simulate a POD crash. The test then scales the rw-core back to a single instance
494 ... and configures ONOS for access. The test succeeds if the device is able to
495 ... complete the DHCP sequence.
496 [Tags] functional rwcore-restart
Andy Baviere187eda2020-04-20 15:00:02 -0700497 [Setup] Run Keywords Start Logging RwCoreFailAndRestart
Suchitra Vemuriebf65322020-04-03 10:09:41 -0700498 ... AND Clear All Devices Then Create New Device
499 [Teardown] Run Keywords Collect Logs
500 ... AND Stop Logging RwCoreFailAndRestart
Suchitra Vemuri5d3383f2020-04-03 11:02:26 -0700501 #... AND Delete Device and Verify
Suchitra Vemuriebf65322020-04-03 10:09:41 -0700502 Run Keyword If ${has_dataplane} Clean Up Linux
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800503 FOR ${I} IN RANGE 0 ${olt_count}
504 ${olt_serial_number}= Get From Dictionary ${olt_ids}[${I}] sn
505 ${olt_device_id}= Get OLTDeviceID From OLT List ${olt_serial_number}
506 ${of_id}= Wait Until Keyword Succeeds ${timeout} 15s Validate OLT Device in ONOS
507 ... ${olt_serial_number}
508 ${nni_port}= Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s
509 ... Get NNI Port in ONOS ${of_id}
510 # Set Global Variable ${nni_port}
511 END
512 FOR ${I} IN RANGE 0 ${num_all_onus}
Suchitra Vemuriebf65322020-04-03 10:09:41 -0700513 ${src}= Set Variable ${hosts.src[${I}]}
514 ${dst}= Set Variable ${hosts.dst[${I}]}
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800515 ${of_id}= Get ofID From OLT List ${src['olt']}
Suchitra Vemuriebf65322020-04-03 10:09:41 -0700516 ${onu_device_id}= Get Device ID From SN ${src['onu']}
517 ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']}
518 ... ${of_id}
519 # Bring up the device and verify it authenticates
Suchitra Vemuricdc32d82020-07-17 12:24:46 -0700520 Wait Until Keyword Succeeds 360s 5s Validate Device ENABLED ACTIVE REACHABLE
Suchitra Vemuriebf65322020-04-03 10:09:41 -0700521 ... ${onu_device_id} onu=True onu_reason=omci-flows-pushed
522 Wait Until Keyword Succeeds ${timeout} 2s Verify Eapol Flows Added For ONU ${ONOS_SSH_IP}
523 ... ${ONOS_SSH_PORT} ${onu_port}
524 ${wpa_log}= Run Keyword If ${has_dataplane} Catenate SEPARATOR=.
525 ... /tmp/wpa ${src['dp_iface_name']} log
526 Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Validate Authentication True
527 ... ${src['dp_iface_name']} wpa_supplicant.conf ${src['ip']} ${src['user']} ${src['pass']}
528 ... ${src['container_type']} ${src['container_name']} ${wpa_log}
529 Wait Until Keyword Succeeds ${timeout} 2s Verify ONU in AAA-Users ${ONOS_SSH_IP}
530 ... ${ONOS_SSH_PORT} ${onu_port}
531 END
532
533 # Scale down the rw-core deployment to 0 PODs and once confirmed, scale it back to 1
Hardik Windlass79b40ff2020-06-11 22:55:47 +0530534 Scale K8s Deployment voltha voltha-voltha-rw-core 0
535 Wait Until Keyword Succeeds ${timeout} 2s Pod Does Not Exist voltha voltha-voltha-rw-core
Suchitra Vemuriebf65322020-04-03 10:09:41 -0700536 # Ensure the ofagent POD goes "not-ready" as expected
537 Wait Until keyword Succeeds ${timeout} 2s
Hardik Windlass79b40ff2020-06-11 22:55:47 +0530538 ... Check Expected Available Deployment Replicas voltha voltha-voltha-ofagent 0
Suchitra Vemuriebf65322020-04-03 10:09:41 -0700539 # Scale up the core deployment and make sure both it and the ofagent deployment are back
Hardik Windlass79b40ff2020-06-11 22:55:47 +0530540 Scale K8s Deployment voltha voltha-voltha-rw-core 1
Suchitra Vemuriebf65322020-04-03 10:09:41 -0700541 Wait Until Keyword Succeeds ${timeout} 2s
Hardik Windlass79b40ff2020-06-11 22:55:47 +0530542 ... Check Expected Available Deployment Replicas voltha voltha-voltha-rw-core 1
Suchitra Vemuriebf65322020-04-03 10:09:41 -0700543 Wait Until Keyword Succeeds ${timeout} 2s
Hardik Windlass79b40ff2020-06-11 22:55:47 +0530544 ... Check Expected Available Deployment Replicas voltha voltha-voltha-ofagent 1
Suchitra Vemuriebf65322020-04-03 10:09:41 -0700545 # For some reason scaling down and up the POD behind a service causes the port forward to stop working,
546 # so restart the port forwarding for the API service
David Bainbridge07321ff2020-06-12 13:55:42 -0700547 Restart VOLTHA Port Forward voltha-api
Suchitra Vemuriebf65322020-04-03 10:09:41 -0700548 # Ensure that the ofagent pod is up and ready and the device is available in ONOS, this
549 # represents system connectivity being restored
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800550 FOR ${I} IN RANGE 0 ${olt_count}
551 ${olt_serial_number}= Get From Dictionary ${olt_ids}[${I}] sn
552 ${olt_device_id}= Get OLTDeviceID From OLT List ${olt_serial_number}
553 ${of_id}= Wait Until Keyword Succeeds ${timeout} 15s Validate OLT Device in ONOS
554 ... ${olt_serial_number}
Girish Gowdrae4de3b32021-03-23 22:20:00 -0700555 Wait Until Keyword Succeeds 120s 2s Device Is Available In ONOS
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800556 ... http://karaf:karaf@${ONOS_REST_IP}:${ONOS_REST_PORT} ${of_id}
557 END
Suchitra Vemuriebf65322020-04-03 10:09:41 -0700558
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800559 FOR ${I} IN RANGE 0 ${num_all_onus}
Andy Bavier52094622020-05-12 15:54:24 -0700560 ${src}= Set Variable ${hosts.src[${I}]}
561 ${dst}= Set Variable ${hosts.dst[${I}]}
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800562 ${of_id}= Get ofID From OLT List ${src['olt']}
Andy Bavier52094622020-05-12 15:54:24 -0700563 ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']}
564 ... ${of_id}
Suchitra Vemuriebf65322020-04-03 10:09:41 -0700565 # Add subscriber access and verify that DHCP completes to ensure system is still functioning properly
566 Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command ${ONOS_SSH_IP}
567 ... ${ONOS_SSH_PORT} volt-add-subscriber-access ${of_id} ${onu_port}
Hardik Windlass21807632020-04-14 16:24:55 +0530568 # Verify subscriber access flows are added for the ONU port
569 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s
570 ... Verify Subscriber Access Flows Added For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id}
571 ... ${onu_port} ${nni_port} ${src['c_tag']} ${src['s_tag']}
Suchitra Vemuriebf65322020-04-03 10:09:41 -0700572 Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Validate DHCP and Ping True
573 ... True ${src['dp_iface_name']} ${src['s_tag']} ${src['c_tag']} ${dst['dp_iface_ip_qinq']}
574 ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
575 ... ${dst['dp_iface_name']} ${dst['ip']} ${dst['user']} ${dst['pass']} ${dst['container_type']}
576 ... ${dst['container_name']}
577 Wait Until Keyword Succeeds ${timeout} 2s Run Keyword And Continue On Failure
578 ... Validate Subscriber DHCP Allocation ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port}
579 END
580
Suchitra Vemuri19e942f2020-08-11 18:04:28 -0700581Verify OLT Soft Reboot
582 [Documentation] Test soft reboot of the OLT using voltctl command
583 [Tags] VOL-2745 OLTSoftReboot functional
584 [Setup] Start Logging OLTSoftReboot
585 [Teardown] Run Keywords Collect Logs
586 ... AND Stop Logging OLTSoftReboot
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800587 FOR ${I} IN RANGE 0 ${olt_count}
588 ${olt_serial_number}= Get From Dictionary ${olt_ids}[${I}] sn
589 ${olt_device_id}= Get OLTDeviceID From OLT List ${olt_serial_number}
590 Run Keyword And Continue On Failure Wait Until Keyword Succeeds 360s 5s
591 ... Validate OLT Device ENABLED ACTIVE
592 ... REACHABLE ${olt_serial_number}
593 # Reboot the OLT using "voltctl device reboot" command
594 Reboot Device ${olt_device_id}
595 END
Suchitra Vemuri19e942f2020-08-11 18:04:28 -0700596 #Verify that ping fails
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800597 FOR ${I} IN RANGE 0 ${num_all_onus}
Suchitra Vemuri19e942f2020-08-11 18:04:28 -0700598 ${src}= Set Variable ${hosts.src[${I}]}
599 ${dst}= Set Variable ${hosts.dst[${I}]}
600 Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure
601 ... Wait Until Keyword Succeeds 60s 2s
602 ... Check Ping False ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']}
603 ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
604 END
Suchitra Vemuri19e942f2020-08-11 18:04:28 -0700605 # Check OLT states
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800606 FOR ${I} IN RANGE 0 ${olt_count}
607 ${olt_serial_number}= Get From Dictionary ${list_olts}[${I}] sn
608 ${olt_ssh_ip}= Get From Dictionary ${list_olts}[${I}] sship
609 ${olt_device_id}= Get OLTDeviceID From OLT List ${olt_serial_number}
610 # Wait for the OLT to come back up
611 Run Keyword If ${has_dataplane} Wait Until Keyword Succeeds 120s 10s
612 ... Check Remote System Reachability True ${olt_ssh_ip}
613 # Check OLT states
614 Run Keyword And Continue On Failure Wait Until Keyword Succeeds 360s 5s
615 ... Validate OLT Device ENABLED ACTIVE
616 ... REACHABLE ${olt_serial_number}
617 END
618 # Waiting extra time for the ONUs to come up
619 Sleep 60s
Suchitra Vemuri19e942f2020-08-11 18:04:28 -0700620 #Check after reboot that ONUs are active, authenticated/DHCP/pingable
621 Run Keyword If ${has_dataplane} Clean Up Linux
622 Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test
623
Suchitra Vemuri10e737e2020-08-14 14:59:10 -0700624Verify restart ofagent container before subscriber is provisioned
625 [Documentation] Restart ofagent container before subscriber is provisioned.
626 [Tags] functional VOL-2962 ofagentRestart2
627 [Setup] Start Logging ofagentRestart2
628 [Teardown] Run Keywords Collect Logs
Suchitra Vemuri8130be82020-09-15 16:47:58 -0700629 ... AND Stop Logging ofagentRestart2
Suchitra Vemuri10e737e2020-08-14 14:59:10 -0700630 ... AND Scale K8s Deployment ${NAMESPACE} voltha-voltha-ofagent 1
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800631 Delete All Devices And Verify
Suchitra Vemuri10e737e2020-08-14 14:59:10 -0700632 setup
633 Run Keyword If ${has_dataplane} Clean Up Linux
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800634 FOR ${I} IN RANGE 0 ${olt_count}
635 ${olt_serial_number}= Get From Dictionary ${olt_ids}[${I}] sn
636 ${olt_device_id}= Get OLTDeviceID From OLT List ${olt_serial_number}
637 ${of_id}= Wait Until Keyword Succeeds ${timeout} 15s Validate OLT Device in ONOS
638 ... ${olt_serial_number}
639 Wait Until Keyword Succeeds ${timeout} 2s Device Is Available In ONOS
640 ... http://karaf:karaf@${ONOS_REST_IP}:${ONOS_REST_PORT} ${of_id}
641 END
642 FOR ${I} IN RANGE 0 ${num_all_onus}
Suchitra Vemuri10e737e2020-08-14 14:59:10 -0700643 ${src}= Set Variable ${hosts.src[${I}]}
644 ${dst}= Set Variable ${hosts.dst[${I}]}
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800645 ${of_id}= Get ofID From OLT List ${src['olt']}
Suchitra Vemuri10e737e2020-08-14 14:59:10 -0700646 ${onu_device_id}= Get Device ID From SN ${src['onu']}
647 ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']}
648 ... ${of_id}
649 # Bring up the device and verify it authenticates
650 Wait Until Keyword Succeeds ${timeout} 5s Validate Device ENABLED ACTIVE REACHABLE
651 ... ${onu_device_id} onu=True onu_reason=omci-flows-pushed
652 Wait Until Keyword Succeeds ${timeout} 2s Verify Eapol Flows Added For ONU ${ONOS_SSH_IP}
653 ... ${ONOS_SSH_PORT} ${onu_port}
654 ${wpa_log}= Run Keyword If ${has_dataplane} Catenate SEPARATOR=.
655 ... /tmp/wpa ${src['dp_iface_name']} log
656 Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Validate Authentication True
657 ... ${src['dp_iface_name']} wpa_supplicant.conf ${src['ip']} ${src['user']} ${src['pass']}
658 ... ${src['container_type']} ${src['container_name']} ${wpa_log}
659 Wait Until Keyword Succeeds ${timeout} 2s Verify ONU in AAA-Users ${ONOS_SSH_IP}
660 ... ${ONOS_SSH_PORT} ${onu_port}
661 END
662 # Restart POD ofagent
663 ${waitforRestart} Set Variable 120s
664 ${podStatusOutput}= Run kubectl get pods -n ${NAMESPACE}
665 Log ${podStatusOutput}
666 ${countBforRestart}= Run kubectl get pods -n ${NAMESPACE} | grep Running | wc -l
667 ${podName} Set Variable ofagent
668 Restart Pod ${NAMESPACE} ${podName}
Suchitra Vemuri10e737e2020-08-14 14:59:10 -0700669 Wait Until Keyword Succeeds ${waitforRestart} 2s Validate Pod Status ofagent ${NAMESPACE}
670 ... Running
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800671 FOR ${I} IN RANGE 0 ${num_all_onus}
Suchitra Vemuri10e737e2020-08-14 14:59:10 -0700672 # Add subscriber access and verify that DHCP completes to ensure system is still functioning properly
673 #Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command ${ONOS_SSH_IP}
674 #... ${ONOS_SSH_PORT} volt-add-subscriber-access ${of_id} ${onu_port}
675 ${src}= Set Variable ${hosts.src[${I}]}
676 ${dst}= Set Variable ${hosts.dst[${I}]}
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800677 ${of_id}= Get ofID From OLT List ${src['olt']}
Suchitra Vemuri10e737e2020-08-14 14:59:10 -0700678 ${onu_device_id}= Get Device ID From SN ${src['onu']}
679 ${onu_port}= Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s
680 ... Get ONU Port in ONOS ${src['onu']} ${of_id}
681 # Add subscriber access and verify that DHCP completes to ensure system is still functioning properly
682 Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command ${ONOS_SSH_IP}
683 ... ${ONOS_SSH_PORT} volt-add-subscriber-access ${of_id} ${onu_port}
684 Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Validate DHCP and Ping True
685 ... True ${src['dp_iface_name']} ${src['s_tag']} ${src['c_tag']} ${dst['dp_iface_ip_qinq']}
686 ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
687 ... ${dst['dp_iface_name']} ${dst['ip']} ${dst['user']} ${dst['pass']} ${dst['container_type']}
688 ... ${dst['container_name']}
689 # Verify DHCP-Allocations
690 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s
691 ... Validate Subscriber DHCP Allocation ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port}
Suchitra Vemuri10e737e2020-08-14 14:59:10 -0700692 END
693
Hardik Windlassc082c422021-03-16 15:44:10 +0000694Verify OLT Grpc Disconnection
695 [Documentation] Restarts OLT Grpc Server and verifies everything works as before without any system disruption.
696 [Tags] functional VOL-3904 restartGrpcServer bbsim
697 [Setup] Start Logging restartGrpcServer
698 [Teardown] Run Keywords Collect Logs
699 ... AND Stop Logging restartGrpcServer
700 Delete All Devices And Verify
701 Setup
702 Run Keyword If ${has_dataplane} Clean Up Linux
703 Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test
704 FOR ${J} IN RANGE 0 ${num_olts}
705 ${bbsim_rel}= Catenate SEPARATOR= bbsim ${J}
706 ${bbsim_pod}= Get Pod Name By Label ${NAMESPACE} release ${bbsim_rel}
707 Restart Grpc Server ${NAMESPACE} ${bbsim_pod} 5
708 END
709 # Repeat sanity test without subscriber changes
710 Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test True
711 # Additional Verification
712 Wait Until Keyword Succeeds ${timeout} 2s Delete All Devices and Verify
713 Setup
714 Run Keyword If ${has_dataplane} Clean Up Linux
715 Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test
716
Hema123aff52020-05-26 15:41:47 +0530717Verify ONU Soft Reboot
718 [Documentation] Test soft reboot of the ONU using voltctl command
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800719 [Tags] VOL-1957 ONUSoftReboot functional notready
Hema123aff52020-05-26 15:41:47 +0530720 [Setup] Start Logging ONUSoftReboot
721 #... AND Setup
Andy Bavier4a8450e2020-02-04 08:58:37 -0700722 [Teardown] Run Keywords Collect Logs
Hema123aff52020-05-26 15:41:47 +0530723 ... AND Stop Logging ONUSoftReboot
724 #... AND Delete Device and Verify
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800725 FOR ${I} IN RANGE 0 ${num_all_onus}
Gayathri.Selvanf68ea4b2020-02-03 07:36:39 +0000726 ${src}= Set Variable ${hosts.src[${I}]}
727 ${dst}= Set Variable ${hosts.dst[${I}]}
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800728 ${of_id}= Get ofID From OLT List ${src['olt']}
Gayathri.Selvanf68ea4b2020-02-03 07:36:39 +0000729 ${onu_device_id}= Get Device ID From SN ${src['onu']}
Suchitra Vemuricd2f64f2020-02-18 18:30:27 -0800730 ${onu_port}= Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s
731 ... Get ONU Port in ONOS ${src['onu']} ${of_id}
Hema123aff52020-05-26 15:41:47 +0530732 Reboot Device ${onu_device_id}
733 Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure
734 ... Wait Until Keyword Succeeds 60s 2s
735 ... Check Ping False ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']}
736 ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
737 # Remove Subscriber Access (To replicate ATT workflow)
738 Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command ${ONOS_SSH_IP}
739 ... ${ONOS_SSH_PORT} volt-remove-subscriber-access ${of_id} ${onu_port}
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800740 Verify ping is succesful except for given device ${num_all_onus} ${onu_device_id}
Hema123aff52020-05-26 15:41:47 +0530741 Sleep 40s
Suchitra Vemuricd2f64f2020-02-18 18:30:27 -0800742 # Check ONU port is Enabled in ONOS
743 Run Keyword And Continue On Failure Wait Until Keyword Succeeds 120s 2s
Suchitra Vemuri760bdd32020-06-17 12:34:48 -0700744 ... Verify ONU Port Is Enabled ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${src['onu']}
Suchitra Vemuricd2f64f2020-02-18 18:30:27 -0800745 # Verify EAPOL flows are added for the ONU port
746 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s
ubuntu6b6e7d42020-03-02 12:35:42 -0800747 ... Verify Eapol Flows Added For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port}
Suchitra Vemuricd2f64f2020-02-18 18:30:27 -0800748 # Verify ONU state in voltha
Suchitra Vemuricdc32d82020-07-17 12:24:46 -0700749 Run Keyword And Continue On Failure Wait Until Keyword Succeeds 360s 5s Validate Device
Suchitra Vemuricd2f64f2020-02-18 18:30:27 -0800750 ... ENABLED ACTIVE REACHABLE
751 ... ${src['onu']} onu=True onu_reason=omci-flows-pushed
Hema123aff52020-05-26 15:41:47 +0530752 Run Keyword If ${has_dataplane} Clean Up Linux
753 # Perform Authentication
754 ${wpa_log}= Run Keyword If ${has_dataplane} Catenate SEPARATOR=.
755 ... /tmp/wpa ${src['dp_iface_name']} log
756 Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Validate Authentication True
757 ... ${src['dp_iface_name']} wpa_supplicant.conf ${src['ip']} ${src['user']} ${src['pass']}
758 ... ${src['container_type']} ${src['container_name']} ${wpa_log}
759 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2
760 ... Verify ONU in AAA-Users ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port}
761 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2
762 ... Execute ONOS CLI Command ${ONOS_SSH_IP} ${ONOS_SSH_PORT}
763 ... volt-add-subscriber-access ${of_id} ${onu_port}
764 # Verify that no pending flows exist for the ONU port
765 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s
766 ... Verify No Pending Flows For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port}
Hardik Windlass21807632020-04-14 16:24:55 +0530767 # Verify subscriber access flows are added for the ONU port
768 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s
769 ... Verify Subscriber Access Flows Added For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id}
770 ... ${onu_port} ${nni_port} ${src['c_tag']} ${src['s_tag']}
Hema123aff52020-05-26 15:41:47 +0530771 Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Validate DHCP and Ping True
772 ... True ${src['dp_iface_name']} ${src['s_tag']} ${src['c_tag']} ${dst['dp_iface_ip_qinq']}
Suchitra Vemuricd2f64f2020-02-18 18:30:27 -0800773 ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
Hema123aff52020-05-26 15:41:47 +0530774 ... ${dst['dp_iface_name']} ${dst['ip']} ${dst['user']} ${dst['pass']} ${dst['container_type']}
775 ... ${dst['container_name']}
776 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s
777 ... Validate Subscriber DHCP Allocation ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port}
Gayathri.Selvanf68ea4b2020-02-03 07:36:39 +0000778 END
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800779
Suchitra Vemurif7a033c2020-02-26 17:22:41 -0800780
781*** Keywords ***
782Setup Suite
783 [Documentation] Set up the test suite
784 Common Test Suite Setup
HungWei Chiu1408fb92020-03-03 19:43:30 -0500785 #power_switch.robot needs it to support different vendor's power switch
Hung-Wei Chiufcc6d8e2020-03-10 12:05:11 -0700786 ${switch_type}= Get Variable Value ${web_power_switch.type}
787 Run Keyword If "${switch_type}"!="" Set Global Variable ${powerswitch_type} ${switch_type}
Suchitra Vemurif7a033c2020-02-26 17:22:41 -0800788
789Clear All Devices Then Create New Device
790 [Documentation] Remove any devices from VOLTHA and ONOS
791 # Remove all devices from voltha and nos
792 Delete All Devices and Verify
793 # Execute normal test Setup Keyword
794 Setup