blob: e26f82002710ffadd191ec2a8bddde4fe21d9a1c [file] [log] [blame]
David Bainbridgef81cd642019-11-20 00:14:47 +00001# Copyright 2017 - present Open Networking Foundation
Suchitra Vemuri65cd65f2019-08-30 14:39:22 -07002#
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.
Matteo Scandolo1294aeb2019-09-24 16:20:32 -070014# FIXME Can we use the same test against BBSim and Hardware?
15
Suchitra Vemuri65cd65f2019-08-30 14:39:22 -070016*** Settings ***
Zack Williamsec53a1b2019-09-16 15:50:52 -070017Documentation Test various end-to-end scenarios
Suchitra Vemuri65cd65f2019-08-30 14:39:22 -070018Suite Setup Setup Suite
Suchitra Vemuri65cd65f2019-08-30 14:39:22 -070019Test Setup Setup
20Test Teardown Teardown
Andy Bavierba9866b2019-10-11 07:11:53 -070021Suite Teardown Teardown Suite
Suchitra Vemuri65cd65f2019-08-30 14:39:22 -070022Library Collections
23Library String
24Library OperatingSystem
25Library XML
26Library RequestsLibrary
Andy Bavierba9866b2019-10-11 07:11:53 -070027Library ../../libraries/DependencyLibrary.py
Suchitra Vemurib8ed2d52019-09-30 13:22:51 -070028Resource ../../libraries/onos.robot
29Resource ../../libraries/voltctl.robot
David Bainbridgef81cd642019-11-20 00:14:47 +000030Resource ../../libraries/voltha.robot
Suchitra Vemurib8ed2d52019-09-30 13:22:51 -070031Resource ../../libraries/utils.robot
Andy Bavierba9866b2019-10-11 07:11:53 -070032Resource ../../libraries/k8s.robot
Suchitra Vemurib8ed2d52019-09-30 13:22:51 -070033Resource ../../variables/variables.robot
Suchitra Vemuri65cd65f2019-08-30 14:39:22 -070034
35*** Variables ***
Zack Williamsec53a1b2019-09-16 15:50:52 -070036${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
Zack Williamsa8fe75a2020-01-10 14:25:27 -070043${NAMESPACE} voltha
suraj gourd64356b2019-11-07 13:26:20 +000044# For below variable value, using deployment name as using grep for
45# parsing radius pod name, we can also use full radius pod name
Zack Williamsa8fe75a2020-01-10 14:25:27 -070046${RESTART_POD_NAME} radius
Andy Bavierba9866b2019-10-11 07:11:53 -070047${timeout} 60s
Zack Williamsec53a1b2019-09-16 15:50:52 -070048${of_id} 0
49${logical_id} 0
Andy Bavierba9866b2019-10-11 07:11:53 -070050${has_dataplane} True
Andy Bavierba9866b2019-10-11 07:11:53 -070051${teardown_device} False
Zack Williamsa8fe75a2020-01-10 14:25:27 -070052${scripts} ../../scripts
Suchitra Vemuri65cd65f2019-08-30 14:39:22 -070053
Andy Bavierabeba262020-02-07 16:22:16 -070054# Per-test logging on failure is turned off by default; set this variable to enable
55${container_log_dir} ${None}
56
Suchitra Vemuri65cd65f2019-08-30 14:39:22 -070057*** Test Cases ***
58Sanity E2E Test for OLT/ONU on POD
59 [Documentation] Validates E2E Ping Connectivity and object states for the given scenario:
60 ... Validate successful authentication/DHCP/E2E ping for the tech profile that is used
Andy Bavierba9866b2019-10-11 07:11:53 -070061 [Tags] sanity test1
Andy Bavier4a8450e2020-02-04 08:58:37 -070062 [Setup] Run Keywords Announce Message START TEST SanityTest
Andy Bavierabeba262020-02-07 16:22:16 -070063 ... AND Start Logging SanityTest
Andy Bavier4a8450e2020-02-04 08:58:37 -070064 ... AND Setup
65 [Teardown] Run Keywords Collect Logs
Andy Bavierabeba262020-02-07 16:22:16 -070066 ... AND Stop Logging SanityTest
Andy Bavier4a8450e2020-02-04 08:58:37 -070067 ... AND Announce Message END TEST SanityTest
Suchitra Vemuric5295a32019-12-15 20:32:04 -080068 Run Keyword If ${has_dataplane} Clean Up Linux
Zack Williamsa8fe75a2020-01-10 14:25:27 -070069 Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test
Suchitra Vemuri65cd65f2019-08-30 14:39:22 -070070
Hema93762cf2020-01-29 19:59:28 +053071Test Disable and Enable OLT
72 [Documentation] Validates E2E Ping Connectivity and object states for the given scenario:
73 ... Assuming that test1 was executed where all the ONUs are authenticated/DHCP/pingable
74 ... Perform disable on the OLT and validate that the pings do not succeed
75 ... Perform enable on the OLT and validate that the pings are successful
76 [Tags] VOL-2410 DisableEnableOLT notready
Andy Bavierabeba262020-02-07 16:22:16 -070077 [Setup] Run Keywords Announce Message START TEST DisableEnableOLT
78 ... AND Start Logging DisableEnableOLT
Andy Bavier4a8450e2020-02-04 08:58:37 -070079 [Teardown] Run Keywords Collect Logs
Andy Bavierabeba262020-02-07 16:22:16 -070080 ... AND Stop Logging DisableEnableOLT
Andy Bavier4a8450e2020-02-04 08:58:37 -070081 ... AND Announce Message END TEST DisableEnableOLT
Hema93762cf2020-01-29 19:59:28 +053082 #Disable the OLT and verify the OLT/ONUs are disabled properly
83 ${rc} ${output}= Run and Return Rc and Output ${VOLTCTL_CONFIG}; voltctl device disable ${olt_device_id}
84 Should Be Equal As Integers ${rc} 0
85 Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Device DISABLED UNKNOWN REACHABLE
86 ... ${olt_serial_number}
87 FOR ${I} IN RANGE 0 ${num_onus}
88 ${src}= Set Variable ${hosts.src[${I}]}
89 ${dst}= Set Variable ${hosts.dst[${I}]}
90 ${onu_device_id}= Get Device ID From SN ${src['onu']}
91 Wait Until Keyword Succeeds ${timeout} 5s Validate Device ENABLED DISCOVERED
92 ... UNREACHABLE ${src['onu']} onu=false
93 #Verify that ping fails
TorstenThieme754fec72020-02-18 07:24:46 +000094 Run Keyword If ${has_dataplane}
95 ... Run Keyword And Continue On Failure Wait Until Keyword Succeeds 60s 2s
Hema93762cf2020-01-29 19:59:28 +053096 ... Check Ping False ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']}
97 ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}}
98 END
99 #Enable the OLT back and check ONU, OLT status are back to "ACTIVE"
100 Enable Device ${olt_device_id}
101 Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Device ENABLED ACTIVE REACHABLE
102 ... ${olt_serial_number}
103 FOR ${I} IN RANGE 0 ${num_onus}
104 ${src}= Set Variable ${hosts.src[${I}]}
105 ${dst}= Set Variable ${hosts.dst[${I}]}
106 ${onu_device_id}= Get Device ID From SN ${src['onu']}
107 ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']}
108 ... ${of_id}
109 Wait Until Keyword Succeeds ${timeout} 5s Validate Device ENABLED ACTIVE
110 ... REACHABLE ${src['onu']} onu=True onu_reason=omci-flows-pushed
111 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s
112 ... Validate Subscriber DHCP Allocation ${k8s_node_ip} ${ONOS_SSH_PORT} ${onu_port}
113 #Verify that ping workss fine again
TorstenThieme754fec72020-02-18 07:24:46 +0000114 Run Keyword If ${has_dataplane}
115 ... Run Keyword And Continue On Failure Wait Until Keyword Succeeds 60s 2s
Hema93762cf2020-01-29 19:59:28 +0530116 ... Check Ping True ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']}
117 ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}}
118 Run Keyword and Ignore Error Collect Logs
119 END
120
121
Suchitra Vemuri6db89412019-11-14 14:52:54 -0800122Test Disable and Enable ONU
123 [Documentation] Validates E2E Ping Connectivity and object states for the given scenario:
124 ... Assuming that test1 was executed where all the ONUs are authenticated/DHCP/pingable
125 ... Perform disable on the ONUs and validate that the pings do not succeed
126 ... Perform enable on the ONUs and validate that the pings are successful
Suchitra Vemuri04245f72020-01-08 16:43:24 -0800127 [Tags] functional DisableEnableONU released
Andy Bavierabeba262020-02-07 16:22:16 -0700128 [Setup] Run Keywords Announce Message START TEST DisableEnableONU
129 ... AND Start Logging DisableEnableONU
Andy Bavier4a8450e2020-02-04 08:58:37 -0700130 [Teardown] Run Keywords Collect Logs
Andy Bavierabeba262020-02-07 16:22:16 -0700131 ... AND Stop Logging DisableEnableONU
Andy Bavier4a8450e2020-02-04 08:58:37 -0700132 ... AND Announce Message END TEST DisableEnableONU
Suchitra Vemuri6db89412019-11-14 14:52:54 -0800133 FOR ${I} IN RANGE 0 ${num_onus}
134 ${src}= Set Variable ${hosts.src[${I}]}
135 ${dst}= Set Variable ${hosts.dst[${I}]}
Suchitra Vemuri6db89412019-11-14 14:52:54 -0800136 ${onu_device_id}= Get Device ID From SN ${src['onu']}
137 ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']}
138 ... ${of_id}
139 Disable Device ${onu_device_id}
Andy Bavier46c8be32020-01-21 10:06:27 -0700140 Wait Until Keyword Succeeds 20s 2s Test Devices Disabled in VOLTHA Id=${onu_device_id}
Andy Bavier33e6dd32020-01-16 13:35:20 -0700141 Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure
142 ... Wait Until Keyword Succeeds 60s 2s
Zack Williamsa8fe75a2020-01-10 14:25:27 -0700143 ... Check Ping False ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']}
144 ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
Suchitra Vemuri6db89412019-11-14 14:52:54 -0800145 Enable Device ${onu_device_id}
146 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s
147 ... Validate Subscriber DHCP Allocation ${k8s_node_ip} ${ONOS_SSH_PORT} ${onu_port}
Andy Bavier33e6dd32020-01-16 13:35:20 -0700148 Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure
149 ... Wait Until Keyword Succeeds 60s 2s
Zack Williamsa8fe75a2020-01-10 14:25:27 -0700150 ... Check Ping True ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']}
151 ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
152 Run Keyword and Ignore Error Get Device Output from Voltha ${onu_device_id}
153 Run Keyword and Ignore Error Collect Logs
Suchitra Vemuri6db89412019-11-14 14:52:54 -0800154 END
155
Suchitra Vemuri5994cd12019-12-17 22:20:55 -0800156Test Subscriber Delete and Add
157 [Documentation] Validates E2E Ping Connectivity and object states for the given scenario:
158 ... Assuming that all the ONUs are authenticated/DHCP/pingable
Zack Williamsa8fe75a2020-01-10 14:25:27 -0700159 ... Delete a subscriber and validate that the pings do not succeed
Suchitra Vemuri5994cd12019-12-17 22:20:55 -0800160 ... Re-add the subscriber and validate that the pings are successful
Suchitra Vemuri04245f72020-01-08 16:43:24 -0800161 [Tags] functional SubAddDelete released
Andy Bavierabeba262020-02-07 16:22:16 -0700162 [Setup] Run Keywords Announce Message START TEST SubAddDelete
163 ... AND Start Logging SubAddDelete
Andy Bavier4a8450e2020-02-04 08:58:37 -0700164 [Teardown] Run Keywords Collect Logs
Andy Bavierabeba262020-02-07 16:22:16 -0700165 ... AND Stop Logging SubAddDelete
Andy Bavier4a8450e2020-02-04 08:58:37 -0700166 ... AND Announce Message END TEST SubAddDelete
Suchitra Vemuri5994cd12019-12-17 22:20:55 -0800167 FOR ${I} IN RANGE 0 ${num_onus}
168 ${src}= Set Variable ${hosts.src[${I}]}
169 ${dst}= Set Variable ${hosts.dst[${I}]}
Suchitra Vemuri5994cd12019-12-17 22:20:55 -0800170 ${onu_device_id}= Get Device ID From SN ${src['onu']}
171 ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']}
172 ... ${of_id}
173 Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command ${k8s_node_ip}
174 ... ${ONOS_SSH_PORT} volt-remove-subscriber-access ${of_id} ${onu_port}
175 Sleep 10s
Andy Bavier33e6dd32020-01-16 13:35:20 -0700176 Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure
177 ... Wait Until Keyword Succeeds 60s 2s
Zack Williamsa8fe75a2020-01-10 14:25:27 -0700178 ... Check Ping False ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']}
179 ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
Suchitra Vemuri5994cd12019-12-17 22:20:55 -0800180 Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command ${k8s_node_ip}
181 ... ${ONOS_SSH_PORT} volt-add-subscriber-access ${of_id} ${onu_port}
182 Sleep 10s
183 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s
184 ... Validate Subscriber DHCP Allocation ${k8s_node_ip} ${ONOS_SSH_PORT} ${onu_port}
Andy Bavier33e6dd32020-01-16 13:35:20 -0700185 Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure
186 ... Wait Until Keyword Succeeds 60s 2s
Zack Williamsa8fe75a2020-01-10 14:25:27 -0700187 ... Check Ping True ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']}
188 ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
189 Run Keyword and Ignore Error Get Device Output from Voltha ${onu_device_id}
190 Run Keyword and Ignore Error Collect Logs
Suchitra Vemuri5994cd12019-12-17 22:20:55 -0800191 END
Suchitra Vemuri5994cd12019-12-17 22:20:55 -0800192
suraj gourd64356b2019-11-07 13:26:20 +0000193Check OLT/ONU Authentication After Radius Pod Restart
suraj gour7f6d5fe2019-11-29 10:56:35 +0000194 [Documentation] After radius restart, triggers reassociation, checks status and
195 ... authentication, validates dhcp and ping. Note : wpa reassociate works only when
196 ... wpa supplicant is running in background hence it is recommended to remove
197 ... teardown from previous test or uncomment 'Teardown None'.
198 ... Assuming that test1 was executed where all the ONUs are authenticated/DHCP/pingable
Suchitra Vemuri04245f72020-01-08 16:43:24 -0800199 [Tags] functional RadiusRestart released
Andy Bavierabeba262020-02-07 16:22:16 -0700200 [Setup] Run Keywords Announce Message START TEST RadiusRestart
201 ... AND Start Logging RadiusRestart
Andy Bavier4a8450e2020-02-04 08:58:37 -0700202 [Teardown] Run Keywords Collect Logs
Andy Bavierabeba262020-02-07 16:22:16 -0700203 ... AND Stop Logging RadiusRestart
Andy Bavier4a8450e2020-02-04 08:58:37 -0700204 ... AND Announce Message END TEST RadiusRestart
Suchitra Vemuri014b6032020-02-14 18:13:13 -0800205 ${waitforRestart} Set Variable 120s
suraj gourd64356b2019-11-07 13:26:20 +0000206 Wait Until Keyword Succeeds ${timeout} 15s Restart Pod ${NAMESPACE} ${RESTART_POD_NAME}
Suchitra Vemuri014b6032020-02-14 18:13:13 -0800207 Wait Until Keyword Succeeds ${waitforRestart} 2s Validate Pod Status ${RESTART_POD_NAME} ${NAMESPACE}
208 ... Running
suraj gourd64356b2019-11-07 13:26:20 +0000209 FOR ${I} IN RANGE 0 ${num_onus}
210 ${src}= Set Variable ${hosts.src[${I}]}
211 ${dst}= Set Variable ${hosts.dst[${I}]}
suraj gourd64356b2019-11-07 13:26:20 +0000212 ${onu_device_id}= Get Device ID From SN ${src['onu']}
Zack Williamsa8fe75a2020-01-10 14:25:27 -0700213 ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s
214 ... Get ONU Port in ONOS ${src['onu']} ${of_id}
215 Wait Until Keyword Succeeds ${timeout} 2s
216 ... Verify Eapol Flows Added For ONU ${k8s_node_ip} ${ONOS_SSH_PORT} ${onu_port}
217 Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure
218 ... Validate Authentication After Reassociate True ${src['dp_iface_name']}
219 ... ${src['ip']} ${src['user']} ${src['pass']}
suraj gourd64356b2019-11-07 13:26:20 +0000220 ... ${src['container_type']} ${src['container_name']}
221 Wait Until Keyword Succeeds ${timeout} 2s Verify ONU in AAA-Users ${k8s_node_ip}
Zack Williamsa8fe75a2020-01-10 14:25:27 -0700222 ... ${ONOS_SSH_PORT} ${onu_port}
223 Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure
224 ... Validate DHCP and Ping True True ${src['dp_iface_name']}
225 ... ${src['s_tag']} ${src['c_tag']} ${dst['dp_iface_ip_qinq']}
226 ... ${src['ip']} ${src['user']} ${src['pass']}
227 ... ${src['container_type']} ${src['container_name']}
228 ... ${dst['dp_iface_name']} ${dst['ip']} ${dst['user']}
229 ... ${dst['pass']} ${dst['container_type']} ${dst['container_name']}
suraj gourd64356b2019-11-07 13:26:20 +0000230 Wait Until Keyword Succeeds ${timeout} 2s Run Keyword And Continue On Failure
231 ... Validate Subscriber DHCP Allocation ${k8s_node_ip} ${ONOS_SSH_PORT} ${onu_port}
Zack Williamsa8fe75a2020-01-10 14:25:27 -0700232 Run Keyword and Ignore Error Get Device Output from Voltha ${onu_device_id}
233 Run Keyword and Ignore Error Collect Logs
suraj gourd64356b2019-11-07 13:26:20 +0000234 END
235
suraj gourd5cfdbb2019-12-13 12:44:55 +0000236Check DHCP attempt fails when subscriber is not added
237 [Documentation] Validates when removed subscriber access, DHCP attempt, ping fails and
238 ... when again added subscriber access, DHCP attempt, ping succeeds
Zack Williamsa8fe75a2020-01-10 14:25:27 -0700239 ... Assuming that test1 or sanity test was executed where all the ONUs are authenticated/DHCP/pingable
Suchitra Vemuri04245f72020-01-08 16:43:24 -0800240 [Tags] functional SubsRemoveDHCP released
Andy Bavierabeba262020-02-07 16:22:16 -0700241 [Setup] Run Keywords Announce Message START TEST SubsRemoveDHCP
242 ... AND Start Logging SubsRemoveDHCP
Andy Bavier4a8450e2020-02-04 08:58:37 -0700243 [Teardown] Run Keywords Collect Logs
Andy Bavierabeba262020-02-07 16:22:16 -0700244 ... AND Stop Logging SubsRemoveDHCP
Andy Bavier4a8450e2020-02-04 08:58:37 -0700245 ... AND Announce Message END TEST SubsRemoveDHCP
suraj gourd5cfdbb2019-12-13 12:44:55 +0000246 FOR ${I} IN RANGE 0 ${num_onus}
247 ${src}= Set Variable ${hosts.src[${I}]}
248 ${dst}= Set Variable ${hosts.dst[${I}]}
Zack Williamsa8fe75a2020-01-10 14:25:27 -0700249 ${onu_device_id}= Get Device ID From SN ${src['onu']}
suraj gourd5cfdbb2019-12-13 12:44:55 +0000250 ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']}
251 ... ${of_id}
Suchitra Vemuri5994cd12019-12-17 22:20:55 -0800252 Run Keyword And Ignore Error Login And Run Command On Remote System killall dhclient ${src['ip']}
253 ... ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
254 Run Keyword And Ignore Error Login And Run Command On Remote System ps -ef | grep dhclient ${src['ip']}
255 ... ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
suraj gourd5cfdbb2019-12-13 12:44:55 +0000256 Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command ${k8s_node_ip}
257 ... ${ONOS_SSH_PORT} volt-remove-subscriber-access ${of_id} ${onu_port}
Zack Williamsa8fe75a2020-01-10 14:25:27 -0700258 Sleep 5s
Suchitra Vemuri5994cd12019-12-17 22:20:55 -0800259 Run Keyword And Ignore Error Login And Run Command On Remote System ps -ef | grep dhclient ${src['ip']}
260 ... ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
Zack Williamsa8fe75a2020-01-10 14:25:27 -0700261 Run Keyword If ${has_dataplane} Wait Until Keyword Succeeds ${timeout} 2s
262 ... Delete IP Addresses from Interface on Remote Host ${src['dp_iface_name']} ${src['ip']}
263 ... ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
264 Run Keyword And Ignore Error Login And Run Command On Remote System
265 ... ifconfig | grep -A 10 ens ${src['ip']}
Suchitra Vemuri5994cd12019-12-17 22:20:55 -0800266 ... ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
suraj gourd5cfdbb2019-12-13 12:44:55 +0000267 Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Validate DHCP and Ping False
268 ... False ${src['dp_iface_name']} ${src['s_tag']} ${src['c_tag']} ${dst['dp_iface_ip_qinq']}
269 ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
270 ... ${dst['dp_iface_name']} ${dst['ip']} ${dst['user']} ${dst['pass']} ${dst['container_type']}
271 ... ${dst['container_name']}
272 Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command ${k8s_node_ip}
273 ... ${ONOS_SSH_PORT} volt-add-subscriber-access ${of_id} ${onu_port}
274 Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Validate DHCP and Ping True
275 ... True ${src['dp_iface_name']} ${src['s_tag']} ${src['c_tag']} ${dst['dp_iface_ip_qinq']}
276 ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
277 ... ${dst['dp_iface_name']} ${dst['ip']} ${dst['user']} ${dst['pass']} ${dst['container_type']}
278 ... ${dst['container_name']}
Suchitra Vemuri5994cd12019-12-17 22:20:55 -0800279 Run Keyword and Ignore Error Collect Logs
280 END
Suchitra Vemuri5994cd12019-12-17 22:20:55 -0800281
Suchitra Vemuri5994cd12019-12-17 22:20:55 -0800282Test Disable and Enable ONU scenario for ATT workflow
283 [Documentation] Validates E2E Ping Connectivity and object states for the given scenario:
284 ... Assuming that test1 was executed where all the ONUs are authenticated/DHCP/pingable
285 ... Perform disable on the ONUs, call volt-remove-subscriber and validate that the pings do not succeed
Zack Williamsa8fe75a2020-01-10 14:25:27 -0700286 ... Perform enable on the ONUs, authentication check, volt-add-subscriber-access and
287 ... validate that the pings are successful
Suchitra Vemuri5994cd12019-12-17 22:20:55 -0800288 ... VOL-2284
Suchitra Vemuria7dae322020-02-19 22:38:18 -0800289 [Tags] functional ATT_DisableEnableONU released
Andy Bavierabeba262020-02-07 16:22:16 -0700290 [Setup] Run Keywords Announce Message START TEST ATT_DisableEnableONU
291 ... AND Start Logging ATT_DisableEnableONU
Andy Bavier4a8450e2020-02-04 08:58:37 -0700292 [Teardown] Run Keywords Collect Logs
Andy Bavierabeba262020-02-07 16:22:16 -0700293 ... AND Stop Logging ATT_DisableEnableONU
Andy Bavier4a8450e2020-02-04 08:58:37 -0700294 ... AND Announce Message END TEST ATT_DisableEnableONU
Suchitra Vemuri5994cd12019-12-17 22:20:55 -0800295 FOR ${I} IN RANGE 0 ${num_onus}
296 ${src}= Set Variable ${hosts.src[${I}]}
297 ${dst}= Set Variable ${hosts.dst[${I}]}
Suchitra Vemuri5994cd12019-12-17 22:20:55 -0800298 ${onu_device_id}= Get Device ID From SN ${src['onu']}
299 ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']}
300 ... ${of_id}
Suchitra Vemuri014b6032020-02-14 18:13:13 -0800301 Run Keyword And Continue On Failure Wait Until Keyword Succeeds 120s 2s
302 ... Verify ONU Port Is Enabled ${k8s_node_ip} ${ONOS_SSH_PORT} ${onu_port}
Suchitra Vemuri5994cd12019-12-17 22:20:55 -0800303 Disable Device ${onu_device_id}
Suchitra Vemuri04245f72020-01-08 16:43:24 -0800304 Sleep 5s
Suchitra Vemuri5994cd12019-12-17 22:20:55 -0800305 Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command ${k8s_node_ip}
306 ... ${ONOS_SSH_PORT} volt-remove-subscriber-access ${of_id} ${onu_port}
Zack Williamsa8fe75a2020-01-10 14:25:27 -0700307 Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure
308 ... Wait Until Keyword Succeeds 60s 2s Check Ping
309 ... False ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']}
310 ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
Suchitra Vemuri5994cd12019-12-17 22:20:55 -0800311 ... ELSE sleep 60s
312 Enable Device ${onu_device_id}
313 Wait Until Keyword Succeeds ${timeout} 2s Verify Eapol Flows Added For ONU ${k8s_node_ip}
314 ... ${ONOS_SSH_PORT} ${onu_port}
Zack Williamsa8fe75a2020-01-10 14:25:27 -0700315 Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure
316 ... Validate Authentication After Reassociate True
317 ... ${src['dp_iface_name']} ${src['ip']} ${src['user']} ${src['pass']}
Suchitra Vemuri5994cd12019-12-17 22:20:55 -0800318 ... ${src['container_type']} ${src['container_name']}
319 Wait Until Keyword Succeeds ${timeout} 2s Verify ONU in AAA-Users ${k8s_node_ip}
Zack Williamsa8fe75a2020-01-10 14:25:27 -0700320 ... ${ONOS_SSH_PORT} ${onu_port}
Suchitra Vemuri5994cd12019-12-17 22:20:55 -0800321 Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command ${k8s_node_ip}
322 ... ${ONOS_SSH_PORT} volt-add-subscriber-access ${of_id} ${onu_port}
323 Sleep 10s
324 Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Validate DHCP and Ping True
Andy Bavier08ae5852019-12-19 09:12:42 -0700325 ... True ${src['dp_iface_name']} ${src['s_tag']} ${src['c_tag']} ${dst['dp_iface_ip_qinq']}
Suchitra Vemuri5994cd12019-12-17 22:20:55 -0800326 ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
327 ... ${dst['dp_iface_name']} ${dst['ip']} ${dst['user']} ${dst['pass']} ${dst['container_type']}
328 ... ${dst['container_name']}
329 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s
330 ... Validate Subscriber DHCP Allocation ${k8s_node_ip} ${ONOS_SSH_PORT} ${onu_port}
Suchitra Vemuri5994cd12019-12-17 22:20:55 -0800331 Run Keyword and Ignore Error Collect Logs
suraj gourd5cfdbb2019-12-13 12:44:55 +0000332 END
suraj gourd5cfdbb2019-12-13 12:44:55 +0000333
Suchitra Vemuri937cd392020-01-12 17:10:42 -0800334Delete OLT, ReAdd OLT and Perform Sanity Test
335 [Documentation] Validates E2E Ping Connectivity and object states for the given scenario:
336 ... Disable and Delete the OLT
337 ... Create/Enable the same OLT again
338 ... Validate authentication/DHCP/E2E pings succeed for all the ONUs connected to the OLT
Suchitra Vemuria7dae322020-02-19 22:38:18 -0800339 [Tags] functional DeleteOLT released
Andy Bavierabeba262020-02-07 16:22:16 -0700340 [Setup] Run Keywords Announce Message START TEST DeleteOLT
341 ... AND Start Logging DeleteOLT
Andy Bavier4a8450e2020-02-04 08:58:37 -0700342 [Teardown] Run Keywords Collect Logs
Andy Bavierabeba262020-02-07 16:22:16 -0700343 ... AND Stop Logging DeleteOLT
Andy Bavier4a8450e2020-02-04 08:58:37 -0700344 ... AND Announce Message END TEST DeleteOLT
Suchitra Vemuri937cd392020-01-12 17:10:42 -0800345 Run Keyword If ${has_dataplane} Clean Up Linux
346 Run Keyword If ${has_dataplane} Delete Device and Verify
347 Run Keyword and Ignore Error Collect Logs
348 # Recreate the OLT
349 Run Keyword If ${has_dataplane} Setup
350 Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test
Suchitra Vemuri937cd392020-01-12 17:10:42 -0800351
Hema783279b2020-01-22 15:37:37 +0530352Test disable ONUs and OLT then delete ONUs and OLT
353 [Documentation] On deployed POD, disable the ONU, disable the OLT and then delete ONU and OLT.
354 ... This TC is to confirm that ONU removal is not impacting OLT
355 ... Devices will be removed during the execution of this TC
356 ... so calling setup at the end to add the devices back to avoid the confusion.
Suchitra Vemuria7dae322020-02-19 22:38:18 -0800357 [Tags] functional VOL-2354 DisableDeleteONUandOLT released
Andy Bavierabeba262020-02-07 16:22:16 -0700358 [Setup] Run Keywords Announce Message START TEST DisableDeleteONUandOLT
359 ... AND Start Logging DisableDeleteONUandOLT
Andy Bavier4a8450e2020-02-04 08:58:37 -0700360 [Teardown] Run Keywords Collect Logs
Andy Bavierabeba262020-02-07 16:22:16 -0700361 ... AND Stop Logging DisableDeleteONUandOLT
Andy Bavier4a8450e2020-02-04 08:58:37 -0700362 ... AND Announce Message END TEST DisableDeleteONUandOLT
Suchitra Vemuriba4f3712020-01-24 16:18:26 -0800363 ${olt_device_id}= Get Device ID From SN ${olt_serial_number}
Hema783279b2020-01-22 15:37:37 +0530364 FOR ${I} IN RANGE 0 ${num_onus}
365 ${src}= Set Variable ${hosts.src[${I}]}
366 ${dst}= Set Variable ${hosts.dst[${I}]}
367 ${onu_device_id}= Get Device ID From SN ${src['onu']}
Suchitra Vemuri014b6032020-02-14 18:13:13 -0800368 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s
369 ... Validate Device ENABLED ACTIVE
Hema783279b2020-01-22 15:37:37 +0530370 ... REACHABLE ${src['onu']} onu=True onu_reason=omci-flows-pushed
Suchitra Vemuri014b6032020-02-14 18:13:13 -0800371 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s
372 ... Validate OLT Device ENABLED ACTIVE
Hema783279b2020-01-22 15:37:37 +0530373 ... REACHABLE ${olt_serial_number}
374 ${rc} ${output}= Run and Return Rc and Output
375 ... ${VOLTCTL_CONFIG}; voltctl device disable ${onu_device_id}
376 Should Be Equal As Integers ${rc} 0
Suchitra Vemuri014b6032020-02-14 18:13:13 -0800377 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s
378 ... Validate Device DISABLED UNKNOWN
Hema783279b2020-01-22 15:37:37 +0530379 ... REACHABLE ${src['onu']} onu=false
Suchitra Vemuri014b6032020-02-14 18:13:13 -0800380 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s
381 ... Validate OLT Device ENABLED ACTIVE
Hema783279b2020-01-22 15:37:37 +0530382 ... REACHABLE ${olt_serial_number}
383 END
384 ${rc} ${output}= Run and Return Rc and Output ${VOLTCTL_CONFIG}; voltctl device disable ${olt_device_id}
385 Should Be Equal As Integers ${rc} 0
Suchitra Vemuri014b6032020-02-14 18:13:13 -0800386 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s
387 ... Validate OLT Device DISABLED UNKNOWN REACHABLE
Hema783279b2020-01-22 15:37:37 +0530388 ... ${olt_serial_number}
389 FOR ${I} IN RANGE 0 ${num_onus}
390 ${src}= Set Variable ${hosts.src[${I}]}
391 ${dst}= Set Variable ${hosts.dst[${I}]}
392 ${onu_device_id}= Get Device ID From SN ${src['onu']}
Suchitra Vemuri014b6032020-02-14 18:13:13 -0800393 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s
394 ... Validate Device DISABLED DISCOVERED
395 ... UNREACHABLE ${src['onu']} onu=false
Hema783279b2020-01-22 15:37:37 +0530396 ${rc} ${output}= Run and Return Rc and Output ${VOLTCTL_CONFIG}; voltctl device delete ${onu_device_id}
397 Should Be Equal As Integers ${rc} 0
Suchitra Vemuri014b6032020-02-14 18:13:13 -0800398 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s
399 ... Validate OLT Device DISABLED UNKNOWN
Hema783279b2020-01-22 15:37:37 +0530400 ... REACHABLE ${olt_serial_number}
401 END
402 ${rc} ${output}= Run and Return Rc and Output ${VOLTCTL_CONFIG}; voltctl device delete ${olt_device_id}
403 Should Be Equal As Integers ${rc} 0
Suchitra Vemuri014b6032020-02-14 18:13:13 -0800404 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s Test Empty Device List
Hema783279b2020-01-22 15:37:37 +0530405 #Adding setup here to add the devices back since this TC removes the devices
406 Run Keyword If ${has_dataplane} sleep 180s
Suchitra Vemuricd2f64f2020-02-18 18:30:27 -0800407 #setup
Hema783279b2020-01-22 15:37:37 +0530408
David Bainbridgef81cd642019-11-20 00:14:47 +0000409Sanity E2E Test for OLT/ONU on POD With Core Fail and Restart
410 [Documentation] Deploys an device instance and waits for it to authenticate. After
411 ... authentication is successful the rw-core deployment is scaled to 0 instances to
412 ... simulate a POD crash. The test then scales the rw-core back to a single instance
Zack Williamsa8fe75a2020-01-10 14:25:27 -0700413 ... and configures ONOS for access. The test succeeds if the device is able to
David Bainbridgef81cd642019-11-20 00:14:47 +0000414 ... complete the DHCP sequence.
415 [Tags] bbsim rwcore-restart
Andy Bavier4a8450e2020-02-04 08:58:37 -0700416 [Setup] Run Keywords Announce Message START TEST RwCoreFailAndRestart
Andy Bavierabeba262020-02-07 16:22:16 -0700417 ... AND Start Logging RwCoreFailAndRestart
Andy Bavier4a8450e2020-02-04 08:58:37 -0700418 ... AND Clear All Devices Then Create New Device
419 [Teardown] Run Keywords Collect Logs
Andy Bavierabeba262020-02-07 16:22:16 -0700420 ... AND Stop Logging RwCoreFailAndRestart
Andy Bavier4a8450e2020-02-04 08:58:37 -0700421 ... AND Announce Message END TEST RwCoreFailAndRestart
David Bainbridgef81cd642019-11-20 00:14:47 +0000422 ${of_id}= Wait Until Keyword Succeeds ${timeout} 15s Validate OLT Device in ONOS ${olt_serial_number}
423 Set Global Variable ${of_id}
David Bainbridgef81cd642019-11-20 00:14:47 +0000424 FOR ${I} IN RANGE 0 ${num_onus}
425 ${src}= Set Variable ${hosts.src[${I}]}
426 ${dst}= Set Variable ${hosts.dst[${I}]}
427 ${onu_device_id}= Get Device ID From SN ${src['onu']}
428 ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']}
429 ... ${of_id}
David Bainbridgef81cd642019-11-20 00:14:47 +0000430 # Bring up the device and verify it authenticates
Zack Williamsa8fe75a2020-01-10 14:25:27 -0700431 Wait Until Keyword Succeeds ${timeout} 5s Validate Device ENABLED ACTIVE REACHABLE
David Bainbridgef81cd642019-11-20 00:14:47 +0000432 ... ${onu_device_id} onu=True onu_reason=omci-flows-pushed
433 Wait Until Keyword Succeeds ${timeout} 2s Verify Eapol Flows Added For ONU ${k8s_node_ip}
434 ... ${ONOS_SSH_PORT} ${onu_port}
435 Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Validate Authentication True
436 ... ${src['dp_iface_name']} wpa_supplicant.conf ${src['ip']} ${src['user']} ${src['pass']}
437 ... ${src['container_type']} ${src['container_name']}
438 Wait Until Keyword Succeeds ${timeout} 2s Verify ONU in AAA-Users ${k8s_node_ip}
David Bainbridge3d6d5d32019-12-17 19:05:35 +0000439 ... ${ONOS_SSH_PORT} ${onu_port}
440 END
441
442 # Scale down the rw-core deployment to 0 PODs and once confirmed, scale it back to 1
443 Scale K8s Deployment voltha voltha-rw-core 0
444 Wait Until Keyword Succeeds ${timeout} 2s Pod Does Not Exist voltha voltha-rw-core
445 # Ensure the ofagent POD goes "not-ready" as expected
446 Wait Until keyword Succeeds ${timeout} 2s
447 ... Check Expected Available Deployment Replicas voltha voltha-ofagent 0
448 # Scale up the core deployment and make sure both it and the ofagent deployment are back
449 Scale K8s Deployment voltha voltha-rw-core 1
450 Wait Until Keyword Succeeds ${timeout} 2s
451 ... Check Expected Available Deployment Replicas voltha voltha-rw-core 1
452 Wait Until Keyword Succeeds ${timeout} 2s
453 ... Check Expected Available Deployment Replicas voltha voltha-ofagent 1
454 # For some reason scaling down and up the POD behind a service causes the port forward to stop working,
455 # so restart the port forwarding for the API service
456 Restart VOLTHA Port Foward voltha-api-minimal
457 # Ensure that the ofagent pod is up and ready and the device is available in ONOS, this
458 # represents system connectivity being restored
459 Wait Until Keyword Succeeds ${timeout} 2s Device Is Available In ONOS
460 ... http://karaf:karaf@${k8s_node_ip}:${ONOS_REST_PORT} ${of_id}
461
462 FOR ${I} IN RANGE 0 ${num_onus}
463 # Add subscriber access and verify that DHCP completes to ensure system is still functioning properly
464 Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command ${k8s_node_ip}
465 ... ${ONOS_SSH_PORT} volt-add-subscriber-access ${of_id} ${onu_port}
466 Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Validate DHCP and Ping True
467 ... True ${src['dp_iface_name']} ${src['s_tag']} ${src['c_tag']} ${dst['dp_iface_ip_qinq']}
468 ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
469 ... ${dst['dp_iface_name']} ${dst['ip']} ${dst['user']} ${dst['pass']} ${dst['container_type']}
470 ... ${dst['container_name']}
471 Wait Until Keyword Succeeds ${timeout} 2s Run Keyword And Continue On Failure
472 ... Validate Subscriber DHCP Allocation ${k8s_node_ip} ${ONOS_SSH_PORT} ${onu_port}
473 END
474
475Sanity E2E Test for OLT/ONU on POD With OLT Adapters Fail and Restart
476 [Documentation] Deploys an device instance and waits for it to authenticate. After
477 ... authentication is successful the rw-core deployment is scaled to 0 instances to
478 ... simulate a POD crash. The test then scales the rw-core back to a single instance
479 ... and configures ONOS for access. The test succeeds if the device is able to
480 ... complete the DHCP sequence.
481 [Tags] bbsim olt-adapter-restart
Andy Bavierabeba262020-02-07 16:22:16 -0700482 [Setup] Run Keywords Announce Message START TEST OltAdapterRestart
483 ... AND Start Logging OltAdapterRestart
484 ... AND Clear All Devices Then Create New Device
485 [Teardown] Run Keywords Collect Logs
486 ... AND Stop Logging OltAdapterRestart
487 ... AND Announce Message END TEST OltAdapterRestart
David Bainbridge3d6d5d32019-12-17 19:05:35 +0000488 ${of_id}= Wait Until Keyword Succeeds ${timeout} 15s Validate OLT Device in ONOS ${olt_serial_number}
489 Set Global Variable ${of_id}
490
491 FOR ${I} IN RANGE 0 ${num_onus}
492 ${src}= Set Variable ${hosts.src[${I}]}
493 ${dst}= Set Variable ${hosts.dst[${I}]}
494 ${onu_device_id}= Get Device ID From SN ${src['onu']}
495 ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']}
496 ... ${of_id}
497
498 # Bring up the device and verify it authenticates
499 Wait Until Keyword Succeeds ${timeout} 5s Validate Device ENABLED ACTIVE REACHABLE
500 ... ${onu_device_id} onu=True onu_reason=omci-flows-pushed
501 Wait Until Keyword Succeeds ${timeout} 2s Verify Eapol Flows Added For ONU ${k8s_node_ip}
Zack Williamsa8fe75a2020-01-10 14:25:27 -0700502 ... ${ONOS_SSH_PORT} ${onu_port}
David Bainbridge3d6d5d32019-12-17 19:05:35 +0000503 Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Validate Authentication True
504 ... ${src['dp_iface_name']} wpa_supplicant.conf ${src['ip']} ${src['user']} ${src['pass']}
505 ... ${src['container_type']} ${src['container_name']}
506 Wait Until Keyword Succeeds ${timeout} 2s Verify ONU in AAA-Users ${k8s_node_ip}
507 ... ${ONOS_SSH_PORT} ${onu_port}
508 END
509
510 # Scale down the open OLT adapter deployment to 0 PODs and once confirmed, scale it back to 1
511 Scale K8s Deployment voltha adapter-open-olt 0
512 Wait Until Keyword Succeeds ${timeout} 2s Pod Does Not Exist voltha adapter-open-olt
513 # Scale up the open OLT adapter deployment and make sure both it and the ofagent deployment are back
514 Scale K8s Deployment voltha adapter-open-olt 1
515 Wait Until Keyword Succeeds ${timeout} 2s
516 ... Check Expected Available Deployment Replicas voltha adapter-open-olt 1
517
518 # Ensure the device is available in ONOS, this represents system connectivity being restored
519 Wait Until Keyword Succeeds ${timeout} 2s Device Is Available In ONOS
520 ... http://karaf:karaf@${k8s_node_ip}:${ONOS_REST_PORT} ${of_id}
521
522 FOR ${I} IN RANGE 0 ${num_onus}
David Bainbridgef81cd642019-11-20 00:14:47 +0000523 # Add subscriber access and verify that DHCP completes to ensure system is still functioning properly
524 Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command ${k8s_node_ip}
525 ... ${ONOS_SSH_PORT} volt-add-subscriber-access ${of_id} ${onu_port}
526 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 ${k8s_node_ip} ${ONOS_SSH_PORT} ${onu_port}
533 END
534
suraj gour472da1c2020-02-25 05:44:51 +0000535Test Disable and Enable ONU and check authentication
536 [Documentation] Assuming that test1 was executed where all the ONUs are authenticated/DHCP/pingable
537 ... Perform disable on the ONUs and validate that the authentication do not succeed
538 ... Perform enable on the ONUs and validate that authentication successful
539 [Tags] functional DisableEnableONU_AuthCheck notready
540 [Setup] None
541 [Teardown] None
542 FOR ${I} IN RANGE 0 ${num_onus}
543 ${src}= Set Variable ${hosts.src[${I}]}
544 ${dst}= Set Variable ${hosts.dst[${I}]}
545 ${onu_device_id}= Get Device ID From SN ${src['onu']}
546 ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']}
547 ... ${of_id}
548 Disable Device ${onu_device_id}
549 Wait Until Keyword Succeeds ${timeout} 5s Validate Device DISABLED UNKNOWN
550 ... REACHABLE ${src['onu']} onu=false
551 Run Keyword If ${has_dataplane} Wait Until Keyword Succeeds ${timeout} 2s
552 ... Validate Authentication After Reassociate False ${src['dp_iface_name']}
553 ... ${src['ip']} ${src['user']} ${src['pass']}
554 ... ${src['container_type']} ${src['container_name']}
555 Enable Device ${onu_device_id}
556 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s Validate Device
557 ... ENABLED ACTIVE REACHABLE ${src['onu']} onu=True onu_reason=omci-flows-pushed
558 Run Keyword If ${has_dataplane} Wait Until Keyword Succeeds ${timeout} 2s
559 ... Validate Authentication After Reassociate True ${src['dp_iface_name']}
560 ... ${src['ip']} ${src['user']} ${src['pass']}
561 ... ${src['container_type']} ${src['container_name']}
562 Run Keyword and Ignore Error Get Device Output from Voltha ${onu_device_id}
563 END
564 Run Keyword and Ignore Error Collect Logs
565
Suchitra Vemuri65cd65f2019-08-30 14:39:22 -0700566*** Keywords ***
567Setup Suite
Andy Bavier88cd9f62019-11-26 16:22:33 -0700568 [Documentation] Set up the test suite
569 Common Test Suite Setup
Suchitra Vemuri65cd65f2019-08-30 14:39:22 -0700570
David Bainbridgef81cd642019-11-20 00:14:47 +0000571Clear All Devices Then Create New Device
572 [Documentation] Remove any devices from VOLTHA and ONOS
David Bainbridgef81cd642019-11-20 00:14:47 +0000573 # Remove all devices from voltha and nos
574 Delete All Devices and Verify
David Bainbridgef81cd642019-11-20 00:14:47 +0000575 # Execute normal test Setup Keyword
576 Setup
577