blob: 3fd4249b4dc6bb72a749926d8dfa2f279fab9d5c [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
Gayathri.Selvan283a63c2020-01-23 04:09:18 +000034
35*** Variables ***
36${POD_NAME} flex-ocp-cord
37${KUBERNETES_CONF} ${KUBERNETES_CONFIGS_DIR}/${POD_NAME}.conf
38${KUBERNETES_CONFIGS_DIR} ~/pod-configs/kubernetes-configs
39#${KUBERNETES_CONFIGS_DIR} ${KUBERNETES_CONFIGS_DIR}/${POD_NAME}.conf
40${KUBERNETES_YAML} ${KUBERNETES_CONFIGS_DIR}/${POD_NAME}.yml
41${HELM_CHARTS_DIR} ~/helm-charts
42${VOLTHA_POD_NUM} 8
43${NAMESPACE} voltha
Suchitra Vemurica1c5d32020-04-09 18:45:29 -070044${DEFAULTSPACE} default
Gayathri.Selvan283a63c2020-01-23 04:09:18 +000045# For below variable value, using deployment name as using grep for
46# parsing radius pod name, we can also use full radius pod name
47${RESTART_POD_NAME} radius
48${timeout} 60s
49${of_id} 0
50${logical_id} 0
Suchitra Vemuri109feb12020-01-23 16:25:02 -080051${has_dataplane} True
Gayathri.Selvan283a63c2020-01-23 04:09:18 +000052${teardown_device} False
53${scripts} ../../scripts
54
Andy Bavierabeba262020-02-07 16:22:16 -070055# Per-test logging on failure is turned off by default; set this variable to enable
56${container_log_dir} ${None}
57
Gayathri.Selvan283a63c2020-01-23 04:09:18 +000058*** Test Cases ***
Suchitra Vemuri60be98b2020-02-19 16:41:21 -080059Verify ONU after rebooting physically
60 [Documentation] Test the ONU functionality by physically turning on/off ONU.
61 ... Prerequisite : Subscriber are authenticated/DHCP/pingable state
62 ... Test case runs only on the PODs that are configured with PowerSwitch that
63 ... controls the power off/on ONUs/OLT remotely (simulating a physical reboot)
64 ... VOL-2634
65 [Tags] functional PowerSwitch
Andy Baviere187eda2020-04-20 15:00:02 -070066 [Setup] Start Logging ONUreboot_PowerSwitch
Suchitra Vemuri60be98b2020-02-19 16:41:21 -080067 [Teardown] Run Keywords Collect Logs
Suchitra Vemuri9a6dd6d2020-02-28 17:46:26 -080068 ... AND Stop Logging ONUreboot_PowerSwitch
Suchitra Vemuri0656bc22020-03-21 19:07:49 -070069 ... AND Delete Device and Verify
Suchitra Vemuri60be98b2020-02-19 16:41:21 -080070 # Add OLT device
71 setup
72 # Performing Sanity Test to make sure subscribers are all AUTH+DHCP and pingable
73 Run Keyword If ${has_dataplane} Clean Up Linux
74 Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test
75 Power Switch Connection Suite ${web_power_switch.ip} ${web_power_switch.user} ${web_power_switch.password}
76 FOR ${I} IN RANGE 0 ${num_onus}
77 ${src}= Set Variable ${hosts.src[${I}]}
78 ${dst}= Set Variable ${hosts.dst[${I}]}
79 ${onu_port}= Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s
80 ... Get ONU Port in ONOS ${src['onu']} ${of_id}
81 Disable Switch Outlet ${src['power_switch_port']}
82 Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure
83 ... Wait Until Keyword Succeeds 60s 2s
84 ... Check Ping False ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']}
85 ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
Hardik Windlass7c801e62020-05-04 19:33:21 +053086 # Remove Subscriber Access (To replicate ATT workflow)
87 Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command ${ONOS_SSH_IP}
88 ... ${ONOS_SSH_PORT} volt-remove-subscriber-access ${of_id} ${onu_port}
Suchitra Vemuri60be98b2020-02-19 16:41:21 -080089
90 Enable Switch Outlet ${src['power_switch_port']}
91 # Check ONU port is Enabled in ONOS
92 Run Keyword And Continue On Failure Wait Until Keyword Succeeds 120s 2s
ubuntu6b6e7d42020-03-02 12:35:42 -080093 ... Verify ONU Port Is Enabled ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port}
Suchitra Vemuri60be98b2020-02-19 16:41:21 -080094 # Verify EAPOL flows are added for the ONU port
95 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s
ubuntu6b6e7d42020-03-02 12:35:42 -080096 ... Verify Eapol Flows Added For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port}
Suchitra Vemuri60be98b2020-02-19 16:41:21 -080097 # Verify ONU state in voltha
98 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s Validate Device
99 ... ENABLED ACTIVE REACHABLE
100 ... ${src['onu']} onu=True onu_reason=omci-flows-pushed
Hardik Windlass7c801e62020-05-04 19:33:21 +0530101 Run Keyword If ${has_dataplane} Clean Up Linux
102 # Perform Authentication
103 ${wpa_log}= Run Keyword If ${has_dataplane} Catenate SEPARATOR=.
104 ... /tmp/wpa ${src['dp_iface_name']} log
105 Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Validate Authentication True
106 ... ${src['dp_iface_name']} wpa_supplicant.conf ${src['ip']} ${src['user']} ${src['pass']}
107 ... ${src['container_type']} ${src['container_name']} ${wpa_log}
108 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2
109 ... Verify ONU in AAA-Users ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port}
110 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2
111 ... Execute ONOS CLI Command ${ONOS_SSH_IP} ${ONOS_SSH_PORT}
112 ... volt-add-subscriber-access ${of_id} ${onu_port}
113 # Verify that no pending flows exist for the ONU port
114 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s
115 ... Verify No Pending Flows For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port}
Hardik Windlass21807632020-04-14 16:24:55 +0530116 # Verify subscriber access flows are added for the ONU port
117 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s
118 ... Verify Subscriber Access Flows Added For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id}
119 ... ${onu_port} ${nni_port} ${src['c_tag']} ${src['s_tag']}
Hardik Windlass7c801e62020-05-04 19:33:21 +0530120 Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Validate DHCP and Ping True
121 ... True ${src['dp_iface_name']} ${src['s_tag']} ${src['c_tag']} ${dst['dp_iface_ip_qinq']}
Suchitra Vemuri60be98b2020-02-19 16:41:21 -0800122 ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
Hardik Windlass7c801e62020-05-04 19:33:21 +0530123 ... ${dst['dp_iface_name']} ${dst['ip']} ${dst['user']} ${dst['pass']} ${dst['container_type']}
124 ... ${dst['container_name']}
125 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s
126 ... Validate Subscriber DHCP Allocation ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port}
127 Run Keyword and Ignore Error Get Device Output from Voltha ${onu_device_id}
Suchitra Vemuri60be98b2020-02-19 16:41:21 -0800128 Run Keyword And Ignore Error Collect Logs
129 END
Suchitra Vemurid7096132020-02-21 14:50:47 -0800130 # Deleting OLT after tests completes independently (as this test doesn't not run on each POD)
Suchitra Vemuri0656bc22020-03-21 19:07:49 -0700131 #Run Keyword If ${has_dataplane} Delete Device and Verify
Suchitra Vemuria7dae322020-02-19 22:38:18 -0800132
Suchitra Vemuri784e1ae2020-03-16 18:40:25 -0700133Verify OLT after rebooting physically
134 [Documentation] Test the physical reboot of the OLT
135 ... Prerequisite : Subscriber are authenticated/DHCP/pingable state
136 ... Test performs a physical reboot, performs "reboot" from the OLT CLI
137 ... VOL-1956
138 [Tags] functional PhysicalOLTReboot
Andy Baviere187eda2020-04-20 15:00:02 -0700139 [Setup] Start Logging PhysicalOLTReboot
Suchitra Vemuri784e1ae2020-03-16 18:40:25 -0700140 [Teardown] Run Keywords Collect Logs
141 ... AND Stop Logging PhysicalOLTReboot
Suchitra Vemurib3a92e42020-03-21 16:49:57 -0700142 ... AND Delete Device and Verify
Suchitra Vemuri784e1ae2020-03-16 18:40:25 -0700143 # Add OLT device
144 setup
145 # Performing Sanity Test to make sure subscribers are all AUTH+DHCP and pingable
146 Run Keyword If ${has_dataplane} Clean Up Linux
147 Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test
148 # Reboot the OLT from the OLT CLI
149 Run Keyword If ${has_dataplane} Login And Run Command On Remote System
150 ... sudo reboot ${olt_ip} ${olt_user} ${olt_pass} prompt=#
151 Run Keyword And Ignore Error Collect Logs
152 FOR ${I} IN RANGE 0 ${num_onus}
153 ${src}= Set Variable ${hosts.src[${I}]}
154 ${dst}= Set Variable ${hosts.dst[${I}]}
155 Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure
156 ... Wait Until Keyword Succeeds 60s 2s
157 ... Check Ping False ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']}
158 ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
159 END
160 # Wait for the OLT to come back up
Andy Bavier8da0e132020-04-13 10:25:16 -0700161 Run Keyword If ${has_dataplane} Wait Until Keyword Succeeds 120s 10s
162 ... Check Remote System Reachability True ${olt_ip}
Suchitra Vemuri64db9652020-03-22 21:11:13 -0700163 # Waiting extra time for the ONUs to come up
164 Sleep 60s
Suchitra Vemuri784e1ae2020-03-16 18:40:25 -0700165 Run Keyword And Ignore Error Collect Logs
166 Run Keyword If ${has_dataplane} Clean Up Linux
167 Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test
168 # Deleting OLT after test completes
Suchitra Vemurib3a92e42020-03-21 16:49:57 -0700169 #Run Keyword If ${has_dataplane} Delete Device and Verify
Suchitra Vemuri784e1ae2020-03-16 18:40:25 -0700170
Suchitra Vemuri05180cb2020-03-26 13:13:27 -0700171Verify restart openolt-adapter container after subscriber provisioning
Suchitra Vemuria7dae322020-02-19 22:38:18 -0800172 [Documentation] Restart openolt-adapter container after VOLTHA is operational.
173 ... Prerequisite : ONUs are authenticated and pingable.
Suchitra Vemurif7a033c2020-02-26 17:22:41 -0800174 [Tags] functional VOL-1958 Restart-OpenOlt released
Andy Baviere187eda2020-04-20 15:00:02 -0700175 [Setup] Start Logging Restart-OpenOlt
Suchitra Vemuria7dae322020-02-19 22:38:18 -0800176 [Teardown] Run Keywords Collect Logs
Suchitra Vemurif7a033c2020-02-26 17:22:41 -0800177 ... AND Stop Logging Restart-OpenOlt
Suchitra Vemuria7dae322020-02-19 22:38:18 -0800178 # Add OLT device
179 setup
180 # Performing Sanity Test to make sure subscribers are all AUTH+DHCP and pingable
181 Run Keyword If ${has_dataplane} Clean Up Linux
182 Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test
183 ${waitforRestart} Set Variable 120s
184 ${podStatusOutput}= Run kubectl get pods -n ${NAMESPACE}
185 Log ${podStatusOutput}
186 ${countBforRestart}= Run kubectl get pods -n ${NAMESPACE} | grep Running | wc -l
187 ${podName} Set Variable adapter-open-olt
188 Restart Pod ${NAMESPACE} ${podName}
189 Wait Until Keyword Succeeds ${waitforRestart} 2s Validate Pod Status ${podName} ${NAMESPACE}
190 ... Running
Suchitra Vemuri312bfe02020-03-16 16:11:34 -0700191 # Wait for 1min after openolt adapter is restarted
192 Sleep 60s
Suchitra Vemuria7dae322020-02-19 22:38:18 -0800193 Repeat Sanity Test
Suchitra Vemurid7096132020-02-21 14:50:47 -0800194 Run Keyword and Ignore Error Collect Logs
Suchitra Vemuria7dae322020-02-19 22:38:18 -0800195 ${podStatusOutput}= Run kubectl get pods -n ${NAMESPACE}
196 Log ${podStatusOutput}
197 ${countAfterRestart}= Run kubectl get pods -n ${NAMESPACE} | grep Running | wc -l
198 Should Be Equal As Strings ${countAfterRestart} ${countBforRestart}
199 Log to console Pod ${podName} restarted and sanity checks passed successfully
Suchitra Vemuri60be98b2020-02-19 16:41:21 -0800200
Suchitra Vemurif7a033c2020-02-26 17:22:41 -0800201Check OLT/ONU Authentication After Radius Pod Restart
202 [Documentation] After radius restart, triggers reassociation, checks status and
203 ... authentication, validates dhcp and ping. Note : wpa reassociate works only when
204 ... wpa supplicant is running in background hence it is recommended to remove
205 ... teardown from previous test or uncomment 'Teardown None'.
206 ... Assuming that test1 was executed where all the ONUs are authenticated/DHCP/pingable
207 [Tags] functional RadiusRestart released
Andy Baviere187eda2020-04-20 15:00:02 -0700208 [Setup] Start Logging RadiusRestart
Suchitra Vemurif7a033c2020-02-26 17:22:41 -0800209 [Teardown] Run Keywords Collect Logs
210 ... AND Stop Logging RadiusRestart
Suchitra Vemurif7a033c2020-02-26 17:22:41 -0800211 ${waitforRestart} Set Variable 120s
Suchitra Vemurica1c5d32020-04-09 18:45:29 -0700212 Wait Until Keyword Succeeds ${timeout} 15s Restart Pod ${DEFAULTSPACE} ${RESTART_POD_NAME}
213 Wait Until Keyword Succeeds ${waitforRestart} 2s Validate Pod Status ${RESTART_POD_NAME}
214 ... ${DEFAULTSPACE} Running
Suchitra Vemurif7a033c2020-02-26 17:22:41 -0800215 FOR ${I} IN RANGE 0 ${num_onus}
216 ${src}= Set Variable ${hosts.src[${I}]}
217 ${dst}= Set Variable ${hosts.dst[${I}]}
218 ${onu_device_id}= Get Device ID From SN ${src['onu']}
219 ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s
220 ... Get ONU Port in ONOS ${src['onu']} ${of_id}
221 Wait Until Keyword Succeeds ${timeout} 2s
ubuntu6b6e7d42020-03-02 12:35:42 -0800222 ... Verify Eapol Flows Added For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port}
Suchitra Vemurif7a033c2020-02-26 17:22:41 -0800223 Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure
224 ... Validate Authentication After Reassociate True ${src['dp_iface_name']}
225 ... ${src['ip']} ${src['user']} ${src['pass']}
226 ... ${src['container_type']} ${src['container_name']}
ubuntu6b6e7d42020-03-02 12:35:42 -0800227 Wait Until Keyword Succeeds ${timeout} 2s Verify ONU in AAA-Users ${ONOS_SSH_IP}
Suchitra Vemurif7a033c2020-02-26 17:22:41 -0800228 ... ${ONOS_SSH_PORT} ${onu_port}
229 Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure
230 ... Validate DHCP and Ping True True ${src['dp_iface_name']}
231 ... ${src['s_tag']} ${src['c_tag']} ${dst['dp_iface_ip_qinq']}
232 ... ${src['ip']} ${src['user']} ${src['pass']}
233 ... ${src['container_type']} ${src['container_name']}
234 ... ${dst['dp_iface_name']} ${dst['ip']} ${dst['user']}
235 ... ${dst['pass']} ${dst['container_type']} ${dst['container_name']}
236 Wait Until Keyword Succeeds ${timeout} 2s Run Keyword And Continue On Failure
ubuntu6b6e7d42020-03-02 12:35:42 -0800237 ... Validate Subscriber DHCP Allocation ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port}
Suchitra Vemurif7a033c2020-02-26 17:22:41 -0800238 Run Keyword and Ignore Error Get Device Output from Voltha ${onu_device_id}
239 Run Keyword and Ignore Error Collect Logs
240 END
241
Suchitra Vemuri05180cb2020-03-26 13:13:27 -0700242Verify openolt adapter restart before subscriber provisioning
Suchitra Vemurif7a033c2020-02-26 17:22:41 -0800243 [Documentation] Deploys an device instance and waits for it to authenticate. After
244 ... authentication is successful the rw-core deployment is scaled to 0 instances to
245 ... simulate a POD crash. The test then scales the rw-core back to a single instance
246 ... and configures ONOS for access. The test succeeds if the device is able to
247 ... complete the DHCP sequence.
Hung-Wei Chiud3576762020-03-25 18:06:26 -0700248 [Tags] functional olt-adapter-restart
Andy Baviere187eda2020-04-20 15:00:02 -0700249 [Setup] Start Logging OltAdapterRestart
Suchitra Vemuria0c086f2020-03-29 19:14:13 -0700250 #... AND Clear All Devices Then Create New Device
Suchitra Vemurif7a033c2020-02-26 17:22:41 -0800251 [Teardown] Run Keywords Collect Logs
252 ... AND Stop Logging OltAdapterRestart
Hung-Wei Chiud3576762020-03-25 18:06:26 -0700253 # Add OLT and perform sanity test
Suchitra Vemuri59ad2772020-03-26 22:27:27 -0700254 #setup
Suchitra Vemuri91537c82020-03-29 15:03:26 -0700255 Run Keyword If ${has_dataplane} Clean Up Linux
Suchitra Vemuri59ad2772020-03-26 22:27:27 -0700256 #Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test
Suchitra Vemurif7a033c2020-02-26 17:22:41 -0800257 Set Global Variable ${of_id}
258
259 FOR ${I} IN RANGE 0 ${num_onus}
260 ${src}= Set Variable ${hosts.src[${I}]}
261 ${dst}= Set Variable ${hosts.dst[${I}]}
262 ${onu_device_id}= Get Device ID From SN ${src['onu']}
263 ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']}
264 ... ${of_id}
265
266 # Bring up the device and verify it authenticates
267 Wait Until Keyword Succeeds ${timeout} 5s Validate Device ENABLED ACTIVE REACHABLE
268 ... ${onu_device_id} onu=True onu_reason=omci-flows-pushed
ubuntu6b6e7d42020-03-02 12:35:42 -0800269 Wait Until Keyword Succeeds ${timeout} 2s Verify Eapol Flows Added For ONU ${ONOS_SSH_IP}
Suchitra Vemurif7a033c2020-02-26 17:22:41 -0800270 ... ${ONOS_SSH_PORT} ${onu_port}
Andy Bavier84834d42020-02-25 13:49:50 -0700271 ${wpa_log}= Run Keyword If ${has_dataplane} Catenate SEPARATOR=.
272 ... /tmp/wpa ${src['dp_iface_name']} log
Suchitra Vemurif7a033c2020-02-26 17:22:41 -0800273 Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Validate Authentication True
274 ... ${src['dp_iface_name']} wpa_supplicant.conf ${src['ip']} ${src['user']} ${src['pass']}
Andy Bavier84834d42020-02-25 13:49:50 -0700275 ... ${src['container_type']} ${src['container_name']} ${wpa_log}
ubuntu6b6e7d42020-03-02 12:35:42 -0800276 Wait Until Keyword Succeeds ${timeout} 2s Verify ONU in AAA-Users ${ONOS_SSH_IP}
Suchitra Vemurif7a033c2020-02-26 17:22:41 -0800277 ... ${ONOS_SSH_PORT} ${onu_port}
278 END
279 # Scale down the open OLT adapter deployment to 0 PODs and once confirmed, scale it back to 1
280 Scale K8s Deployment voltha adapter-open-olt 0
281 Wait Until Keyword Succeeds ${timeout} 2s Pod Does Not Exist voltha adapter-open-olt
282 # Scale up the open OLT adapter deployment and make sure both it and the ofagent deployment are back
283 Scale K8s Deployment voltha adapter-open-olt 1
284 Wait Until Keyword Succeeds ${timeout} 2s
285 ... Check Expected Available Deployment Replicas voltha adapter-open-olt 1
286
287 # Ensure the device is available in ONOS, this represents system connectivity being restored
288 Wait Until Keyword Succeeds ${timeout} 2s Device Is Available In ONOS
ubuntu6b6e7d42020-03-02 12:35:42 -0800289 ... http://karaf:karaf@${ONOS_REST_IP}:${ONOS_REST_PORT} ${of_id}
Suchitra Vemurif7a033c2020-02-26 17:22:41 -0800290
291 FOR ${I} IN RANGE 0 ${num_onus}
292 # Add subscriber access and verify that DHCP completes to ensure system is still functioning properly
ubuntu6b6e7d42020-03-02 12:35:42 -0800293 Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command ${ONOS_SSH_IP}
Suchitra Vemurif7a033c2020-02-26 17:22:41 -0800294 ... ${ONOS_SSH_PORT} volt-add-subscriber-access ${of_id} ${onu_port}
Hardik Windlass21807632020-04-14 16:24:55 +0530295 # Verify subscriber access flows are added for the ONU port
296 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s
297 ... Verify Subscriber Access Flows Added For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id}
298 ... ${onu_port} ${nni_port} ${src['c_tag']} ${src['s_tag']}
Suchitra Vemurif7a033c2020-02-26 17:22:41 -0800299 Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Validate DHCP and Ping True
300 ... True ${src['dp_iface_name']} ${src['s_tag']} ${src['c_tag']} ${dst['dp_iface_ip_qinq']}
301 ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
302 ... ${dst['dp_iface_name']} ${dst['ip']} ${dst['user']} ${dst['pass']} ${dst['container_type']}
303 ... ${dst['container_name']}
304 Wait Until Keyword Succeeds ${timeout} 2s Run Keyword And Continue On Failure
ubuntu6b6e7d42020-03-02 12:35:42 -0800305 ... Validate Subscriber DHCP Allocation ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port}
Suchitra Vemurif7a033c2020-02-26 17:22:41 -0800306 END
307
hwchiu14c05102020-03-27 00:44:30 +0000308Verify restart ofagent container after subscriber is provisioned
Gayathri.Selvanb6a2b542020-01-24 07:24:23 +0000309 [Documentation] Restart ofagent container after VOLTHA is operational.
Gayathri.Selvanb6a2b542020-01-24 07:24:23 +0000310 ... Prerequisite : ONUs are authenticated and pingable.
Hardik Windlass7a846662020-03-19 20:42:59 +0530311 [Tags] functional VOL-2409 ofagentRestart
Andy Baviere187eda2020-04-20 15:00:02 -0700312 [Setup] Start Logging ofagentRestart
Andy Bavier4a8450e2020-02-04 08:58:37 -0700313 [Teardown] Run Keywords Collect Logs
Andy Bavierabeba262020-02-07 16:22:16 -0700314 ... AND Stop Logging ofagentRestart
Hardik Windlass8f2aadc2020-03-16 20:16:39 +0530315 ... AND Scale K8s Deployment ${NAMESPACE} voltha-ofagent 1
Suchitra Vemuriceb002a2020-03-25 13:36:21 -0700316 # set timeout value
Gayathri.Selvanb6a2b542020-01-24 07:24:23 +0000317 ${waitforRestart} Set Variable 120s
Andy Bavier4a8450e2020-02-04 08:58:37 -0700318 ${podStatusOutput}= Run kubectl get pods -n ${NAMESPACE}
Gayathri.Selvanb6a2b542020-01-24 07:24:23 +0000319 Log ${podStatusOutput}
Andy Bavier4a8450e2020-02-04 08:58:37 -0700320 ${countBforRestart}= Run kubectl get pods -n ${NAMESPACE} | grep Running | wc -l
Hardik Windlass8f2aadc2020-03-16 20:16:39 +0530321 ${podName} Set Variable ofagent
322 Restart Pod ${NAMESPACE} ${podName}
Gayathri.Selvanb6a2b542020-01-24 07:24:23 +0000323 Sleep 60s
324 Wait Until Keyword Succeeds ${waitforRestart} 2s Validate Pod Status ofagent ${NAMESPACE}
325 ... Running
Hardik Windlass8f2aadc2020-03-16 20:16:39 +0530326 # Performing Sanity Test to make sure subscribers are all AUTH+DHCP and pingable
327 Run Keyword If ${has_dataplane} Clean Up Linux
328 Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test
Andy Bavier4a8450e2020-02-04 08:58:37 -0700329 ${podStatusOutput}= Run kubectl get pods -n ${NAMESPACE}
Gayathri.Selvanb6a2b542020-01-24 07:24:23 +0000330 Log ${podStatusOutput}
Andy Bavier4a8450e2020-02-04 08:58:37 -0700331 ${countAfterRestart}= Run kubectl get pods -n ${NAMESPACE} | grep Running | wc -l
Gayathri.Selvanb6a2b542020-01-24 07:24:23 +0000332 Should Be Equal As Strings ${countAfterRestart} ${countBforRestart}
Hardik Windlass8f2aadc2020-03-16 20:16:39 +0530333 # Scale Down the Of-Agent Deployment
334 Scale K8s Deployment ${NAMESPACE} voltha-ofagent 0
335 Sleep 30s
336 FOR ${I} IN RANGE 0 ${num_onus}
337 ${src}= Set Variable ${hosts.src[${I}]}
338 ${dst}= Set Variable ${hosts.dst[${I}]}
339 Run Keyword and Ignore Error Collect Logs
340 ${onu_device_id}= Get Device ID From SN ${src['onu']}
341 ${onu_port}= Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s
342 ... Get ONU Port in ONOS ${src['onu']} ${of_id}
343 # Verify ONU state in voltha
344 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s Validate Device
345 ... ENABLED ACTIVE REACHABLE
346 ... ${src['onu']} onu=True onu_reason=omci-flows-pushed
347 # Check ONU port is Disabled in ONOS
348 Run Keyword And Continue On Failure Wait Until Keyword Succeeds 120s 2s
349 ... Verify ONU Port Is Disabled ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port}
350 # Verify EAPOL flows are present for the ONU port
351 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s
352 ... Verify Eapol Flows Added For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port}
353 # Verify ONU in AAA-Users
354 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2
355 ... Verify ONU in AAA-Users ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port}
356 # Verify DHCP-Allocations
357 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s
358 ... Validate Subscriber DHCP Allocation ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port}
Hardik Windlass21807632020-04-14 16:24:55 +0530359 # Verify subscriber access flows are added for the ONU port
360 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s
361 ... Verify Subscriber Access Flows Added For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id}
362 ... ${onu_port} ${nni_port} ${src['c_tag']} ${src['s_tag']}
Hardik Windlass8f2aadc2020-03-16 20:16:39 +0530363 # Verify Ping
364 Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Check Ping True
365 ... ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']} ${src['ip']}
366 ... ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
367 Run Keyword and Ignore Error Get Device Output from Voltha ${onu_device_id}
368 Run Keyword and Ignore Error Collect Logs
369 END
370 # Scale Up the Of-Agent Deployment
371 Scale K8s Deployment ${NAMESPACE} voltha-ofagent 1
372 Wait Until Keyword Succeeds ${waitforRestart} 2s Validate Pod Status ofagent ${NAMESPACE}
373 ... Running
374 # Performing Sanity Test to make sure subscribers are all AUTH+DHCP and pingable
375 Run Keyword If ${has_dataplane} Clean Up Linux
376 Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test
377 Log to console Pod ${podName} restarted and sanity checks passed successfully
Gayathri.Selvanb6a2b542020-01-24 07:24:23 +0000378
Gayathri.Selvanc0b37022020-02-06 05:17:00 +0000379Check ONU adapter crash not forcing authentication again
380 [Documentation] After ONU adapter restart, checks wpa log for 'authentication started'
381 ... message count to make sure auth not started again and validates EAP status and ping.
382 ... Assuming that test1 or sanity was executed where all the ONUs are authenticated/DHCP/pingable
hwchiu14c05102020-03-27 00:44:30 +0000383 [Tags] functional ONUAdaptCrash
Andy Baviere187eda2020-04-20 15:00:02 -0700384 [Setup] Start Logging ONUAdaptCrash
Andy Bavierabeba262020-02-07 16:22:16 -0700385 [Teardown] Run Keywords Collect Logs
386 ... AND Stop Logging ONUAdaptCrash
hwchiu14c05102020-03-27 00:44:30 +0000387 # Wait for adapter to resync
388 Sleep 60s
389 # Restart the onu
390 ${podName} Set Variable adapter-open-onu
Hung-Wei Chiu2bee4d42020-04-24 11:31:50 -0700391 Wait Until Keyword Succeeds ${timeout} 15s Delete K8s Pods By Label ${NAMESPACE} app ${podName}
hwchiu14c05102020-03-27 00:44:30 +0000392 # Validate ONU Ports
Gayathri.Selvanc0b37022020-02-06 05:17:00 +0000393 FOR ${I} IN RANGE 0 ${num_onus}
394 ${src}= Set Variable ${hosts.src[${I}]}
395 ${dst}= Set Variable ${hosts.dst[${I}]}
396 ${onu_device_id}= Get Device ID From SN ${src['onu']}
397 ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']}
398 ... ${of_id}
hwchiu14c05102020-03-27 00:44:30 +0000399 Run Keyword And Continue On Failure Verify ONU Port Is Enabled ${ONOS_SSH_IP} ${ONOS_SSH_PORT}
400 ... ${onu_port}
Gayathri.Selvanc0b37022020-02-06 05:17:00 +0000401 ${output}= Run Keyword If ${has_dataplane} Login And Run Command On Remote System
402 ... wpa_cli status | grep SUCCESS ${src['ip']} ${src['user']} ${src['pass']}
403 ... ${src['container_type']} ${src['container_name']}
404 Run Keyword If ${has_dataplane} Should Contain ${output} SUCCESS
Gayathri.Selvanc0b37022020-02-06 05:17:00 +0000405 END
Hung-Wei Chiu2bee4d42020-04-24 11:31:50 -0700406 Wait Until Keyword Succeeds ${timeout} 2s Validate Pods Status By Label ${NAMESPACE}
407 ... app ${podName} Running
hwchiu14c05102020-03-27 00:44:30 +0000408 # Wait for adapter to resync
409 Sleep 60s
Andy Bavier8da0e132020-04-13 10:25:16 -0700410 Run Keyword If ${has_dataplane} Clean Up Linux
hwchiu14c05102020-03-27 00:44:30 +0000411 # Perform all steps in Sanity Test except the subscriber addition
412 ${of_id}= Wait Until Keyword Succeeds ${timeout} 15s Validate OLT Device in ONOS ${olt_serial_number}
413 Set Global Variable ${of_id}
414 FOR ${I} IN RANGE 0 ${num_onus}
415 ${src}= Set Variable ${hosts.src[${I}]}
416 ${dst}= Set Variable ${hosts.dst[${I}]}
417 Run Keyword and Ignore Error Collect Logs
418 ${onu_device_id}= Get Device ID From SN ${src['onu']}
419 ${onu_port}= Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s
420 ... Get ONU Port in ONOS ${src['onu']} ${of_id}
421 # Check ONU port is Enabled in ONOS
422 Run Keyword And Continue On Failure Wait Until Keyword Succeeds 120s 2s
423 ... Verify ONU Port Is Enabled ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port}
424 # Verify EAPOL flows are added for the ONU port
425 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s
426 ... Verify Eapol Flows Added For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port}
427 # Verify ONU state in voltha
428 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s Validate Device
429 ... ENABLED ACTIVE REACHABLE
430 ... ${src['onu']} onu=True onu_reason=omci-flows-pushed
431 # Perform Authentication
432 ${wpa_log}= Run Keyword If ${has_dataplane} Catenate SEPARATOR=.
433 ... /tmp/wpa ${src['dp_iface_name']} log
434 Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Validate Authentication True
435 ... ${src['dp_iface_name']} wpa_supplicant.conf ${src['ip']} ${src['user']} ${src['pass']}
436 ... ${src['container_type']} ${src['container_name']} ${wpa_log}
437 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2
438 ... Verify ONU in AAA-Users ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port}
439 # Verify that no pending flows exist for the ONU port
440 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s
441 ... Verify No Pending Flows For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port}
Hardik Windlass21807632020-04-14 16:24:55 +0530442 # Verify subscriber access flows are added for the ONU port
443 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s
444 ... Verify Subscriber Access Flows Added For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id}
445 ... ${onu_port} ${nni_port} ${src['c_tag']} ${src['s_tag']}
hwchiu14c05102020-03-27 00:44:30 +0000446 Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Validate DHCP and Ping True
447 ... True ${src['dp_iface_name']} ${src['s_tag']} ${src['c_tag']} ${dst['dp_iface_ip_qinq']}
448 ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
449 ... ${dst['dp_iface_name']} ${dst['ip']} ${dst['user']} ${dst['pass']} ${dst['container_type']}
450 ... ${dst['container_name']}
451 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s
452 ... Validate Subscriber DHCP Allocation ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port}
453 Run Keyword and Ignore Error Get Device Output from Voltha ${onu_device_id}
454 Run Keyword and Ignore Error Collect Logs
455 END
456
Gayathri.Selvanc0b37022020-02-06 05:17:00 +0000457 Run Keyword and Ignore Error Collect Logs
458
Suchitra Vemuriebf65322020-04-03 10:09:41 -0700459Sanity E2E Test for OLT/ONU on POD With Core Fail and Restart
460 [Documentation] Deploys an device instance and waits for it to authenticate. After
461 ... authentication is successful the rw-core deployment is scaled to 0 instances to
462 ... simulate a POD crash. The test then scales the rw-core back to a single instance
463 ... and configures ONOS for access. The test succeeds if the device is able to
464 ... complete the DHCP sequence.
465 [Tags] functional rwcore-restart
Andy Baviere187eda2020-04-20 15:00:02 -0700466 [Setup] Run Keywords Start Logging RwCoreFailAndRestart
Suchitra Vemuriebf65322020-04-03 10:09:41 -0700467 ... AND Clear All Devices Then Create New Device
468 [Teardown] Run Keywords Collect Logs
469 ... AND Stop Logging RwCoreFailAndRestart
Suchitra Vemuri5d3383f2020-04-03 11:02:26 -0700470 #... AND Delete Device and Verify
Suchitra Vemuriebf65322020-04-03 10:09:41 -0700471 Run Keyword and Ignore Error Collect Logs
472 Run Keyword If ${has_dataplane} Clean Up Linux
473 ${of_id}= Wait Until Keyword Succeeds ${timeout} 15s Validate OLT Device in ONOS ${olt_serial_number}
474 Set Global Variable ${of_id}
Hardik Windlasse05e4712020-04-29 10:40:42 +0530475 ${nni_port}= Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s
476 ... Get NNI Port in ONOS ${of_id}
477 Set Global Variable ${nni_port}
Suchitra Vemuriebf65322020-04-03 10:09:41 -0700478 FOR ${I} IN RANGE 0 ${num_onus}
479 ${src}= Set Variable ${hosts.src[${I}]}
480 ${dst}= Set Variable ${hosts.dst[${I}]}
481 ${onu_device_id}= Get Device ID From SN ${src['onu']}
482 ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']}
483 ... ${of_id}
484 # Bring up the device and verify it authenticates
485 Wait Until Keyword Succeeds ${timeout} 5s Validate Device ENABLED ACTIVE REACHABLE
486 ... ${onu_device_id} onu=True onu_reason=omci-flows-pushed
487 Wait Until Keyword Succeeds ${timeout} 2s Verify Eapol Flows Added For ONU ${ONOS_SSH_IP}
488 ... ${ONOS_SSH_PORT} ${onu_port}
489 ${wpa_log}= Run Keyword If ${has_dataplane} Catenate SEPARATOR=.
490 ... /tmp/wpa ${src['dp_iface_name']} log
491 Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Validate Authentication True
492 ... ${src['dp_iface_name']} wpa_supplicant.conf ${src['ip']} ${src['user']} ${src['pass']}
493 ... ${src['container_type']} ${src['container_name']} ${wpa_log}
494 Wait Until Keyword Succeeds ${timeout} 2s Verify ONU in AAA-Users ${ONOS_SSH_IP}
495 ... ${ONOS_SSH_PORT} ${onu_port}
496 END
497
498 # Scale down the rw-core deployment to 0 PODs and once confirmed, scale it back to 1
499 Scale K8s Deployment voltha voltha-rw-core 0
500 Wait Until Keyword Succeeds ${timeout} 2s Pod Does Not Exist voltha voltha-rw-core
501 # Ensure the ofagent POD goes "not-ready" as expected
502 Wait Until keyword Succeeds ${timeout} 2s
503 ... Check Expected Available Deployment Replicas voltha voltha-ofagent 0
504 # Scale up the core deployment and make sure both it and the ofagent deployment are back
505 Scale K8s Deployment voltha voltha-rw-core 1
506 Wait Until Keyword Succeeds ${timeout} 2s
507 ... Check Expected Available Deployment Replicas voltha voltha-rw-core 1
508 Wait Until Keyword Succeeds ${timeout} 2s
509 ... Check Expected Available Deployment Replicas voltha voltha-ofagent 1
510 # For some reason scaling down and up the POD behind a service causes the port forward to stop working,
511 # so restart the port forwarding for the API service
512 Restart VOLTHA Port Foward voltha-api-minimal
513 # Ensure that the ofagent pod is up and ready and the device is available in ONOS, this
514 # represents system connectivity being restored
515 Wait Until Keyword Succeeds ${timeout} 2s Device Is Available In ONOS
516 ... http://karaf:karaf@${ONOS_REST_IP}:${ONOS_REST_PORT} ${of_id}
517
518 FOR ${I} IN RANGE 0 ${num_onus}
519 # Add subscriber access and verify that DHCP completes to ensure system is still functioning properly
520 Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command ${ONOS_SSH_IP}
521 ... ${ONOS_SSH_PORT} volt-add-subscriber-access ${of_id} ${onu_port}
Hardik Windlass21807632020-04-14 16:24:55 +0530522 # Verify subscriber access flows are added for the ONU port
523 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s
524 ... Verify Subscriber Access Flows Added For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id}
525 ... ${onu_port} ${nni_port} ${src['c_tag']} ${src['s_tag']}
Suchitra Vemuriebf65322020-04-03 10:09:41 -0700526 Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Validate DHCP and Ping True
527 ... True ${src['dp_iface_name']} ${src['s_tag']} ${src['c_tag']} ${dst['dp_iface_ip_qinq']}
528 ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
529 ... ${dst['dp_iface_name']} ${dst['ip']} ${dst['user']} ${dst['pass']} ${dst['container_type']}
530 ... ${dst['container_name']}
531 Wait Until Keyword Succeeds ${timeout} 2s Run Keyword And Continue On Failure
532 ... Validate Subscriber DHCP Allocation ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port}
533 END
534
Gayathri.Selvanf68ea4b2020-02-03 07:36:39 +0000535ONU Reboot
536 [Documentation] Reboot ONU and verify that ONU comes up properly
537 [Tags] VOL-1957 RebootONU notready
Andy Baviere187eda2020-04-20 15:00:02 -0700538 [Setup] Start Logging RebootONU
Andy Bavier4a8450e2020-02-04 08:58:37 -0700539 [Teardown] Run Keywords Collect Logs
Andy Bavierabeba262020-02-07 16:22:16 -0700540 ... AND Stop Logging RebootONU
Gayathri.Selvanf68ea4b2020-02-03 07:36:39 +0000541 FOR ${I} IN RANGE 0 ${num_onus}
542 ${src}= Set Variable ${hosts.src[${I}]}
543 ${dst}= Set Variable ${hosts.dst[${I}]}
544 ${onu_device_id}= Get Device ID From SN ${src['onu']}
Suchitra Vemuricd2f64f2020-02-18 18:30:27 -0800545 ${onu_port}= Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s
546 ... Get ONU Port in ONOS ${src['onu']} ${of_id}
Gayathri.Selvanf68ea4b2020-02-03 07:36:39 +0000547 Reboot ONU ${onu_device_id} ${src} ${dst}
548 Verify ping is succesful except for given device ${num_onus} ${onu_device_id}
Suchitra Vemuricd2f64f2020-02-18 18:30:27 -0800549 # Check ONU port is Enabled in ONOS
550 Run Keyword And Continue On Failure Wait Until Keyword Succeeds 120s 2s
ubuntu6b6e7d42020-03-02 12:35:42 -0800551 ... Verify ONU Port Is Enabled ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port}
Suchitra Vemuricd2f64f2020-02-18 18:30:27 -0800552 # Verify EAPOL flows are added for the ONU port
553 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s
ubuntu6b6e7d42020-03-02 12:35:42 -0800554 ... Verify Eapol Flows Added For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port}
Suchitra Vemuricd2f64f2020-02-18 18:30:27 -0800555 # Verify ONU state in voltha
556 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s Validate Device
557 ... ENABLED ACTIVE REACHABLE
558 ... ${src['onu']} onu=True onu_reason=omci-flows-pushed
Hardik Windlass21807632020-04-14 16:24:55 +0530559 # Verify subscriber access flows are added for the ONU port
560 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s
561 ... Verify Subscriber Access Flows Added For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id}
562 ... ${onu_port} ${nni_port} ${src['c_tag']} ${src['s_tag']}
Suchitra Vemuricd2f64f2020-02-18 18:30:27 -0800563 # Verify pings are successful after reboot on the current ONU
564 Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure
565 ... Wait Until Keyword Succeeds 60s 2s
566 ... Check Ping True ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']}
567 ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
Gayathri.Selvanf68ea4b2020-02-03 07:36:39 +0000568 END
Suchitra Vemuricd2f64f2020-02-18 18:30:27 -0800569 #Run Keyword If ${has_dataplane} Clean Up Linux
570 #Check after reboot that ONUs are active, authenticated/DHCP/pingable
571 #Perform Sanity Test
Suchitra Vemurif7a033c2020-02-26 17:22:41 -0800572
573*** Keywords ***
574Setup Suite
575 [Documentation] Set up the test suite
576 Common Test Suite Setup
HungWei Chiu1408fb92020-03-03 19:43:30 -0500577 #power_switch.robot needs it to support different vendor's power switch
Hung-Wei Chiufcc6d8e2020-03-10 12:05:11 -0700578 ${switch_type}= Get Variable Value ${web_power_switch.type}
579 Run Keyword If "${switch_type}"!="" Set Global Variable ${powerswitch_type} ${switch_type}
Suchitra Vemurif7a033c2020-02-26 17:22:41 -0800580
581Clear All Devices Then Create New Device
582 [Documentation] Remove any devices from VOLTHA and ONOS
583 # Remove all devices from voltha and nos
584 Delete All Devices and Verify
585 # Execute normal test Setup Keyword
586 Setup