Hardik Windlass | a3d04b9 | 2020-02-17 15:06:05 +0000 | [diff] [blame] | 1 | # 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 *** |
| 17 | Documentation Test various end-to-end scenarios |
| 18 | Suite Setup Setup Suite |
| 19 | Test Setup Setup |
| 20 | Test Teardown Teardown |
| 21 | Suite Teardown Teardown Suite |
| 22 | Library Collections |
| 23 | Library String |
| 24 | Library OperatingSystem |
| 25 | Library XML |
| 26 | Library RequestsLibrary |
| 27 | Library ../../libraries/DependencyLibrary.py |
| 28 | Resource ../../libraries/onos.robot |
| 29 | Resource ../../libraries/voltctl.robot |
| 30 | Resource ../../libraries/voltha.robot |
| 31 | Resource ../../libraries/utils.robot |
| 32 | Resource ../../libraries/k8s.robot |
| 33 | Resource ../../variables/variables.robot |
Suchitra Vemuri | 1d8e817 | 2020-06-17 17:43:56 -0700 | [diff] [blame] | 34 | Resource ../../libraries/power_switch.robot |
Hardik Windlass | a3d04b9 | 2020-02-17 15:06:05 +0000 | [diff] [blame] | 35 | |
| 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 Vemuri | e9c6ca6 | 2020-07-27 16:44:53 -0700 | [diff] [blame] | 48 | ${timeout} 360s |
Hardik Windlass | a3d04b9 | 2020-02-17 15:06:05 +0000 | [diff] [blame] | 49 | ${of_id} 0 |
| 50 | ${logical_id} 0 |
Andrea Campanella | 86e2406 | 2020-08-05 19:09:18 +0200 | [diff] [blame] | 51 | ${uprate} 0 |
| 52 | ${dnrate} 0 |
Hardik Windlass | a3d04b9 | 2020-02-17 15:06:05 +0000 | [diff] [blame] | 53 | ${has_dataplane} True |
Hardik Windlass | ffbf060 | 2020-04-24 23:14:45 +0530 | [diff] [blame] | 54 | ${teardown_device} True |
Hardik Windlass | a3d04b9 | 2020-02-17 15:06:05 +0000 | [diff] [blame] | 55 | ${scripts} ../../scripts |
| 56 | |
Andy Bavier | e19991a | 2020-05-08 10:42:40 -0700 | [diff] [blame] | 57 | # For dataplane bandwidth testing |
| 58 | ${upper_margin_pct} 105 # Allow 5% over the limit |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 59 | ${lower_margin_pct} 90 # Allow 8% under the limit |
Andy Bavier | e19991a | 2020-05-08 10:42:40 -0700 | [diff] [blame] | 60 | ${udp_rate_multiplier} 1.10 # Send UDP at bw profile limit * rate_multiplier |
Andy Bavier | c80a274 | 2020-08-28 10:59:05 -0700 | [diff] [blame] | 61 | ${udp_packet_bytes} 1470 # UDP payload in bytes |
Andy Bavier | e19991a | 2020-05-08 10:42:40 -0700 | [diff] [blame] | 62 | |
Hardik Windlass | a3d04b9 | 2020-02-17 15:06:05 +0000 | [diff] [blame] | 63 | # Per-test logging on failure is turned off by default; set this variable to enable |
| 64 | ${container_log_dir} ${None} |
| 65 | |
Hardik Windlass | 4353133 | 2021-05-19 07:07:03 +0000 | [diff] [blame] | 66 | # logging flag to enable Collect Logs, can be passed via the command line too |
| 67 | # example: -v logging:False |
| 68 | ${logging} True |
| 69 | |
Hardik Windlass | 4ed5450 | 2021-05-14 07:34:15 +0000 | [diff] [blame] | 70 | # Flag specific to Soak Jobs |
| 71 | ${SOAK_TEST} False |
| 72 | ${bbsim_port} 50060 |
| 73 | |
Hardik Windlass | a3d04b9 | 2020-02-17 15:06:05 +0000 | [diff] [blame] | 74 | *** Test Cases *** |
Suchitra Vemuri | 1d8e817 | 2020-06-17 17:43:56 -0700 | [diff] [blame] | 75 | Reboot DT ONUs Physically |
| 76 | [Documentation] This test reboots ONUs physically before execution all the tests |
| 77 | ... Test case runs only on the PODs that are configured with PowerSwitch that |
| 78 | ... controls the power off/on ONUs/OLT remotely (simulating a physical reboot) |
Suchitra Vemuri | 228f880 | 2021-03-10 13:14:17 -0800 | [diff] [blame] | 79 | [Tags] functionalDt PowerSwitch RebootAllDTONUs soak |
Suchitra Vemuri | 1d8e817 | 2020-06-17 17:43:56 -0700 | [diff] [blame] | 80 | [Setup] Start Logging RebootAllDTONUs |
Hardik Windlass | 4353133 | 2021-05-19 07:07:03 +0000 | [diff] [blame] | 81 | [Teardown] Run Keywords Run Keyword If ${logging} Collect Logs |
Suchitra Vemuri | 1d8e817 | 2020-06-17 17:43:56 -0700 | [diff] [blame] | 82 | ... AND Stop Logging RebootAllDTONUs |
| 83 | Power Switch Connection Suite ${web_power_switch.ip} ${web_power_switch.user} ${web_power_switch.password} |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 84 | FOR ${I} IN RANGE 0 ${num_all_onus} |
Suchitra Vemuri | 1d8e817 | 2020-06-17 17:43:56 -0700 | [diff] [blame] | 85 | ${src}= Set Variable ${hosts.src[${I}]} |
| 86 | ${dst}= Set Variable ${hosts.dst[${I}]} |
| 87 | Disable Switch Outlet ${src['power_switch_port']} |
Hardik Windlass | 5e214b2 | 2021-02-26 10:37:14 +0000 | [diff] [blame] | 88 | Sleep 10s |
Suchitra Vemuri | 1d8e817 | 2020-06-17 17:43:56 -0700 | [diff] [blame] | 89 | Enable Switch Outlet ${src['power_switch_port']} |
Suchitra Vemuri | 1d8e817 | 2020-06-17 17:43:56 -0700 | [diff] [blame] | 90 | END |
| 91 | |
Hardik Windlass | 4ed5450 | 2021-05-14 07:34:15 +0000 | [diff] [blame] | 92 | Create Soak BBSim Device |
| 93 | [Documentation] This creates and enables the BBSim device as required by the soak testing |
| 94 | ... The BBSim OLT and ONUs created as part of this test are not part of active testing |
| 95 | ... but only to mock the load on Soak POD. |
| 96 | [Tags] soak |
| 97 | [Setup] Start Logging soakPodCreateBBSimLoad |
Hardik Windlass | 4353133 | 2021-05-19 07:07:03 +0000 | [diff] [blame] | 98 | [Teardown] Run Keywords Run Keyword If ${logging} Collect Logs |
Hardik Windlass | 4ed5450 | 2021-05-14 07:34:15 +0000 | [diff] [blame] | 99 | ... AND Stop Logging soakPodCreateBBSimLoad |
| 100 | ${num_bbsim} Get Length ${bbsim} |
Hardik Windlass | ea4caf7 | 2021-07-30 07:22:12 +0000 | [diff] [blame] | 101 | @{bbsim_olt_of_id_list}= Create List |
Hardik Windlass | 4ed5450 | 2021-05-14 07:34:15 +0000 | [diff] [blame] | 102 | FOR ${I} IN RANGE 0 ${num_bbsim} |
| 103 | ${ip} Evaluate ${bbsim}[${I}].get("ip") |
| 104 | ${serial_number} Evaluate ${bbsim}[${I}].get("serial") |
| 105 | ${bbsim_olt_device_id}= Create Device ${ip} ${bbsim_port} |
| 106 | Log ${bbsim_olt_device_id} |
| 107 | Wait Until Keyword Succeeds ${timeout} 5s |
Hardik Windlass | 8b44649 | 2021-06-10 06:25:23 +0000 | [diff] [blame] | 108 | ... Validate OLT Device PREPROVISIONED UNKNOWN UNKNOWN ${bbsim_olt_device_id} by_dev_id=True |
Hardik Windlass | 4ed5450 | 2021-05-14 07:34:15 +0000 | [diff] [blame] | 109 | Enable Device ${bbsim_olt_device_id} |
| 110 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 111 | ... Validate OLT Device ENABLED ACTIVE REACHABLE ${serial_number} |
Hardik Windlass | ea4caf7 | 2021-07-30 07:22:12 +0000 | [diff] [blame] | 112 | ${bbsim_olt_of_id}= Wait Until Keyword Succeeds ${timeout} 15s Validate OLT Device in ONOS |
Hardik Windlass | 4ed5450 | 2021-05-14 07:34:15 +0000 | [diff] [blame] | 113 | ... ${serial_number} |
Hardik Windlass | ea4caf7 | 2021-07-30 07:22:12 +0000 | [diff] [blame] | 114 | Log ${bbsim_olt_of_id} |
| 115 | Append To List ${bbsim_olt_of_id_list} ${bbsim_olt_of_id} |
Hardik Windlass | 4ed5450 | 2021-05-14 07:34:15 +0000 | [diff] [blame] | 116 | END |
| 117 | # Extra sleep time for ONUs to come up Active |
Hardik Windlass | ea4caf7 | 2021-07-30 07:22:12 +0000 | [diff] [blame] | 118 | Sleep 60s |
| 119 | FOR ${bbsim_olt_of_id} IN @{bbsim_olt_of_id_list} |
| 120 | Provision all subscribers on device ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${ONOS_SSH_IP} ${ONOS_REST_PORT} |
| 121 | ... ${bbsim_olt_of_id} |
| 122 | ${total_onus_per_bbsim_olt}= Count Enabled UNI Ports ${ONOS_SSH_IP} ${ONOS_SSH_PORT} |
| 123 | ... ${bbsim_olt_of_id} |
| 124 | Wait for all flows to in ADDED state ${ONOS_SSH_IP} ${ONOS_SSH_PORT} |
| 125 | ... ${bbsim_olt_of_id} dt ${total_onus_per_bbsim_olt} 1 true |
| 126 | ... false false false true |
| 127 | END |
Hardik Windlass | 4ed5450 | 2021-05-14 07:34:15 +0000 | [diff] [blame] | 128 | |
Hardik Windlass | a3d04b9 | 2020-02-17 15:06:05 +0000 | [diff] [blame] | 129 | Sanity E2E Test for OLT/ONU on POD for DT |
| 130 | [Documentation] Validates E2E Ping Connectivity and object states for the given scenario: |
| 131 | ... Validate successful DHCP/E2E ping (no EAPOL and DHCP flows) for the tech profile that is used |
| 132 | ... Traffic sent with same vlan from different RGs, |
| 133 | ... should reach the NNI port on the OLT with the expected double tagged vlan ids |
| 134 | ... Inner vlans from the RG should not change |
Suchitra Vemuri | 228f880 | 2021-03-10 13:14:17 -0800 | [diff] [blame] | 135 | [Tags] sanityDt soak |
Hardik Windlass | 4ed5450 | 2021-05-14 07:34:15 +0000 | [diff] [blame] | 136 | [Setup] Start Logging SanityTestDt |
Hardik Windlass | 4353133 | 2021-05-19 07:07:03 +0000 | [diff] [blame] | 137 | [Teardown] Run Keywords Run Keyword If ${logging} Collect Logs |
Hardik Windlass | a3d04b9 | 2020-02-17 15:06:05 +0000 | [diff] [blame] | 138 | ... AND Stop Logging SanityTestDt |
Hardik Windlass | 4ed5450 | 2021-05-14 07:34:15 +0000 | [diff] [blame] | 139 | Setup ${SOAK_TEST} |
Hardik Windlass | a3d04b9 | 2020-02-17 15:06:05 +0000 | [diff] [blame] | 140 | Run Keyword If ${has_dataplane} Clean Up Linux |
| 141 | Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test DT |
| 142 | |
Hardik Windlass | 35706ba | 2020-02-20 08:16:42 +0000 | [diff] [blame] | 143 | Test Subscriber Delete and Add for DT |
| 144 | [Documentation] Validates E2E Ping Connectivity and object states for the given scenario: |
Hardik Windlass | 63d5e00 | 2020-03-06 21:07:09 +0530 | [diff] [blame] | 145 | ... Assuming that all the ONUs are DHCP/pingable (i.e. assuming sanityDt test was executed) |
Hardik Windlass | 35706ba | 2020-02-20 08:16:42 +0000 | [diff] [blame] | 146 | ... Delete a subscriber and validate that the pings do not succeed and state is purged |
| 147 | ... Disable and Enable the ONU (This is to replicate the existing DT behaviour) |
| 148 | ... Re-add the subscriber, and validate that the flows are present and pings are successful |
Suchitra Vemuri | 228f880 | 2021-03-10 13:14:17 -0800 | [diff] [blame] | 149 | [Tags] functionalDt SubAddDeleteDt soak |
Andy Bavier | e187eda | 2020-04-20 15:00:02 -0700 | [diff] [blame] | 150 | [Setup] Start Logging SubAddDeleteDt |
Hardik Windlass | 4353133 | 2021-05-19 07:07:03 +0000 | [diff] [blame] | 151 | [Teardown] Run Keywords Run Keyword If ${logging} Collect Logs |
Hardik Windlass | 35706ba | 2020-02-20 08:16:42 +0000 | [diff] [blame] | 152 | ... AND Stop Logging SubAddDeleteDt |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 153 | FOR ${I} IN RANGE 0 ${num_all_onus} |
Hardik Windlass | 35706ba | 2020-02-20 08:16:42 +0000 | [diff] [blame] | 154 | ${src}= Set Variable ${hosts.src[${I}]} |
| 155 | ${dst}= Set Variable ${hosts.dst[${I}]} |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 156 | ${of_id}= Get ofID From OLT List ${src['olt']} |
Hardik Windlass | 35706ba | 2020-02-20 08:16:42 +0000 | [diff] [blame] | 157 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 158 | ${olt_device_id}= Get OLTDeviceID From OLT List ${src['olt']} |
Andrea Campanella | d848de0 | 2020-11-24 10:23:41 +0100 | [diff] [blame] | 159 | ${num_of_olt_onus}= Get Num of Onus From OLT SN ${src['olt']} |
Hardik Windlass | 35706ba | 2020-02-20 08:16:42 +0000 | [diff] [blame] | 160 | ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']} |
| 161 | ... ${of_id} |
| 162 | # Remove Subscriber Access |
TorstenThieme | 4e2168e | 2021-06-22 14:01:47 +0000 | [diff] [blame] | 163 | Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command use single connection ${ONOS_SSH_IP} |
Hardik Windlass | 35706ba | 2020-02-20 08:16:42 +0000 | [diff] [blame] | 164 | ... ${ONOS_SSH_PORT} volt-remove-subscriber-access ${of_id} ${onu_port} |
Hardik Windlass | 35706ba | 2020-02-20 08:16:42 +0000 | [diff] [blame] | 165 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure |
| 166 | ... Wait Until Keyword Succeeds 60s 2s |
| 167 | ... Check Ping False ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']} |
| 168 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
Andrea Campanella | d848de0 | 2020-11-24 10:23:41 +0100 | [diff] [blame] | 169 | |
Hardik Windlass | fb5eace | 2020-03-26 14:49:01 +0530 | [diff] [blame] | 170 | # Number of Access Flows on ONOS equals 4 * the Number of Active ONUs (2 for each downstream and upstream) |
Andrea Campanella | d848de0 | 2020-11-24 10:23:41 +0100 | [diff] [blame] | 171 | ${onos_flows_count}= Evaluate 4 * ( ${num_of_olt_onus} - 1 ) |
Hardik Windlass | fb5eace | 2020-03-26 14:49:01 +0530 | [diff] [blame] | 172 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 173 | ... Verify Subscriber Access Flows Added Count DT ${ONOS_SSH_IP} ${ONOS_SSH_PORT} |
Suchitra Vemuri | 93db32b | 2020-11-23 21:27:05 -0800 | [diff] [blame] | 174 | ... ${of_id} ${onos_flows_count} |
Hardik Windlass | 35706ba | 2020-02-20 08:16:42 +0000 | [diff] [blame] | 175 | # Verify VOLTHA flows for OLT equals twice the number of ONUS (minus ONU under test) + 1 for LLDP |
Andrea Campanella | d848de0 | 2020-11-24 10:23:41 +0100 | [diff] [blame] | 176 | ${olt_flows}= Evaluate 2 * ( ${num_of_olt_onus} - 1 ) + 1 |
Hardik Windlass | 35706ba | 2020-02-20 08:16:42 +0000 | [diff] [blame] | 177 | Run Keyword Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Flows ${olt_flows} |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 178 | ... ${olt_device_id} |
Hardik Windlass | 35706ba | 2020-02-20 08:16:42 +0000 | [diff] [blame] | 179 | # Verify VOLTHA flows for ONU under test is Zero |
| 180 | Run Keyword Wait Until Keyword Succeeds ${timeout} 5s Validate Device Flows |
| 181 | ... ${onu_device_id} 0 |
| 182 | # Disable and Re-Enable the ONU (To replicate DT current workflow) |
| 183 | # TODO: Delete and Auto-Discovery Add of ONU (not yet supported) |
| 184 | Disable Device ${onu_device_id} |
| 185 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 186 | ... Validate Device DISABLED UNKNOWN |
| 187 | ... REACHABLE ${src['onu']} |
| 188 | Enable Device ${onu_device_id} |
Suchitra Vemuri | cdc32d8 | 2020-07-17 12:24:46 -0700 | [diff] [blame] | 189 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds 360s 5s |
Hardik Windlass | 35706ba | 2020-02-20 08:16:42 +0000 | [diff] [blame] | 190 | ... Validate Device ENABLED ACTIVE |
| 191 | ... REACHABLE ${src['onu']} |
| 192 | # Add Subscriber Access |
TorstenThieme | 4e2168e | 2021-06-22 14:01:47 +0000 | [diff] [blame] | 193 | Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command use single connection ${ONOS_SSH_IP} |
Hardik Windlass | 35706ba | 2020-02-20 08:16:42 +0000 | [diff] [blame] | 194 | ... ${ONOS_SSH_PORT} volt-add-subscriber-access ${of_id} ${onu_port} |
Hardik Windlass | fb5eace | 2020-03-26 14:49:01 +0530 | [diff] [blame] | 195 | # Verify subscriber access flows are added for the ONU port |
| 196 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
Hardik Windlass | 25e1170 | 2020-03-30 20:05:19 +0530 | [diff] [blame] | 197 | ... Verify Subscriber Access Flows Added For ONU DT ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id} |
| 198 | ... ${onu_port} ${nni_port} ${src['s_tag']} |
Suchitra Vemuri | cdc32d8 | 2020-07-17 12:24:46 -0700 | [diff] [blame] | 199 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds 360s 5s |
Hardik Windlass | 35706ba | 2020-02-20 08:16:42 +0000 | [diff] [blame] | 200 | ... Validate Device ENABLED ACTIVE |
| 201 | ... REACHABLE ${src['onu']} onu=True onu_reason=omci-flows-pushed |
Hardik Windlass | fb5eace | 2020-03-26 14:49:01 +0530 | [diff] [blame] | 202 | # TODO: Yet to Verify on the GPON based Physical POD (VOL-2652) |
Hardik Windlass | 35706ba | 2020-02-20 08:16:42 +0000 | [diff] [blame] | 203 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure |
| 204 | ... Wait Until Keyword Succeeds 60s 2s |
| 205 | ... Check Ping True ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']} |
| 206 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
Hardik Windlass | 35706ba | 2020-02-20 08:16:42 +0000 | [diff] [blame] | 207 | END |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 208 | # Verify flows for all OLTs |
| 209 | Run Keyword Wait Until Keyword Succeeds ${timeout} 5s Validate All OLT Flows |
Hardik Windlass | 35706ba | 2020-02-20 08:16:42 +0000 | [diff] [blame] | 210 | |
Hardik Windlass | 63d5e00 | 2020-03-06 21:07:09 +0530 | [diff] [blame] | 211 | Test Disable and Enable ONU for DT |
| 212 | [Documentation] Validates E2E Ping Connectivity and object states for the given scenario: |
| 213 | ... Assuming that all the ONUs are DHCP/pingable (i.e. assuming sanityDt test was executed) |
| 214 | ... Perform disable on the ONUs and validate that the pings do not succeed |
| 215 | ... Perform enable on the ONUs and validate that the pings are successful |
Suchitra Vemuri | 228f880 | 2021-03-10 13:14:17 -0800 | [diff] [blame] | 216 | [Tags] functionalDt DisableEnableONUDt soak |
Andy Bavier | e187eda | 2020-04-20 15:00:02 -0700 | [diff] [blame] | 217 | [Setup] Start Logging DisableEnableONUDt |
Hardik Windlass | 4353133 | 2021-05-19 07:07:03 +0000 | [diff] [blame] | 218 | [Teardown] Run Keywords Run Keyword If ${logging} Collect Logs |
Hardik Windlass | 63d5e00 | 2020-03-06 21:07:09 +0530 | [diff] [blame] | 219 | ... AND Stop Logging DisableEnableONUDt |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 220 | FOR ${I} IN RANGE 0 ${num_all_onus} |
Hardik Windlass | 63d5e00 | 2020-03-06 21:07:09 +0530 | [diff] [blame] | 221 | ${src}= Set Variable ${hosts.src[${I}]} |
| 222 | ${dst}= Set Variable ${hosts.dst[${I}]} |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 223 | ${of_id}= Get ofID From OLT List ${src['olt']} |
Hardik Windlass | 63d5e00 | 2020-03-06 21:07:09 +0530 | [diff] [blame] | 224 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
| 225 | ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']} |
| 226 | ... ${of_id} |
| 227 | Disable Device ${onu_device_id} |
| 228 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 229 | ... Validate Device DISABLED UNKNOWN |
| 230 | ... REACHABLE ${src['onu']} onu=True onu_reason=omci-admin-lock |
| 231 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
Hardik Windlass | 3901567 | 2021-07-05 05:48:08 +0000 | [diff] [blame] | 232 | ... Verify UNI Port Is Disabled ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${src['onu']} |
Hardik Windlass | fb5eace | 2020-03-26 14:49:01 +0530 | [diff] [blame] | 233 | # TODO: Yet to Verify on the GPON based Physical POD (VOL-2652) |
Hardik Windlass | 63d5e00 | 2020-03-06 21:07:09 +0530 | [diff] [blame] | 234 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure |
| 235 | ... Wait Until Keyword Succeeds 60s 2s |
| 236 | ... Check Ping False ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']} |
| 237 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 238 | Sleep 5s |
| 239 | Enable Device ${onu_device_id} |
Suchitra Vemuri | cdc32d8 | 2020-07-17 12:24:46 -0700 | [diff] [blame] | 240 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds 360s 5s |
Hardik Windlass | 63d5e00 | 2020-03-06 21:07:09 +0530 | [diff] [blame] | 241 | ... Validate Device ENABLED ACTIVE |
| 242 | ... REACHABLE ${src['onu']} onu=True onu_reason=onu-reenabled |
| 243 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
Hardik Windlass | 3901567 | 2021-07-05 05:48:08 +0000 | [diff] [blame] | 244 | ... Verify UNI Port Is Enabled ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${src['onu']} |
Hardik Windlass | fb5eace | 2020-03-26 14:49:01 +0530 | [diff] [blame] | 245 | # TODO: Yet to Verify on the GPON based Physical POD (VOL-2652) |
Hardik Windlass | 63d5e00 | 2020-03-06 21:07:09 +0530 | [diff] [blame] | 246 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure |
| 247 | ... Wait Until Keyword Succeeds 60s 2s |
| 248 | ... Check Ping True ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']} |
| 249 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
Hardik Windlass | 63d5e00 | 2020-03-06 21:07:09 +0530 | [diff] [blame] | 250 | END |
| 251 | |
Hardik Windlass | aaea340 | 2020-03-10 19:45:45 +0530 | [diff] [blame] | 252 | Test Disable and Delete OLT for DT |
| 253 | [Documentation] Validates E2E Ping Connectivity and object states for the given scenario: |
| 254 | ... Assuming that all the ONUs are DHCP/pingable (i.e. assuming sanityDt test was executed) |
| 255 | ... Perform disable on the OLT and validate ONUs state and that the pings do not succeed |
| 256 | ... Perform delete on the OLT, Re-do Setup (Recreate the OLT) and Perform Sanity Test DT |
Hardik Windlass | 4353133 | 2021-05-19 07:07:03 +0000 | [diff] [blame] | 257 | [Tags] functionalDt DisableDeleteOLTDt soak |
Suchitra Vemuri | 221398a | 2020-05-29 22:45:17 -0700 | [diff] [blame] | 258 | [Setup] Start Logging DisableDeleteOLTDt |
Hardik Windlass | 4353133 | 2021-05-19 07:07:03 +0000 | [diff] [blame] | 259 | [Teardown] Run Keywords Run Keyword If ${logging} Collect Logs |
Hardik Windlass | aaea340 | 2020-03-10 19:45:45 +0530 | [diff] [blame] | 260 | ... AND Stop Logging DisableDeleteOLTDt |
Hardik Windlass | aaea340 | 2020-03-10 19:45:45 +0530 | [diff] [blame] | 261 | # Disable and Validate OLT Device |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 262 | FOR ${I} IN RANGE 0 ${olt_count} |
| 263 | ${olt_serial_number}= Get From Dictionary ${olt_ids}[${I}] sn |
| 264 | ${olt_device_id}= Get OLTDeviceID From OLT List ${olt_serial_number} |
| 265 | Disable Device ${olt_device_id} |
| 266 | ${of_id}= Get ofID From OLT List ${olt_serial_number} |
| 267 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 268 | ... Validate OLT Device DISABLED UNKNOWN REACHABLE |
| 269 | ... ${olt_serial_number} |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 270 | ${num_onus}= Set Variable ${list_olts}[${I}][onucount] |
| 271 | # Validate ONUs |
| 272 | Run Keyword Wait Until Keyword Succeeds ${timeout} 5s Validate ONUs After OLT Disable |
Andrea Campanella | 4e50788 | 2020-11-26 11:33:11 +0100 | [diff] [blame] | 273 | ... ${num_onus} ${olt_serial_number} |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 274 | # Verify ONOS Flows |
| 275 | # Number of Access Flows on ONOS equals 4 * the Number of Active ONUs (2 for each downstream and upstream) |
| 276 | ${onos_flows_count}= Evaluate 4 * ${num_onus} |
| 277 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 278 | ... Verify Subscriber Access Flows Added Count DT ${ONOS_SSH_IP} ${ONOS_SSH_PORT} |
| 279 | ... ${of_id} ${onos_flows_count} |
| 280 | # Verify VOLTHA Flows |
| 281 | # Number of per OLT Flows equals Twice the Number of Active ONUs (each for downstream and upstream) + 1 for LLDP |
| 282 | ${olt_flows}= Evaluate 2 * ${num_onus} + 1 |
| 283 | # Number of per ONU Flows equals 2 (one each for downstream and upstream) |
| 284 | ${onu_flows}= Set Variable 2 |
| 285 | Run Keyword Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Flows ${olt_flows} |
| 286 | ... ${olt_device_id} |
| 287 | ${List_ONU_Serial} Create List |
| 288 | Set Suite Variable ${List_ONU_Serial} |
Andrea Campanella | 99a548b | 2020-11-18 09:50:32 +0100 | [diff] [blame] | 289 | Build ONU SN List ${List_ONU_Serial} ${olt_serial_number} ${num_onus} |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 290 | Log ${List_ONU_Serial} |
| 291 | Run Keyword Wait Until Keyword Succeeds ${timeout} 5s Validate ONU Flows |
| 292 | ... ${List_ONU_Serial} ${onu_flows} |
| 293 | # Delete OLT and Validate Empty Device List |
| 294 | Delete Device ${olt_device_id} |
Andrea Campanella | 4e50788 | 2020-11-26 11:33:11 +0100 | [diff] [blame] | 295 | # Check that the OLT and the ONUs are actually removed from the system |
| 296 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s Validate Device Removed |
| 297 | ... ${olt_serial_number} |
| 298 | Run Keyword and Continue On Failure Validate all ONUS for OLT Removed ${num_all_onus} ${hosts} |
| 299 | ... ${olt_serial_number} ${timeout} |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 300 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 301 | ... Verify Device Flows Removed ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id} |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 302 | END |
Hardik Windlass | aaea340 | 2020-03-10 19:45:45 +0530 | [diff] [blame] | 303 | # Re-do Setup (Recreate the OLT) and Perform Sanity Test DT |
Hardik Windlass | 4353133 | 2021-05-19 07:07:03 +0000 | [diff] [blame] | 304 | Run Keyword Setup ${SOAK_TEST} |
Suchitra Vemuri | ae9cecb | 2020-03-12 12:59:14 -0700 | [diff] [blame] | 305 | Run Keyword If ${has_dataplane} Clean Up Linux |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 306 | Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test DT |
| 307 | #Run Keyword If ${has_dataplane} Clean Up Linux |
Hardik Windlass | aaea340 | 2020-03-10 19:45:45 +0530 | [diff] [blame] | 308 | |
Hardik Windlass | 3b531fa | 2020-04-23 18:51:44 +0530 | [diff] [blame] | 309 | Test Disable and Enable OLT for DT |
| 310 | [Documentation] Validates E2E Ping Connectivity and object states for the given scenario: |
| 311 | ... Assuming that all the ONUs are DHCP/pingable (i.e. assuming sanityDt test was executed) |
| 312 | ... Perform disable on the OLT and validate that the pings do not succeed |
| 313 | ... Perform enable on the OLT and validate that the pings are successful |
Suchitra Vemuri | 228f880 | 2021-03-10 13:14:17 -0800 | [diff] [blame] | 314 | [Tags] functionalDt DisableEnableOLTDt soak |
Hardik Windlass | 3b531fa | 2020-04-23 18:51:44 +0530 | [diff] [blame] | 315 | [Setup] Start Logging DisableEnableOLTDt |
Hardik Windlass | 4353133 | 2021-05-19 07:07:03 +0000 | [diff] [blame] | 316 | [Teardown] Run Keywords Run Keyword If ${logging} Collect Logs |
Hardik Windlass | 3b531fa | 2020-04-23 18:51:44 +0530 | [diff] [blame] | 317 | ... AND Stop Logging DisableEnableOLTDt |
| 318 | # Disable and Validate OLT Device |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 319 | FOR ${I} IN RANGE 0 ${olt_count} |
| 320 | ${olt_serial_number}= Get From Dictionary ${olt_ids}[${I}] sn |
| 321 | ${olt_device_id}= Get OLTDeviceID From OLT List ${olt_serial_number} |
| 322 | ${rc} ${output}= Run and Return Rc and Output |
| 323 | ... ${VOLTCTL_CONFIG}; voltctl device disable ${olt_device_id} |
| 324 | Should Be Equal As Integers ${rc} 0 |
| 325 | Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Device DISABLED UNKNOWN REACHABLE |
| 326 | ... ${olt_serial_number} |
| 327 | END |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 328 | # Validate ONUs |
| 329 | FOR ${I} IN RANGE 0 ${num_all_onus} |
Hardik Windlass | 7c801e6 | 2020-05-04 19:33:21 +0530 | [diff] [blame] | 330 | ${src}= Set Variable ${hosts.src[${I}]} |
| 331 | ${dst}= Set Variable ${hosts.dst[${I}]} |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 332 | ${of_id}= Get ofID From OLT List ${src['olt']} |
Hardik Windlass | 7c801e6 | 2020-05-04 19:33:21 +0530 | [diff] [blame] | 333 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
| 334 | ${onu_port}= Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
| 335 | ... Get ONU Port in ONOS ${src['onu']} ${of_id} |
| 336 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
Hardik Windlass | 3901567 | 2021-07-05 05:48:08 +0000 | [diff] [blame] | 337 | ... Verify UNI Port Is Disabled ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${src['onu']} |
Hardik Windlass | 7c801e6 | 2020-05-04 19:33:21 +0530 | [diff] [blame] | 338 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure |
| 339 | ... Wait Until Keyword Succeeds 60s 2s |
| 340 | ... Check Ping False ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']} |
| 341 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 342 | # Remove Subscriber Access (To replicate DT workflow) |
TorstenThieme | 4e2168e | 2021-06-22 14:01:47 +0000 | [diff] [blame] | 343 | Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command use single connection ${ONOS_SSH_IP} |
Hardik Windlass | 7c801e6 | 2020-05-04 19:33:21 +0530 | [diff] [blame] | 344 | ... ${ONOS_SSH_PORT} volt-remove-subscriber-access ${of_id} ${onu_port} |
| 345 | # Delete ONU Device (To replicate DT workflow) |
| 346 | Delete Device ${onu_device_id} |
| 347 | END |
Hardik Windlass | 2b37e71 | 2020-06-12 02:13:17 +0530 | [diff] [blame] | 348 | Sleep 5s |
Hardik Windlass | 3b531fa | 2020-04-23 18:51:44 +0530 | [diff] [blame] | 349 | # Enable the OLT back and check ONU, OLT status are back to "ACTIVE" |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 350 | FOR ${I} IN RANGE 0 ${olt_count} |
| 351 | ${olt_serial_number}= Get From Dictionary ${olt_ids}[${I}] sn |
| 352 | ${olt_device_id}= Get OLTDeviceID From OLT List ${olt_serial_number} |
| 353 | Enable Device ${olt_device_id} |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 354 | Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Device ENABLED ACTIVE REACHABLE |
| 355 | ... ${olt_serial_number} |
| 356 | #TODO: Update for PON_OLT ETHERNET_NNI |
| 357 | #Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Port Types |
| 358 | #... PON_OLT ETHERNET_NNI |
| 359 | END |
Hardik Windlass | 7c801e6 | 2020-05-04 19:33:21 +0530 | [diff] [blame] | 360 | # Waiting extra time for the ONUs to come up |
| 361 | Sleep 60s |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 362 | Run Keyword If ${has_dataplane} Clean Up Linux |
Hardik Windlass | 7c801e6 | 2020-05-04 19:33:21 +0530 | [diff] [blame] | 363 | Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test DT |
Hardik Windlass | 3b531fa | 2020-04-23 18:51:44 +0530 | [diff] [blame] | 364 | |
| 365 | Test Delete and ReAdd OLT for DT |
| 366 | [Documentation] Validates E2E Ping Connectivity and object states for the given scenario: |
| 367 | ... Assuming that all the ONUs are DHCP/pingable (i.e. assuming sanityDt test was executed) |
| 368 | ... Disable and Delete the OLT |
| 369 | ... Create/Enable the same OLT again |
| 370 | ... Validate DHCP/E2E pings succeed for all the ONUs connected to the OLT |
Hardik Windlass | 4353133 | 2021-05-19 07:07:03 +0000 | [diff] [blame] | 371 | [Tags] functionalDt DeleteReAddOLTDt soak |
Hardik Windlass | 3b531fa | 2020-04-23 18:51:44 +0530 | [diff] [blame] | 372 | [Setup] Start Logging DeleteReAddOLTDt |
Hardik Windlass | 4353133 | 2021-05-19 07:07:03 +0000 | [diff] [blame] | 373 | [Teardown] Run Keywords Run Keyword If ${logging} Collect Logs |
Hardik Windlass | 3b531fa | 2020-04-23 18:51:44 +0530 | [diff] [blame] | 374 | ... AND Stop Logging DeleteReAddOLTDt |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 375 | FOR ${I} IN RANGE 0 ${olt_count} |
| 376 | ${olt_serial_number}= Get From Dictionary ${olt_ids}[${I}] sn |
| 377 | ${of_id}= Get ofID From OLT List ${olt_serial_number} |
| 378 | Delete Device and Verify ${olt_serial_number} |
| 379 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 380 | ... Verify Device Flows Removed ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id} |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 381 | END |
| 382 | # Recreate the OLTs |
Hardik Windlass | 4353133 | 2021-05-19 07:07:03 +0000 | [diff] [blame] | 383 | Setup ${SOAK_TEST} |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 384 | Run Keyword If ${has_dataplane} Clean Up Linux |
Hardik Windlass | 3b531fa | 2020-04-23 18:51:44 +0530 | [diff] [blame] | 385 | Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test DT |
| 386 | |
| 387 | Test Disable ONUs and OLT Then Delete ONUs and OLT for DT |
| 388 | [Documentation] On deployed POD, disable the ONU, disable the OLT and then delete ONU and OLT. |
| 389 | ... This TC is to confirm that ONU removal is not impacting OLT |
| 390 | ... Devices will be removed during the execution of this TC |
| 391 | ... so calling setup at the end to add the devices back to avoid the confusion. |
| 392 | [Tags] functionalDt DisableDeleteONUOLTDt |
| 393 | [Setup] Start Logging DisableDeleteONUOLTDt |
Hardik Windlass | 4353133 | 2021-05-19 07:07:03 +0000 | [diff] [blame] | 394 | [Teardown] Run Keywords Run Keyword If ${logging} Collect Logs |
Hardik Windlass | 3b531fa | 2020-04-23 18:51:44 +0530 | [diff] [blame] | 395 | ... AND Stop Logging DisableDeleteONUOLTDt |
Suchitra Vemuri | 0217055 | 2021-03-23 16:40:50 -0700 | [diff] [blame] | 396 | @{onu_reason}= Create List initial-mib-downloaded omci-flows-pushed |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 397 | FOR ${I} IN RANGE 0 ${num_all_onus} |
Hardik Windlass | 3b531fa | 2020-04-23 18:51:44 +0530 | [diff] [blame] | 398 | ${src}= Set Variable ${hosts.src[${I}]} |
| 399 | ${dst}= Set Variable ${hosts.dst[${I}]} |
| 400 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
| 401 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 402 | ... Validate Device ENABLED ACTIVE |
Suchitra Vemuri | 0217055 | 2021-03-23 16:40:50 -0700 | [diff] [blame] | 403 | ... REACHABLE ${src['onu']} onu=True onu_reason=${onu_reason} |
Hardik Windlass | 3b531fa | 2020-04-23 18:51:44 +0530 | [diff] [blame] | 404 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 405 | ... Validate OLT Device ENABLED ACTIVE |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 406 | ... REACHABLE ${src['olt']} |
Hardik Windlass | 3b531fa | 2020-04-23 18:51:44 +0530 | [diff] [blame] | 407 | Disable Device ${onu_device_id} |
| 408 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 409 | ... Validate Device DISABLED UNKNOWN |
| 410 | ... REACHABLE ${src['onu']} onu=false |
| 411 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 412 | ... Validate OLT Device ENABLED ACTIVE |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 413 | ... REACHABLE ${src['olt']} |
Hardik Windlass | 3b531fa | 2020-04-23 18:51:44 +0530 | [diff] [blame] | 414 | END |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 415 | # Disable all OLTs |
| 416 | FOR ${I} IN RANGE 0 ${olt_count} |
| 417 | ${olt_serial_number}= Get From Dictionary ${olt_ids}[${I}] sn |
| 418 | ${olt_device_id}= Get OLTDeviceID From OLT List ${olt_serial_number} |
| 419 | ${rc} ${output}= Run and Return Rc and Output |
| 420 | ... ${VOLTCTL_CONFIG}; voltctl device disable ${olt_device_id} |
| 421 | Should Be Equal As Integers ${rc} 0 |
| 422 | Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Device DISABLED UNKNOWN REACHABLE |
| 423 | ... ${olt_serial_number} |
| 424 | END |
| 425 | # Validate ONUs after OLT disable |
| 426 | FOR ${I} IN RANGE 0 ${num_all_onus} |
Hardik Windlass | 3b531fa | 2020-04-23 18:51:44 +0530 | [diff] [blame] | 427 | ${src}= Set Variable ${hosts.src[${I}]} |
| 428 | ${dst}= Set Variable ${hosts.dst[${I}]} |
| 429 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
| 430 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 431 | ... Validate Device DISABLED DISCOVERED |
| 432 | ... UNREACHABLE ${src['onu']} onu=false |
| 433 | Delete Device ${onu_device_id} |
| 434 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 435 | ... Validate OLT Device DISABLED UNKNOWN |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 436 | ... REACHABLE ${src['olt']} |
Hardik Windlass | 3b531fa | 2020-04-23 18:51:44 +0530 | [diff] [blame] | 437 | END |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 438 | # Delete all OLTs |
| 439 | Delete All Devices and Verify |
| 440 | |
| 441 | #Delete Device ${olt_device_id} |
| 442 | #TODO: Fix the following assertion |
| 443 | #Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s Test Empty Device List |
| 444 | #Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 445 | #... Verify Device Flows Removed ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id} |
| 446 | |
Hardik Windlass | 3b531fa | 2020-04-23 18:51:44 +0530 | [diff] [blame] | 447 | # Re-do Setup (Recreate the OLT) and Perform Sanity Test DT |
| 448 | Run Keyword Setup |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 449 | Run Keyword If ${has_dataplane} Clean Up Linux |
Hardik Windlass | 3b531fa | 2020-04-23 18:51:44 +0530 | [diff] [blame] | 450 | Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test DT |
Hardik Windlass | 3b531fa | 2020-04-23 18:51:44 +0530 | [diff] [blame] | 451 | |
Andy Bavier | e19991a | 2020-05-08 10:42:40 -0700 | [diff] [blame] | 452 | Data plane verification using TCP for DT |
| 453 | [Documentation] Test bandwidth profile is met and not exceeded for each subscriber. |
| 454 | ... Assumes iperf3 and jq installed on client and iperf -s running on DHCP server |
Matteo Scandolo | ab48f9e | 2021-06-11 17:08:00 +0200 | [diff] [blame] | 455 | [Tags] non-critical dataplaneDt BandwidthProfileTCPDt VOL-3061 soakDataplane |
Andy Bavier | dfbcaef | 2020-05-27 15:34:18 -0700 | [diff] [blame] | 456 | [Setup] Start Logging BandwidthProfileTCPDt |
Hardik Windlass | 4353133 | 2021-05-19 07:07:03 +0000 | [diff] [blame] | 457 | [Teardown] Run Keywords Run Keyword If ${logging} Collect Logs |
Andy Bavier | dfbcaef | 2020-05-27 15:34:18 -0700 | [diff] [blame] | 458 | ... AND Stop Logging BandwidthProfileTCPDt |
Andy Bavier | e19991a | 2020-05-08 10:42:40 -0700 | [diff] [blame] | 459 | Pass Execution If '${has_dataplane}'=='False' Bandwidth profile validation can be done only in |
| 460 | ... physical pod. Skipping this test in BBSIM. |
Hardik Windlass | 3280f2d | 2021-05-20 07:38:31 +0000 | [diff] [blame] | 461 | Run Keyword If '${SOAK_TEST}'=='False' Clear All Devices Then Create New Device |
Hardik Windlass | 62db9d9 | 2021-05-17 09:32:40 +0000 | [diff] [blame] | 462 | ... ELSE Setup Soak |
Suchitra Vemuri | a4e3e07 | 2020-11-06 14:23:47 -0800 | [diff] [blame] | 463 | Run Keyword If ${has_dataplane} Clean Up Linux |
Suchitra Vemuri | a4e3e07 | 2020-11-06 14:23:47 -0800 | [diff] [blame] | 464 | Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test DT |
| 465 | |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 466 | #${of_id}= Wait Until Keyword Succeeds ${timeout} 15s Validate OLT Device in ONOS |
| 467 | #... ${olt_serial_number} |
| 468 | FOR ${I} IN RANGE 0 ${num_all_onus} |
Andy Bavier | e19991a | 2020-05-08 10:42:40 -0700 | [diff] [blame] | 469 | ${src}= Set Variable ${hosts.src[${I}]} |
| 470 | ${dst}= Set Variable ${hosts.dst[${I}]} |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 471 | ${of_id}= Get ofID From OLT List ${src['olt']} |
Andy Bavier | f6ab19c | 2020-05-14 10:34:47 -0700 | [diff] [blame] | 472 | # Check for iperf3 and jq tools |
| 473 | ${stdout} ${stderr} ${rc}= Execute Remote Command which iperf3 jq |
| 474 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 475 | Pass Execution If ${rc} != 0 Skipping test: iperf3 / jq not found on the RG |
| 476 | |
Andy Bavier | e19991a | 2020-05-08 10:42:40 -0700 | [diff] [blame] | 477 | ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']} |
| 478 | ... ${of_id} |
| 479 | ${subscriber_id}= Set Variable ${of_id}/${onu_port} |
| 480 | ${bandwidth_profile_name} Get Bandwidth Profile Name For Given Subscriber ${subscriber_id} |
| 481 | ... upstreamBandwidthProfile |
Girish Gowdra | 21ec25d | 2021-05-24 10:07:01 -0700 | [diff] [blame] | 482 | ${us_cir} ${us_cbs} ${us_pir} ${us_pbs} ${us_gir}= Get Bandwidth Profile Details Ietf Rest |
| 483 | ... ${bandwidth_profile_name} |
| 484 | ${limiting_bw_value_upstream}= Set Variable If ${us_pir} != 0 ${us_pir} ${us_gir} |
Andy Bavier | e19991a | 2020-05-08 10:42:40 -0700 | [diff] [blame] | 485 | ${bandwidth_profile_name} Get Bandwidth Profile Name For Given Subscriber ${subscriber_id} |
| 486 | ... downstreamBandwidthProfile |
Girish Gowdra | 21ec25d | 2021-05-24 10:07:01 -0700 | [diff] [blame] | 487 | ${ds_cir} ${ds_cbs} ${ds_pir} ${ds_pbs} ${ds_gir}= Get Bandwidth Profile Details Ietf Rest |
| 488 | ... ${bandwidth_profile_name} |
| 489 | ${limiting_bw_value_dnstream}= Set Variable If ${ds_pir} != 0 ${ds_pir} ${ds_gir} |
Andy Bavier | e19991a | 2020-05-08 10:42:40 -0700 | [diff] [blame] | 490 | |
| 491 | # Stream TCP packets from RG to server |
| 492 | ${updict}= Run Iperf3 Test Client ${src} server=${dst['dp_iface_ip_qinq']} |
| 493 | ... args=-t 30 |
| 494 | ${actual_upstream_bw_used}= Evaluate ${updict['end']['sum_received']['bits_per_second']}/1000 |
| 495 | |
| 496 | # Stream TCP packets from server to RG |
| 497 | ${dndict}= Run Iperf3 Test Client ${src} server=${dst['dp_iface_ip_qinq']} |
| 498 | ... args=-R -t 30 |
| 499 | ${actual_dnstream_bw_used}= Evaluate ${dndict['end']['sum_received']['bits_per_second']}/1000 |
| 500 | |
| 501 | ${pct_limit_up}= Evaluate 100*${actual_upstream_bw_used}/${limiting_bw_value_upstream} |
| 502 | ${pct_limit_dn}= Evaluate 100*${actual_dnstream_bw_used}/${limiting_bw_value_dnstream} |
| 503 | Log Up: bwprof ${limiting_bw_value_upstream}Kbps, got ${actual_upstream_bw_used}Kbps (${pct_limit_up}%) |
| 504 | Log Down: bwprof ${limiting_bw_value_dnstream}Kbps, got ${actual_dnstream_bw_used}Kbps (${pct_limit_dn}%) |
| 505 | |
| 506 | Should Be True ${pct_limit_up} <= ${upper_margin_pct} |
| 507 | ... The upstream bandwidth exceeded the limit (${pct_limit_up}% of limit) |
Andy Bavier | 7613b9a | 2020-07-08 07:25:47 -0700 | [diff] [blame] | 508 | # VOL-3125: downstream bw limit not enforced. Uncomment when fixed. |
| 509 | #Should Be True ${pct_limit_dn} <= ${upper_margin_pct} |
| 510 | #... The downstream bandwidth exceeded the limit (${pct_limit_dn}% of limit) |
Andy Bavier | e19991a | 2020-05-08 10:42:40 -0700 | [diff] [blame] | 511 | Should Be True ${pct_limit_up} >= ${lower_margin_pct} |
| 512 | ... The upstream bandwidth guarantee was not met (${pct_limit_up}% of resv) |
| 513 | Should Be True ${pct_limit_dn} >= ${lower_margin_pct} |
| 514 | ... The downstream bandwidth guarantee was not met (${pct_limit_dn}% of resv) |
| 515 | END |
| 516 | |
| 517 | Data plane verification using UDP for DT |
| 518 | [Documentation] Test bandwidth profile is met and not exceeded for each subscriber. |
| 519 | ... Assumes iperf3 and jq installed on client and iperf -s running on DHCP server |
Matteo Scandolo | ab48f9e | 2021-06-11 17:08:00 +0200 | [diff] [blame] | 520 | [Tags] non-critical dataplaneDt BandwidthProfileUDPDt VOL-3061 soakDataplane |
Andy Bavier | dfbcaef | 2020-05-27 15:34:18 -0700 | [diff] [blame] | 521 | [Setup] Start Logging BandwidthProfileUDPDt |
Hardik Windlass | 4353133 | 2021-05-19 07:07:03 +0000 | [diff] [blame] | 522 | [Teardown] Run Keywords Run Keyword If ${logging} Collect Logs |
Andy Bavier | dfbcaef | 2020-05-27 15:34:18 -0700 | [diff] [blame] | 523 | ... AND Stop Logging BandwidthProfileUDPDt |
Andy Bavier | e19991a | 2020-05-08 10:42:40 -0700 | [diff] [blame] | 524 | Pass Execution If '${has_dataplane}'=='False' Bandwidth profile validation can be done only in |
| 525 | ... physical pod. Skipping this test in BBSIM. |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 526 | FOR ${I} IN RANGE 0 ${num_all_onus} |
Andy Bavier | e19991a | 2020-05-08 10:42:40 -0700 | [diff] [blame] | 527 | ${src}= Set Variable ${hosts.src[${I}]} |
| 528 | ${dst}= Set Variable ${hosts.dst[${I}]} |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 529 | ${of_id}= Get ofID From OLT List ${src['olt']} |
Andy Bavier | 7613b9a | 2020-07-08 07:25:47 -0700 | [diff] [blame] | 530 | |
| 531 | # Check for iperf3 and jq tools |
| 532 | ${stdout} ${stderr} ${rc}= Execute Remote Command which iperf3 jq |
| 533 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 534 | Pass Execution If ${rc} != 0 Skipping test: iperf3 / jq not found on the RG |
| 535 | |
Andy Bavier | e19991a | 2020-05-08 10:42:40 -0700 | [diff] [blame] | 536 | ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']} |
| 537 | ... ${of_id} |
| 538 | ${subscriber_id}= Set Variable ${of_id}/${onu_port} |
| 539 | ${bandwidth_profile_name} Get Bandwidth Profile Name For Given Subscriber ${subscriber_id} |
| 540 | ... upstreamBandwidthProfile |
Girish Gowdra | 21ec25d | 2021-05-24 10:07:01 -0700 | [diff] [blame] | 541 | ${us_cir} ${us_cbs} ${us_pir} ${us_pbs} ${us_gir}= Get Bandwidth Profile Details Ietf Rest |
| 542 | ... ${bandwidth_profile_name} |
| 543 | ${limiting_bw_value_upstream}= Set Variable If ${us_pir} != 0 ${us_pir} ${us_gir} |
Andy Bavier | e19991a | 2020-05-08 10:42:40 -0700 | [diff] [blame] | 544 | ${bandwidth_profile_name} Get Bandwidth Profile Name For Given Subscriber ${subscriber_id} |
| 545 | ... downstreamBandwidthProfile |
Girish Gowdra | 21ec25d | 2021-05-24 10:07:01 -0700 | [diff] [blame] | 546 | ${ds_cir} ${ds_cbs} ${ds_pir} ${ds_pbs} ${ds_gir}= Get Bandwidth Profile Details Ietf Rest |
| 547 | ... ${bandwidth_profile_name} |
| 548 | ${limiting_bw_value_dnstream}= Set Variable If ${ds_pir} != 0 ${ds_pir} ${ds_gir} |
Andy Bavier | e19991a | 2020-05-08 10:42:40 -0700 | [diff] [blame] | 549 | |
| 550 | # Stream UDP packets from RG to server |
Andrea Campanella | 1d34bfc | 2020-08-06 09:58:49 +0200 | [diff] [blame] | 551 | ${uprate}= Run Keyword If ${limiting_bw_value_upstream} != 1000000 |
| 552 | ... Evaluate ${limiting_bw_value_upstream}*${udp_rate_multiplier} |
Andrea Campanella | 580e049 | 2020-08-05 15:35:48 +0200 | [diff] [blame] | 553 | ... ELSE |
Andrea Campanella | 1d34bfc | 2020-08-06 09:58:49 +0200 | [diff] [blame] | 554 | ... Set Variable ${limiting_bw_value_upstream} |
Andrea Campanella | 580e049 | 2020-08-05 15:35:48 +0200 | [diff] [blame] | 555 | |
Andy Bavier | e19991a | 2020-05-08 10:42:40 -0700 | [diff] [blame] | 556 | ${updict}= Run Iperf3 Test Client ${src} server=${dst['dp_iface_ip_qinq']} |
Andy Bavier | 7dc5062 | 2020-05-28 14:34:12 -0700 | [diff] [blame] | 557 | ... args=-u -b ${uprate}K -t 30 -l ${udp_packet_bytes} --pacing-timer 0 |
Andy Bavier | e19991a | 2020-05-08 10:42:40 -0700 | [diff] [blame] | 558 | # With UDP test, bits per second is the sending rate. Multiply by the loss rate to get the throughput. |
| 559 | ${actual_upstream_bw_used}= Evaluate |
| 560 | ... (100 - ${updict['end']['sum']['lost_percent']})*${updict['end']['sum']['bits_per_second']}/100000 |
| 561 | |
| 562 | # Stream UDP packets from server to RG |
Andrea Campanella | 1d34bfc | 2020-08-06 09:58:49 +0200 | [diff] [blame] | 563 | ${dnrate}= Run Keyword If ${limiting_bw_value_dnstream} != 1000000 |
| 564 | ... Evaluate ${limiting_bw_value_dnstream}*${udp_rate_multiplier} |
Andrea Campanella | 580e049 | 2020-08-05 15:35:48 +0200 | [diff] [blame] | 565 | ... ELSE |
Andrea Campanella | 1d34bfc | 2020-08-06 09:58:49 +0200 | [diff] [blame] | 566 | ... Set Variable ${limiting_bw_value_dnstream} |
Andy Bavier | e19991a | 2020-05-08 10:42:40 -0700 | [diff] [blame] | 567 | ${dndict}= Run Iperf3 Test Client ${src} server=${dst['dp_iface_ip_qinq']} |
Andy Bavier | 7dc5062 | 2020-05-28 14:34:12 -0700 | [diff] [blame] | 568 | ... args=-u -b ${dnrate}K -R -t 30 -l ${udp_packet_bytes} --pacing-timer 0 |
Andy Bavier | e19991a | 2020-05-08 10:42:40 -0700 | [diff] [blame] | 569 | # With UDP test, bits per second is the sending rate. Multiply by the loss rate to get the throughput. |
| 570 | ${actual_dnstream_bw_used}= Evaluate |
| 571 | ... (100 - ${dndict['end']['sum']['lost_percent']})*${dndict['end']['sum']['bits_per_second']}/100000 |
| 572 | |
| 573 | ${pct_limit_up}= Evaluate 100*${actual_upstream_bw_used}/${limiting_bw_value_upstream} |
| 574 | ${pct_limit_dn}= Evaluate 100*${actual_dnstream_bw_used}/${limiting_bw_value_dnstream} |
| 575 | Log Up: bwprof ${limiting_bw_value_upstream}Kbps, got ${actual_upstream_bw_used}Kbps (${pct_limit_up}%) |
| 576 | Log Down: bwprof ${limiting_bw_value_dnstream}Kbps, got ${actual_dnstream_bw_used}Kbps (${pct_limit_dn}%) |
| 577 | |
| 578 | Should Be True ${pct_limit_up} <= ${upper_margin_pct} |
| 579 | ... The upstream bandwidth exceeded the limit (${pct_limit_up}% of limit) |
Andy Bavier | 7613b9a | 2020-07-08 07:25:47 -0700 | [diff] [blame] | 580 | # VOL-3125: downstream bw limit not enforced. Uncomment when fixed. |
| 581 | #Should Be True ${pct_limit_dn} <= ${upper_margin_pct} |
| 582 | #... The downstream bandwidth exceeded the limit (${pct_limit_dn}% of limit) |
Andy Bavier | e19991a | 2020-05-08 10:42:40 -0700 | [diff] [blame] | 583 | Should Be True ${pct_limit_up} >= ${lower_margin_pct} |
| 584 | ... The upstream bandwidth guarantee was not met (${pct_limit_up}% of resv) |
| 585 | Should Be True ${pct_limit_dn} >= ${lower_margin_pct} |
| 586 | ... The downstream bandwidth guarantee was not met (${pct_limit_dn}% of resv) |
| 587 | END |
| 588 | |
Andy Bavier | 7613b9a | 2020-07-08 07:25:47 -0700 | [diff] [blame] | 589 | Validate parsing of data traffic through voltha using tech profile |
| 590 | [Documentation] Assuming that test1 was executed where all the ONUs are authenticated/DHCP/pingable |
| 591 | ... Prerequisite tools : Tcpdump and Mausezahn traffic generator on both RG and DHCP/BNG VMs |
| 592 | ... Install jq tool to read json file, where test suite is being running |
Girish Gowdra | bbfbbc3 | 2021-05-17 14:36:58 -0700 | [diff] [blame] | 593 | ... This test sends TCP packets with pbits between 0 and 7 and validates that |
Andy Bavier | 7613b9a | 2020-07-08 07:25:47 -0700 | [diff] [blame] | 594 | ... the pbits are preserved by the PON. |
Hardik Windlass | 62db9d9 | 2021-05-17 09:32:40 +0000 | [diff] [blame] | 595 | [Tags] dataplaneDt TechProfileDt VOL-3291 soakDataplane |
Andy Bavier | 7613b9a | 2020-07-08 07:25:47 -0700 | [diff] [blame] | 596 | [Setup] Start Logging TechProfileDt |
Hardik Windlass | 4353133 | 2021-05-19 07:07:03 +0000 | [diff] [blame] | 597 | [Teardown] Run Keywords Run Keyword If ${logging} Collect Logs |
Andy Bavier | 7613b9a | 2020-07-08 07:25:47 -0700 | [diff] [blame] | 598 | ... AND Stop Logging TechProfileDt |
| 599 | Pass Execution If '${has_dataplane}'=='False' |
| 600 | ... Skipping test: Technology profile validation can be done only in physical pod |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 601 | FOR ${I} IN RANGE 0 ${num_all_onus} |
Andy Bavier | 7613b9a | 2020-07-08 07:25:47 -0700 | [diff] [blame] | 602 | ${src}= Set Variable ${hosts.src[${I}]} |
| 603 | ${dst}= Set Variable ${hosts.dst[${I}]} |
| 604 | |
Andy Bavier | 275414a | 2020-07-16 13:07:17 -0700 | [diff] [blame] | 605 | ${src_iface_name}= Fetch From Left ${src['dp_iface_name']} . |
| 606 | |
Andy Bavier | 7613b9a | 2020-07-08 07:25:47 -0700 | [diff] [blame] | 607 | ${bng_ip}= Get Variable Value ${dst['noroot_ip']} |
| 608 | ${bng_user}= Get Variable Value ${dst['noroot_user']} |
| 609 | ${bng_pass}= Get Variable Value ${dst['noroot_pass']} |
| 610 | Pass Execution If "${bng_ip}" == "${NONE}" or "${bng_user}" == "${NONE}" or "${bng_pass}" == "${NONE}" |
| 611 | ... Skipping test: credentials for BNG login required in deployment config |
| 612 | |
| 613 | ${stdout} ${stderr} ${rc}= Execute Remote Command which mausezahn tcpdump |
| 614 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 615 | Pass Execution If ${rc} != 0 Skipping test: mausezahn / tcpdump not found on the RG |
| 616 | ${stdout} ${stderr} ${rc}= Execute Remote Command which mausezahn tcpdump |
| 617 | ... ${bng_ip} ${bng_user} ${bng_pass} ${dst['container_type']} ${dst['container_name']} |
| 618 | Pass Execution If ${rc} != 0 Skipping test: mausezahn / tcpdump not found on the BNG |
| 619 | Log Upstream test |
| 620 | Run Keyword If ${has_dataplane} Create traffic with each pbit and capture at other end |
Andy Bavier | 275414a | 2020-07-16 13:07:17 -0700 | [diff] [blame] | 621 | ... ${dst['dp_iface_ip_qinq']} ${dst['dp_iface_name']} ${src_iface_name} |
Girish Gowdra | 66cd95d | 2021-07-08 10:31:54 -0700 | [diff] [blame] | 622 | ... 0 tcp ${src['c_tag']} ${src['s_tag']} upstream vlan |
Andy Bavier | 7613b9a | 2020-07-08 07:25:47 -0700 | [diff] [blame] | 623 | ... ${bng_ip} ${bng_user} ${bng_pass} ${dst['container_type']} ${dst['container_name']} |
| 624 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 625 | Log Downstream test |
| 626 | ${rg_ip} ${stderr} ${rc}= Execute Remote Command |
| 627 | ... ifconfig ${src['dp_iface_name']} | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1 }' |
| 628 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 629 | Should Be Equal As Integers ${rc} 0 Could not get RG's IP address |
| 630 | Run Keyword If ${has_dataplane} Create traffic with each pbit and capture at other end |
Girish Gowdra | 66cd95d | 2021-07-08 10:31:54 -0700 | [diff] [blame] | 631 | ... ${rg_ip} ${src_iface_name} ${dst['dp_iface_name']} |
| 632 | ... 0 tcp ${src['c_tag']} ${src['s_tag']} downstream tcp |
Andy Bavier | 7613b9a | 2020-07-08 07:25:47 -0700 | [diff] [blame] | 633 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 634 | ... ${bng_ip} ${bng_user} ${bng_pass} ${dst['container_type']} ${dst['container_name']} |
| 635 | END |
| 636 | |
Hardik Windlass | 16cdf96 | 2020-04-29 15:26:50 +0530 | [diff] [blame] | 637 | Test Disable and Enable OLT PON Port for DT |
| 638 | [Documentation] Validates E2E Ping Connectivity and object states for the given scenario: |
| 639 | ... Assuming that all the ONUs are DHCP/pingable (i.e. assuming sanityDt test was executed) |
| 640 | ... Perform disable on the OLT PON Port and validate that the pings do not succeed |
| 641 | ... Perform enable on the OLT PON Port and validate that the pings are successful |
Hardik Windlass | 4353133 | 2021-05-19 07:07:03 +0000 | [diff] [blame] | 642 | [Tags] functionalDt DisableEnableOltPonPortDt VOL-2577 soak |
Hardik Windlass | 16cdf96 | 2020-04-29 15:26:50 +0530 | [diff] [blame] | 643 | [Setup] Start Logging DisableEnableOltPonPortDt |
Hardik Windlass | 4353133 | 2021-05-19 07:07:03 +0000 | [diff] [blame] | 644 | [Teardown] Run Keywords Run Keyword If ${logging} Collect Logs |
Hardik Windlass | 16cdf96 | 2020-04-29 15:26:50 +0530 | [diff] [blame] | 645 | ... AND Stop Logging DisableEnableOltPonPortDt |
Hardik Windlass | 41701e8 | 2021-01-12 17:44:44 +0000 | [diff] [blame] | 646 | FOR ${I} IN RANGE 0 ${olt_count} |
| 647 | ${olt_serial_number}= Get From Dictionary ${olt_ids}[${I}] sn |
| 648 | Disable Enable PON Port Per OLT DT ${olt_serial_number} |
Hardik Windlass | 16cdf96 | 2020-04-29 15:26:50 +0530 | [diff] [blame] | 649 | END |
| 650 | |
Hardik Windlass | 91cc529 | 2021-07-26 10:09:40 +0000 | [diff] [blame] | 651 | Data plane Bandwidth profile update verification for DT |
| 652 | [Documentation] Test bandwidth profile is updated for one subscriber and not changed for other subscribers. |
| 653 | ... Assumes iperf3 and jq installed on client and iperf -s running on DHCP server |
| 654 | ... Assumes Default and User_Bandwidth2 profiles are configured as bandwidth profiles |
| 655 | [Tags] non-critical dataplaneDt BandwidthProfileUpdateTCPDt VOL-2549 |
| 656 | [Setup] Start Logging BandwidthProfileUpdateTCPDt |
| 657 | [Teardown] Run Keywords Collect Logs |
| 658 | ... AND Stop Logging BandwidthProfileUpdateTCPDt |
| 659 | ... AND Send File To Onos ${CURDIR}/../../tests/data/${POD_NAME}-sadis-DT.json |
| 660 | Pass Execution If '${has_dataplane}'=='False' |
| 661 | ... Bandwidth profile validation can be done only in physical pod. Skipping this test in BBSIM. |
| 662 | Delete All Devices And Verify |
| 663 | Run Keyword If ${has_dataplane} Clean Up Linux |
| 664 | Setup |
| 665 | Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test DT |
| 666 | # Update the Bandwidth Profile for the First Subscriber under test |
| 667 | ${src}= Set Variable ${hosts.src[${0}]} |
| 668 | ${dst}= Set Variable ${hosts.dst[${0}]} |
| 669 | ${of_id}= Get ofID From OLT List ${src['olt']} |
| 670 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
| 671 | ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']} |
| 672 | ... ${of_id} ${src['uni_id']} |
| 673 | ${subscriber_id}= Set Variable ${of_id}/${onu_port} |
| 674 | ${oldBwName} Get Bandwidth Profile Name For Given Subscriber ${subscriber_id} upstreamBandwidthProfile |
| 675 | # Delete the existing subscriber |
| 676 | Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command use single connection ${ONOS_SSH_IP} |
| 677 | ... ${ONOS_SSH_PORT} volt-remove-subscriber-access ${of_id} ${onu_port} |
| 678 | # Verify VOLTHA flows for ONU under test is Zero |
| 679 | Run Keyword Wait Until Keyword Succeeds ${timeout} 5s Validate Device Flows |
| 680 | ... ${onu_device_id} 0 |
| 681 | # Disable and Re-Enable the ONU (To replicate DT current workflow) |
| 682 | # TODO: Delete and Auto-Discovery Add of ONU (not yet supported) |
| 683 | Disable Device ${onu_device_id} |
| 684 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 685 | ... Validate Device DISABLED UNKNOWN |
| 686 | ... REACHABLE ${src['onu']} |
| 687 | Enable Device ${onu_device_id} |
| 688 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds 360s 5s |
| 689 | ... Validate Device ENABLED ACTIVE |
| 690 | ... REACHABLE ${src['onu']} |
| 691 | # Change the bandwidth profile and load the configuration |
| 692 | ${newBwName} Set Variable If ${oldBwName} == 'Default' 'User_Bandwidth2' 'Default' |
| 693 | ${cmd} Catenate |
| 694 | ... sed 's/upstreamBandwidthProfile": "${oldBwName}"/upstreamBandwidthProfile": "${newBwName}"/g' |
| 695 | ... ${CURDIR}/../../tests/data/${POD_NAME}-sadis-DT.json > ${CURDIR}/../../tests/data/${POD_NAME}-sadis-new.json |
| 696 | ${rc} Run and Return RC ${cmd} |
| 697 | Send File To Onos ${CURDIR}/../../tests/data/${POD_NAME}-sadis-new.json |
| 698 | # Re-add the subscriber with new bandwidth profile |
| 699 | Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command use single connection ${ONOS_SSH_IP} |
| 700 | ... ${ONOS_SSH_PORT} volt-add-subscriber-access ${of_id} ${onu_port} |
| 701 | # Verify subscriber access flows are added for the ONU port |
| 702 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 703 | ... Verify Subscriber Access Flows Added For ONU DT ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id} |
| 704 | ... ${onu_port} ${nni_port} ${src['s_tag']} |
| 705 | # Verify ONU state in voltha |
| 706 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s Validate Device |
| 707 | ... ENABLED ACTIVE REACHABLE |
| 708 | ... ${src['onu']} onu=True onu_reason=omci-flows-pushed |
| 709 | # Verify Meters in ONOS |
| 710 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 711 | ... Verify Meters in ONOS Ietf ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id} ${onu_port} |
| 712 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Validate DHCP and Ping True |
| 713 | ... True ${src['dp_iface_name']} ${src['s_tag']} ${src['c_tag']} ${dst['dp_iface_ip_qinq']} |
| 714 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 715 | ... ${dst['dp_iface_name']} ${dst['ip']} ${dst['user']} ${dst['pass']} ${dst['container_type']} |
| 716 | ... ${dst['container_name']} |
| 717 | # Verify new bandwidth profile is applied and other subscribers are working fine |
| 718 | ${checkBwName} Get Bandwidth Profile Name For Given Subscriber ${subscriber_id} upstreamBandwidthProfile |
| 719 | Should Be Equal ${checkBwName} ${newBwName} The bandwidth profile is not updated properly |
| 720 | FOR ${I} IN RANGE 0 ${num_all_onus} |
| 721 | ${src}= Set Variable ${hosts.src[${I}]} |
| 722 | ${dst}= Set Variable ${hosts.dst[${I}]} |
| 723 | ${of_id}= Get ofID From OLT List ${src['olt']} |
| 724 | # Check for iperf3 and jq tools |
| 725 | ${stdout} ${stderr} ${rc}= Execute Remote Command which iperf3 jq |
| 726 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 727 | Pass Execution If ${rc} != 0 Skipping test: iperf3 / jq not found on the RG |
| 728 | |
| 729 | ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']} |
| 730 | ... ${of_id} |
| 731 | ${subscriber_id}= Set Variable ${of_id}/${onu_port} |
| 732 | ${bandwidth_profile_name} Get Bandwidth Profile Name For Given Subscriber ${subscriber_id} |
| 733 | ... upstreamBandwidthProfile |
| 734 | ${us_cir} ${us_cbs} ${us_pir} ${us_pbs} ${us_gir}= Get Bandwidth Profile Details Ietf Rest |
| 735 | ... ${bandwidth_profile_name} |
| 736 | ${limiting_bw_value_upstream}= Set Variable If ${us_pir} != 0 ${us_pir} ${us_gir} |
| 737 | ${bandwidth_profile_name} Get Bandwidth Profile Name For Given Subscriber ${subscriber_id} |
| 738 | ... downstreamBandwidthProfile |
| 739 | ${ds_cir} ${ds_cbs} ${ds_pir} ${ds_pbs} ${ds_gir}= Get Bandwidth Profile Details Ietf Rest |
| 740 | ... ${bandwidth_profile_name} |
| 741 | ${limiting_bw_value_dnstream}= Set Variable If ${ds_pir} != 0 ${ds_pir} ${ds_gir} |
| 742 | |
| 743 | # Stream TCP packets from RG to server |
| 744 | ${updict}= Run Iperf3 Test Client ${src} server=${dst['dp_iface_ip_qinq']} |
| 745 | ... args=-t 30 |
| 746 | ${actual_upstream_bw_used}= Evaluate ${updict['end']['sum_received']['bits_per_second']}/1000 |
| 747 | |
| 748 | # Stream TCP packets from server to RG |
| 749 | ${dndict}= Run Iperf3 Test Client ${src} server=${dst['dp_iface_ip_qinq']} |
| 750 | ... args=-R -t 30 |
| 751 | ${actual_dnstream_bw_used}= Evaluate ${dndict['end']['sum_received']['bits_per_second']}/1000 |
| 752 | |
| 753 | ${pct_limit_up}= Evaluate 100*${actual_upstream_bw_used}/${limiting_bw_value_upstream} |
| 754 | ${pct_limit_dn}= Evaluate 100*${actual_dnstream_bw_used}/${limiting_bw_value_dnstream} |
| 755 | Log Up: bwprof ${limiting_bw_value_upstream}Kbps, got ${actual_upstream_bw_used}Kbps (${pct_limit_up}%) |
| 756 | Log Down: bwprof ${limiting_bw_value_dnstream}Kbps, got ${actual_dnstream_bw_used}Kbps (${pct_limit_dn}%) |
| 757 | |
| 758 | Should Be True ${pct_limit_up} <= ${upper_margin_pct} |
| 759 | ... The upstream bandwidth exceeded the limit (${pct_limit_up}% of limit) |
| 760 | # VOL-3125: downstream bw limit not enforced. Uncomment when fixed. |
| 761 | #Should Be True ${pct_limit_dn} <= ${upper_margin_pct} |
| 762 | #... The downstream bandwidth exceeded the limit (${pct_limit_dn}% of limit) |
| 763 | Should Be True ${pct_limit_up} >= ${lower_margin_pct} |
| 764 | ... The upstream bandwidth guarantee was not met (${pct_limit_up}% of resv) |
| 765 | Should Be True ${pct_limit_dn} >= ${lower_margin_pct} |
| 766 | ... The downstream bandwidth guarantee was not met (${pct_limit_dn}% of resv) |
| 767 | END |
| 768 | |
Hardik Windlass | a3d04b9 | 2020-02-17 15:06:05 +0000 | [diff] [blame] | 769 | *** Keywords *** |
| 770 | Setup Suite |
| 771 | [Documentation] Set up the test suite |
| 772 | Common Test Suite Setup |
Hung-Wei Chiu | cc6e655 | 2020-06-04 12:57:38 -0700 | [diff] [blame] | 773 | #Restore all ONUs |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 774 | #Run Keyword If ${has_dataplane} RestoreONUs ${num_all_onus} |
Suchitra Vemuri | 1d8e817 | 2020-06-17 17:43:56 -0700 | [diff] [blame] | 775 | #power_switch.robot needs it to support different vendor's power switch |
| 776 | ${switch_type}= Get Variable Value ${web_power_switch.type} |
| 777 | Run Keyword If "${switch_type}"!="" Set Global Variable ${powerswitch_type} ${switch_type} |
Hardik Windlass | a3d04b9 | 2020-02-17 15:06:05 +0000 | [diff] [blame] | 778 | |
| 779 | Clear All Devices Then Create New Device |
| 780 | [Documentation] Remove any devices from VOLTHA and ONOS |
| 781 | # Remove all devices from voltha and nos |
| 782 | Delete All Devices and Verify |
| 783 | # Execute normal test Setup Keyword |
| 784 | Setup |