blob: d4ed24832fbae777763b2c2463772060edf6a0e2 [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']}
Hardik Windlass5e214b22021-02-26 10:37:14 +000080 Sleep 10s
Suchitra Vemuri1d8e8172020-06-17 17:43:56 -070081 Enable Switch Outlet ${src['power_switch_port']}
Suchitra Vemuri1d8e8172020-06-17 17:43:56 -070082 END
83
Hardik Windlassa3d04b92020-02-17 15:06:05 +000084Sanity E2E Test for OLT/ONU on POD for DT
85 [Documentation] Validates E2E Ping Connectivity and object states for the given scenario:
86 ... Validate successful DHCP/E2E ping (no EAPOL and DHCP flows) for the tech profile that is used
87 ... Traffic sent with same vlan from different RGs,
88 ... should reach the NNI port on the OLT with the expected double tagged vlan ids
89 ... Inner vlans from the RG should not change
Suchitra Vemurif2388ad2020-03-15 21:44:44 -070090 [Tags] sanityDt
Andy Baviere187eda2020-04-20 15:00:02 -070091 [Setup] Run Keywords Start Logging SanityTestDt
Hardik Windlassa3d04b92020-02-17 15:06:05 +000092 ... AND Setup
93 [Teardown] Run Keywords Collect Logs
94 ... AND Stop Logging SanityTestDt
Hardik Windlassa3d04b92020-02-17 15:06:05 +000095 Run Keyword If ${has_dataplane} Clean Up Linux
96 Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test DT
97
Hardik Windlass35706ba2020-02-20 08:16:42 +000098Test Subscriber Delete and Add for DT
99 [Documentation] Validates E2E Ping Connectivity and object states for the given scenario:
Hardik Windlass63d5e002020-03-06 21:07:09 +0530100 ... Assuming that all the ONUs are DHCP/pingable (i.e. assuming sanityDt test was executed)
Hardik Windlass35706ba2020-02-20 08:16:42 +0000101 ... Delete a subscriber and validate that the pings do not succeed and state is purged
102 ... Disable and Enable the ONU (This is to replicate the existing DT behaviour)
103 ... Re-add the subscriber, and validate that the flows are present and pings are successful
Suchitra Vemurif2388ad2020-03-15 21:44:44 -0700104 [Tags] functionalDt SubAddDeleteDt
Andy Baviere187eda2020-04-20 15:00:02 -0700105 [Setup] Start Logging SubAddDeleteDt
Hardik Windlass35706ba2020-02-20 08:16:42 +0000106 [Teardown] Run Keywords Collect Logs
107 ... AND Stop Logging SubAddDeleteDt
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800108 FOR ${I} IN RANGE 0 ${num_all_onus}
Hardik Windlass35706ba2020-02-20 08:16:42 +0000109 ${src}= Set Variable ${hosts.src[${I}]}
110 ${dst}= Set Variable ${hosts.dst[${I}]}
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800111 ${of_id}= Get ofID From OLT List ${src['olt']}
Hardik Windlass35706ba2020-02-20 08:16:42 +0000112 ${onu_device_id}= Get Device ID From SN ${src['onu']}
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800113 ${olt_device_id}= Get OLTDeviceID From OLT List ${src['olt']}
Andrea Campanellad848de02020-11-24 10:23:41 +0100114 ${num_of_olt_onus}= Get Num of Onus From OLT SN ${src['olt']}
Hardik Windlass35706ba2020-02-20 08:16:42 +0000115 ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']}
116 ... ${of_id}
117 # Remove Subscriber Access
ubuntu6b6e7d42020-03-02 12:35:42 -0800118 Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command ${ONOS_SSH_IP}
Hardik Windlass35706ba2020-02-20 08:16:42 +0000119 ... ${ONOS_SSH_PORT} volt-remove-subscriber-access ${of_id} ${onu_port}
Hardik Windlass35706ba2020-02-20 08:16:42 +0000120 Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure
121 ... Wait Until Keyword Succeeds 60s 2s
122 ... Check Ping False ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']}
123 ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
Andrea Campanellad848de02020-11-24 10:23:41 +0100124
Hardik Windlassfb5eace2020-03-26 14:49:01 +0530125 # 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 +0100126 ${onos_flows_count}= Evaluate 4 * ( ${num_of_olt_onus} - 1 )
Hardik Windlassfb5eace2020-03-26 14:49:01 +0530127 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s
128 ... Verify Subscriber Access Flows Added Count DT ${ONOS_SSH_IP} ${ONOS_SSH_PORT}
Suchitra Vemuri93db32b2020-11-23 21:27:05 -0800129 ... ${of_id} ${onos_flows_count}
Hardik Windlass35706ba2020-02-20 08:16:42 +0000130 # 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 +0100131 ${olt_flows}= Evaluate 2 * ( ${num_of_olt_onus} - 1 ) + 1
Hardik Windlass35706ba2020-02-20 08:16:42 +0000132 Run Keyword Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Flows ${olt_flows}
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800133 ... ${olt_device_id}
Hardik Windlass35706ba2020-02-20 08:16:42 +0000134 # Verify VOLTHA flows for ONU under test is Zero
135 Run Keyword Wait Until Keyword Succeeds ${timeout} 5s Validate Device Flows
136 ... ${onu_device_id} 0
137 # Disable and Re-Enable the ONU (To replicate DT current workflow)
138 # TODO: Delete and Auto-Discovery Add of ONU (not yet supported)
139 Disable Device ${onu_device_id}
140 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s
141 ... Validate Device DISABLED UNKNOWN
142 ... REACHABLE ${src['onu']}
143 Enable Device ${onu_device_id}
Suchitra Vemuricdc32d82020-07-17 12:24:46 -0700144 Run Keyword And Continue On Failure Wait Until Keyword Succeeds 360s 5s
Hardik Windlass35706ba2020-02-20 08:16:42 +0000145 ... Validate Device ENABLED ACTIVE
146 ... REACHABLE ${src['onu']}
147 # Add Subscriber Access
ubuntu6b6e7d42020-03-02 12:35:42 -0800148 Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command ${ONOS_SSH_IP}
Hardik Windlass35706ba2020-02-20 08:16:42 +0000149 ... ${ONOS_SSH_PORT} volt-add-subscriber-access ${of_id} ${onu_port}
Hardik Windlassfb5eace2020-03-26 14:49:01 +0530150 # Verify subscriber access flows are added for the ONU port
151 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s
Hardik Windlass25e11702020-03-30 20:05:19 +0530152 ... Verify Subscriber Access Flows Added For ONU DT ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id}
153 ... ${onu_port} ${nni_port} ${src['s_tag']}
Suchitra Vemuricdc32d82020-07-17 12:24:46 -0700154 Run Keyword And Continue On Failure Wait Until Keyword Succeeds 360s 5s
Hardik Windlass35706ba2020-02-20 08:16:42 +0000155 ... Validate Device ENABLED ACTIVE
156 ... REACHABLE ${src['onu']} onu=True onu_reason=omci-flows-pushed
Hardik Windlassfb5eace2020-03-26 14:49:01 +0530157 # TODO: Yet to Verify on the GPON based Physical POD (VOL-2652)
Hardik Windlass35706ba2020-02-20 08:16:42 +0000158 Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure
159 ... Wait Until Keyword Succeeds 60s 2s
160 ... Check Ping True ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']}
161 ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
Hardik Windlass35706ba2020-02-20 08:16:42 +0000162 END
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800163 # Verify flows for all OLTs
164 Run Keyword Wait Until Keyword Succeeds ${timeout} 5s Validate All OLT Flows
Hardik Windlass35706ba2020-02-20 08:16:42 +0000165
Hardik Windlass63d5e002020-03-06 21:07:09 +0530166Test Disable and Enable ONU for DT
167 [Documentation] Validates E2E Ping Connectivity and object states for the given scenario:
168 ... Assuming that all the ONUs are DHCP/pingable (i.e. assuming sanityDt test was executed)
169 ... Perform disable on the ONUs and validate that the pings do not succeed
170 ... Perform enable on the ONUs and validate that the pings are successful
Suchitra Vemurif2388ad2020-03-15 21:44:44 -0700171 [Tags] functionalDt DisableEnableONUDt
Andy Baviere187eda2020-04-20 15:00:02 -0700172 [Setup] Start Logging DisableEnableONUDt
Hardik Windlass63d5e002020-03-06 21:07:09 +0530173 [Teardown] Run Keywords Collect Logs
174 ... AND Stop Logging DisableEnableONUDt
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800175 FOR ${I} IN RANGE 0 ${num_all_onus}
Hardik Windlass63d5e002020-03-06 21:07:09 +0530176 ${src}= Set Variable ${hosts.src[${I}]}
177 ${dst}= Set Variable ${hosts.dst[${I}]}
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800178 ${of_id}= Get ofID From OLT List ${src['olt']}
Hardik Windlass63d5e002020-03-06 21:07:09 +0530179 ${onu_device_id}= Get Device ID From SN ${src['onu']}
180 ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']}
181 ... ${of_id}
182 Disable Device ${onu_device_id}
183 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s
184 ... Validate Device DISABLED UNKNOWN
185 ... REACHABLE ${src['onu']} onu=True onu_reason=omci-admin-lock
186 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s
Suchitra Vemuri760bdd32020-06-17 12:34:48 -0700187 ... Verify ONU Port Is Disabled ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${src['onu']}
Hardik Windlassfb5eace2020-03-26 14:49:01 +0530188 # TODO: Yet to Verify on the GPON based Physical POD (VOL-2652)
Hardik Windlass63d5e002020-03-06 21:07:09 +0530189 Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure
190 ... Wait Until Keyword Succeeds 60s 2s
191 ... Check Ping False ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']}
192 ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
193 Sleep 5s
194 Enable Device ${onu_device_id}
Suchitra Vemuricdc32d82020-07-17 12:24:46 -0700195 Run Keyword And Continue On Failure Wait Until Keyword Succeeds 360s 5s
Hardik Windlass63d5e002020-03-06 21:07:09 +0530196 ... Validate Device ENABLED ACTIVE
197 ... REACHABLE ${src['onu']} onu=True onu_reason=onu-reenabled
198 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s
Suchitra Vemuri760bdd32020-06-17 12:34:48 -0700199 ... Verify ONU Port Is Enabled ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${src['onu']}
Hardik Windlassfb5eace2020-03-26 14:49:01 +0530200 # TODO: Yet to Verify on the GPON based Physical POD (VOL-2652)
Hardik Windlass63d5e002020-03-06 21:07:09 +0530201 Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure
202 ... Wait Until Keyword Succeeds 60s 2s
203 ... Check Ping True ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']}
204 ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
Hardik Windlass63d5e002020-03-06 21:07:09 +0530205 END
206
Hardik Windlassaaea3402020-03-10 19:45:45 +0530207Test Disable and Delete OLT for DT
208 [Documentation] Validates E2E Ping Connectivity and object states for the given scenario:
209 ... Assuming that all the ONUs are DHCP/pingable (i.e. assuming sanityDt test was executed)
210 ... Perform disable on the OLT and validate ONUs state and that the pings do not succeed
211 ... Perform delete on the OLT, Re-do Setup (Recreate the OLT) and Perform Sanity Test DT
Suchitra Vemurif2388ad2020-03-15 21:44:44 -0700212 [Tags] functionalDt DisableDeleteOLTDt
Suchitra Vemuri221398a2020-05-29 22:45:17 -0700213 [Setup] Start Logging DisableDeleteOLTDt
Hardik Windlassaaea3402020-03-10 19:45:45 +0530214 [Teardown] Run Keywords Collect Logs
215 ... AND Stop Logging DisableDeleteOLTDt
Hardik Windlassaaea3402020-03-10 19:45:45 +0530216 # Disable and Validate OLT Device
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800217 FOR ${I} IN RANGE 0 ${olt_count}
218 ${olt_serial_number}= Get From Dictionary ${olt_ids}[${I}] sn
219 ${olt_device_id}= Get OLTDeviceID From OLT List ${olt_serial_number}
220 Disable Device ${olt_device_id}
221 ${of_id}= Get ofID From OLT List ${olt_serial_number}
222 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s
223 ... Validate OLT Device DISABLED UNKNOWN REACHABLE
224 ... ${olt_serial_number}
225 Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Device DISABLED UNKNOWN REACHABLE
226 ... ${olt_serial_number}
227 ${num_onus}= Set Variable ${list_olts}[${I}][onucount]
228 # Validate ONUs
229 Run Keyword Wait Until Keyword Succeeds ${timeout} 5s Validate ONUs After OLT Disable
Andrea Campanella4e507882020-11-26 11:33:11 +0100230 ... ${num_onus} ${olt_serial_number}
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800231 # Verify ONOS Flows
232 # Number of Access Flows on ONOS equals 4 * the Number of Active ONUs (2 for each downstream and upstream)
233 ${onos_flows_count}= Evaluate 4 * ${num_onus}
234 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s
235 ... Verify Subscriber Access Flows Added Count DT ${ONOS_SSH_IP} ${ONOS_SSH_PORT}
236 ... ${of_id} ${onos_flows_count}
237 # Verify VOLTHA Flows
238 # Number of per OLT Flows equals Twice the Number of Active ONUs (each for downstream and upstream) + 1 for LLDP
239 ${olt_flows}= Evaluate 2 * ${num_onus} + 1
240 # Number of per ONU Flows equals 2 (one each for downstream and upstream)
241 ${onu_flows}= Set Variable 2
242 Run Keyword Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Flows ${olt_flows}
243 ... ${olt_device_id}
244 ${List_ONU_Serial} Create List
245 Set Suite Variable ${List_ONU_Serial}
Andrea Campanella99a548b2020-11-18 09:50:32 +0100246 Build ONU SN List ${List_ONU_Serial} ${olt_serial_number} ${num_onus}
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800247 Log ${List_ONU_Serial}
248 Run Keyword Wait Until Keyword Succeeds ${timeout} 5s Validate ONU Flows
249 ... ${List_ONU_Serial} ${onu_flows}
250 # Delete OLT and Validate Empty Device List
251 Delete Device ${olt_device_id}
Andrea Campanella4e507882020-11-26 11:33:11 +0100252 # Check that the OLT and the ONUs are actually removed from the system
253 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s Validate Device Removed
254 ... ${olt_serial_number}
255 Run Keyword and Continue On Failure Validate all ONUS for OLT Removed ${num_all_onus} ${hosts}
256 ... ${olt_serial_number} ${timeout}
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800257 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s
258 ... Verify Device Flows Removed ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id}
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800259 END
Hardik Windlassaaea3402020-03-10 19:45:45 +0530260 # Re-do Setup (Recreate the OLT) and Perform Sanity Test DT
261 Run Keyword Setup
Suchitra Vemuriae9cecb2020-03-12 12:59:14 -0700262 Run Keyword If ${has_dataplane} Clean Up Linux
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800263 Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test DT
264 #Run Keyword If ${has_dataplane} Clean Up Linux
Hardik Windlassaaea3402020-03-10 19:45:45 +0530265
Hardik Windlass3b531fa2020-04-23 18:51:44 +0530266Test Disable and Enable OLT for DT
267 [Documentation] Validates E2E Ping Connectivity and object states for the given scenario:
268 ... Assuming that all the ONUs are DHCP/pingable (i.e. assuming sanityDt test was executed)
269 ... Perform disable on the OLT and validate that the pings do not succeed
270 ... Perform enable on the OLT and validate that the pings are successful
Hardik Windlass2b37e712020-06-12 02:13:17 +0530271 [Tags] functionalDt DisableEnableOLTDt
Hardik Windlass3b531fa2020-04-23 18:51:44 +0530272 [Setup] Start Logging DisableEnableOLTDt
273 [Teardown] Run Keywords Collect Logs
274 ... AND Stop Logging DisableEnableOLTDt
275 # Disable and Validate OLT Device
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800276 FOR ${I} IN RANGE 0 ${olt_count}
277 ${olt_serial_number}= Get From Dictionary ${olt_ids}[${I}] sn
278 ${olt_device_id}= Get OLTDeviceID From OLT List ${olt_serial_number}
279 ${rc} ${output}= Run and Return Rc and Output
280 ... ${VOLTCTL_CONFIG}; voltctl device disable ${olt_device_id}
281 Should Be Equal As Integers ${rc} 0
282 Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Device DISABLED UNKNOWN REACHABLE
283 ... ${olt_serial_number}
284 END
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800285 # Validate ONUs
286 FOR ${I} IN RANGE 0 ${num_all_onus}
Hardik Windlass7c801e62020-05-04 19:33:21 +0530287 ${src}= Set Variable ${hosts.src[${I}]}
288 ${dst}= Set Variable ${hosts.dst[${I}]}
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800289 ${of_id}= Get ofID From OLT List ${src['olt']}
Hardik Windlass7c801e62020-05-04 19:33:21 +0530290 ${onu_device_id}= Get Device ID From SN ${src['onu']}
291 ${onu_port}= Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s
292 ... Get ONU Port in ONOS ${src['onu']} ${of_id}
293 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s
Suchitra Vemuri760bdd32020-06-17 12:34:48 -0700294 ... Verify ONU Port Is Disabled ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${src['onu']}
Hardik Windlass7c801e62020-05-04 19:33:21 +0530295 Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure
296 ... Wait Until Keyword Succeeds 60s 2s
297 ... Check Ping False ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']}
298 ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
299 # Remove Subscriber Access (To replicate DT workflow)
300 Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command ${ONOS_SSH_IP}
301 ... ${ONOS_SSH_PORT} volt-remove-subscriber-access ${of_id} ${onu_port}
302 # Delete ONU Device (To replicate DT workflow)
303 Delete Device ${onu_device_id}
304 END
Hardik Windlass2b37e712020-06-12 02:13:17 +0530305 Sleep 5s
Hardik Windlass3b531fa2020-04-23 18:51:44 +0530306 # Enable the OLT back and check ONU, OLT status are back to "ACTIVE"
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800307 FOR ${I} IN RANGE 0 ${olt_count}
308 ${olt_serial_number}= Get From Dictionary ${olt_ids}[${I}] sn
309 ${olt_device_id}= Get OLTDeviceID From OLT List ${olt_serial_number}
310 Enable Device ${olt_device_id}
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800311 Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Device ENABLED ACTIVE REACHABLE
312 ... ${olt_serial_number}
313 #TODO: Update for PON_OLT ETHERNET_NNI
314 #Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Port Types
315 #... PON_OLT ETHERNET_NNI
316 END
Hardik Windlass7c801e62020-05-04 19:33:21 +0530317 # Waiting extra time for the ONUs to come up
318 Sleep 60s
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800319 Run Keyword If ${has_dataplane} Clean Up Linux
Hardik Windlass7c801e62020-05-04 19:33:21 +0530320 Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test DT
Hardik Windlass3b531fa2020-04-23 18:51:44 +0530321
322Test Delete and ReAdd OLT for DT
323 [Documentation] Validates E2E Ping Connectivity and object states for the given scenario:
324 ... Assuming that all the ONUs are DHCP/pingable (i.e. assuming sanityDt test was executed)
325 ... Disable and Delete the OLT
326 ... Create/Enable the same OLT again
327 ... Validate DHCP/E2E pings succeed for all the ONUs connected to the OLT
328 [Tags] functionalDt DeleteReAddOLTDt
329 [Setup] Start Logging DeleteReAddOLTDt
330 [Teardown] Run Keywords Collect Logs
331 ... AND Stop Logging DeleteReAddOLTDt
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800332 FOR ${I} IN RANGE 0 ${olt_count}
333 ${olt_serial_number}= Get From Dictionary ${olt_ids}[${I}] sn
334 ${of_id}= Get ofID From OLT List ${olt_serial_number}
335 Delete Device and Verify ${olt_serial_number}
336 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s
337 ... Verify Device Flows Removed ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id}
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800338 END
339 # Recreate the OLTs
Hardik Windlass3b531fa2020-04-23 18:51:44 +0530340 Setup
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800341 Run Keyword If ${has_dataplane} Clean Up Linux
Hardik Windlass3b531fa2020-04-23 18:51:44 +0530342 Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test DT
343
344Test Disable ONUs and OLT Then Delete ONUs and OLT for DT
345 [Documentation] On deployed POD, disable the ONU, disable the OLT and then delete ONU and OLT.
346 ... This TC is to confirm that ONU removal is not impacting OLT
347 ... Devices will be removed during the execution of this TC
348 ... so calling setup at the end to add the devices back to avoid the confusion.
349 [Tags] functionalDt DisableDeleteONUOLTDt
350 [Setup] Start Logging DisableDeleteONUOLTDt
351 [Teardown] Run Keywords Collect Logs
352 ... AND Stop Logging DisableDeleteONUOLTDt
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800353 FOR ${I} IN RANGE 0 ${num_all_onus}
Hardik Windlass3b531fa2020-04-23 18:51:44 +0530354 ${src}= Set Variable ${hosts.src[${I}]}
355 ${dst}= Set Variable ${hosts.dst[${I}]}
356 ${onu_device_id}= Get Device ID From SN ${src['onu']}
357 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s
358 ... Validate Device ENABLED ACTIVE
359 ... REACHABLE ${src['onu']} onu=True onu_reason=omci-flows-pushed
360 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s
361 ... Validate OLT Device ENABLED ACTIVE
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800362 ... REACHABLE ${src['olt']}
Hardik Windlass3b531fa2020-04-23 18:51:44 +0530363 Disable Device ${onu_device_id}
364 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s
365 ... Validate Device DISABLED UNKNOWN
366 ... REACHABLE ${src['onu']} onu=false
367 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s
368 ... Validate OLT Device ENABLED ACTIVE
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800369 ... REACHABLE ${src['olt']}
Hardik Windlass3b531fa2020-04-23 18:51:44 +0530370 END
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800371 # Disable all OLTs
372 FOR ${I} IN RANGE 0 ${olt_count}
373 ${olt_serial_number}= Get From Dictionary ${olt_ids}[${I}] sn
374 ${olt_device_id}= Get OLTDeviceID From OLT List ${olt_serial_number}
375 ${rc} ${output}= Run and Return Rc and Output
376 ... ${VOLTCTL_CONFIG}; voltctl device disable ${olt_device_id}
377 Should Be Equal As Integers ${rc} 0
378 Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Device DISABLED UNKNOWN REACHABLE
379 ... ${olt_serial_number}
380 END
381 # Validate ONUs after OLT disable
382 FOR ${I} IN RANGE 0 ${num_all_onus}
Hardik Windlass3b531fa2020-04-23 18:51:44 +0530383 ${src}= Set Variable ${hosts.src[${I}]}
384 ${dst}= Set Variable ${hosts.dst[${I}]}
385 ${onu_device_id}= Get Device ID From SN ${src['onu']}
386 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s
387 ... Validate Device DISABLED DISCOVERED
388 ... UNREACHABLE ${src['onu']} onu=false
389 Delete Device ${onu_device_id}
390 Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s
391 ... Validate OLT Device DISABLED UNKNOWN
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800392 ... REACHABLE ${src['olt']}
Hardik Windlass3b531fa2020-04-23 18:51:44 +0530393 END
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800394 # Delete all OLTs
395 Delete All Devices and Verify
396
397 #Delete Device ${olt_device_id}
398 #TODO: Fix the following assertion
399 #Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s Test Empty Device List
400 #Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s
401 #... Verify Device Flows Removed ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id}
402
Hardik Windlass3b531fa2020-04-23 18:51:44 +0530403 # Re-do Setup (Recreate the OLT) and Perform Sanity Test DT
404 Run Keyword Setup
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800405 Run Keyword If ${has_dataplane} Clean Up Linux
Hardik Windlass3b531fa2020-04-23 18:51:44 +0530406 Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test DT
Hardik Windlass3b531fa2020-04-23 18:51:44 +0530407
Andy Baviere19991a2020-05-08 10:42:40 -0700408Data plane verification using TCP for DT
409 [Documentation] Test bandwidth profile is met and not exceeded for each subscriber.
410 ... Assumes iperf3 and jq installed on client and iperf -s running on DHCP server
Andy Bavier7613b9a2020-07-08 07:25:47 -0700411 [Tags] dataplaneDt BandwidthProfileTCPDt VOL-3061
Andy Bavierdfbcaef2020-05-27 15:34:18 -0700412 [Setup] Start Logging BandwidthProfileTCPDt
413 [Teardown] Run Keywords Collect Logs
414 ... AND Stop Logging BandwidthProfileTCPDt
Andy Baviere19991a2020-05-08 10:42:40 -0700415 Pass Execution If '${has_dataplane}'=='False' Bandwidth profile validation can be done only in
416 ... physical pod. Skipping this test in BBSIM.
Suchitra Vemuria4e3e072020-11-06 14:23:47 -0800417 Delete All Devices And Verify
418 Run Keyword If ${has_dataplane} Clean Up Linux
419 setup
420 Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test DT
421
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800422 #${of_id}= Wait Until Keyword Succeeds ${timeout} 15s Validate OLT Device in ONOS
423 #... ${olt_serial_number}
424 FOR ${I} IN RANGE 0 ${num_all_onus}
Andy Baviere19991a2020-05-08 10:42:40 -0700425 ${src}= Set Variable ${hosts.src[${I}]}
426 ${dst}= Set Variable ${hosts.dst[${I}]}
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800427 ${of_id}= Get ofID From OLT List ${src['olt']}
Andy Bavierf6ab19c2020-05-14 10:34:47 -0700428 # Check for iperf3 and jq tools
429 ${stdout} ${stderr} ${rc}= Execute Remote Command which iperf3 jq
430 ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
431 Pass Execution If ${rc} != 0 Skipping test: iperf3 / jq not found on the RG
432
Andy Baviere19991a2020-05-08 10:42:40 -0700433 ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']}
434 ... ${of_id}
435 ${subscriber_id}= Set Variable ${of_id}/${onu_port}
436 ${bandwidth_profile_name} Get Bandwidth Profile Name For Given Subscriber ${subscriber_id}
437 ... upstreamBandwidthProfile
438 ${limiting_bw_value_upstream} Get Bandwidth Details ${bandwidth_profile_name}
439 ${bandwidth_profile_name} Get Bandwidth Profile Name For Given Subscriber ${subscriber_id}
440 ... downstreamBandwidthProfile
441 ${limiting_bw_value_dnstream} Get Bandwidth Details ${bandwidth_profile_name}
442
443 # Stream TCP packets from RG to server
444 ${updict}= Run Iperf3 Test Client ${src} server=${dst['dp_iface_ip_qinq']}
445 ... args=-t 30
446 ${actual_upstream_bw_used}= Evaluate ${updict['end']['sum_received']['bits_per_second']}/1000
447
448 # Stream TCP packets from server to RG
449 ${dndict}= Run Iperf3 Test Client ${src} server=${dst['dp_iface_ip_qinq']}
450 ... args=-R -t 30
451 ${actual_dnstream_bw_used}= Evaluate ${dndict['end']['sum_received']['bits_per_second']}/1000
452
453 ${pct_limit_up}= Evaluate 100*${actual_upstream_bw_used}/${limiting_bw_value_upstream}
454 ${pct_limit_dn}= Evaluate 100*${actual_dnstream_bw_used}/${limiting_bw_value_dnstream}
455 Log Up: bwprof ${limiting_bw_value_upstream}Kbps, got ${actual_upstream_bw_used}Kbps (${pct_limit_up}%)
456 Log Down: bwprof ${limiting_bw_value_dnstream}Kbps, got ${actual_dnstream_bw_used}Kbps (${pct_limit_dn}%)
457
458 Should Be True ${pct_limit_up} <= ${upper_margin_pct}
459 ... The upstream bandwidth exceeded the limit (${pct_limit_up}% of limit)
Andy Bavier7613b9a2020-07-08 07:25:47 -0700460 # VOL-3125: downstream bw limit not enforced. Uncomment when fixed.
461 #Should Be True ${pct_limit_dn} <= ${upper_margin_pct}
462 #... The downstream bandwidth exceeded the limit (${pct_limit_dn}% of limit)
Andy Baviere19991a2020-05-08 10:42:40 -0700463 Should Be True ${pct_limit_up} >= ${lower_margin_pct}
464 ... The upstream bandwidth guarantee was not met (${pct_limit_up}% of resv)
465 Should Be True ${pct_limit_dn} >= ${lower_margin_pct}
466 ... The downstream bandwidth guarantee was not met (${pct_limit_dn}% of resv)
467 END
468
469Data plane verification using UDP for DT
470 [Documentation] Test bandwidth profile is met and not exceeded for each subscriber.
471 ... Assumes iperf3 and jq installed on client and iperf -s running on DHCP server
Andy Bavier7613b9a2020-07-08 07:25:47 -0700472 [Tags] dataplaneDt BandwidthProfileUDPDt VOL-3061
Andy Bavierdfbcaef2020-05-27 15:34:18 -0700473 [Setup] Start Logging BandwidthProfileUDPDt
474 [Teardown] Run Keywords Collect Logs
475 ... AND Stop Logging BandwidthProfileUDPDt
Andy Baviere19991a2020-05-08 10:42:40 -0700476 Pass Execution If '${has_dataplane}'=='False' Bandwidth profile validation can be done only in
477 ... physical pod. Skipping this test in BBSIM.
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800478 FOR ${I} IN RANGE 0 ${num_all_onus}
Andy Baviere19991a2020-05-08 10:42:40 -0700479 ${src}= Set Variable ${hosts.src[${I}]}
480 ${dst}= Set Variable ${hosts.dst[${I}]}
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800481 ${of_id}= Get ofID From OLT List ${src['olt']}
Andy Bavier7613b9a2020-07-08 07:25:47 -0700482
483 # Check for iperf3 and jq tools
484 ${stdout} ${stderr} ${rc}= Execute Remote Command which iperf3 jq
485 ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
486 Pass Execution If ${rc} != 0 Skipping test: iperf3 / jq not found on the RG
487
Andy Baviere19991a2020-05-08 10:42:40 -0700488 ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']}
489 ... ${of_id}
490 ${subscriber_id}= Set Variable ${of_id}/${onu_port}
491 ${bandwidth_profile_name} Get Bandwidth Profile Name For Given Subscriber ${subscriber_id}
492 ... upstreamBandwidthProfile
493 ${limiting_bw_value_upstream} Get Bandwidth Details ${bandwidth_profile_name}
494 ${bandwidth_profile_name} Get Bandwidth Profile Name For Given Subscriber ${subscriber_id}
495 ... downstreamBandwidthProfile
496 ${limiting_bw_value_dnstream} Get Bandwidth Details ${bandwidth_profile_name}
497
498 # Stream UDP packets from RG to server
Andrea Campanella1d34bfc2020-08-06 09:58:49 +0200499 ${uprate}= Run Keyword If ${limiting_bw_value_upstream} != 1000000
500 ... Evaluate ${limiting_bw_value_upstream}*${udp_rate_multiplier}
Andrea Campanella580e0492020-08-05 15:35:48 +0200501 ... ELSE
Andrea Campanella1d34bfc2020-08-06 09:58:49 +0200502 ... Set Variable ${limiting_bw_value_upstream}
Andrea Campanella580e0492020-08-05 15:35:48 +0200503
Andy Baviere19991a2020-05-08 10:42:40 -0700504 ${updict}= Run Iperf3 Test Client ${src} server=${dst['dp_iface_ip_qinq']}
Andy Bavier7dc50622020-05-28 14:34:12 -0700505 ... args=-u -b ${uprate}K -t 30 -l ${udp_packet_bytes} --pacing-timer 0
Andy Baviere19991a2020-05-08 10:42:40 -0700506 # With UDP test, bits per second is the sending rate. Multiply by the loss rate to get the throughput.
507 ${actual_upstream_bw_used}= Evaluate
508 ... (100 - ${updict['end']['sum']['lost_percent']})*${updict['end']['sum']['bits_per_second']}/100000
509
510 # Stream UDP packets from server to RG
Andrea Campanella1d34bfc2020-08-06 09:58:49 +0200511 ${dnrate}= Run Keyword If ${limiting_bw_value_dnstream} != 1000000
512 ... Evaluate ${limiting_bw_value_dnstream}*${udp_rate_multiplier}
Andrea Campanella580e0492020-08-05 15:35:48 +0200513 ... ELSE
Andrea Campanella1d34bfc2020-08-06 09:58:49 +0200514 ... Set Variable ${limiting_bw_value_dnstream}
Andy Baviere19991a2020-05-08 10:42:40 -0700515 ${dndict}= Run Iperf3 Test Client ${src} server=${dst['dp_iface_ip_qinq']}
Andy Bavier7dc50622020-05-28 14:34:12 -0700516 ... args=-u -b ${dnrate}K -R -t 30 -l ${udp_packet_bytes} --pacing-timer 0
Andy Baviere19991a2020-05-08 10:42:40 -0700517 # With UDP test, bits per second is the sending rate. Multiply by the loss rate to get the throughput.
518 ${actual_dnstream_bw_used}= Evaluate
519 ... (100 - ${dndict['end']['sum']['lost_percent']})*${dndict['end']['sum']['bits_per_second']}/100000
520
521 ${pct_limit_up}= Evaluate 100*${actual_upstream_bw_used}/${limiting_bw_value_upstream}
522 ${pct_limit_dn}= Evaluate 100*${actual_dnstream_bw_used}/${limiting_bw_value_dnstream}
523 Log Up: bwprof ${limiting_bw_value_upstream}Kbps, got ${actual_upstream_bw_used}Kbps (${pct_limit_up}%)
524 Log Down: bwprof ${limiting_bw_value_dnstream}Kbps, got ${actual_dnstream_bw_used}Kbps (${pct_limit_dn}%)
525
526 Should Be True ${pct_limit_up} <= ${upper_margin_pct}
527 ... The upstream bandwidth exceeded the limit (${pct_limit_up}% of limit)
Andy Bavier7613b9a2020-07-08 07:25:47 -0700528 # VOL-3125: downstream bw limit not enforced. Uncomment when fixed.
529 #Should Be True ${pct_limit_dn} <= ${upper_margin_pct}
530 #... The downstream bandwidth exceeded the limit (${pct_limit_dn}% of limit)
Andy Baviere19991a2020-05-08 10:42:40 -0700531 Should Be True ${pct_limit_up} >= ${lower_margin_pct}
532 ... The upstream bandwidth guarantee was not met (${pct_limit_up}% of resv)
533 Should Be True ${pct_limit_dn} >= ${lower_margin_pct}
534 ... The downstream bandwidth guarantee was not met (${pct_limit_dn}% of resv)
535 END
536
Andy Bavier7613b9a2020-07-08 07:25:47 -0700537Validate parsing of data traffic through voltha using tech profile
538 [Documentation] Assuming that test1 was executed where all the ONUs are authenticated/DHCP/pingable
539 ... Prerequisite tools : Tcpdump and Mausezahn traffic generator on both RG and DHCP/BNG VMs
540 ... Install jq tool to read json file, where test suite is being running
541 ... Make sure 9999 port is enabled or forwarded for both upsteam and downstream direction
542 ... This test sends UDP packets on port 9999 with pbits between 0 and 7 and validates that
543 ... the pbits are preserved by the PON.
544 [Tags] dataplaneDt TechProfileDt VOL-3291
545 [Setup] Start Logging TechProfileDt
546 [Teardown] Run Keywords Collect Logs
547 ... AND Stop Logging TechProfileDt
548 Pass Execution If '${has_dataplane}'=='False'
549 ... Skipping test: Technology profile validation can be done only in physical pod
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800550 FOR ${I} IN RANGE 0 ${num_all_onus}
Andy Bavier7613b9a2020-07-08 07:25:47 -0700551 ${src}= Set Variable ${hosts.src[${I}]}
552 ${dst}= Set Variable ${hosts.dst[${I}]}
553
Andy Bavier275414a2020-07-16 13:07:17 -0700554 ${src_iface_name}= Fetch From Left ${src['dp_iface_name']} .
555
Andy Bavier7613b9a2020-07-08 07:25:47 -0700556 ${bng_ip}= Get Variable Value ${dst['noroot_ip']}
557 ${bng_user}= Get Variable Value ${dst['noroot_user']}
558 ${bng_pass}= Get Variable Value ${dst['noroot_pass']}
559 Pass Execution If "${bng_ip}" == "${NONE}" or "${bng_user}" == "${NONE}" or "${bng_pass}" == "${NONE}"
560 ... Skipping test: credentials for BNG login required in deployment config
561
562 ${stdout} ${stderr} ${rc}= Execute Remote Command which mausezahn tcpdump
563 ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
564 Pass Execution If ${rc} != 0 Skipping test: mausezahn / tcpdump not found on the RG
565 ${stdout} ${stderr} ${rc}= Execute Remote Command which mausezahn tcpdump
566 ... ${bng_ip} ${bng_user} ${bng_pass} ${dst['container_type']} ${dst['container_name']}
567 Pass Execution If ${rc} != 0 Skipping test: mausezahn / tcpdump not found on the BNG
568 Log Upstream test
569 Run Keyword If ${has_dataplane} Create traffic with each pbit and capture at other end
Andy Bavier275414a2020-07-16 13:07:17 -0700570 ... ${dst['dp_iface_ip_qinq']} ${dst['dp_iface_name']} ${src_iface_name}
571 ... 0 udp 9999 ${src['c_tag']} vlan
Andy Bavier7613b9a2020-07-08 07:25:47 -0700572 ... ${bng_ip} ${bng_user} ${bng_pass} ${dst['container_type']} ${dst['container_name']}
573 ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
574 Log Downstream test
575 ${rg_ip} ${stderr} ${rc}= Execute Remote Command
576 ... ifconfig ${src['dp_iface_name']} | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1 }'
577 ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
578 Should Be Equal As Integers ${rc} 0 Could not get RG's IP address
579 Run Keyword If ${has_dataplane} Create traffic with each pbit and capture at other end
Andy Bavier275414a2020-07-16 13:07:17 -0700580 ... ${rg_ip} ${src_iface_name} ${dst['dp_iface_name']}.${src['s_tag']}
Andy Bavier7613b9a2020-07-08 07:25:47 -0700581 ... 0 udp 9999 ${src['c_tag']} udp
582 ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}
583 ... ${bng_ip} ${bng_user} ${bng_pass} ${dst['container_type']} ${dst['container_name']}
584 END
585
Hardik Windlass16cdf962020-04-29 15:26:50 +0530586Test Disable and Enable OLT PON Port for DT
587 [Documentation] Validates E2E Ping Connectivity and object states for the given scenario:
588 ... Assuming that all the ONUs are DHCP/pingable (i.e. assuming sanityDt test was executed)
589 ... Perform disable on the OLT PON Port and validate that the pings do not succeed
590 ... Perform enable on the OLT PON Port and validate that the pings are successful
Hardik Windlass41701e82021-01-12 17:44:44 +0000591 [Tags] functionalDt DisableEnableOltPonPortDt VOL-2577
Hardik Windlass16cdf962020-04-29 15:26:50 +0530592 [Setup] Start Logging DisableEnableOltPonPortDt
593 [Teardown] Run Keywords Collect Logs
594 ... AND Stop Logging DisableEnableOltPonPortDt
Hardik Windlass41701e82021-01-12 17:44:44 +0000595 FOR ${I} IN RANGE 0 ${olt_count}
596 ${olt_serial_number}= Get From Dictionary ${olt_ids}[${I}] sn
597 Disable Enable PON Port Per OLT DT ${olt_serial_number}
Hardik Windlass16cdf962020-04-29 15:26:50 +0530598 END
599
Hardik Windlassa3d04b92020-02-17 15:06:05 +0000600*** Keywords ***
601Setup Suite
602 [Documentation] Set up the test suite
603 Common Test Suite Setup
Hung-Wei Chiucc6e6552020-06-04 12:57:38 -0700604 #Restore all ONUs
Suchitra Vemuria6879aa2020-11-03 11:03:11 -0800605 #Run Keyword If ${has_dataplane} RestoreONUs ${num_all_onus}
Suchitra Vemuri1d8e8172020-06-17 17:43:56 -0700606 #power_switch.robot needs it to support different vendor's power switch
607 ${switch_type}= Get Variable Value ${web_power_switch.type}
608 Run Keyword If "${switch_type}"!="" Set Global Variable ${powerswitch_type} ${switch_type}
Hardik Windlassa3d04b92020-02-17 15:06:05 +0000609
610Clear All Devices Then Create New Device
611 [Documentation] Remove any devices from VOLTHA and ONOS
612 # Remove all devices from voltha and nos
613 Delete All Devices and Verify
614 # Execute normal test Setup Keyword
615 Setup