blob: 993b48911c1a2be4c49cb0768348976bc52c2141 [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
Gayathri.Selvan92d16862020-03-19 14:47:58 +000054# For dataplane bandwidth testing
55${upper_margin_pct} 105 # Allow 5% over the limit
56${lower_margin_pct} 93 # Allow 7% under the limit
57${udp_rate_multiplier} 1.10 # Send UDP at bw profile limit * rate_multiplier
58${udp_packet_bytes} 1400 # UDP payload in bytes
59
Andy Bavierabeba262020-02-07 16:22:16 -070060# Per-test logging on failure is turned off by default; set this variable to enable
61${container_log_dir} ${None}
62
Suchitra Vemuri65cd65f2019-08-30 14:39:22 -070063*** Test Cases ***
64Sanity E2E Test for OLT/ONU on POD
65 [Documentation] Validates E2E Ping Connectivity and object states for the given scenario:
66 ... Validate successful authentication/DHCP/E2E ping for the tech profile that is used
Andy Bavierba9866b2019-10-11 07:11:53 -070067 [Tags] sanity test1
Andy Baviere187eda2020-04-20 15:00:02 -070068 [Setup] Run Keywords Start Logging SanityTest
Andy Bavier4a8450e2020-02-04 08:58:37 -070069 ... AND Setup
70 [Teardown] Run Keywords Collect Logs
Andy Bavierabeba262020-02-07 16:22:16 -070071 ... AND Stop Logging SanityTest
Suchitra Vemuric5295a32019-12-15 20:32:04 -080072 Run Keyword If ${has_dataplane} Clean Up Linux
Zack Williamsa8fe75a2020-01-10 14:25:27 -070073 Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test
Suchitra Vemuri65cd65f2019-08-30 14:39:22 -070074
Hema93762cf2020-01-29 19:59:28 +053075Test Disable and Enable OLT
76 [Documentation] Validates E2E Ping Connectivity and object states for the given scenario:
77 ... Assuming that test1 was executed where all the ONUs are authenticated/DHCP/pingable
78 ... Perform disable on the OLT and validate that the pings do not succeed
79 ... Perform enable on the OLT and validate that the pings are successful
Andrea Campanella3e2f1a02020-04-30 20:23:18 +020080 [Tags] functional VOL-2410 DisableEnableOLT notready
Andy Baviere187eda2020-04-20 15:00:02 -070081 [Setup] Start Logging DisableEnableOLT
Andy Bavier4a8450e2020-02-04 08:58:37 -070082 [Teardown] Run Keywords Collect Logs
Andy Bavierabeba262020-02-07 16:22:16 -070083 ... AND Stop Logging DisableEnableOLT
Hema93762cf2020-01-29 19:59:28 +053084 #Disable the OLT and verify the OLT/ONUs are disabled properly
85 ${rc} ${output}= Run and Return Rc and Output ${VOLTCTL_CONFIG}; voltctl device disable ${olt_device_id}
86 Should Be Equal As Integers ${rc} 0
87 Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Device DISABLED UNKNOWN REACHABLE
88 ... ${olt_serial_number}
89 FOR ${I} IN RANGE 0 ${num_onus}
90 ${src}= Set Variable ${hosts.src[${I}]}
91 ${dst}= Set Variable ${hosts.dst[${I}]}
92 ${onu_device_id}= Get Device ID From SN ${src['onu']}
Hardik Windlass7c801e62020-05-04 19:33:21 +053093 ${onu_port}= Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s
94 ... Get ONU Port in ONOS ${src['onu']} ${of_id}
Hema93762cf2020-01-29 19:59:28 +053095 Wait Until Keyword Succeeds ${timeout} 5s Validate Device ENABLED DISCOVERED
96 ... UNREACHABLE ${src['onu']} onu=false
97 #Verify that ping fails
TorstenThieme754fec72020-02-18 07:24:46 +000098 Run Keyword If ${has_dataplane}
99 ... Run Keyword And Continue On Failure Wait Until Keyword Succeeds 60s 2s
Hema93762cf2020-01-29 19:59:28 +0530100 ... Check Ping False ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']}
Andrea Campanellaa6e17322020-05-04 14:31:44 +0200101 ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
Hardik Windlass7c801e62020-05-04 19:33:21 +0530102 # Remove Subscriber Access (To replicate ATT workflow)
103 Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command ${ONOS_SSH_IP}
104 ... ${ONOS_SSH_PORT} volt-remove-subscriber-access ${of_id} ${onu_port}
Hema93762cf2020-01-29 19:59:28 +0530105 END
106 #Enable the OLT back and check ONU, OLT status are back to "ACTIVE"
107 Enable Device ${olt_device_id}
108 Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Device ENABLED ACTIVE REACHABLE
109 ... ${olt_serial_number}
Hemaf64d34c2020-03-25 00:40:17 +0530110 Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Port Types
111 ... PON_OLT ETHERNET_NNI
Hardik Windlass7c801e62020-05-04 19:33:21 +0530112 Run Keyword If ${has_dataplane} Clean Up Linux
113 Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test
Hema93762cf2020-01-29 19:59:28 +0530114
Suchitra Vemuri6db89412019-11-14 14:52:54 -0800115Test Disable and Enable ONU
116 [Documentation] Validates E2E Ping Connectivity and object states for the given scenario:
117 ... Assuming that test1 was executed where all the ONUs are authenticated/DHCP/pingable
118 ... Perform disable on the ONUs and validate that the pings do not succeed
119 ... Perform enable on the ONUs and validate that the pings are successful
Suchitra Vemuri04245f72020-01-08 16:43:24 -0800120 [Tags] functional DisableEnableONU released
Andy Baviere187eda2020-04-20 15:00:02 -0700121 [Setup] Start Logging DisableEnableONU
Andy Bavier4a8450e2020-02-04 08:58:37 -0700122 [Teardown] Run Keywords Collect Logs
Andy Bavierabeba262020-02-07 16:22:16 -0700123 ... AND Stop Logging DisableEnableONU
Suchitra Vemuri6db89412019-11-14 14:52:54 -0800124 FOR ${I} IN RANGE 0 ${num_onus}
125 ${src}= Set Variable ${hosts.src[${I}]}
126 ${dst}= Set Variable ${hosts.dst[${I}]}
Suchitra Vemuri6db89412019-11-14 14:52:54 -0800127 ${onu_device_id}= Get Device ID From SN ${src['onu']}
128 ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']}
129 ... ${of_id}
130 Disable Device ${onu_device_id}
Andy Bavier46c8be32020-01-21 10:06:27 -0700131 Wait Until Keyword Succeeds 20s 2s Test Devices Disabled in VOLTHA Id=${onu_device_id}
Andy Bavier33e6dd32020-01-16 13:35:20 -0700132 Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure
133 ... Wait Until Keyword Succeeds 60s 2s
Zack Williamsa8fe75a2020-01-10 14:25:27 -0700134 ... Check Ping False ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']}
135 ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
Suchitra Vemuri6db89412019-11-14 14:52:54 -0800136 Enable Device ${onu_device_id}
137 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s
ubuntu6b6e7d42020-03-02 12:35:42 -0800138 ... Validate Subscriber DHCP Allocation ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port}
Hardik Windlass21807632020-04-14 16:24:55 +0530139 # Verify subscriber access flows are added for the ONU port
140 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s
141 ... Verify Subscriber Access Flows Added For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id}
142 ... ${onu_port} ${nni_port} ${src['c_tag']} ${src['s_tag']}
Andy Bavier33e6dd32020-01-16 13:35:20 -0700143 Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure
144 ... Wait Until Keyword Succeeds 60s 2s
Zack Williamsa8fe75a2020-01-10 14:25:27 -0700145 ... Check Ping True ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']}
146 ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
147 Run Keyword and Ignore Error Get Device Output from Voltha ${onu_device_id}
148 Run Keyword and Ignore Error Collect Logs
Suchitra Vemuri6db89412019-11-14 14:52:54 -0800149 END
150
Suchitra Vemuri5994cd12019-12-17 22:20:55 -0800151Test Subscriber Delete and Add
152 [Documentation] Validates E2E Ping Connectivity and object states for the given scenario:
153 ... Assuming that all the ONUs are authenticated/DHCP/pingable
Zack Williamsa8fe75a2020-01-10 14:25:27 -0700154 ... Delete a subscriber and validate that the pings do not succeed
Suchitra Vemuri5994cd12019-12-17 22:20:55 -0800155 ... Re-add the subscriber and validate that the pings are successful
Suchitra Vemuri04245f72020-01-08 16:43:24 -0800156 [Tags] functional SubAddDelete released
Andy Baviere187eda2020-04-20 15:00:02 -0700157 [Setup] Start Logging SubAddDelete
Andy Bavier4a8450e2020-02-04 08:58:37 -0700158 [Teardown] Run Keywords Collect Logs
Andy Bavierabeba262020-02-07 16:22:16 -0700159 ... AND Stop Logging SubAddDelete
Suchitra Vemuri5994cd12019-12-17 22:20:55 -0800160 FOR ${I} IN RANGE 0 ${num_onus}
161 ${src}= Set Variable ${hosts.src[${I}]}
162 ${dst}= Set Variable ${hosts.dst[${I}]}
Suchitra Vemuri5994cd12019-12-17 22:20:55 -0800163 ${onu_device_id}= Get Device ID From SN ${src['onu']}
164 ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']}
165 ... ${of_id}
ubuntu6b6e7d42020-03-02 12:35:42 -0800166 Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command ${ONOS_SSH_IP}
Suchitra Vemuri5994cd12019-12-17 22:20:55 -0800167 ... ${ONOS_SSH_PORT} volt-remove-subscriber-access ${of_id} ${onu_port}
168 Sleep 10s
Suchitra Vemuri9da44302020-03-04 14:24:49 -0800169 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s
170 ... Verify No Pending Flows For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port}
Andy Bavier33e6dd32020-01-16 13:35:20 -0700171 Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure
172 ... Wait Until Keyword Succeeds 60s 2s
Zack Williamsa8fe75a2020-01-10 14:25:27 -0700173 ... Check Ping False ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']}
174 ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
ubuntu6b6e7d42020-03-02 12:35:42 -0800175 Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command ${ONOS_SSH_IP}
Suchitra Vemuri5994cd12019-12-17 22:20:55 -0800176 ... ${ONOS_SSH_PORT} volt-add-subscriber-access ${of_id} ${onu_port}
177 Sleep 10s
178 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s
Suchitra Vemuri9da44302020-03-04 14:24:49 -0800179 ... Verify No Pending Flows For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port}
180 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s
ubuntu6b6e7d42020-03-02 12:35:42 -0800181 ... Validate Subscriber DHCP Allocation ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port}
Hardik Windlass21807632020-04-14 16:24:55 +0530182 # Verify subscriber access flows are added for the ONU port
183 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s
184 ... Verify Subscriber Access Flows Added For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id}
185 ... ${onu_port} ${nni_port} ${src['c_tag']} ${src['s_tag']}
Andy Bavier33e6dd32020-01-16 13:35:20 -0700186 Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure
187 ... Wait Until Keyword Succeeds 60s 2s
Zack Williamsa8fe75a2020-01-10 14:25:27 -0700188 ... Check Ping True ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']}
189 ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
190 Run Keyword and Ignore Error Get Device Output from Voltha ${onu_device_id}
191 Run Keyword and Ignore Error Collect Logs
Suchitra Vemuri5994cd12019-12-17 22:20:55 -0800192 END
Suchitra Vemuri5994cd12019-12-17 22:20:55 -0800193
suraj gourd5cfdbb2019-12-13 12:44:55 +0000194Check DHCP attempt fails when subscriber is not added
195 [Documentation] Validates when removed subscriber access, DHCP attempt, ping fails and
196 ... when again added subscriber access, DHCP attempt, ping succeeds
Zack Williamsa8fe75a2020-01-10 14:25:27 -0700197 ... Assuming that test1 or sanity test was executed where all the ONUs are authenticated/DHCP/pingable
Suchitra Vemuri04245f72020-01-08 16:43:24 -0800198 [Tags] functional SubsRemoveDHCP released
Andy Baviere187eda2020-04-20 15:00:02 -0700199 [Setup] Start Logging SubsRemoveDHCP
Andy Bavier4a8450e2020-02-04 08:58:37 -0700200 [Teardown] Run Keywords Collect Logs
Andy Bavierabeba262020-02-07 16:22:16 -0700201 ... AND Stop Logging SubsRemoveDHCP
suraj gourd5cfdbb2019-12-13 12:44:55 +0000202 FOR ${I} IN RANGE 0 ${num_onus}
203 ${src}= Set Variable ${hosts.src[${I}]}
204 ${dst}= Set Variable ${hosts.dst[${I}]}
Zack Williamsa8fe75a2020-01-10 14:25:27 -0700205 ${onu_device_id}= Get Device ID From SN ${src['onu']}
suraj gourd5cfdbb2019-12-13 12:44:55 +0000206 ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']}
207 ... ${of_id}
Suchitra Vemuri5994cd12019-12-17 22:20:55 -0800208 Run Keyword And Ignore Error Login And Run Command On Remote System killall dhclient ${src['ip']}
209 ... ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
210 Run Keyword And Ignore Error Login And Run Command On Remote System ps -ef | grep dhclient ${src['ip']}
211 ... ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
ubuntu6b6e7d42020-03-02 12:35:42 -0800212 Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command ${ONOS_SSH_IP}
suraj gourd5cfdbb2019-12-13 12:44:55 +0000213 ... ${ONOS_SSH_PORT} volt-remove-subscriber-access ${of_id} ${onu_port}
Suchitra Vemuri8f1d3062020-02-28 11:57:37 -0800214 Sleep 15s
Suchitra Vemuri5994cd12019-12-17 22:20:55 -0800215 Run Keyword And Ignore Error Login And Run Command On Remote System ps -ef | grep dhclient ${src['ip']}
216 ... ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
Zack Williamsa8fe75a2020-01-10 14:25:27 -0700217 Run Keyword If ${has_dataplane} Wait Until Keyword Succeeds ${timeout} 2s
218 ... Delete IP Addresses from Interface on Remote Host ${src['dp_iface_name']} ${src['ip']}
219 ... ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
220 Run Keyword And Ignore Error Login And Run Command On Remote System
221 ... ifconfig | grep -A 10 ens ${src['ip']}
Suchitra Vemuri5994cd12019-12-17 22:20:55 -0800222 ... ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
suraj gourd5cfdbb2019-12-13 12:44:55 +0000223 Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Validate DHCP and Ping False
224 ... False ${src['dp_iface_name']} ${src['s_tag']} ${src['c_tag']} ${dst['dp_iface_ip_qinq']}
225 ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
226 ... ${dst['dp_iface_name']} ${dst['ip']} ${dst['user']} ${dst['pass']} ${dst['container_type']}
227 ... ${dst['container_name']}
ubuntu6b6e7d42020-03-02 12:35:42 -0800228 Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command ${ONOS_SSH_IP}
suraj gourd5cfdbb2019-12-13 12:44:55 +0000229 ... ${ONOS_SSH_PORT} volt-add-subscriber-access ${of_id} ${onu_port}
Suchitra Vemuri9da44302020-03-04 14:24:49 -0800230 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s
231 ... Verify No Pending Flows For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port}
Hardik Windlass21807632020-04-14 16:24:55 +0530232 # Verify subscriber access flows are added for the ONU port
233 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s
234 ... Verify Subscriber Access Flows Added For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id}
235 ... ${onu_port} ${nni_port} ${src['c_tag']} ${src['s_tag']}
suraj gourd5cfdbb2019-12-13 12:44:55 +0000236 Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Validate DHCP and Ping True
237 ... True ${src['dp_iface_name']} ${src['s_tag']} ${src['c_tag']} ${dst['dp_iface_ip_qinq']}
238 ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
239 ... ${dst['dp_iface_name']} ${dst['ip']} ${dst['user']} ${dst['pass']} ${dst['container_type']}
240 ... ${dst['container_name']}
Suchitra Vemuri5994cd12019-12-17 22:20:55 -0800241 Run Keyword and Ignore Error Collect Logs
242 END
Suchitra Vemuri5994cd12019-12-17 22:20:55 -0800243
Suchitra Vemuri5994cd12019-12-17 22:20:55 -0800244Test Disable and Enable ONU scenario for ATT workflow
245 [Documentation] Validates E2E Ping Connectivity and object states for the given scenario:
246 ... Assuming that test1 was executed where all the ONUs are authenticated/DHCP/pingable
247 ... Perform disable on the ONUs, call volt-remove-subscriber and validate that the pings do not succeed
Zack Williamsa8fe75a2020-01-10 14:25:27 -0700248 ... Perform enable on the ONUs, authentication check, volt-add-subscriber-access and
249 ... validate that the pings are successful
Suchitra Vemuri5994cd12019-12-17 22:20:55 -0800250 ... VOL-2284
Suchitra Vemuria7dae322020-02-19 22:38:18 -0800251 [Tags] functional ATT_DisableEnableONU released
Andy Baviere187eda2020-04-20 15:00:02 -0700252 [Setup] Start Logging ATT_DisableEnableONU
Andy Bavier4a8450e2020-02-04 08:58:37 -0700253 [Teardown] Run Keywords Collect Logs
Andy Bavierabeba262020-02-07 16:22:16 -0700254 ... AND Stop Logging ATT_DisableEnableONU
Suchitra Vemuri5994cd12019-12-17 22:20:55 -0800255 FOR ${I} IN RANGE 0 ${num_onus}
256 ${src}= Set Variable ${hosts.src[${I}]}
257 ${dst}= Set Variable ${hosts.dst[${I}]}
Suchitra Vemuri5994cd12019-12-17 22:20:55 -0800258 ${onu_device_id}= Get Device ID From SN ${src['onu']}
259 ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']}
260 ... ${of_id}
Suchitra Vemuri014b6032020-02-14 18:13:13 -0800261 Run Keyword And Continue On Failure Wait Until Keyword Succeeds 120s 2s
ubuntu6b6e7d42020-03-02 12:35:42 -0800262 ... Verify ONU Port Is Enabled ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port}
Suchitra Vemuri5994cd12019-12-17 22:20:55 -0800263 Disable Device ${onu_device_id}
Suchitra Vemuri04245f72020-01-08 16:43:24 -0800264 Sleep 5s
ubuntu6b6e7d42020-03-02 12:35:42 -0800265 Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command ${ONOS_SSH_IP}
Suchitra Vemuri5994cd12019-12-17 22:20:55 -0800266 ... ${ONOS_SSH_PORT} volt-remove-subscriber-access ${of_id} ${onu_port}
Zack Williamsa8fe75a2020-01-10 14:25:27 -0700267 Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure
268 ... Wait Until Keyword Succeeds 60s 2s Check Ping
269 ... False ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']}
270 ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
Suchitra Vemuri5994cd12019-12-17 22:20:55 -0800271 ... ELSE sleep 60s
272 Enable Device ${onu_device_id}
ubuntu6b6e7d42020-03-02 12:35:42 -0800273 Wait Until Keyword Succeeds ${timeout} 2s Verify Eapol Flows Added For ONU ${ONOS_SSH_IP}
Suchitra Vemuri5994cd12019-12-17 22:20:55 -0800274 ... ${ONOS_SSH_PORT} ${onu_port}
Zack Williamsa8fe75a2020-01-10 14:25:27 -0700275 Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure
276 ... Validate Authentication After Reassociate True
277 ... ${src['dp_iface_name']} ${src['ip']} ${src['user']} ${src['pass']}
Suchitra Vemuri5994cd12019-12-17 22:20:55 -0800278 ... ${src['container_type']} ${src['container_name']}
ubuntu6b6e7d42020-03-02 12:35:42 -0800279 Wait Until Keyword Succeeds ${timeout} 2s Verify ONU in AAA-Users ${ONOS_SSH_IP}
Zack Williamsa8fe75a2020-01-10 14:25:27 -0700280 ... ${ONOS_SSH_PORT} ${onu_port}
ubuntu6b6e7d42020-03-02 12:35:42 -0800281 Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command ${ONOS_SSH_IP}
Suchitra Vemuri5994cd12019-12-17 22:20:55 -0800282 ... ${ONOS_SSH_PORT} volt-add-subscriber-access ${of_id} ${onu_port}
283 Sleep 10s
Hardik Windlass21807632020-04-14 16:24:55 +0530284 # Verify subscriber access flows are added for the ONU port
285 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s
286 ... Verify Subscriber Access Flows Added For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id}
287 ... ${onu_port} ${nni_port} ${src['c_tag']} ${src['s_tag']}
Suchitra Vemuri5994cd12019-12-17 22:20:55 -0800288 Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Validate DHCP and Ping True
Andy Bavier08ae5852019-12-19 09:12:42 -0700289 ... True ${src['dp_iface_name']} ${src['s_tag']} ${src['c_tag']} ${dst['dp_iface_ip_qinq']}
Suchitra Vemuri5994cd12019-12-17 22:20:55 -0800290 ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
291 ... ${dst['dp_iface_name']} ${dst['ip']} ${dst['user']} ${dst['pass']} ${dst['container_type']}
292 ... ${dst['container_name']}
293 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s
ubuntu6b6e7d42020-03-02 12:35:42 -0800294 ... Validate Subscriber DHCP Allocation ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port}
Suchitra Vemuri5994cd12019-12-17 22:20:55 -0800295 Run Keyword and Ignore Error Collect Logs
suraj gourd5cfdbb2019-12-13 12:44:55 +0000296 END
suraj gourd5cfdbb2019-12-13 12:44:55 +0000297
Suchitra Vemuri937cd392020-01-12 17:10:42 -0800298Delete OLT, ReAdd OLT and Perform Sanity Test
299 [Documentation] Validates E2E Ping Connectivity and object states for the given scenario:
300 ... Disable and Delete the OLT
301 ... Create/Enable the same OLT again
302 ... Validate authentication/DHCP/E2E pings succeed for all the ONUs connected to the OLT
Suchitra Vemuria7dae322020-02-19 22:38:18 -0800303 [Tags] functional DeleteOLT released
Andy Baviere187eda2020-04-20 15:00:02 -0700304 [Setup] Start Logging DeleteOLT
Andy Bavier4a8450e2020-02-04 08:58:37 -0700305 [Teardown] Run Keywords Collect Logs
Andy Bavierabeba262020-02-07 16:22:16 -0700306 ... AND Stop Logging DeleteOLT
Suchitra Vemuri937cd392020-01-12 17:10:42 -0800307 Run Keyword If ${has_dataplane} Clean Up Linux
Hardik Windlass480f3e22020-04-02 20:14:14 +0530308 Delete Device and Verify
309 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s
310 ... Verify Device Flows Removed ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id}
Suchitra Vemuri937cd392020-01-12 17:10:42 -0800311 Run Keyword and Ignore Error Collect Logs
312 # Recreate the OLT
Hardik Windlass480f3e22020-04-02 20:14:14 +0530313 Setup
Suchitra Vemuri937cd392020-01-12 17:10:42 -0800314 Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test
Suchitra Vemuri937cd392020-01-12 17:10:42 -0800315
Hema567f3012020-03-25 00:51:53 +0530316Check Mib State on OLT recreation after ONU, OLT deletion
317 [Documentation] Assuming that test1 was executed where all the ONUs are authenticated/DHCP/pingable,
318 ... Disable and Delete the ONU, Disable and Delete the OLT
319 ... Create/Enable the OLT again and Check for the Mib State of the ONUs
320 [Tags] functional CheckMibState notready
Andy Baviere187eda2020-04-20 15:00:02 -0700321 [Setup] Start Logging CheckMibState
Hema567f3012020-03-25 00:51:53 +0530322 [Teardown] Run Keywords Collect Logs
323 ... AND Stop Logging CheckMibState
Hema567f3012020-03-25 00:51:53 +0530324 #Disable and Delete the ONU
325 FOR ${I} IN RANGE 0 ${num_onus}
326 ${src}= Set Variable ${hosts.src[${I}]}
327 ${dst}= Set Variable ${hosts.dst[${I}]}
328 ${onu_device_id}= Get Device ID From SN ${src['onu']}
329 ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']}
330 ... ${of_id}
331 Disable Device ${onu_device_id}
332 Wait Until Keyword Succeeds 20s 2s Test Devices Disabled in VOLTHA Id=${onu_device_id}
333 Delete Device ${onu_device_id}
334 END
335 #Disable and Delete the OLT
Hardik Windlass480f3e22020-04-02 20:14:14 +0530336 Delete Device and Verify
337 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s
338 ... Verify Device Flows Removed ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id}
339 # Recreate the OLT
Hema567f3012020-03-25 00:51:53 +0530340 Run Keyword If ${has_dataplane} Sleep 180s
341 ${olt_device_id}= Create Device ${olt_ip} ${OLT_PORT}
342 Set Suite Variable ${olt_device_id}
343 Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Device PREPROVISIONED
344 ... UNKNOWN UNKNOWN ${olt_device_id}
345 Enable Device ${olt_device_id}
346 Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Device ENABLED ACTIVE REACHABLE
347 ... ${olt_serial_number}
348 #Check for the ONU status and ONU Mib State should be "omci-flows-pushed"
349 FOR ${I} IN RANGE 0 ${num_onus}
350 ${src}= Set Variable ${hosts.src[${I}]}
351 ${dst}= Set Variable ${hosts.dst[${I}]}
352 ${onu_device_id}= Get Device ID From SN ${src['onu']}
353 ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']}
354 ... ${of_id}
355 Wait Until Keyword Succeeds ${timeout} 5s Validate Device ENABLED ACTIVE
356 ... REACHABLE ${src['onu']} onu=True onu_reason=omci-flows-pushed
357 END
358
Hema783279b2020-01-22 15:37:37 +0530359Test disable ONUs and OLT then delete ONUs and OLT
360 [Documentation] On deployed POD, disable the ONU, disable the OLT and then delete ONU and OLT.
361 ... This TC is to confirm that ONU removal is not impacting OLT
362 ... Devices will be removed during the execution of this TC
363 ... so calling setup at the end to add the devices back to avoid the confusion.
Suchitra Vemuria7dae322020-02-19 22:38:18 -0800364 [Tags] functional VOL-2354 DisableDeleteONUandOLT released
Andy Baviere187eda2020-04-20 15:00:02 -0700365 [Setup] Start Logging DisableDeleteONUandOLT
Andy Bavier4a8450e2020-02-04 08:58:37 -0700366 [Teardown] Run Keywords Collect Logs
Andy Bavierabeba262020-02-07 16:22:16 -0700367 ... AND Stop Logging DisableDeleteONUandOLT
Suchitra Vemuriba4f3712020-01-24 16:18:26 -0800368 ${olt_device_id}= Get Device ID From SN ${olt_serial_number}
Hema783279b2020-01-22 15:37:37 +0530369 FOR ${I} IN RANGE 0 ${num_onus}
370 ${src}= Set Variable ${hosts.src[${I}]}
371 ${dst}= Set Variable ${hosts.dst[${I}]}
372 ${onu_device_id}= Get Device ID From SN ${src['onu']}
Suchitra Vemuri014b6032020-02-14 18:13:13 -0800373 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s
374 ... Validate Device ENABLED ACTIVE
Hema783279b2020-01-22 15:37:37 +0530375 ... REACHABLE ${src['onu']} onu=True onu_reason=omci-flows-pushed
Suchitra Vemuri014b6032020-02-14 18:13:13 -0800376 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s
377 ... Validate OLT Device ENABLED ACTIVE
Hema783279b2020-01-22 15:37:37 +0530378 ... REACHABLE ${olt_serial_number}
379 ${rc} ${output}= Run and Return Rc and Output
380 ... ${VOLTCTL_CONFIG}; voltctl device disable ${onu_device_id}
381 Should Be Equal As Integers ${rc} 0
Suchitra Vemuri014b6032020-02-14 18:13:13 -0800382 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s
383 ... Validate Device DISABLED UNKNOWN
Hema783279b2020-01-22 15:37:37 +0530384 ... REACHABLE ${src['onu']} onu=false
Suchitra Vemuri014b6032020-02-14 18:13:13 -0800385 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s
386 ... Validate OLT Device ENABLED ACTIVE
Hema783279b2020-01-22 15:37:37 +0530387 ... REACHABLE ${olt_serial_number}
388 END
389 ${rc} ${output}= Run and Return Rc and Output ${VOLTCTL_CONFIG}; voltctl device disable ${olt_device_id}
390 Should Be Equal As Integers ${rc} 0
Suchitra Vemuri014b6032020-02-14 18:13:13 -0800391 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s
392 ... Validate OLT Device DISABLED UNKNOWN REACHABLE
Hema783279b2020-01-22 15:37:37 +0530393 ... ${olt_serial_number}
394 FOR ${I} IN RANGE 0 ${num_onus}
395 ${src}= Set Variable ${hosts.src[${I}]}
396 ${dst}= Set Variable ${hosts.dst[${I}]}
397 ${onu_device_id}= Get Device ID From SN ${src['onu']}
Suchitra Vemuri014b6032020-02-14 18:13:13 -0800398 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s
399 ... Validate Device DISABLED DISCOVERED
400 ... UNREACHABLE ${src['onu']} onu=false
Hardik Windlass7da42ca2020-03-13 14:25:44 +0530401 Delete Device ${onu_device_id}
Suchitra Vemuri014b6032020-02-14 18:13:13 -0800402 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s
403 ... Validate OLT Device DISABLED UNKNOWN
Hema783279b2020-01-22 15:37:37 +0530404 ... REACHABLE ${olt_serial_number}
405 END
Hardik Windlass7da42ca2020-03-13 14:25:44 +0530406 Delete Device ${olt_device_id}
Suchitra Vemuri014b6032020-02-14 18:13:13 -0800407 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s Test Empty Device List
Hardik Windlass480f3e22020-04-02 20:14:14 +0530408 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s
409 ... Verify Device Flows Removed ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id}
David Bainbridgef81cd642019-11-20 00:14:47 +0000410
Suchitra Vemuri9a6dd6d2020-02-28 17:46:26 -0800411Validate authentication on a disabled ONU
suraj gour472da1c2020-02-25 05:44:51 +0000412 [Documentation] Assuming that test1 was executed where all the ONUs are authenticated/DHCP/pingable
413 ... Perform disable on the ONUs and validate that the authentication do not succeed
414 ... Perform enable on the ONUs and validate that authentication successful
Suchitra Vemurif7a033c2020-02-26 17:22:41 -0800415 [Tags] functional DisableONU_AuthCheck
416 # Creates Devices in the Setup
Andy Baviere187eda2020-04-20 15:00:02 -0700417 [Setup] Run Keywords Start Logging DisableONU_AuthCheck
Suchitra Vemurif7a033c2020-02-26 17:22:41 -0800418 ... AND Setup
419 [Teardown] Run Keywords Collect Logs
420 ... AND Stop Logging DisableONU_AuthCheck
Suchitra Vemurif7a033c2020-02-26 17:22:41 -0800421 ... AND Delete Device and Verify
422 Run Keyword and Ignore Error Collect Logs
423 Run Keyword If ${has_dataplane} Clean Up Linux
424 Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test
425 Clean WPA Process
suraj gour472da1c2020-02-25 05:44:51 +0000426 FOR ${I} IN RANGE 0 ${num_onus}
427 ${src}= Set Variable ${hosts.src[${I}]}
428 ${dst}= Set Variable ${hosts.dst[${I}]}
Suchitra Vemurif7a033c2020-02-26 17:22:41 -0800429 Run Keyword and Ignore Error Collect Logs
suraj gour472da1c2020-02-25 05:44:51 +0000430 ${onu_device_id}= Get Device ID From SN ${src['onu']}
431 ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']}
432 ... ${of_id}
433 Disable Device ${onu_device_id}
434 Wait Until Keyword Succeeds ${timeout} 5s Validate Device DISABLED UNKNOWN
435 ... REACHABLE ${src['onu']} onu=false
Andy Bavier84834d42020-02-25 13:49:50 -0700436 ${wpa_log}= Run Keyword If ${has_dataplane} Catenate SEPARATOR=.
437 ... /tmp/wpa ${src['dp_iface_name']} log
Suchitra Vemurif7a033c2020-02-26 17:22:41 -0800438 Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Validate Authentication False
439 ... ${src['dp_iface_name']} wpa_supplicant.conf ${src['ip']} ${src['user']} ${src['pass']}
Andy Bavier84834d42020-02-25 13:49:50 -0700440 ... ${src['container_type']} ${src['container_name']} ${wpa_log}
Suchitra Vemurif7a033c2020-02-26 17:22:41 -0800441 Enable Device ${onu_device_id}
442 Run Keyword And Ignore Error Kill Linux Process [w]pa_supplicant ${src['ip']}
443 ... ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
444 Run Keyword and Ignore Error Collect Logs
445 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s Validate Device
446 ... ENABLED ACTIVE REACHABLE ${src['onu']} onu=True onu_reason=omci-flows-pushed
447 Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Validate Authentication True
448 ... ${src['dp_iface_name']} wpa_supplicant.conf ${src['ip']} ${src['user']} ${src['pass']}
Andy Bavier84834d42020-02-25 13:49:50 -0700449 ... ${src['container_type']} ${src['container_name']} ${wpa_log}
suraj gour472da1c2020-02-25 05:44:51 +0000450 Run Keyword and Ignore Error Get Device Output from Voltha ${onu_device_id}
451 END
452 Run Keyword and Ignore Error Collect Logs
453
Gayathri.Selvan92d16862020-03-19 14:47:58 +0000454Data plane verification using TCP
455 [Documentation] Test bandwidth profile is met and not exceeded for each subscriber.
456 ... Assumes iperf3 and jq installed on client and iperf -s running on DHCP server
457 [Tags] dataplane BW-profile-TCP VOL-2052
458 [Setup] None
459 [Teardown] None
460 Pass Execution If '${has_dataplane}'=='False' Bandwidth profile validation can be done only in
461 ... physical pod. Skipping this test in BBSIM.
462 FOR ${I} IN RANGE 0 ${num_onus}
463 ${src}= Set Variable ${hosts.src[${I}]}
464 ${dst}= Set Variable ${hosts.dst[${I}]}
465 ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']}
466 ... ${of_id}
467 ${subscriber_id}= Set Variable ${of_id}/${onu_port}
468 ${bandwidth_profile_name} Get Bandwidth Profile Name For Given Subscriber ${subscriber_id}
469 ... upstreamBandwidthProfile
470 ${limiting_bw_value_upstream} Get Bandwidth Details ${bandwidth_profile_name}
471 ${bandwidth_profile_name} Get Bandwidth Profile Name For Given Subscriber ${subscriber_id}
472 ... downstreamBandwidthProfile
473 ${limiting_bw_value_dnstream} Get Bandwidth Details ${bandwidth_profile_name}
474
475 # Stream TCP packets from RG to server
476 ${updict}= Run Iperf3 Test Client ${src} server=${dst['dp_iface_ip_qinq']}
477 ... args=-t 30
478 ${actual_upstream_bw_used}= Evaluate ${updict['end']['sum_received']['bits_per_second']}/1000
479
480 # Stream TCP packets from server to RG
481 ${dndict}= Run Iperf3 Test Client ${src} server=${dst['dp_iface_ip_qinq']}
482 ... args=-R -t 30
483 ${actual_dnstream_bw_used}= Evaluate ${dndict['end']['sum_received']['bits_per_second']}/1000
484
485 ${pct_limit_up}= Evaluate 100*${actual_upstream_bw_used}/${limiting_bw_value_upstream}
486 ${pct_limit_dn}= Evaluate 100*${actual_dnstream_bw_used}/${limiting_bw_value_dnstream}
487 Log Up: bwprof ${limiting_bw_value_upstream}Kbps, got ${actual_upstream_bw_used}Kbps (${pct_limit_up}%)
488 Log Down: bwprof ${limiting_bw_value_dnstream}Kbps, got ${actual_dnstream_bw_used}Kbps (${pct_limit_dn}%)
489
490 Should Be True ${pct_limit_up} <= ${upper_margin_pct}
491 ... The upstream bandwidth exceeded the limit (${pct_limit_up}% of limit)
492 Should Be True ${pct_limit_dn} <= ${upper_margin_pct}
493 ... The downstream bandwidth exceeded the limit (${pct_limit_dn}% of limit)
494 Should Be True ${pct_limit_up} >= ${lower_margin_pct}
495 ... The upstream bandwidth guarantee was not met (${pct_limit_up}% of resv)
496 Should Be True ${pct_limit_dn} >= ${lower_margin_pct}
497 ... The downstream bandwidth guarantee was not met (${pct_limit_dn}% of resv)
498 END
499
500Data plane verification using UDP
501 [Documentation] Test bandwidth profile is met and not exceeded for each subscriber.
502 ... Assumes iperf3 and jq installed on client and iperf -s running on DHCP server
503 [Tags] dataplane BW-profile-UDP VOL-2052
504 [Setup] None
505 [Teardown] None
506 Pass Execution If '${has_dataplane}'=='False' Bandwidth profile validation can be done only in
507 ... physical pod. Skipping this test in BBSIM.
508 FOR ${I} IN RANGE 0 ${num_onus}
509 ${src}= Set Variable ${hosts.src[${I}]}
510 ${dst}= Set Variable ${hosts.dst[${I}]}
511 ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']}
512 ... ${of_id}
513 ${subscriber_id}= Set Variable ${of_id}/${onu_port}
514 ${bandwidth_profile_name} Get Bandwidth Profile Name For Given Subscriber ${subscriber_id}
515 ... upstreamBandwidthProfile
516 ${limiting_bw_value_upstream} Get Bandwidth Details ${bandwidth_profile_name}
517 ${bandwidth_profile_name} Get Bandwidth Profile Name For Given Subscriber ${subscriber_id}
518 ... downstreamBandwidthProfile
519 ${limiting_bw_value_dnstream} Get Bandwidth Details ${bandwidth_profile_name}
520
521 # Stream UDP packets from RG to server
522 ${uprate}= Evaluate ${limiting_bw_value_upstream}*${udp_rate_multiplier}
523 ${updict}= Run Iperf3 Test Client ${src} server=${dst['dp_iface_ip_qinq']}
524 ... args=-u -b ${uprate}K -t 30 -l ${udp_packet_bytes}
525 # With UDP test, bits per second is the sending rate. Multiply by the loss rate to get the throughput.
526 ${actual_upstream_bw_used}= Evaluate
527 ... (100 - ${updict['end']['sum']['lost_percent']})*${updict['end']['sum']['bits_per_second']}/100000
528
529 # Stream UDP packets from server to RG
530 ${dnrate}= Evaluate ${limiting_bw_value_dnstream}*${udp_rate_multiplier}
531 ${dndict}= Run Iperf3 Test Client ${src} server=${dst['dp_iface_ip_qinq']}
532 ... args=-u -b ${dnrate}K -R -t 30 -l ${udp_packet_bytes}
533 # With UDP test, bits per second is the sending rate. Multiply by the loss rate to get the throughput.
534 ${actual_dnstream_bw_used}= Evaluate
535 ... (100 - ${dndict['end']['sum']['lost_percent']})*${dndict['end']['sum']['bits_per_second']}/100000
536
537 ${pct_limit_up}= Evaluate 100*${actual_upstream_bw_used}/${limiting_bw_value_upstream}
538 ${pct_limit_dn}= Evaluate 100*${actual_dnstream_bw_used}/${limiting_bw_value_dnstream}
539 Log Up: bwprof ${limiting_bw_value_upstream}Kbps, got ${actual_upstream_bw_used}Kbps (${pct_limit_up}%)
540 Log Down: bwprof ${limiting_bw_value_dnstream}Kbps, got ${actual_dnstream_bw_used}Kbps (${pct_limit_dn}%)
541
542 Should Be True ${pct_limit_up} <= ${upper_margin_pct}
543 ... The upstream bandwidth exceeded the limit (${pct_limit_up}% of limit)
544 Should Be True ${pct_limit_dn} <= ${upper_margin_pct}
545 ... The downstream bandwidth exceeded the limit (${pct_limit_dn}% of limit)
546 Should Be True ${pct_limit_up} >= ${lower_margin_pct}
547 ... The upstream bandwidth guarantee was not met (${pct_limit_up}% of resv)
548 Should Be True ${pct_limit_dn} >= ${lower_margin_pct}
549 ... The downstream bandwidth guarantee was not met (${pct_limit_dn}% of resv)
550 END
Suchitra Vemurif7a033c2020-02-26 17:22:41 -0800551
Suchitra Vemuri65cd65f2019-08-30 14:39:22 -0700552*** Keywords ***
553Setup Suite
Andy Bavier88cd9f62019-11-26 16:22:33 -0700554 [Documentation] Set up the test suite
555 Common Test Suite Setup
Suchitra Vemuri65cd65f2019-08-30 14:39:22 -0700556
David Bainbridgef81cd642019-11-20 00:14:47 +0000557Clear All Devices Then Create New Device
558 [Documentation] Remove any devices from VOLTHA and ONOS
David Bainbridgef81cd642019-11-20 00:14:47 +0000559 # Remove all devices from voltha and nos
560 Delete All Devices and Verify
David Bainbridgef81cd642019-11-20 00:14:47 +0000561 # Execute normal test Setup Keyword
562 Setup
563