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