blob: 4f183f580e5662f2763583ad4273e1f67c102500 [file] [log] [blame]
Hardik Windlassa3d04b92020-02-17 15:06:05 +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.
14# FIXME Can we use the same test against BBSim and Hardware?
15
16*** Settings ***
17Documentation Test various end-to-end scenarios
18Suite Setup Setup Suite
19Test Setup Setup
20Test Teardown Teardown
21Suite Teardown Teardown Suite
22Library Collections
23Library String
24Library OperatingSystem
25Library XML
26Library RequestsLibrary
27Library ../../libraries/DependencyLibrary.py
28Resource ../../libraries/onos.robot
29Resource ../../libraries/voltctl.robot
30Resource ../../libraries/voltha.robot
31Resource ../../libraries/utils.robot
32Resource ../../libraries/k8s.robot
33Resource ../../variables/variables.robot
Suchitra Vemuri1d8e8172020-06-17 17:43:56 -070034Resource ../../libraries/power_switch.robot
Hardik Windlassa3d04b92020-02-17 15:06:05 +000035
36*** Variables ***
37${POD_NAME} flex-ocp-cord
38${KUBERNETES_CONF} ${KUBERNETES_CONFIGS_DIR}/${POD_NAME}.conf
39${KUBERNETES_CONFIGS_DIR} ~/pod-configs/kubernetes-configs
40#${KUBERNETES_CONFIGS_DIR} ${KUBERNETES_CONFIGS_DIR}/${POD_NAME}.conf
41${KUBERNETES_YAML} ${KUBERNETES_CONFIGS_DIR}/${POD_NAME}.yml
42${HELM_CHARTS_DIR} ~/helm-charts
43${VOLTHA_POD_NUM} 8
44${NAMESPACE} voltha
45# 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
Suchitra Vemurie9c6ca62020-07-27 16:44:53 -070048${timeout} 360s
Hardik Windlassa3d04b92020-02-17 15:06:05 +000049${of_id} 0
50${logical_id} 0
Andrea Campanella86e24062020-08-05 19:09:18 +020051${uprate} 0
52${dnrate} 0
Hardik Windlassa3d04b92020-02-17 15:06:05 +000053${has_dataplane} True
Hardik Windlassffbf0602020-04-24 23:14:45 +053054${teardown_device} True
Hardik Windlassa3d04b92020-02-17 15:06:05 +000055${scripts} ../../scripts
56
Andy Baviere19991a2020-05-08 10:42:40 -070057# For dataplane bandwidth testing
58${upper_margin_pct} 105 # Allow 5% over the limit
Suchitra Vemuria6879aa2020-11-03 11:03:11 -080059${lower_margin_pct} 90 # Allow 8% under the limit
Andy Baviere19991a2020-05-08 10:42:40 -070060${udp_rate_multiplier} 1.10 # Send UDP at bw profile limit * rate_multiplier
Andy Bavierc80a2742020-08-28 10:59:05 -070061${udp_packet_bytes} 1470 # UDP payload in bytes
Andy Baviere19991a2020-05-08 10:42:40 -070062
Hardik Windlassa3d04b92020-02-17 15:06:05 +000063# Per-test logging on failure is turned off by default; set this variable to enable
64${container_log_dir} ${None}
65
66*** Test Cases ***
Suchitra Vemuri1d8e8172020-06-17 17:43:56 -070067Reboot DT ONUs Physically
68 [Documentation] This test reboots ONUs physically before execution all the tests
69 ... Test case runs only on the PODs that are configured with PowerSwitch that
70 ... controls the power off/on ONUs/OLT remotely (simulating a physical reboot)
Hardik Windlassd6aa0822020-06-29 20:18:12 +053071 [Tags] functionalDt PowerSwitch RebootAllDTONUs
Suchitra Vemuri1d8e8172020-06-17 17:43:56 -070072 [Setup] Start Logging RebootAllDTONUs
73 [Teardown] Run Keywords Collect Logs
74 ... AND Stop Logging RebootAllDTONUs
75 Power Switch Connection Suite ${web_power_switch.ip} ${web_power_switch.user} ${web_power_switch.password}
Suchitra Vemuria6879aa2020-11-03 11:03:11 -080076 FOR ${I} IN RANGE 0 ${num_all_onus}
Suchitra Vemuri1d8e8172020-06-17 17:43:56 -070077 ${src}= Set Variable ${hosts.src[${I}]}
78 ${dst}= Set Variable ${hosts.dst[${I}]}
79 Disable Switch Outlet ${src['power_switch_port']}
80 Sleep 60s
81 Enable Switch Outlet ${src['power_switch_port']}
82 Sleep 60s
83 END
84
Hardik Windlassa3d04b92020-02-17 15:06:05 +000085Sanity E2E Test for OLT/ONU on POD for DT
86 [Documentation] Validates E2E Ping Connectivity and object states for the given scenario:
87 ... Validate successful DHCP/E2E ping (no EAPOL and DHCP flows) for the tech profile that is used
88 ... Traffic sent with same vlan from different RGs,
89 ... should reach the NNI port on the OLT with the expected double tagged vlan ids
90 ... Inner vlans from the RG should not change
Suchitra Vemurif2388ad2020-03-15 21:44:44 -070091 [Tags] sanityDt
Andy Baviere187eda2020-04-20 15:00:02 -070092 [Setup] Run Keywords Start Logging SanityTestDt
Hardik Windlassa3d04b92020-02-17 15:06:05 +000093 ... AND Setup
94 [Teardown] Run Keywords Collect Logs
95 ... AND Stop Logging SanityTestDt
Hardik Windlassa3d04b92020-02-17 15:06:05 +000096 Run Keyword If ${has_dataplane} Clean Up Linux
97 Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test DT
98
Hardik Windlass35706ba2020-02-20 08:16:42 +000099Test Subscriber Delete and Add for DT
100 [Documentation] Validates E2E Ping Connectivity and object states for the given scenario:
Hardik Windlass63d5e002020-03-06 21:07:09 +0530101 ... Assuming that all the ONUs are DHCP/pingable (i.e. assuming sanityDt test was executed)
Hardik Windlass35706ba2020-02-20 08:16:42 +0000102 ... Delete a subscriber and validate that the pings do not succeed and state is purged
103 ... Disable and Enable the ONU (This is to replicate the existing DT behaviour)
104 ... Re-add the subscriber, and validate that the flows are present and pings are successful
Suchitra Vemurif2388ad2020-03-15 21:44:44 -0700105 [Tags] functionalDt SubAddDeleteDt
Andy Baviere187eda2020-04-20 15:00:02 -0700106 [Setup] Start Logging SubAddDeleteDt
Hardik Windlass35706ba2020-02-20 08:16:42 +0000107 [Teardown] Run Keywords Collect Logs
108 ... AND Stop Logging SubAddDeleteDt
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800109 FOR ${I} IN RANGE 0 ${num_all_onus}
Hardik Windlass35706ba2020-02-20 08:16:42 +0000110 ${src}= Set Variable ${hosts.src[${I}]}
111 ${dst}= Set Variable ${hosts.dst[${I}]}
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800112 ${of_id}= Get ofID From OLT List ${src['olt']}
Hardik Windlass35706ba2020-02-20 08:16:42 +0000113 ${onu_device_id}= Get Device ID From SN ${src['onu']}
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800114 ${olt_device_id}= Get OLTDeviceID From OLT List ${src['olt']}
Andrea Campanellad848de02020-11-24 10:23:41 +0100115 ${num_of_olt_onus}= Get Num of Onus From OLT SN ${src['olt']}
Hardik Windlass35706ba2020-02-20 08:16:42 +0000116 ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']}
117 ... ${of_id}
118 # Remove Subscriber Access
ubuntu6b6e7d42020-03-02 12:35:42 -0800119 Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command ${ONOS_SSH_IP}
Hardik Windlass35706ba2020-02-20 08:16:42 +0000120 ... ${ONOS_SSH_PORT} volt-remove-subscriber-access ${of_id} ${onu_port}
121 Sleep 10s
Hardik Windlass35706ba2020-02-20 08:16:42 +0000122 Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure
123 ... Wait Until Keyword Succeeds 60s 2s
124 ... Check Ping False ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']}
125 ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
Andrea Campanellad848de02020-11-24 10:23:41 +0100126
Hardik Windlassfb5eace2020-03-26 14:49:01 +0530127 # Number of Access Flows on ONOS equals 4 * the Number of Active ONUs (2 for each downstream and upstream)
Andrea Campanellad848de02020-11-24 10:23:41 +0100128 ${onos_flows_count}= Evaluate 4 * ( ${num_of_olt_onus} - 1 )
Hardik Windlassfb5eace2020-03-26 14:49:01 +0530129 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s
130 ... Verify Subscriber Access Flows Added Count DT ${ONOS_SSH_IP} ${ONOS_SSH_PORT}
Suchitra Vemuri93db32b2020-11-23 21:27:05 -0800131 ... ${of_id} ${onos_flows_count}
Hardik Windlass35706ba2020-02-20 08:16:42 +0000132 # Verify VOLTHA flows for OLT equals twice the number of ONUS (minus ONU under test) + 1 for LLDP
Andrea Campanellad848de02020-11-24 10:23:41 +0100133 ${olt_flows}= Evaluate 2 * ( ${num_of_olt_onus} - 1 ) + 1
Hardik Windlass35706ba2020-02-20 08:16:42 +0000134 Run Keyword Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Flows ${olt_flows}
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800135 ... ${olt_device_id}
Hardik Windlass35706ba2020-02-20 08:16:42 +0000136 # Verify VOLTHA flows for ONU under test is Zero
137 Run Keyword Wait Until Keyword Succeeds ${timeout} 5s Validate Device Flows
138 ... ${onu_device_id} 0
139 # Disable and Re-Enable the ONU (To replicate DT current workflow)
140 # TODO: Delete and Auto-Discovery Add of ONU (not yet supported)
141 Disable Device ${onu_device_id}
142 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s
143 ... Validate Device DISABLED UNKNOWN
144 ... REACHABLE ${src['onu']}
145 Enable Device ${onu_device_id}
Suchitra Vemuricdc32d82020-07-17 12:24:46 -0700146 Run Keyword And Continue On Failure Wait Until Keyword Succeeds 360s 5s
Hardik Windlass35706ba2020-02-20 08:16:42 +0000147 ... Validate Device ENABLED ACTIVE
148 ... REACHABLE ${src['onu']}
149 # Add Subscriber Access
ubuntu6b6e7d42020-03-02 12:35:42 -0800150 Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command ${ONOS_SSH_IP}
Hardik Windlass35706ba2020-02-20 08:16:42 +0000151 ... ${ONOS_SSH_PORT} volt-add-subscriber-access ${of_id} ${onu_port}
152 Sleep 10s
Hardik Windlassfb5eace2020-03-26 14:49:01 +0530153 # Verify subscriber access flows are added for the ONU port
154 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s
Hardik Windlass25e11702020-03-30 20:05:19 +0530155 ... Verify Subscriber Access Flows Added For ONU DT ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id}
156 ... ${onu_port} ${nni_port} ${src['s_tag']}
Suchitra Vemuricdc32d82020-07-17 12:24:46 -0700157 Run Keyword And Continue On Failure Wait Until Keyword Succeeds 360s 5s
Hardik Windlass35706ba2020-02-20 08:16:42 +0000158 ... Validate Device ENABLED ACTIVE
159 ... REACHABLE ${src['onu']} onu=True onu_reason=omci-flows-pushed
Hardik Windlassfb5eace2020-03-26 14:49:01 +0530160 # TODO: Yet to Verify on the GPON based Physical POD (VOL-2652)
Hardik Windlass35706ba2020-02-20 08:16:42 +0000161 Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure
162 ... Wait Until Keyword Succeeds 60s 2s
163 ... Check Ping True ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']}
164 ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
Hardik Windlass35706ba2020-02-20 08:16:42 +0000165 END
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800166 # Verify flows for all OLTs
167 Run Keyword Wait Until Keyword Succeeds ${timeout} 5s Validate All OLT Flows
Hardik Windlass35706ba2020-02-20 08:16:42 +0000168
Hardik Windlass63d5e002020-03-06 21:07:09 +0530169Test Disable and Enable ONU for DT
170 [Documentation] Validates E2E Ping Connectivity and object states for the given scenario:
171 ... Assuming that all the ONUs are DHCP/pingable (i.e. assuming sanityDt test was executed)
172 ... Perform disable on the ONUs and validate that the pings do not succeed
173 ... Perform enable on the ONUs and validate that the pings are successful
Suchitra Vemurif2388ad2020-03-15 21:44:44 -0700174 [Tags] functionalDt DisableEnableONUDt
Andy Baviere187eda2020-04-20 15:00:02 -0700175 [Setup] Start Logging DisableEnableONUDt
Hardik Windlass63d5e002020-03-06 21:07:09 +0530176 [Teardown] Run Keywords Collect Logs
177 ... AND Stop Logging DisableEnableONUDt
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800178 FOR ${I} IN RANGE 0 ${num_all_onus}
Hardik Windlass63d5e002020-03-06 21:07:09 +0530179 ${src}= Set Variable ${hosts.src[${I}]}
180 ${dst}= Set Variable ${hosts.dst[${I}]}
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800181 ${of_id}= Get ofID From OLT List ${src['olt']}
Hardik Windlass63d5e002020-03-06 21:07:09 +0530182 ${onu_device_id}= Get Device ID From SN ${src['onu']}
183 ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']}
184 ... ${of_id}
185 Disable Device ${onu_device_id}
186 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s
187 ... Validate Device DISABLED UNKNOWN
188 ... REACHABLE ${src['onu']} onu=True onu_reason=omci-admin-lock
189 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s
Suchitra Vemuri760bdd32020-06-17 12:34:48 -0700190 ... Verify ONU Port Is Disabled ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${src['onu']}
Hardik Windlassfb5eace2020-03-26 14:49:01 +0530191 # TODO: Yet to Verify on the GPON based Physical POD (VOL-2652)
Hardik Windlass63d5e002020-03-06 21:07:09 +0530192 Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure
193 ... Wait Until Keyword Succeeds 60s 2s
194 ... Check Ping False ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']}
195 ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
196 Sleep 5s
197 Enable Device ${onu_device_id}
Suchitra Vemuricdc32d82020-07-17 12:24:46 -0700198 Run Keyword And Continue On Failure Wait Until Keyword Succeeds 360s 5s
Hardik Windlass63d5e002020-03-06 21:07:09 +0530199 ... Validate Device ENABLED ACTIVE
200 ... REACHABLE ${src['onu']} onu=True onu_reason=onu-reenabled
201 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s
Suchitra Vemuri760bdd32020-06-17 12:34:48 -0700202 ... Verify ONU Port Is Enabled ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${src['onu']}
Hardik Windlassfb5eace2020-03-26 14:49:01 +0530203 # TODO: Yet to Verify on the GPON based Physical POD (VOL-2652)
Hardik Windlass63d5e002020-03-06 21:07:09 +0530204 Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure
205 ... Wait Until Keyword Succeeds 60s 2s
206 ... Check Ping True ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']}
207 ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
Hardik Windlass63d5e002020-03-06 21:07:09 +0530208 END
209
Hardik Windlassaaea3402020-03-10 19:45:45 +0530210Test Disable and Delete OLT for DT
211 [Documentation] Validates E2E Ping Connectivity and object states for the given scenario:
212 ... Assuming that all the ONUs are DHCP/pingable (i.e. assuming sanityDt test was executed)
213 ... Perform disable on the OLT and validate ONUs state and that the pings do not succeed
214 ... Perform delete on the OLT, Re-do Setup (Recreate the OLT) and Perform Sanity Test DT
Suchitra Vemurif2388ad2020-03-15 21:44:44 -0700215 [Tags] functionalDt DisableDeleteOLTDt
Suchitra Vemuri221398a2020-05-29 22:45:17 -0700216 [Setup] Start Logging DisableDeleteOLTDt
Hardik Windlassaaea3402020-03-10 19:45:45 +0530217 [Teardown] Run Keywords Collect Logs
218 ... AND Stop Logging DisableDeleteOLTDt
Hardik Windlassaaea3402020-03-10 19:45:45 +0530219 # Disable and Validate OLT Device
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800220 FOR ${I} IN RANGE 0 ${olt_count}
221 ${olt_serial_number}= Get From Dictionary ${olt_ids}[${I}] sn
222 ${olt_device_id}= Get OLTDeviceID From OLT List ${olt_serial_number}
223 Disable Device ${olt_device_id}
224 ${of_id}= Get ofID From OLT List ${olt_serial_number}
225 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s
226 ... Validate OLT Device DISABLED UNKNOWN REACHABLE
227 ... ${olt_serial_number}
228 Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Device DISABLED UNKNOWN REACHABLE
229 ... ${olt_serial_number}
230 ${num_onus}= Set Variable ${list_olts}[${I}][onucount]
231 # Validate ONUs
232 Run Keyword Wait Until Keyword Succeeds ${timeout} 5s Validate ONUs After OLT Disable
Andrea Campanella4e507882020-11-26 11:33:11 +0100233 ... ${num_onus} ${olt_serial_number}
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800234 # Verify ONOS Flows
235 # Number of Access Flows on ONOS equals 4 * the Number of Active ONUs (2 for each downstream and upstream)
236 ${onos_flows_count}= Evaluate 4 * ${num_onus}
237 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s
238 ... Verify Subscriber Access Flows Added Count DT ${ONOS_SSH_IP} ${ONOS_SSH_PORT}
239 ... ${of_id} ${onos_flows_count}
240 # Verify VOLTHA Flows
241 # Number of per OLT Flows equals Twice the Number of Active ONUs (each for downstream and upstream) + 1 for LLDP
242 ${olt_flows}= Evaluate 2 * ${num_onus} + 1
243 # Number of per ONU Flows equals 2 (one each for downstream and upstream)
244 ${onu_flows}= Set Variable 2
245 Run Keyword Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Flows ${olt_flows}
246 ... ${olt_device_id}
247 ${List_ONU_Serial} Create List
248 Set Suite Variable ${List_ONU_Serial}
Andrea Campanella99a548b2020-11-18 09:50:32 +0100249 Build ONU SN List ${List_ONU_Serial} ${olt_serial_number} ${num_onus}
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800250 Log ${List_ONU_Serial}
251 Run Keyword Wait Until Keyword Succeeds ${timeout} 5s Validate ONU Flows
252 ... ${List_ONU_Serial} ${onu_flows}
253 # Delete OLT and Validate Empty Device List
254 Delete Device ${olt_device_id}
Andrea Campanella4e507882020-11-26 11:33:11 +0100255 # Check that the OLT and the ONUs are actually removed from the system
256 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s Validate Device Removed
257 ... ${olt_serial_number}
258 Run Keyword and Continue On Failure Validate all ONUS for OLT Removed ${num_all_onus} ${hosts}
259 ... ${olt_serial_number} ${timeout}
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800260 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s
261 ... Verify Device Flows Removed ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id}
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800262 END
Hardik Windlassaaea3402020-03-10 19:45:45 +0530263 # Re-do Setup (Recreate the OLT) and Perform Sanity Test DT
264 Run Keyword Setup
Suchitra Vemuriae9cecb2020-03-12 12:59:14 -0700265 Run Keyword If ${has_dataplane} Clean Up Linux
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800266 Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test DT
267 #Run Keyword If ${has_dataplane} Clean Up Linux
Hardik Windlassaaea3402020-03-10 19:45:45 +0530268
Hardik Windlass3b531fa2020-04-23 18:51:44 +0530269Test Disable and Enable OLT for DT
270 [Documentation] Validates E2E Ping Connectivity and object states for the given scenario:
271 ... Assuming that all the ONUs are DHCP/pingable (i.e. assuming sanityDt test was executed)
272 ... Perform disable on the OLT and validate that the pings do not succeed
273 ... Perform enable on the OLT and validate that the pings are successful
Hardik Windlass2b37e712020-06-12 02:13:17 +0530274 [Tags] functionalDt DisableEnableOLTDt
Hardik Windlass3b531fa2020-04-23 18:51:44 +0530275 [Setup] Start Logging DisableEnableOLTDt
276 [Teardown] Run Keywords Collect Logs
277 ... AND Stop Logging DisableEnableOLTDt
278 # Disable and Validate OLT Device
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800279 FOR ${I} IN RANGE 0 ${olt_count}
280 ${olt_serial_number}= Get From Dictionary ${olt_ids}[${I}] sn
281 ${olt_device_id}= Get OLTDeviceID From OLT List ${olt_serial_number}
282 ${rc} ${output}= Run and Return Rc and Output
283 ... ${VOLTCTL_CONFIG}; voltctl device disable ${olt_device_id}
284 Should Be Equal As Integers ${rc} 0
285 Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Device DISABLED UNKNOWN REACHABLE
286 ... ${olt_serial_number}
287 END
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800288 # Validate ONUs
289 FOR ${I} IN RANGE 0 ${num_all_onus}
Hardik Windlass7c801e62020-05-04 19:33:21 +0530290 ${src}= Set Variable ${hosts.src[${I}]}
291 ${dst}= Set Variable ${hosts.dst[${I}]}
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800292 ${of_id}= Get ofID From OLT List ${src['olt']}
Hardik Windlass7c801e62020-05-04 19:33:21 +0530293 ${onu_device_id}= Get Device ID From SN ${src['onu']}
294 ${onu_port}= Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s
295 ... Get ONU Port in ONOS ${src['onu']} ${of_id}
296 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s
Suchitra Vemuri760bdd32020-06-17 12:34:48 -0700297 ... Verify ONU Port Is Disabled ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${src['onu']}
Hardik Windlass7c801e62020-05-04 19:33:21 +0530298 Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure
299 ... Wait Until Keyword Succeeds 60s 2s
300 ... Check Ping False ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']}
301 ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
302 # Remove Subscriber Access (To replicate DT workflow)
303 Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command ${ONOS_SSH_IP}
304 ... ${ONOS_SSH_PORT} volt-remove-subscriber-access ${of_id} ${onu_port}
Hardik Windlass2b37e712020-06-12 02:13:17 +0530305 Sleep 10s
Hardik Windlass7c801e62020-05-04 19:33:21 +0530306 # Delete ONU Device (To replicate DT workflow)
307 Delete Device ${onu_device_id}
Hardik Windlass2b37e712020-06-12 02:13:17 +0530308 Sleep 5s
Hardik Windlass7c801e62020-05-04 19:33:21 +0530309 END
Hardik Windlass2b37e712020-06-12 02:13:17 +0530310 Sleep 5s
Hardik Windlass3b531fa2020-04-23 18:51:44 +0530311 # Enable the OLT back and check ONU, OLT status are back to "ACTIVE"
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800312 FOR ${I} IN RANGE 0 ${olt_count}
313 ${olt_serial_number}= Get From Dictionary ${olt_ids}[${I}] sn
314 ${olt_device_id}= Get OLTDeviceID From OLT List ${olt_serial_number}
315 Enable Device ${olt_device_id}
316 Sleep 15s
317 Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Device ENABLED ACTIVE REACHABLE
318 ... ${olt_serial_number}
319 #TODO: Update for PON_OLT ETHERNET_NNI
320 #Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Port Types
321 #... PON_OLT ETHERNET_NNI
322 END
Hardik Windlass7c801e62020-05-04 19:33:21 +0530323 # Waiting extra time for the ONUs to come up
324 Sleep 60s
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800325 Run Keyword If ${has_dataplane} Clean Up Linux
Hardik Windlass7c801e62020-05-04 19:33:21 +0530326 Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test DT
Hardik Windlass3b531fa2020-04-23 18:51:44 +0530327
328Test Delete and ReAdd OLT for DT
329 [Documentation] Validates E2E Ping Connectivity and object states for the given scenario:
330 ... Assuming that all the ONUs are DHCP/pingable (i.e. assuming sanityDt test was executed)
331 ... Disable and Delete the OLT
332 ... Create/Enable the same OLT again
333 ... Validate DHCP/E2E pings succeed for all the ONUs connected to the OLT
334 [Tags] functionalDt DeleteReAddOLTDt
335 [Setup] Start Logging DeleteReAddOLTDt
336 [Teardown] Run Keywords Collect Logs
337 ... AND Stop Logging DeleteReAddOLTDt
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800338 FOR ${I} IN RANGE 0 ${olt_count}
339 ${olt_serial_number}= Get From Dictionary ${olt_ids}[${I}] sn
340 ${of_id}= Get ofID From OLT List ${olt_serial_number}
341 Delete Device and Verify ${olt_serial_number}
342 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s
343 ... Verify Device Flows Removed ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id}
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800344 END
345 # Recreate the OLTs
Hardik Windlass3b531fa2020-04-23 18:51:44 +0530346 Setup
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800347 Run Keyword If ${has_dataplane} Clean Up Linux
Hardik Windlass3b531fa2020-04-23 18:51:44 +0530348 Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test DT
349
350Test Disable ONUs and OLT Then Delete ONUs and OLT for DT
351 [Documentation] On deployed POD, disable the ONU, disable the OLT and then delete ONU and OLT.
352 ... This TC is to confirm that ONU removal is not impacting OLT
353 ... Devices will be removed during the execution of this TC
354 ... so calling setup at the end to add the devices back to avoid the confusion.
355 [Tags] functionalDt DisableDeleteONUOLTDt
356 [Setup] Start Logging DisableDeleteONUOLTDt
357 [Teardown] Run Keywords Collect Logs
358 ... AND Stop Logging DisableDeleteONUOLTDt
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800359 FOR ${I} IN RANGE 0 ${num_all_onus}
Hardik Windlass3b531fa2020-04-23 18:51:44 +0530360 ${src}= Set Variable ${hosts.src[${I}]}
361 ${dst}= Set Variable ${hosts.dst[${I}]}
362 ${onu_device_id}= Get Device ID From SN ${src['onu']}
363 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s
364 ... Validate Device ENABLED ACTIVE
365 ... REACHABLE ${src['onu']} onu=True onu_reason=omci-flows-pushed
366 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s
367 ... Validate OLT Device ENABLED ACTIVE
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800368 ... REACHABLE ${src['olt']}
Hardik Windlass3b531fa2020-04-23 18:51:44 +0530369 Disable Device ${onu_device_id}
370 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s
371 ... Validate Device DISABLED UNKNOWN
372 ... REACHABLE ${src['onu']} onu=false
373 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s
374 ... Validate OLT Device ENABLED ACTIVE
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800375 ... REACHABLE ${src['olt']}
Hardik Windlass3b531fa2020-04-23 18:51:44 +0530376 END
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800377 # Disable all OLTs
378 FOR ${I} IN RANGE 0 ${olt_count}
379 ${olt_serial_number}= Get From Dictionary ${olt_ids}[${I}] sn
380 ${olt_device_id}= Get OLTDeviceID From OLT List ${olt_serial_number}
381 ${rc} ${output}= Run and Return Rc and Output
382 ... ${VOLTCTL_CONFIG}; voltctl device disable ${olt_device_id}
383 Should Be Equal As Integers ${rc} 0
384 Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Device DISABLED UNKNOWN REACHABLE
385 ... ${olt_serial_number}
386 END
387 # Validate ONUs after OLT disable
388 FOR ${I} IN RANGE 0 ${num_all_onus}
Hardik Windlass3b531fa2020-04-23 18:51:44 +0530389 ${src}= Set Variable ${hosts.src[${I}]}
390 ${dst}= Set Variable ${hosts.dst[${I}]}
391 ${onu_device_id}= Get Device ID From SN ${src['onu']}
392 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s
393 ... Validate Device DISABLED DISCOVERED
394 ... UNREACHABLE ${src['onu']} onu=false
395 Delete Device ${onu_device_id}
396 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s
397 ... Validate OLT Device DISABLED UNKNOWN
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800398 ... REACHABLE ${src['olt']}
Hardik Windlass3b531fa2020-04-23 18:51:44 +0530399 END
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800400 # Delete all OLTs
401 Delete All Devices and Verify
402
403 #Delete Device ${olt_device_id}
404 #TODO: Fix the following assertion
405 #Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s Test Empty Device List
406 #Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s
407 #... Verify Device Flows Removed ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id}
408
Hardik Windlass3b531fa2020-04-23 18:51:44 +0530409 # Re-do Setup (Recreate the OLT) and Perform Sanity Test DT
410 Run Keyword Setup
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800411 Run Keyword If ${has_dataplane} Clean Up Linux
Hardik Windlass3b531fa2020-04-23 18:51:44 +0530412 Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test DT
Hardik Windlass3b531fa2020-04-23 18:51:44 +0530413
Andy Baviere19991a2020-05-08 10:42:40 -0700414Data plane verification using TCP for DT
415 [Documentation] Test bandwidth profile is met and not exceeded for each subscriber.
416 ... Assumes iperf3 and jq installed on client and iperf -s running on DHCP server
Andy Bavier7613b9a2020-07-08 07:25:47 -0700417 [Tags] dataplaneDt BandwidthProfileTCPDt VOL-3061
Andy Bavierdfbcaef2020-05-27 15:34:18 -0700418 [Setup] Start Logging BandwidthProfileTCPDt
419 [Teardown] Run Keywords Collect Logs
420 ... AND Stop Logging BandwidthProfileTCPDt
Andy Baviere19991a2020-05-08 10:42:40 -0700421 Pass Execution If '${has_dataplane}'=='False' Bandwidth profile validation can be done only in
422 ... physical pod. Skipping this test in BBSIM.
Suchitra Vemuria4e3e072020-11-06 14:23:47 -0800423 Delete All Devices And Verify
424 Run Keyword If ${has_dataplane} Clean Up Linux
425 setup
426 Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test DT
427
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800428 #${of_id}= Wait Until Keyword Succeeds ${timeout} 15s Validate OLT Device in ONOS
429 #... ${olt_serial_number}
430 FOR ${I} IN RANGE 0 ${num_all_onus}
Andy Baviere19991a2020-05-08 10:42:40 -0700431 ${src}= Set Variable ${hosts.src[${I}]}
432 ${dst}= Set Variable ${hosts.dst[${I}]}
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800433 ${of_id}= Get ofID From OLT List ${src['olt']}
Andy Bavierf6ab19c2020-05-14 10:34:47 -0700434 # Check for iperf3 and jq tools
435 ${stdout} ${stderr} ${rc}= Execute Remote Command which iperf3 jq
436 ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
437 Pass Execution If ${rc} != 0 Skipping test: iperf3 / jq not found on the RG
438
Andy Baviere19991a2020-05-08 10:42:40 -0700439 ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']}
440 ... ${of_id}
441 ${subscriber_id}= Set Variable ${of_id}/${onu_port}
442 ${bandwidth_profile_name} Get Bandwidth Profile Name For Given Subscriber ${subscriber_id}
443 ... upstreamBandwidthProfile
444 ${limiting_bw_value_upstream} Get Bandwidth Details ${bandwidth_profile_name}
445 ${bandwidth_profile_name} Get Bandwidth Profile Name For Given Subscriber ${subscriber_id}
446 ... downstreamBandwidthProfile
447 ${limiting_bw_value_dnstream} Get Bandwidth Details ${bandwidth_profile_name}
448
449 # Stream TCP packets from RG to server
450 ${updict}= Run Iperf3 Test Client ${src} server=${dst['dp_iface_ip_qinq']}
451 ... args=-t 30
452 ${actual_upstream_bw_used}= Evaluate ${updict['end']['sum_received']['bits_per_second']}/1000
453
454 # Stream TCP packets from server to RG
455 ${dndict}= Run Iperf3 Test Client ${src} server=${dst['dp_iface_ip_qinq']}
456 ... args=-R -t 30
457 ${actual_dnstream_bw_used}= Evaluate ${dndict['end']['sum_received']['bits_per_second']}/1000
458
459 ${pct_limit_up}= Evaluate 100*${actual_upstream_bw_used}/${limiting_bw_value_upstream}
460 ${pct_limit_dn}= Evaluate 100*${actual_dnstream_bw_used}/${limiting_bw_value_dnstream}
461 Log Up: bwprof ${limiting_bw_value_upstream}Kbps, got ${actual_upstream_bw_used}Kbps (${pct_limit_up}%)
462 Log Down: bwprof ${limiting_bw_value_dnstream}Kbps, got ${actual_dnstream_bw_used}Kbps (${pct_limit_dn}%)
463
464 Should Be True ${pct_limit_up} <= ${upper_margin_pct}
465 ... The upstream bandwidth exceeded the limit (${pct_limit_up}% of limit)
Andy Bavier7613b9a2020-07-08 07:25:47 -0700466 # VOL-3125: downstream bw limit not enforced. Uncomment when fixed.
467 #Should Be True ${pct_limit_dn} <= ${upper_margin_pct}
468 #... The downstream bandwidth exceeded the limit (${pct_limit_dn}% of limit)
Andy Baviere19991a2020-05-08 10:42:40 -0700469 Should Be True ${pct_limit_up} >= ${lower_margin_pct}
470 ... The upstream bandwidth guarantee was not met (${pct_limit_up}% of resv)
471 Should Be True ${pct_limit_dn} >= ${lower_margin_pct}
472 ... The downstream bandwidth guarantee was not met (${pct_limit_dn}% of resv)
473 END
474
475Data plane verification using UDP for DT
476 [Documentation] Test bandwidth profile is met and not exceeded for each subscriber.
477 ... Assumes iperf3 and jq installed on client and iperf -s running on DHCP server
Andy Bavier7613b9a2020-07-08 07:25:47 -0700478 [Tags] dataplaneDt BandwidthProfileUDPDt VOL-3061
Andy Bavierdfbcaef2020-05-27 15:34:18 -0700479 [Setup] Start Logging BandwidthProfileUDPDt
480 [Teardown] Run Keywords Collect Logs
481 ... AND Stop Logging BandwidthProfileUDPDt
Andy Baviere19991a2020-05-08 10:42:40 -0700482 Pass Execution If '${has_dataplane}'=='False' Bandwidth profile validation can be done only in
483 ... physical pod. Skipping this test in BBSIM.
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800484 FOR ${I} IN RANGE 0 ${num_all_onus}
Andy Baviere19991a2020-05-08 10:42:40 -0700485 ${src}= Set Variable ${hosts.src[${I}]}
486 ${dst}= Set Variable ${hosts.dst[${I}]}
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800487 ${of_id}= Get ofID From OLT List ${src['olt']}
Andy Bavier7613b9a2020-07-08 07:25:47 -0700488
489 # Check for iperf3 and jq tools
490 ${stdout} ${stderr} ${rc}= Execute Remote Command which iperf3 jq
491 ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
492 Pass Execution If ${rc} != 0 Skipping test: iperf3 / jq not found on the RG
493
Andy Baviere19991a2020-05-08 10:42:40 -0700494 ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']}
495 ... ${of_id}
496 ${subscriber_id}= Set Variable ${of_id}/${onu_port}
497 ${bandwidth_profile_name} Get Bandwidth Profile Name For Given Subscriber ${subscriber_id}
498 ... upstreamBandwidthProfile
499 ${limiting_bw_value_upstream} Get Bandwidth Details ${bandwidth_profile_name}
500 ${bandwidth_profile_name} Get Bandwidth Profile Name For Given Subscriber ${subscriber_id}
501 ... downstreamBandwidthProfile
502 ${limiting_bw_value_dnstream} Get Bandwidth Details ${bandwidth_profile_name}
503
504 # Stream UDP packets from RG to server
Andrea Campanella1d34bfc2020-08-06 09:58:49 +0200505 ${uprate}= Run Keyword If ${limiting_bw_value_upstream} != 1000000
506 ... Evaluate ${limiting_bw_value_upstream}*${udp_rate_multiplier}
Andrea Campanella580e0492020-08-05 15:35:48 +0200507 ... ELSE
Andrea Campanella1d34bfc2020-08-06 09:58:49 +0200508 ... Set Variable ${limiting_bw_value_upstream}
Andrea Campanella580e0492020-08-05 15:35:48 +0200509
Andy Baviere19991a2020-05-08 10:42:40 -0700510 ${updict}= Run Iperf3 Test Client ${src} server=${dst['dp_iface_ip_qinq']}
Andy Bavier7dc50622020-05-28 14:34:12 -0700511 ... args=-u -b ${uprate}K -t 30 -l ${udp_packet_bytes} --pacing-timer 0
Andy Baviere19991a2020-05-08 10:42:40 -0700512 # With UDP test, bits per second is the sending rate. Multiply by the loss rate to get the throughput.
513 ${actual_upstream_bw_used}= Evaluate
514 ... (100 - ${updict['end']['sum']['lost_percent']})*${updict['end']['sum']['bits_per_second']}/100000
515
516 # Stream UDP packets from server to RG
Andrea Campanella1d34bfc2020-08-06 09:58:49 +0200517 ${dnrate}= Run Keyword If ${limiting_bw_value_dnstream} != 1000000
518 ... Evaluate ${limiting_bw_value_dnstream}*${udp_rate_multiplier}
Andrea Campanella580e0492020-08-05 15:35:48 +0200519 ... ELSE
Andrea Campanella1d34bfc2020-08-06 09:58:49 +0200520 ... Set Variable ${limiting_bw_value_dnstream}
Andy Baviere19991a2020-05-08 10:42:40 -0700521 ${dndict}= Run Iperf3 Test Client ${src} server=${dst['dp_iface_ip_qinq']}
Andy Bavier7dc50622020-05-28 14:34:12 -0700522 ... args=-u -b ${dnrate}K -R -t 30 -l ${udp_packet_bytes} --pacing-timer 0
Andy Baviere19991a2020-05-08 10:42:40 -0700523 # With UDP test, bits per second is the sending rate. Multiply by the loss rate to get the throughput.
524 ${actual_dnstream_bw_used}= Evaluate
525 ... (100 - ${dndict['end']['sum']['lost_percent']})*${dndict['end']['sum']['bits_per_second']}/100000
526
527 ${pct_limit_up}= Evaluate 100*${actual_upstream_bw_used}/${limiting_bw_value_upstream}
528 ${pct_limit_dn}= Evaluate 100*${actual_dnstream_bw_used}/${limiting_bw_value_dnstream}
529 Log Up: bwprof ${limiting_bw_value_upstream}Kbps, got ${actual_upstream_bw_used}Kbps (${pct_limit_up}%)
530 Log Down: bwprof ${limiting_bw_value_dnstream}Kbps, got ${actual_dnstream_bw_used}Kbps (${pct_limit_dn}%)
531
532 Should Be True ${pct_limit_up} <= ${upper_margin_pct}
533 ... The upstream bandwidth exceeded the limit (${pct_limit_up}% of limit)
Andy Bavier7613b9a2020-07-08 07:25:47 -0700534 # VOL-3125: downstream bw limit not enforced. Uncomment when fixed.
535 #Should Be True ${pct_limit_dn} <= ${upper_margin_pct}
536 #... The downstream bandwidth exceeded the limit (${pct_limit_dn}% of limit)
Andy Baviere19991a2020-05-08 10:42:40 -0700537 Should Be True ${pct_limit_up} >= ${lower_margin_pct}
538 ... The upstream bandwidth guarantee was not met (${pct_limit_up}% of resv)
539 Should Be True ${pct_limit_dn} >= ${lower_margin_pct}
540 ... The downstream bandwidth guarantee was not met (${pct_limit_dn}% of resv)
541 END
542
Andy Bavier7613b9a2020-07-08 07:25:47 -0700543Validate parsing of data traffic through voltha using tech profile
544 [Documentation] Assuming that test1 was executed where all the ONUs are authenticated/DHCP/pingable
545 ... Prerequisite tools : Tcpdump and Mausezahn traffic generator on both RG and DHCP/BNG VMs
546 ... Install jq tool to read json file, where test suite is being running
547 ... Make sure 9999 port is enabled or forwarded for both upsteam and downstream direction
548 ... This test sends UDP packets on port 9999 with pbits between 0 and 7 and validates that
549 ... the pbits are preserved by the PON.
550 [Tags] dataplaneDt TechProfileDt VOL-3291
551 [Setup] Start Logging TechProfileDt
552 [Teardown] Run Keywords Collect Logs
553 ... AND Stop Logging TechProfileDt
554 Pass Execution If '${has_dataplane}'=='False'
555 ... Skipping test: Technology profile validation can be done only in physical pod
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800556 FOR ${I} IN RANGE 0 ${num_all_onus}
Andy Bavier7613b9a2020-07-08 07:25:47 -0700557 ${src}= Set Variable ${hosts.src[${I}]}
558 ${dst}= Set Variable ${hosts.dst[${I}]}
559
Andy Bavier275414a2020-07-16 13:07:17 -0700560 ${src_iface_name}= Fetch From Left ${src['dp_iface_name']} .
561
Andy Bavier7613b9a2020-07-08 07:25:47 -0700562 ${bng_ip}= Get Variable Value ${dst['noroot_ip']}
563 ${bng_user}= Get Variable Value ${dst['noroot_user']}
564 ${bng_pass}= Get Variable Value ${dst['noroot_pass']}
565 Pass Execution If "${bng_ip}" == "${NONE}" or "${bng_user}" == "${NONE}" or "${bng_pass}" == "${NONE}"
566 ... Skipping test: credentials for BNG login required in deployment config
567
568 ${stdout} ${stderr} ${rc}= Execute Remote Command which mausezahn tcpdump
569 ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
570 Pass Execution If ${rc} != 0 Skipping test: mausezahn / tcpdump not found on the RG
571 ${stdout} ${stderr} ${rc}= Execute Remote Command which mausezahn tcpdump
572 ... ${bng_ip} ${bng_user} ${bng_pass} ${dst['container_type']} ${dst['container_name']}
573 Pass Execution If ${rc} != 0 Skipping test: mausezahn / tcpdump not found on the BNG
574 Log Upstream test
575 Run Keyword If ${has_dataplane} Create traffic with each pbit and capture at other end
Andy Bavier275414a2020-07-16 13:07:17 -0700576 ... ${dst['dp_iface_ip_qinq']} ${dst['dp_iface_name']} ${src_iface_name}
577 ... 0 udp 9999 ${src['c_tag']} vlan
Andy Bavier7613b9a2020-07-08 07:25:47 -0700578 ... ${bng_ip} ${bng_user} ${bng_pass} ${dst['container_type']} ${dst['container_name']}
579 ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
580 Log Downstream test
581 ${rg_ip} ${stderr} ${rc}= Execute Remote Command
582 ... ifconfig ${src['dp_iface_name']} | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1 }'
583 ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
584 Should Be Equal As Integers ${rc} 0 Could not get RG's IP address
585 Run Keyword If ${has_dataplane} Create traffic with each pbit and capture at other end
Andy Bavier275414a2020-07-16 13:07:17 -0700586 ... ${rg_ip} ${src_iface_name} ${dst['dp_iface_name']}.${src['s_tag']}
Andy Bavier7613b9a2020-07-08 07:25:47 -0700587 ... 0 udp 9999 ${src['c_tag']} udp
588 ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
589 ... ${bng_ip} ${bng_user} ${bng_pass} ${dst['container_type']} ${dst['container_name']}
590 END
591
Hardik Windlass16cdf962020-04-29 15:26:50 +0530592Test Disable and Enable OLT PON Port for DT
593 [Documentation] Validates E2E Ping Connectivity and object states for the given scenario:
594 ... Assuming that all the ONUs are DHCP/pingable (i.e. assuming sanityDt test was executed)
595 ... Perform disable on the OLT PON Port and validate that the pings do not succeed
596 ... Perform enable on the OLT PON Port and validate that the pings are successful
Hardik Windlass41701e82021-01-12 17:44:44 +0000597 [Tags] functionalDt DisableEnableOltPonPortDt VOL-2577
Hardik Windlass16cdf962020-04-29 15:26:50 +0530598 [Setup] Start Logging DisableEnableOltPonPortDt
599 [Teardown] Run Keywords Collect Logs
600 ... AND Stop Logging DisableEnableOltPonPortDt
Hardik Windlass41701e82021-01-12 17:44:44 +0000601 FOR ${I} IN RANGE 0 ${olt_count}
602 ${olt_serial_number}= Get From Dictionary ${olt_ids}[${I}] sn
603 Disable Enable PON Port Per OLT DT ${olt_serial_number}
Hardik Windlass16cdf962020-04-29 15:26:50 +0530604 END
605
Hardik Windlassa3d04b92020-02-17 15:06:05 +0000606*** Keywords ***
607Setup Suite
608 [Documentation] Set up the test suite
609 Common Test Suite Setup
Hung-Wei Chiucc6e6552020-06-04 12:57:38 -0700610 #Restore all ONUs
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800611 #Run Keyword If ${has_dataplane} RestoreONUs ${num_all_onus}
Suchitra Vemuri1d8e8172020-06-17 17:43:56 -0700612 #power_switch.robot needs it to support different vendor's power switch
613 ${switch_type}= Get Variable Value ${web_power_switch.type}
614 Run Keyword If "${switch_type}"!="" Set Global Variable ${powerswitch_type} ${switch_type}
Hardik Windlassa3d04b92020-02-17 15:06:05 +0000615
616Clear All Devices Then Create New Device
617 [Documentation] Remove any devices from VOLTHA and ONOS
618 # Remove all devices from voltha and nos
619 Delete All Devices and Verify
620 # Execute normal test Setup Keyword
621 Setup