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 |
Hardik Windlass | 5d537ad | 2021-11-16 06:01:54 +0000 | [diff] [blame] | 49 | ${timeout} 60s |
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 |
Hardik Windlass | c4d1fd6 | 2022-04-12 13:12:28 +0000 | [diff] [blame] | 57 | # flag to reboot OLT through Power Switch |
| 58 | ${power_cycle_olt} False |
Hardik Windlass | a3d04b9 | 2020-02-17 15:06:05 +0000 | [diff] [blame] | 59 | |
Andy Bavier | e19991a | 2020-05-08 10:42:40 -0700 | [diff] [blame] | 60 | # For dataplane bandwidth testing |
| 61 | ${upper_margin_pct} 105 # Allow 5% over the limit |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 62 | ${lower_margin_pct} 90 # Allow 8% under the limit |
Andy Bavier | e19991a | 2020-05-08 10:42:40 -0700 | [diff] [blame] | 63 | ${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] | 64 | ${udp_packet_bytes} 1470 # UDP payload in bytes |
Andy Bavier | e19991a | 2020-05-08 10:42:40 -0700 | [diff] [blame] | 65 | |
Hardik Windlass | a3d04b9 | 2020-02-17 15:06:05 +0000 | [diff] [blame] | 66 | # Per-test logging on failure is turned off by default; set this variable to enable |
| 67 | ${container_log_dir} ${None} |
| 68 | |
Hardik Windlass | 4353133 | 2021-05-19 07:07:03 +0000 | [diff] [blame] | 69 | # logging flag to enable Collect Logs, can be passed via the command line too |
| 70 | # example: -v logging:False |
| 71 | ${logging} True |
| 72 | |
Hardik Windlass | 4ed5450 | 2021-05-14 07:34:15 +0000 | [diff] [blame] | 73 | # Flag specific to Soak Jobs |
| 74 | ${SOAK_TEST} False |
| 75 | ${bbsim_port} 50060 |
| 76 | |
Hardik Windlass | a3d04b9 | 2020-02-17 15:06:05 +0000 | [diff] [blame] | 77 | *** Test Cases *** |
Hardik Windlass | c4d1fd6 | 2022-04-12 13:12:28 +0000 | [diff] [blame] | 78 | Reboot DT ONUs and OLTs Physically |
| 79 | [Documentation] This test reboots ONUs and OLTs physically before execution all the tests |
Suchitra Vemuri | 1d8e817 | 2020-06-17 17:43:56 -0700 | [diff] [blame] | 80 | ... Test case runs only on the PODs that are configured with PowerSwitch that |
| 81 | ... controls the power off/on ONUs/OLT remotely (simulating a physical reboot) |
Hardik Windlass | c4d1fd6 | 2022-04-12 13:12:28 +0000 | [diff] [blame] | 82 | [Tags] functionalDt PowerSwitch RebootAllDTONUsOLTs soak |
| 83 | [Setup] Start Logging RebootAllDTONUsOLTs |
Hardik Windlass | 4353133 | 2021-05-19 07:07:03 +0000 | [diff] [blame] | 84 | [Teardown] Run Keywords Run Keyword If ${logging} Collect Logs |
Hardik Windlass | c4d1fd6 | 2022-04-12 13:12:28 +0000 | [diff] [blame] | 85 | ... AND Stop Logging RebootAllDTONUsOLTs |
| 86 | Perform Reboot ONUs and OLTs Physically ${power_cycle_olt} |
Suchitra Vemuri | 1d8e817 | 2020-06-17 17:43:56 -0700 | [diff] [blame] | 87 | |
Hardik Windlass | 4ed5450 | 2021-05-14 07:34:15 +0000 | [diff] [blame] | 88 | Create Soak BBSim Device |
| 89 | [Documentation] This creates and enables the BBSim device as required by the soak testing |
| 90 | ... The BBSim OLT and ONUs created as part of this test are not part of active testing |
| 91 | ... but only to mock the load on Soak POD. |
| 92 | [Tags] soak |
| 93 | [Setup] Start Logging soakPodCreateBBSimLoad |
Hardik Windlass | 4353133 | 2021-05-19 07:07:03 +0000 | [diff] [blame] | 94 | [Teardown] Run Keywords Run Keyword If ${logging} Collect Logs |
Hardik Windlass | 4ed5450 | 2021-05-14 07:34:15 +0000 | [diff] [blame] | 95 | ... AND Stop Logging soakPodCreateBBSimLoad |
| 96 | ${num_bbsim} Get Length ${bbsim} |
Hardik Windlass | ea4caf7 | 2021-07-30 07:22:12 +0000 | [diff] [blame] | 97 | @{bbsim_olt_of_id_list}= Create List |
Hardik Windlass | 4ed5450 | 2021-05-14 07:34:15 +0000 | [diff] [blame] | 98 | FOR ${I} IN RANGE 0 ${num_bbsim} |
| 99 | ${ip} Evaluate ${bbsim}[${I}].get("ip") |
| 100 | ${serial_number} Evaluate ${bbsim}[${I}].get("serial") |
| 101 | ${bbsim_olt_device_id}= Create Device ${ip} ${bbsim_port} |
| 102 | Log ${bbsim_olt_device_id} |
| 103 | Wait Until Keyword Succeeds ${timeout} 5s |
Hardik Windlass | 8b44649 | 2021-06-10 06:25:23 +0000 | [diff] [blame] | 104 | ... 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] | 105 | Enable Device ${bbsim_olt_device_id} |
Hardik Windlass | 5d537ad | 2021-11-16 06:01:54 +0000 | [diff] [blame] | 106 | Wait Until Keyword Succeeds ${timeout} 5s |
Hardik Windlass | 4ed5450 | 2021-05-14 07:34:15 +0000 | [diff] [blame] | 107 | ... Validate OLT Device ENABLED ACTIVE REACHABLE ${serial_number} |
Hardik Windlass | ea4caf7 | 2021-07-30 07:22:12 +0000 | [diff] [blame] | 108 | ${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] | 109 | ... ${serial_number} |
Hardik Windlass | ea4caf7 | 2021-07-30 07:22:12 +0000 | [diff] [blame] | 110 | Log ${bbsim_olt_of_id} |
| 111 | Append To List ${bbsim_olt_of_id_list} ${bbsim_olt_of_id} |
Hardik Windlass | 4ed5450 | 2021-05-14 07:34:15 +0000 | [diff] [blame] | 112 | END |
| 113 | # Extra sleep time for ONUs to come up Active |
Hardik Windlass | ea4caf7 | 2021-07-30 07:22:12 +0000 | [diff] [blame] | 114 | Sleep 60s |
| 115 | FOR ${bbsim_olt_of_id} IN @{bbsim_olt_of_id_list} |
| 116 | Provision all subscribers on device ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${ONOS_SSH_IP} ${ONOS_REST_PORT} |
| 117 | ... ${bbsim_olt_of_id} |
| 118 | ${total_onus_per_bbsim_olt}= Count Enabled UNI Ports ${ONOS_SSH_IP} ${ONOS_SSH_PORT} |
| 119 | ... ${bbsim_olt_of_id} |
| 120 | Wait for all flows to in ADDED state ${ONOS_SSH_IP} ${ONOS_SSH_PORT} |
| 121 | ... ${bbsim_olt_of_id} dt ${total_onus_per_bbsim_olt} 1 true |
| 122 | ... false false false true |
| 123 | END |
Hardik Windlass | 4ed5450 | 2021-05-14 07:34:15 +0000 | [diff] [blame] | 124 | |
Hardik Windlass | a3d04b9 | 2020-02-17 15:06:05 +0000 | [diff] [blame] | 125 | Sanity E2E Test for OLT/ONU on POD for DT |
| 126 | [Documentation] Validates E2E Ping Connectivity and object states for the given scenario: |
| 127 | ... Validate successful DHCP/E2E ping (no EAPOL and DHCP flows) for the tech profile that is used |
| 128 | ... Traffic sent with same vlan from different RGs, |
| 129 | ... should reach the NNI port on the OLT with the expected double tagged vlan ids |
| 130 | ... Inner vlans from the RG should not change |
Suchitra Vemuri | 228f880 | 2021-03-10 13:14:17 -0800 | [diff] [blame] | 131 | [Tags] sanityDt soak |
Hardik Windlass | 4ed5450 | 2021-05-14 07:34:15 +0000 | [diff] [blame] | 132 | [Setup] Start Logging SanityTestDt |
Hardik Windlass | 4353133 | 2021-05-19 07:07:03 +0000 | [diff] [blame] | 133 | [Teardown] Run Keywords Run Keyword If ${logging} Collect Logs |
Hardik Windlass | a3d04b9 | 2020-02-17 15:06:05 +0000 | [diff] [blame] | 134 | ... AND Stop Logging SanityTestDt |
Hardik Windlass | 4ed5450 | 2021-05-14 07:34:15 +0000 | [diff] [blame] | 135 | Setup ${SOAK_TEST} |
Hardik Windlass | a3d04b9 | 2020-02-17 15:06:05 +0000 | [diff] [blame] | 136 | Run Keyword If ${has_dataplane} Clean Up Linux |
Hardik Windlass | 5d537ad | 2021-11-16 06:01:54 +0000 | [diff] [blame] | 137 | Perform Sanity Test DT |
Hardik Windlass | a3d04b9 | 2020-02-17 15:06:05 +0000 | [diff] [blame] | 138 | |
Hardik Windlass | 35706ba | 2020-02-20 08:16:42 +0000 | [diff] [blame] | 139 | Test Subscriber Delete and Add for DT |
| 140 | [Documentation] Validates E2E Ping Connectivity and object states for the given scenario: |
Hardik Windlass | 63d5e00 | 2020-03-06 21:07:09 +0530 | [diff] [blame] | 141 | ... 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] | 142 | ... Delete a subscriber and validate that the pings do not succeed and state is purged |
| 143 | ... Disable and Enable the ONU (This is to replicate the existing DT behaviour) |
| 144 | ... 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] | 145 | [Tags] functionalDt SubAddDeleteDt soak |
Girish Gowdra | fbdddc1 | 2021-12-17 15:39:55 +0530 | [diff] [blame] | 146 | [Setup] Run Keywords Start Logging SubAddDeleteDt |
| 147 | ... AND Run Keyword If ${has_dataplane} Set Non-Critical Tag for XGSPON Tech |
Hardik Windlass | 4353133 | 2021-05-19 07:07:03 +0000 | [diff] [blame] | 148 | [Teardown] Run Keywords Run Keyword If ${logging} Collect Logs |
Hardik Windlass | 35706ba | 2020-02-20 08:16:42 +0000 | [diff] [blame] | 149 | ... AND Stop Logging SubAddDeleteDt |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 150 | FOR ${I} IN RANGE 0 ${num_all_onus} |
Hardik Windlass | 35706ba | 2020-02-20 08:16:42 +0000 | [diff] [blame] | 151 | ${src}= Set Variable ${hosts.src[${I}]} |
| 152 | ${dst}= Set Variable ${hosts.dst[${I}]} |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 153 | ${of_id}= Get ofID From OLT List ${src['olt']} |
TorstenThieme | dda3765 | 2021-11-11 16:22:05 +0000 | [diff] [blame] | 154 | ${nni_port}= Wait Until Keyword Succeeds ${timeout} 2s Get NNI Port in ONOS ${of_id} |
Hardik Windlass | 35706ba | 2020-02-20 08:16:42 +0000 | [diff] [blame] | 155 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 156 | ${olt_device_id}= Get OLTDeviceID From OLT List ${src['olt']} |
Andrea Campanella | d848de0 | 2020-11-24 10:23:41 +0100 | [diff] [blame] | 157 | ${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] | 158 | ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']} |
Emrehan UZUN | abef518 | 2021-11-26 10:54:24 +0000 | [diff] [blame] | 159 | ... ${of_id} ${src['uni_id']} |
Hardik Windlass | 35706ba | 2020-02-20 08:16:42 +0000 | [diff] [blame] | 160 | # Remove Subscriber Access |
TorstenThieme | 4e2168e | 2021-06-22 14:01:47 +0000 | [diff] [blame] | 161 | 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] | 162 | ... ${ONOS_SSH_PORT} volt-remove-subscriber-access ${of_id} ${onu_port} |
Hardik Windlass | 35706ba | 2020-02-20 08:16:42 +0000 | [diff] [blame] | 163 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure |
Hardik Windlass | 5d537ad | 2021-11-16 06:01:54 +0000 | [diff] [blame] | 164 | ... Wait Until Keyword Succeeds ${timeout} 2s |
Hardik Windlass | 35706ba | 2020-02-20 08:16:42 +0000 | [diff] [blame] | 165 | ... Check Ping False ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']} |
| 166 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
Andrea Campanella | d848de0 | 2020-11-24 10:23:41 +0100 | [diff] [blame] | 167 | |
Hardik Windlass | fb5eace | 2020-03-26 14:49:01 +0530 | [diff] [blame] | 168 | # 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] | 169 | ${onos_flows_count}= Evaluate 4 * ( ${num_of_olt_onus} - 1 ) |
Hardik Windlass | fb5eace | 2020-03-26 14:49:01 +0530 | [diff] [blame] | 170 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 171 | ... 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] | 172 | ... ${of_id} ${onos_flows_count} |
Hardik Windlass | 35706ba | 2020-02-20 08:16:42 +0000 | [diff] [blame] | 173 | # 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] | 174 | ${olt_flows}= Evaluate 2 * ( ${num_of_olt_onus} - 1 ) + 1 |
Hardik Windlass | 5d537ad | 2021-11-16 06:01:54 +0000 | [diff] [blame] | 175 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Flows |
| 176 | ... ${olt_flows} ${olt_device_id} |
Hardik Windlass | 35706ba | 2020-02-20 08:16:42 +0000 | [diff] [blame] | 177 | # Verify VOLTHA flows for ONU under test is Zero |
| 178 | Run Keyword Wait Until Keyword Succeeds ${timeout} 5s Validate Device Flows |
| 179 | ... ${onu_device_id} 0 |
| 180 | # Disable and Re-Enable the ONU (To replicate DT current workflow) |
| 181 | # TODO: Delete and Auto-Discovery Add of ONU (not yet supported) |
| 182 | Disable Device ${onu_device_id} |
Hardik Windlass | 5d537ad | 2021-11-16 06:01:54 +0000 | [diff] [blame] | 183 | Wait Until Keyword Succeeds ${timeout} 5s |
Hardik Windlass | 35706ba | 2020-02-20 08:16:42 +0000 | [diff] [blame] | 184 | ... Validate Device DISABLED UNKNOWN |
| 185 | ... REACHABLE ${src['onu']} |
| 186 | Enable Device ${onu_device_id} |
Hardik Windlass | 5d537ad | 2021-11-16 06:01:54 +0000 | [diff] [blame] | 187 | Wait Until Keyword Succeeds 360s 5s |
Hardik Windlass | 35706ba | 2020-02-20 08:16:42 +0000 | [diff] [blame] | 188 | ... Validate Device ENABLED ACTIVE |
| 189 | ... REACHABLE ${src['onu']} |
| 190 | # Add Subscriber Access |
TorstenThieme | 4e2168e | 2021-06-22 14:01:47 +0000 | [diff] [blame] | 191 | 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] | 192 | ... ${ONOS_SSH_PORT} volt-add-subscriber-access ${of_id} ${onu_port} |
Hardik Windlass | fb5eace | 2020-03-26 14:49:01 +0530 | [diff] [blame] | 193 | # Verify subscriber access flows are added for the ONU port |
| 194 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
Hardik Windlass | 25e1170 | 2020-03-30 20:05:19 +0530 | [diff] [blame] | 195 | ... Verify Subscriber Access Flows Added For ONU DT ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id} |
| 196 | ... ${onu_port} ${nni_port} ${src['s_tag']} |
Hardik Windlass | 5d537ad | 2021-11-16 06:01:54 +0000 | [diff] [blame] | 197 | Wait Until Keyword Succeeds ${timeout} 5s |
Hardik Windlass | 35706ba | 2020-02-20 08:16:42 +0000 | [diff] [blame] | 198 | ... Validate Device ENABLED ACTIVE |
| 199 | ... REACHABLE ${src['onu']} onu=True onu_reason=omci-flows-pushed |
Girish Gowdra | d2c0e9d | 2021-11-23 14:40:23 -0800 | [diff] [blame] | 200 | # Workaround for issue seen in VOL-4489. Keep this workaround until VOL-4489 is fixed. |
| 201 | Run Keyword If ${has_dataplane} Reboot XGSPON ONU ${src['olt']} ${src['onu']} omci-flows-pushed |
| 202 | # Workaround ends here for issue seen in VOL-4489. |
Hardik Windlass | 35706ba | 2020-02-20 08:16:42 +0000 | [diff] [blame] | 203 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure |
Hardik Windlass | 5d537ad | 2021-11-16 06:01:54 +0000 | [diff] [blame] | 204 | ... Wait Until Keyword Succeeds ${timeout} 2s |
Hardik Windlass | 35706ba | 2020-02-20 08:16:42 +0000 | [diff] [blame] | 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 |
Girish Gowdra | 8fd9696 | 2021-12-14 16:20:04 +0530 | [diff] [blame] | 217 | [Setup] Run Keywords Start Logging DisableEnableONUDt |
| 218 | ... AND Run Keyword If ${has_dataplane} Set Non-Critical Tag for XGSPON Tech |
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_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']} |
Emrehan UZUN | abef518 | 2021-11-26 10:54:24 +0000 | [diff] [blame] | 226 | ... ${of_id} ${src['uni_id']} |
Hardik Windlass | 78bb0fd | 2022-06-21 15:11:54 +0530 | [diff] [blame] | 227 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
Hardik Windlass | 63d5e00 | 2020-03-06 21:07:09 +0530 | [diff] [blame] | 228 | Disable Device ${onu_device_id} |
| 229 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 230 | ... Validate Device DISABLED UNKNOWN |
Andrea Campanella | a0c2655 | 2022-05-09 09:58:34 +0200 | [diff] [blame] | 231 | ... REACHABLE ${src['onu']} onu=True onu_reason=omci-admin-lock |
Hardik Windlass | 5d537ad | 2021-11-16 06:01:54 +0000 | [diff] [blame] | 232 | Wait Until Keyword Succeeds ${timeout} 2s |
Emrehan UZUN | abef518 | 2021-11-26 10:54:24 +0000 | [diff] [blame] | 233 | ... Verify UNI Port Is Disabled ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${src['onu']} ${src['uni_id']} |
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 |
Hardik Windlass | 5d537ad | 2021-11-16 06:01:54 +0000 | [diff] [blame] | 236 | ... Wait Until Keyword Succeeds ${timeout} 2s |
Hardik Windlass | 63d5e00 | 2020-03-06 21:07:09 +0530 | [diff] [blame] | 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 |
Hardik Windlass | 5d537ad | 2021-11-16 06:01:54 +0000 | [diff] [blame] | 244 | Wait Until Keyword Succeeds ${timeout} 2s |
Emrehan UZUN | abef518 | 2021-11-26 10:54:24 +0000 | [diff] [blame] | 245 | ... Verify UNI Port Is Enabled ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${src['onu']} ${src['uni_id']} |
Girish Gowdra | c38824c | 2021-12-01 13:22:08 +0530 | [diff] [blame] | 246 | # Workaround for issue seen in VOL-4489. Keep this workaround until VOL-4489 is fixed. |
| 247 | Run Keyword If ${has_dataplane} Reboot XGSPON ONU ${src['olt']} ${src['onu']} omci-flows-pushed |
| 248 | # Workaround ends here for issue seen in VOL-4489. |
Hardik Windlass | 63d5e00 | 2020-03-06 21:07:09 +0530 | [diff] [blame] | 249 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure |
Hardik Windlass | 5d537ad | 2021-11-16 06:01:54 +0000 | [diff] [blame] | 250 | ... Wait Until Keyword Succeeds ${timeout} 2s |
Hardik Windlass | 63d5e00 | 2020-03-06 21:07:09 +0530 | [diff] [blame] | 251 | ... Check Ping True ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']} |
| 252 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
Hardik Windlass | 63d5e00 | 2020-03-06 21:07:09 +0530 | [diff] [blame] | 253 | END |
| 254 | |
Hardik Windlass | aaea340 | 2020-03-10 19:45:45 +0530 | [diff] [blame] | 255 | Test Disable and Delete OLT for DT |
| 256 | [Documentation] Validates E2E Ping Connectivity and object states for the given scenario: |
| 257 | ... Assuming that all the ONUs are DHCP/pingable (i.e. assuming sanityDt test was executed) |
| 258 | ... Perform disable on the OLT and validate ONUs state and that the pings do not succeed |
| 259 | ... 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] | 260 | [Tags] functionalDt DisableDeleteOLTDt soak |
Suchitra Vemuri | 221398a | 2020-05-29 22:45:17 -0700 | [diff] [blame] | 261 | [Setup] Start Logging DisableDeleteOLTDt |
Hardik Windlass | 4353133 | 2021-05-19 07:07:03 +0000 | [diff] [blame] | 262 | [Teardown] Run Keywords Run Keyword If ${logging} Collect Logs |
Hardik Windlass | aaea340 | 2020-03-10 19:45:45 +0530 | [diff] [blame] | 263 | ... AND Stop Logging DisableDeleteOLTDt |
Hardik Windlass | aaea340 | 2020-03-10 19:45:45 +0530 | [diff] [blame] | 264 | # Disable and Validate OLT Device |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 265 | FOR ${I} IN RANGE 0 ${olt_count} |
| 266 | ${olt_serial_number}= Get From Dictionary ${olt_ids}[${I}] sn |
| 267 | ${olt_device_id}= Get OLTDeviceID From OLT List ${olt_serial_number} |
| 268 | Disable Device ${olt_device_id} |
| 269 | ${of_id}= Get ofID From OLT List ${olt_serial_number} |
Hardik Windlass | 5d537ad | 2021-11-16 06:01:54 +0000 | [diff] [blame] | 270 | Wait Until Keyword Succeeds ${timeout} 5s |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 271 | ... Validate OLT Device DISABLED UNKNOWN REACHABLE |
| 272 | ... ${olt_serial_number} |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 273 | ${num_onus}= Set Variable ${list_olts}[${I}][onucount] |
| 274 | # Validate ONUs |
| 275 | 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] | 276 | ... ${num_onus} ${olt_serial_number} |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 277 | # Verify ONOS Flows |
TorstenThieme | 970b71b | 2022-07-13 10:31:34 +0000 | [diff] [blame] | 278 | # Number of Access Flows on ONOS equals 4 * the Number of Active ONUs (2 for each downstream and upstream) |
| 279 | ${onos_flows_count}= Evaluate 4 * ${num_onus} |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 280 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 281 | ... Verify Subscriber Access Flows Added Count DT ${ONOS_SSH_IP} ${ONOS_SSH_PORT} |
TorstenThieme | 970b71b | 2022-07-13 10:31:34 +0000 | [diff] [blame] | 282 | ... ${of_id} ${onos_flows_count} |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 283 | # Verify VOLTHA Flows |
TorstenThieme | 970b71b | 2022-07-13 10:31:34 +0000 | [diff] [blame] | 284 | # Number of per OLT Flows equals Twice the Number of Active ONUs (each for downstream and upstream) + 1 for LLDP |
| 285 | ${olt_flows}= Evaluate 2 * ${num_onus} + 1 |
| 286 | # Number of per ONU Flows equals 2 (one each for downstream and upstream) |
| 287 | ${onu_flows}= Set Variable 2 |
Andrea Campanella | 753510e | 2022-04-28 23:26:27 +0200 | [diff] [blame] | 288 | Run Keyword Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Flows |
TorstenThieme | 970b71b | 2022-07-13 10:31:34 +0000 | [diff] [blame] | 289 | ... ${olt_flows} ${olt_device_id} |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 290 | ${List_ONU_Serial} Create List |
| 291 | Set Suite Variable ${List_ONU_Serial} |
Andrea Campanella | 99a548b | 2020-11-18 09:50:32 +0100 | [diff] [blame] | 292 | Build ONU SN List ${List_ONU_Serial} ${olt_serial_number} ${num_onus} |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 293 | Log ${List_ONU_Serial} |
| 294 | Run Keyword Wait Until Keyword Succeeds ${timeout} 5s Validate ONU Flows |
TorstenThieme | 970b71b | 2022-07-13 10:31:34 +0000 | [diff] [blame] | 295 | ... ${List_ONU_Serial} ${onu_flows} |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 296 | # Delete OLT and Validate Empty Device List |
| 297 | Delete Device ${olt_device_id} |
Andrea Campanella | 4e50788 | 2020-11-26 11:33:11 +0100 | [diff] [blame] | 298 | # Check that the OLT and the ONUs are actually removed from the system |
| 299 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s Validate Device Removed |
| 300 | ... ${olt_serial_number} |
| 301 | Run Keyword and Continue On Failure Validate all ONUS for OLT Removed ${num_all_onus} ${hosts} |
| 302 | ... ${olt_serial_number} ${timeout} |
Hardik Windlass | 5d537ad | 2021-11-16 06:01:54 +0000 | [diff] [blame] | 303 | Wait Until Keyword Succeeds ${timeout} 5s |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 304 | ... Verify Device Flows Removed ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id} |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 305 | END |
Hardik Windlass | aaea340 | 2020-03-10 19:45:45 +0530 | [diff] [blame] | 306 | # Re-do Setup (Recreate the OLT) and Perform Sanity Test DT |
Hardik Windlass | 4353133 | 2021-05-19 07:07:03 +0000 | [diff] [blame] | 307 | Run Keyword Setup ${SOAK_TEST} |
Suchitra Vemuri | ae9cecb | 2020-03-12 12:59:14 -0700 | [diff] [blame] | 308 | Run Keyword If ${has_dataplane} Clean Up Linux |
Hardik Windlass | 5d537ad | 2021-11-16 06:01:54 +0000 | [diff] [blame] | 309 | Perform Sanity Test DT |
Hardik Windlass | aaea340 | 2020-03-10 19:45:45 +0530 | [diff] [blame] | 310 | |
Hardik Windlass | 3b531fa | 2020-04-23 18:51:44 +0530 | [diff] [blame] | 311 | Test Disable and Enable OLT for DT |
| 312 | [Documentation] Validates E2E Ping Connectivity and object states for the given scenario: |
| 313 | ... Assuming that all the ONUs are DHCP/pingable (i.e. assuming sanityDt test was executed) |
| 314 | ... Perform disable on the OLT and validate that the pings do not succeed |
| 315 | ... Perform enable on the OLT and validate that the pings are successful |
Suchitra Vemuri | 228f880 | 2021-03-10 13:14:17 -0800 | [diff] [blame] | 316 | [Tags] functionalDt DisableEnableOLTDt soak |
Hardik Windlass | 3b531fa | 2020-04-23 18:51:44 +0530 | [diff] [blame] | 317 | [Setup] Start Logging DisableEnableOLTDt |
Hardik Windlass | 4353133 | 2021-05-19 07:07:03 +0000 | [diff] [blame] | 318 | [Teardown] Run Keywords Run Keyword If ${logging} Collect Logs |
Hardik Windlass | 3b531fa | 2020-04-23 18:51:44 +0530 | [diff] [blame] | 319 | ... AND Stop Logging DisableEnableOLTDt |
| 320 | # Disable and Validate OLT Device |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 321 | FOR ${I} IN RANGE 0 ${olt_count} |
| 322 | ${olt_serial_number}= Get From Dictionary ${olt_ids}[${I}] sn |
| 323 | ${olt_device_id}= Get OLTDeviceID From OLT List ${olt_serial_number} |
| 324 | ${rc} ${output}= Run and Return Rc and Output |
Jan Klare | c92d698 | 2023-09-05 14:46:52 +0200 | [diff] [blame] | 325 | ... voltctl -c ${VOLTCTL_CONFIG} device disable ${olt_device_id} |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 326 | Should Be Equal As Integers ${rc} 0 |
| 327 | Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Device DISABLED UNKNOWN REACHABLE |
| 328 | ... ${olt_serial_number} |
| 329 | END |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 330 | # Validate ONUs |
| 331 | FOR ${I} IN RANGE 0 ${num_all_onus} |
Hardik Windlass | 7c801e6 | 2020-05-04 19:33:21 +0530 | [diff] [blame] | 332 | ${src}= Set Variable ${hosts.src[${I}]} |
| 333 | ${dst}= Set Variable ${hosts.dst[${I}]} |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 334 | ${of_id}= Get ofID From OLT List ${src['olt']} |
Hardik Windlass | 5d537ad | 2021-11-16 06:01:54 +0000 | [diff] [blame] | 335 | ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s |
Emrehan UZUN | abef518 | 2021-11-26 10:54:24 +0000 | [diff] [blame] | 336 | ... Get ONU Port in ONOS ${src['onu']} ${of_id} ${src['uni_id']} |
Hardik Windlass | 78bb0fd | 2022-06-21 15:11:54 +0530 | [diff] [blame] | 337 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
Hardik Windlass | 5d537ad | 2021-11-16 06:01:54 +0000 | [diff] [blame] | 338 | Wait Until Keyword Succeeds ${timeout} 2s |
Emrehan UZUN | abef518 | 2021-11-26 10:54:24 +0000 | [diff] [blame] | 339 | ... Verify UNI Port Is Disabled ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${src['onu']} ${src['uni_id']} |
Hardik Windlass | 7c801e6 | 2020-05-04 19:33:21 +0530 | [diff] [blame] | 340 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure |
Hardik Windlass | 5d537ad | 2021-11-16 06:01:54 +0000 | [diff] [blame] | 341 | ... Wait Until Keyword Succeeds ${timeout} 2s |
Hardik Windlass | 7c801e6 | 2020-05-04 19:33:21 +0530 | [diff] [blame] | 342 | ... Check Ping False ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']} |
| 343 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 344 | # Remove Subscriber Access (To replicate DT workflow) |
TorstenThieme | 4e2168e | 2021-06-22 14:01:47 +0000 | [diff] [blame] | 345 | 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] | 346 | ... ${ONOS_SSH_PORT} volt-remove-subscriber-access ${of_id} ${onu_port} |
| 347 | # Delete ONU Device (To replicate DT workflow) |
| 348 | Delete Device ${onu_device_id} |
| 349 | END |
Hardik Windlass | 2b37e71 | 2020-06-12 02:13:17 +0530 | [diff] [blame] | 350 | Sleep 5s |
Hardik Windlass | 3b531fa | 2020-04-23 18:51:44 +0530 | [diff] [blame] | 351 | # 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] | 352 | FOR ${I} IN RANGE 0 ${olt_count} |
| 353 | ${olt_serial_number}= Get From Dictionary ${olt_ids}[${I}] sn |
| 354 | ${olt_device_id}= Get OLTDeviceID From OLT List ${olt_serial_number} |
| 355 | Enable Device ${olt_device_id} |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 356 | Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Device ENABLED ACTIVE REACHABLE |
| 357 | ... ${olt_serial_number} |
| 358 | #TODO: Update for PON_OLT ETHERNET_NNI |
| 359 | #Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Port Types |
| 360 | #... PON_OLT ETHERNET_NNI |
| 361 | END |
Hardik Windlass | 7c801e6 | 2020-05-04 19:33:21 +0530 | [diff] [blame] | 362 | # Waiting extra time for the ONUs to come up |
| 363 | Sleep 60s |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 364 | Run Keyword If ${has_dataplane} Clean Up Linux |
Hardik Windlass | 5d537ad | 2021-11-16 06:01:54 +0000 | [diff] [blame] | 365 | Perform Sanity Test DT |
Hardik Windlass | 3b531fa | 2020-04-23 18:51:44 +0530 | [diff] [blame] | 366 | |
| 367 | Test Delete and ReAdd OLT for DT |
| 368 | [Documentation] Validates E2E Ping Connectivity and object states for the given scenario: |
| 369 | ... Assuming that all the ONUs are DHCP/pingable (i.e. assuming sanityDt test was executed) |
| 370 | ... Disable and Delete the OLT |
| 371 | ... Create/Enable the same OLT again |
| 372 | ... 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] | 373 | [Tags] functionalDt DeleteReAddOLTDt soak |
Hardik Windlass | 3b531fa | 2020-04-23 18:51:44 +0530 | [diff] [blame] | 374 | [Setup] Start Logging DeleteReAddOLTDt |
Hardik Windlass | 4353133 | 2021-05-19 07:07:03 +0000 | [diff] [blame] | 375 | [Teardown] Run Keywords Run Keyword If ${logging} Collect Logs |
Hardik Windlass | 3b531fa | 2020-04-23 18:51:44 +0530 | [diff] [blame] | 376 | ... AND Stop Logging DeleteReAddOLTDt |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 377 | FOR ${I} IN RANGE 0 ${olt_count} |
| 378 | ${olt_serial_number}= Get From Dictionary ${olt_ids}[${I}] sn |
| 379 | ${of_id}= Get ofID From OLT List ${olt_serial_number} |
| 380 | Delete Device and Verify ${olt_serial_number} |
Hardik Windlass | 5d537ad | 2021-11-16 06:01:54 +0000 | [diff] [blame] | 381 | Wait Until Keyword Succeeds ${timeout} 5s |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 382 | ... Verify Device Flows Removed ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id} |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 383 | END |
| 384 | # Recreate the OLTs |
Hardik Windlass | 4353133 | 2021-05-19 07:07:03 +0000 | [diff] [blame] | 385 | Setup ${SOAK_TEST} |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 386 | Run Keyword If ${has_dataplane} Clean Up Linux |
Hardik Windlass | 5d537ad | 2021-11-16 06:01:54 +0000 | [diff] [blame] | 387 | Perform Sanity Test DT |
Hardik Windlass | 3b531fa | 2020-04-23 18:51:44 +0530 | [diff] [blame] | 388 | |
| 389 | Test Disable ONUs and OLT Then Delete ONUs and OLT for DT |
| 390 | [Documentation] On deployed POD, disable the ONU, disable the OLT and then delete ONU and OLT. |
| 391 | ... This TC is to confirm that ONU removal is not impacting OLT |
| 392 | ... Devices will be removed during the execution of this TC |
| 393 | ... so calling setup at the end to add the devices back to avoid the confusion. |
| 394 | [Tags] functionalDt DisableDeleteONUOLTDt |
Girish Gowdra | 8fd9696 | 2021-12-14 16:20:04 +0530 | [diff] [blame] | 395 | [Setup] Run Keywords Start Logging DisableDeleteONUOLTDt |
| 396 | ... AND Run Keyword If ${has_dataplane} Set Non-Critical Tag for XGSPON Tech |
Hardik Windlass | 4353133 | 2021-05-19 07:07:03 +0000 | [diff] [blame] | 397 | [Teardown] Run Keywords Run Keyword If ${logging} Collect Logs |
Hardik Windlass | 3b531fa | 2020-04-23 18:51:44 +0530 | [diff] [blame] | 398 | ... AND Stop Logging DisableDeleteONUOLTDt |
Suchitra Vemuri | 0217055 | 2021-03-23 16:40:50 -0700 | [diff] [blame] | 399 | @{onu_reason}= Create List initial-mib-downloaded omci-flows-pushed |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 400 | FOR ${I} IN RANGE 0 ${num_all_onus} |
Hardik Windlass | 3b531fa | 2020-04-23 18:51:44 +0530 | [diff] [blame] | 401 | ${src}= Set Variable ${hosts.src[${I}]} |
| 402 | ${dst}= Set Variable ${hosts.dst[${I}]} |
| 403 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
| 404 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 405 | ... Validate Device ENABLED ACTIVE |
Suchitra Vemuri | 0217055 | 2021-03-23 16:40:50 -0700 | [diff] [blame] | 406 | ... REACHABLE ${src['onu']} onu=True onu_reason=${onu_reason} |
Hardik Windlass | 5d537ad | 2021-11-16 06:01:54 +0000 | [diff] [blame] | 407 | Wait Until Keyword Succeeds ${timeout} 5s |
Hardik Windlass | 3b531fa | 2020-04-23 18:51:44 +0530 | [diff] [blame] | 408 | ... Validate OLT Device ENABLED ACTIVE |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 409 | ... REACHABLE ${src['olt']} |
Hardik Windlass | 3b531fa | 2020-04-23 18:51:44 +0530 | [diff] [blame] | 410 | Disable Device ${onu_device_id} |
| 411 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 412 | ... Validate Device DISABLED UNKNOWN |
| 413 | ... REACHABLE ${src['onu']} onu=false |
Hardik Windlass | 5d537ad | 2021-11-16 06:01:54 +0000 | [diff] [blame] | 414 | Wait Until Keyword Succeeds ${timeout} 5s |
Hardik Windlass | 3b531fa | 2020-04-23 18:51:44 +0530 | [diff] [blame] | 415 | ... Validate OLT Device ENABLED ACTIVE |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 416 | ... REACHABLE ${src['olt']} |
Hardik Windlass | 3b531fa | 2020-04-23 18:51:44 +0530 | [diff] [blame] | 417 | END |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 418 | # Disable all OLTs |
| 419 | FOR ${I} IN RANGE 0 ${olt_count} |
| 420 | ${olt_serial_number}= Get From Dictionary ${olt_ids}[${I}] sn |
| 421 | ${olt_device_id}= Get OLTDeviceID From OLT List ${olt_serial_number} |
| 422 | ${rc} ${output}= Run and Return Rc and Output |
Jan Klare | c92d698 | 2023-09-05 14:46:52 +0200 | [diff] [blame] | 423 | ... voltctl -c ${VOLTCTL_CONFIG} device disable ${olt_device_id} |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 424 | Should Be Equal As Integers ${rc} 0 |
| 425 | Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Device DISABLED UNKNOWN REACHABLE |
| 426 | ... ${olt_serial_number} |
| 427 | END |
| 428 | # Validate ONUs after OLT disable |
| 429 | FOR ${I} IN RANGE 0 ${num_all_onus} |
Hardik Windlass | 3b531fa | 2020-04-23 18:51:44 +0530 | [diff] [blame] | 430 | ${src}= Set Variable ${hosts.src[${I}]} |
| 431 | ${dst}= Set Variable ${hosts.dst[${I}]} |
| 432 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
Hardik Windlass | 5d537ad | 2021-11-16 06:01:54 +0000 | [diff] [blame] | 433 | Wait Until Keyword Succeeds ${timeout} 5s |
Hardik Windlass | 3b531fa | 2020-04-23 18:51:44 +0530 | [diff] [blame] | 434 | ... Validate Device DISABLED DISCOVERED |
| 435 | ... UNREACHABLE ${src['onu']} onu=false |
| 436 | Delete Device ${onu_device_id} |
Hardik Windlass | 5d537ad | 2021-11-16 06:01:54 +0000 | [diff] [blame] | 437 | Wait Until Keyword Succeeds ${timeout} 5s |
Hardik Windlass | 3b531fa | 2020-04-23 18:51:44 +0530 | [diff] [blame] | 438 | ... Validate OLT Device DISABLED UNKNOWN |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 439 | ... REACHABLE ${src['olt']} |
Hardik Windlass | 3b531fa | 2020-04-23 18:51:44 +0530 | [diff] [blame] | 440 | END |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 441 | # Delete all OLTs |
| 442 | Delete All Devices and Verify |
| 443 | |
| 444 | #Delete Device ${olt_device_id} |
| 445 | #TODO: Fix the following assertion |
| 446 | #Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s Test Empty Device List |
| 447 | #Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 448 | #... Verify Device Flows Removed ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id} |
| 449 | |
Hardik Windlass | 3b531fa | 2020-04-23 18:51:44 +0530 | [diff] [blame] | 450 | # Re-do Setup (Recreate the OLT) and Perform Sanity Test DT |
| 451 | Run Keyword Setup |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 452 | Run Keyword If ${has_dataplane} Clean Up Linux |
Hardik Windlass | 5d537ad | 2021-11-16 06:01:54 +0000 | [diff] [blame] | 453 | Perform Sanity Test DT |
Hardik Windlass | 3b531fa | 2020-04-23 18:51:44 +0530 | [diff] [blame] | 454 | |
Andy Bavier | e19991a | 2020-05-08 10:42:40 -0700 | [diff] [blame] | 455 | Data plane verification using TCP for DT |
| 456 | [Documentation] Test bandwidth profile is met and not exceeded for each subscriber. |
| 457 | ... 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] | 458 | [Tags] non-critical dataplaneDt BandwidthProfileTCPDt VOL-3061 soakDataplane |
Andy Bavier | dfbcaef | 2020-05-27 15:34:18 -0700 | [diff] [blame] | 459 | [Setup] Start Logging BandwidthProfileTCPDt |
Hardik Windlass | 4353133 | 2021-05-19 07:07:03 +0000 | [diff] [blame] | 460 | [Teardown] Run Keywords Run Keyword If ${logging} Collect Logs |
Andy Bavier | dfbcaef | 2020-05-27 15:34:18 -0700 | [diff] [blame] | 461 | ... AND Stop Logging BandwidthProfileTCPDt |
Andy Bavier | e19991a | 2020-05-08 10:42:40 -0700 | [diff] [blame] | 462 | Pass Execution If '${has_dataplane}'=='False' Bandwidth profile validation can be done only in |
| 463 | ... physical pod. Skipping this test in BBSIM. |
Hardik Windlass | 3280f2d | 2021-05-20 07:38:31 +0000 | [diff] [blame] | 464 | 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] | 465 | ... ELSE Setup Soak |
Suchitra Vemuri | a4e3e07 | 2020-11-06 14:23:47 -0800 | [diff] [blame] | 466 | Run Keyword If ${has_dataplane} Clean Up Linux |
Hardik Windlass | 5d537ad | 2021-11-16 06:01:54 +0000 | [diff] [blame] | 467 | Perform Sanity Test DT |
Suchitra Vemuri | a4e3e07 | 2020-11-06 14:23:47 -0800 | [diff] [blame] | 468 | |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 469 | #${of_id}= Wait Until Keyword Succeeds ${timeout} 15s Validate OLT Device in ONOS |
| 470 | #... ${olt_serial_number} |
| 471 | FOR ${I} IN RANGE 0 ${num_all_onus} |
Andy Bavier | e19991a | 2020-05-08 10:42:40 -0700 | [diff] [blame] | 472 | ${src}= Set Variable ${hosts.src[${I}]} |
| 473 | ${dst}= Set Variable ${hosts.dst[${I}]} |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 474 | ${of_id}= Get ofID From OLT List ${src['olt']} |
Andy Bavier | f6ab19c | 2020-05-14 10:34:47 -0700 | [diff] [blame] | 475 | # Check for iperf3 and jq tools |
| 476 | ${stdout} ${stderr} ${rc}= Execute Remote Command which iperf3 jq |
| 477 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 478 | Pass Execution If ${rc} != 0 Skipping test: iperf3 / jq not found on the RG |
| 479 | |
Andy Bavier | e19991a | 2020-05-08 10:42:40 -0700 | [diff] [blame] | 480 | ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']} |
Emrehan UZUN | abef518 | 2021-11-26 10:54:24 +0000 | [diff] [blame] | 481 | ... ${of_id} ${src['uni_id']} |
Andy Bavier | e19991a | 2020-05-08 10:42:40 -0700 | [diff] [blame] | 482 | ${subscriber_id}= Set Variable ${of_id}/${onu_port} |
| 483 | ${bandwidth_profile_name} Get Bandwidth Profile Name For Given Subscriber ${subscriber_id} |
| 484 | ... upstreamBandwidthProfile |
Girish Gowdra | 21ec25d | 2021-05-24 10:07:01 -0700 | [diff] [blame] | 485 | ${us_cir} ${us_cbs} ${us_pir} ${us_pbs} ${us_gir}= Get Bandwidth Profile Details Ietf Rest |
| 486 | ... ${bandwidth_profile_name} |
| 487 | ${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] | 488 | ${bandwidth_profile_name} Get Bandwidth Profile Name For Given Subscriber ${subscriber_id} |
| 489 | ... downstreamBandwidthProfile |
Girish Gowdra | 21ec25d | 2021-05-24 10:07:01 -0700 | [diff] [blame] | 490 | ${ds_cir} ${ds_cbs} ${ds_pir} ${ds_pbs} ${ds_gir}= Get Bandwidth Profile Details Ietf Rest |
| 491 | ... ${bandwidth_profile_name} |
| 492 | ${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] | 493 | |
| 494 | # Stream TCP packets from RG to server |
| 495 | ${updict}= Run Iperf3 Test Client ${src} server=${dst['dp_iface_ip_qinq']} |
| 496 | ... args=-t 30 |
| 497 | ${actual_upstream_bw_used}= Evaluate ${updict['end']['sum_received']['bits_per_second']}/1000 |
| 498 | |
| 499 | # Stream TCP packets from server to RG |
| 500 | ${dndict}= Run Iperf3 Test Client ${src} server=${dst['dp_iface_ip_qinq']} |
| 501 | ... args=-R -t 30 |
| 502 | ${actual_dnstream_bw_used}= Evaluate ${dndict['end']['sum_received']['bits_per_second']}/1000 |
| 503 | |
| 504 | ${pct_limit_up}= Evaluate 100*${actual_upstream_bw_used}/${limiting_bw_value_upstream} |
| 505 | ${pct_limit_dn}= Evaluate 100*${actual_dnstream_bw_used}/${limiting_bw_value_dnstream} |
| 506 | Log Up: bwprof ${limiting_bw_value_upstream}Kbps, got ${actual_upstream_bw_used}Kbps (${pct_limit_up}%) |
| 507 | Log Down: bwprof ${limiting_bw_value_dnstream}Kbps, got ${actual_dnstream_bw_used}Kbps (${pct_limit_dn}%) |
| 508 | |
| 509 | Should Be True ${pct_limit_up} <= ${upper_margin_pct} |
| 510 | ... The upstream bandwidth exceeded the limit (${pct_limit_up}% of limit) |
Andy Bavier | 7613b9a | 2020-07-08 07:25:47 -0700 | [diff] [blame] | 511 | # VOL-3125: downstream bw limit not enforced. Uncomment when fixed. |
| 512 | #Should Be True ${pct_limit_dn} <= ${upper_margin_pct} |
| 513 | #... The downstream bandwidth exceeded the limit (${pct_limit_dn}% of limit) |
Andy Bavier | e19991a | 2020-05-08 10:42:40 -0700 | [diff] [blame] | 514 | Should Be True ${pct_limit_up} >= ${lower_margin_pct} |
| 515 | ... The upstream bandwidth guarantee was not met (${pct_limit_up}% of resv) |
| 516 | Should Be True ${pct_limit_dn} >= ${lower_margin_pct} |
| 517 | ... The downstream bandwidth guarantee was not met (${pct_limit_dn}% of resv) |
| 518 | END |
| 519 | |
| 520 | Data plane verification using UDP for DT |
| 521 | [Documentation] Test bandwidth profile is met and not exceeded for each subscriber. |
| 522 | ... 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] | 523 | [Tags] non-critical dataplaneDt BandwidthProfileUDPDt VOL-3061 soakDataplane |
Andy Bavier | dfbcaef | 2020-05-27 15:34:18 -0700 | [diff] [blame] | 524 | [Setup] Start Logging BandwidthProfileUDPDt |
Hardik Windlass | 4353133 | 2021-05-19 07:07:03 +0000 | [diff] [blame] | 525 | [Teardown] Run Keywords Run Keyword If ${logging} Collect Logs |
Andy Bavier | dfbcaef | 2020-05-27 15:34:18 -0700 | [diff] [blame] | 526 | ... AND Stop Logging BandwidthProfileUDPDt |
Andy Bavier | e19991a | 2020-05-08 10:42:40 -0700 | [diff] [blame] | 527 | Pass Execution If '${has_dataplane}'=='False' Bandwidth profile validation can be done only in |
| 528 | ... physical pod. Skipping this test in BBSIM. |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 529 | FOR ${I} IN RANGE 0 ${num_all_onus} |
Andy Bavier | e19991a | 2020-05-08 10:42:40 -0700 | [diff] [blame] | 530 | ${src}= Set Variable ${hosts.src[${I}]} |
| 531 | ${dst}= Set Variable ${hosts.dst[${I}]} |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 532 | ${of_id}= Get ofID From OLT List ${src['olt']} |
Andy Bavier | 7613b9a | 2020-07-08 07:25:47 -0700 | [diff] [blame] | 533 | |
| 534 | # Check for iperf3 and jq tools |
| 535 | ${stdout} ${stderr} ${rc}= Execute Remote Command which iperf3 jq |
| 536 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 537 | Pass Execution If ${rc} != 0 Skipping test: iperf3 / jq not found on the RG |
| 538 | |
Andy Bavier | e19991a | 2020-05-08 10:42:40 -0700 | [diff] [blame] | 539 | ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']} |
Emrehan UZUN | abef518 | 2021-11-26 10:54:24 +0000 | [diff] [blame] | 540 | ... ${of_id} ${src['uni_id']} |
Andy Bavier | e19991a | 2020-05-08 10:42:40 -0700 | [diff] [blame] | 541 | ${subscriber_id}= Set Variable ${of_id}/${onu_port} |
| 542 | ${bandwidth_profile_name} Get Bandwidth Profile Name For Given Subscriber ${subscriber_id} |
| 543 | ... upstreamBandwidthProfile |
Girish Gowdra | 21ec25d | 2021-05-24 10:07:01 -0700 | [diff] [blame] | 544 | ${us_cir} ${us_cbs} ${us_pir} ${us_pbs} ${us_gir}= Get Bandwidth Profile Details Ietf Rest |
| 545 | ... ${bandwidth_profile_name} |
| 546 | ${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] | 547 | ${bandwidth_profile_name} Get Bandwidth Profile Name For Given Subscriber ${subscriber_id} |
| 548 | ... downstreamBandwidthProfile |
Girish Gowdra | 21ec25d | 2021-05-24 10:07:01 -0700 | [diff] [blame] | 549 | ${ds_cir} ${ds_cbs} ${ds_pir} ${ds_pbs} ${ds_gir}= Get Bandwidth Profile Details Ietf Rest |
| 550 | ... ${bandwidth_profile_name} |
| 551 | ${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] | 552 | |
| 553 | # Stream UDP packets from RG to server |
Andrea Campanella | 1d34bfc | 2020-08-06 09:58:49 +0200 | [diff] [blame] | 554 | ${uprate}= Run Keyword If ${limiting_bw_value_upstream} != 1000000 |
| 555 | ... Evaluate ${limiting_bw_value_upstream}*${udp_rate_multiplier} |
Andrea Campanella | 580e049 | 2020-08-05 15:35:48 +0200 | [diff] [blame] | 556 | ... ELSE |
Andrea Campanella | 1d34bfc | 2020-08-06 09:58:49 +0200 | [diff] [blame] | 557 | ... Set Variable ${limiting_bw_value_upstream} |
Andrea Campanella | 580e049 | 2020-08-05 15:35:48 +0200 | [diff] [blame] | 558 | |
Andy Bavier | e19991a | 2020-05-08 10:42:40 -0700 | [diff] [blame] | 559 | ${updict}= Run Iperf3 Test Client ${src} server=${dst['dp_iface_ip_qinq']} |
Andy Bavier | 7dc5062 | 2020-05-28 14:34:12 -0700 | [diff] [blame] | 560 | ... 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] | 561 | # With UDP test, bits per second is the sending rate. Multiply by the loss rate to get the throughput. |
| 562 | ${actual_upstream_bw_used}= Evaluate |
| 563 | ... (100 - ${updict['end']['sum']['lost_percent']})*${updict['end']['sum']['bits_per_second']}/100000 |
| 564 | |
| 565 | # Stream UDP packets from server to RG |
Andrea Campanella | 1d34bfc | 2020-08-06 09:58:49 +0200 | [diff] [blame] | 566 | ${dnrate}= Run Keyword If ${limiting_bw_value_dnstream} != 1000000 |
| 567 | ... Evaluate ${limiting_bw_value_dnstream}*${udp_rate_multiplier} |
Andrea Campanella | 580e049 | 2020-08-05 15:35:48 +0200 | [diff] [blame] | 568 | ... ELSE |
Andrea Campanella | 1d34bfc | 2020-08-06 09:58:49 +0200 | [diff] [blame] | 569 | ... Set Variable ${limiting_bw_value_dnstream} |
Andy Bavier | e19991a | 2020-05-08 10:42:40 -0700 | [diff] [blame] | 570 | ${dndict}= Run Iperf3 Test Client ${src} server=${dst['dp_iface_ip_qinq']} |
Andy Bavier | 7dc5062 | 2020-05-28 14:34:12 -0700 | [diff] [blame] | 571 | ... 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] | 572 | # With UDP test, bits per second is the sending rate. Multiply by the loss rate to get the throughput. |
| 573 | ${actual_dnstream_bw_used}= Evaluate |
| 574 | ... (100 - ${dndict['end']['sum']['lost_percent']})*${dndict['end']['sum']['bits_per_second']}/100000 |
| 575 | |
| 576 | ${pct_limit_up}= Evaluate 100*${actual_upstream_bw_used}/${limiting_bw_value_upstream} |
| 577 | ${pct_limit_dn}= Evaluate 100*${actual_dnstream_bw_used}/${limiting_bw_value_dnstream} |
| 578 | Log Up: bwprof ${limiting_bw_value_upstream}Kbps, got ${actual_upstream_bw_used}Kbps (${pct_limit_up}%) |
| 579 | Log Down: bwprof ${limiting_bw_value_dnstream}Kbps, got ${actual_dnstream_bw_used}Kbps (${pct_limit_dn}%) |
| 580 | |
| 581 | Should Be True ${pct_limit_up} <= ${upper_margin_pct} |
| 582 | ... The upstream bandwidth exceeded the limit (${pct_limit_up}% of limit) |
Andy Bavier | 7613b9a | 2020-07-08 07:25:47 -0700 | [diff] [blame] | 583 | # VOL-3125: downstream bw limit not enforced. Uncomment when fixed. |
| 584 | #Should Be True ${pct_limit_dn} <= ${upper_margin_pct} |
| 585 | #... The downstream bandwidth exceeded the limit (${pct_limit_dn}% of limit) |
Andy Bavier | e19991a | 2020-05-08 10:42:40 -0700 | [diff] [blame] | 586 | Should Be True ${pct_limit_up} >= ${lower_margin_pct} |
| 587 | ... The upstream bandwidth guarantee was not met (${pct_limit_up}% of resv) |
| 588 | Should Be True ${pct_limit_dn} >= ${lower_margin_pct} |
| 589 | ... The downstream bandwidth guarantee was not met (${pct_limit_dn}% of resv) |
| 590 | END |
| 591 | |
Joey Armstrong | b215128 | 2023-01-12 09:38:28 -0500 | [diff] [blame] | 592 | Reconcile with data plane verification using TCP for DT |
| 593 | [Documentation] Test bandwidth profile is met and not exceeded for each subscriber while reconciling openonu-adapter. |
| 594 | ... Assumes iperf3 and jq installed on client and iperf -s running on DHCP server |
| 595 | ... VOL-4829 |
| 596 | [Tags] non-critical dataplaneDt ReconcileBandwidthProfileTCPPDt VOL-4829 soakDataplane |
| 597 | [Setup] Start Logging ReconcileBandwidthProfileTCPPDt |
| 598 | [Teardown] Run Keywords Run Keyword If ${logging} Collect Logs |
| 599 | ... AND Stop Logging ReconcileBandwidthProfileTCPPDt |
| 600 | ${podStatusOutput}= Run kubectl get pods -n ${NAMESPACE} |
| 601 | Log ${podStatusOutput} |
| 602 | ${countBeforeRestart}= Run kubectl get pods -n ${NAMESPACE} | grep Running | wc -l |
| 603 | ${cmdname}= Set Variable kubectl -n ${NAMESPACE} get pods -l app=adapter-open-onu -o name |
| 604 | ${cmddelete}= Set Variable sleep 10; kubectl -n ${NAMESPACE} delete pods -l app=adapter-open-onu |
| 605 | FOR ${I} IN RANGE 0 ${num_all_onus} |
| 606 | ${src}= Set Variable ${hosts.src[${I}]} |
| 607 | ${dst}= Set Variable ${hosts.dst[${I}]} |
| 608 | # Check for iperf3 and jq tools |
| 609 | ${stdout} ${stderr} ${rc}= Execute Remote Command which iperf3 jq |
| 610 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 611 | Run Keyword If ${rc} != 0 Log iperf3 / jq not found on the RG |
| 612 | Continue For Loop If ${rc} != 0 |
| 613 | |
| 614 | # Read bandwidth profile per subscriber |
| 615 | ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']} |
| 616 | ... ${of_id} ${src['uni_id']} |
| 617 | ${subscriber_id}= Set Variable ${of_id}/${onu_port} |
| 618 | ${bandwidth_profile_name} Get Bandwidth Profile Name For Given Subscriber ${subscriber_id} |
| 619 | ... upstreamBandwidthProfile |
| 620 | ${us_cir} ${us_cbs} ${us_pir} ${us_pbs} ${us_gir}= Get Bandwidth Profile Details Ietf Rest |
| 621 | ... ${bandwidth_profile_name} |
| 622 | ${limiting_bw_value_upstream}= Set Variable If ${us_pir} != 0 ${us_pir} ${us_gir} |
| 623 | ${bandwidth_profile_name} Get Bandwidth Profile Name For Given Subscriber ${subscriber_id} |
| 624 | ... downstreamBandwidthProfile |
| 625 | ${ds_cir} ${ds_cbs} ${ds_pir} ${ds_pbs} ${ds_gir}= Get Bandwidth Profile Details Ietf Rest |
| 626 | ... ${bandwidth_profile_name} |
| 627 | ${limiting_bw_value_dnstream}= Set Variable If ${ds_pir} != 0 ${ds_pir} ${ds_gir} |
| 628 | |
| 629 | ${rc} ${namebefore}= Run and Return Rc and Output ${cmdname} |
| 630 | ${deleteOpenOnuAdapterHdl}= Start Process ${cmddelete} shell=true |
| 631 | Set Suite Variable ${deleteOpenOnuAdapterHdl} |
| 632 | |
| 633 | # Stream TCP packets bidirectional |
| 634 | ${bidirdict}= Run Iperf3 Test Client ${src} server=${dst['dp_iface_ip_qinq']} args=--bidir -t 30 |
| 635 | # read and log up and down stream datarate just for info |
| 636 | ${actual_dnstream_bw_used}= Evaluate ${bidirdict['end']['sum_received']['bits_per_second']}/1000 |
| 637 | ${actual_upstream_bw_used}= Evaluate ${bidirdict['end']['sum_sent']['bits_per_second']}/1000 |
| 638 | ${pct_limit_up}= Evaluate 100*${actual_upstream_bw_used}/${limiting_bw_value_upstream} |
| 639 | ${pct_limit_dn}= Evaluate 100*${actual_dnstream_bw_used}/${limiting_bw_value_dnstream} |
| 640 | Log Up: bwprof ${limiting_bw_value_upstream}Kbps, got ${actual_upstream_bw_used}Kbps (${pct_limit_up}%) |
| 641 | Log Down: bwprof ${limiting_bw_value_dnstream}Kbps, got ${actual_dnstream_bw_used}Kbps (${pct_limit_dn}%) |
| 642 | # validate datarate per interval |
| 643 | ${result_interval}= Validate Performance Intervals ${bidirdict} |
| 644 | Should Be True ${result_interval} At least one transmission interval data rate was too less. |
| 645 | # end reconcile process and validate reconcilation by checking pod name |
| 646 | ${result}= Terminate Process ${deleteOpenOnuAdapterHdl} |
| 647 | LOG ${result} |
| 648 | ${rc} ${nameafter}= Run and Return Rc and Output ${cmdname} |
| 649 | Should Not Be Equal As Strings ${namebefore} ${nameafter} openonu adpater did not reconciled! |
| 650 | ${podStatusOutput}= Run kubectl get pods -n ${NAMESPACE} |
| 651 | Log ${podStatusOutput} |
| 652 | ${countAfterRestart}= Run kubectl get pods -n ${NAMESPACE} | grep Running | wc -l |
| 653 | Should Be Equal As Strings ${countAfterRestart} ${countBeforeRestart} |
| 654 | # Disable and enable ONU to verify accessibility via openonu-adapter |
| 655 | ${of_id}= Get ofID From OLT List ${src['olt']} |
| 656 | ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']} |
| 657 | ... ${of_id} ${src['uni_id']} |
| 658 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
| 659 | Disable Device ${onu_device_id} |
| 660 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 661 | ... Validate Device DISABLED UNKNOWN |
| 662 | ... REACHABLE ${src['onu']} onu=True onu_reason=omci-admin-lock |
| 663 | Wait Until Keyword Succeeds ${timeout} 2s |
| 664 | ... Verify UNI Port Is Disabled ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${src['onu']} ${src['uni_id']} |
| 665 | Sleep 5s |
| 666 | Enable Device ${onu_device_id} |
| 667 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds 360s 5s |
| 668 | ... Validate Device ENABLED ACTIVE |
| 669 | ... REACHABLE ${src['onu']} onu=True onu_reason=onu-reenabled |
| 670 | Wait Until Keyword Succeeds ${timeout} 2s |
| 671 | ... Verify UNI Port Is Enabled ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${src['onu']} ${src['uni_id']} |
| 672 | # Workaround for issue seen in VOL-4489. Keep this workaround until VOL-4489 is fixed. |
| 673 | Run Keyword If ${has_dataplane} Reboot XGSPON ONU ${src['olt']} ${src['onu']} omci-flows-pushed |
| 674 | # Workaround ends here for issue seen in VOL-4489. |
| 675 | END |
| 676 | Run Keyword If '${SOAK_TEST}'=='False' Delete All Devices and Verify |
| 677 | |
Andy Bavier | 7613b9a | 2020-07-08 07:25:47 -0700 | [diff] [blame] | 678 | Validate parsing of data traffic through voltha using tech profile |
| 679 | [Documentation] Assuming that test1 was executed where all the ONUs are authenticated/DHCP/pingable |
| 680 | ... Prerequisite tools : Tcpdump and Mausezahn traffic generator on both RG and DHCP/BNG VMs |
| 681 | ... 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] | 682 | ... 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] | 683 | ... the pbits are preserved by the PON. |
Hardik Windlass | 62db9d9 | 2021-05-17 09:32:40 +0000 | [diff] [blame] | 684 | [Tags] dataplaneDt TechProfileDt VOL-3291 soakDataplane |
Andy Bavier | 7613b9a | 2020-07-08 07:25:47 -0700 | [diff] [blame] | 685 | [Setup] Start Logging TechProfileDt |
Hardik Windlass | 4353133 | 2021-05-19 07:07:03 +0000 | [diff] [blame] | 686 | [Teardown] Run Keywords Run Keyword If ${logging} Collect Logs |
Andy Bavier | 7613b9a | 2020-07-08 07:25:47 -0700 | [diff] [blame] | 687 | ... AND Stop Logging TechProfileDt |
| 688 | Pass Execution If '${has_dataplane}'=='False' |
| 689 | ... Skipping test: Technology profile validation can be done only in physical pod |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 690 | FOR ${I} IN RANGE 0 ${num_all_onus} |
Andy Bavier | 7613b9a | 2020-07-08 07:25:47 -0700 | [diff] [blame] | 691 | ${src}= Set Variable ${hosts.src[${I}]} |
| 692 | ${dst}= Set Variable ${hosts.dst[${I}]} |
| 693 | |
Andy Bavier | 275414a | 2020-07-16 13:07:17 -0700 | [diff] [blame] | 694 | ${src_iface_name}= Fetch From Left ${src['dp_iface_name']} . |
| 695 | |
Andy Bavier | 7613b9a | 2020-07-08 07:25:47 -0700 | [diff] [blame] | 696 | ${bng_ip}= Get Variable Value ${dst['noroot_ip']} |
| 697 | ${bng_user}= Get Variable Value ${dst['noroot_user']} |
| 698 | ${bng_pass}= Get Variable Value ${dst['noroot_pass']} |
| 699 | Pass Execution If "${bng_ip}" == "${NONE}" or "${bng_user}" == "${NONE}" or "${bng_pass}" == "${NONE}" |
| 700 | ... Skipping test: credentials for BNG login required in deployment config |
| 701 | |
| 702 | ${stdout} ${stderr} ${rc}= Execute Remote Command which mausezahn tcpdump |
| 703 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 704 | Pass Execution If ${rc} != 0 Skipping test: mausezahn / tcpdump not found on the RG |
| 705 | ${stdout} ${stderr} ${rc}= Execute Remote Command which mausezahn tcpdump |
| 706 | ... ${bng_ip} ${bng_user} ${bng_pass} ${dst['container_type']} ${dst['container_name']} |
| 707 | Pass Execution If ${rc} != 0 Skipping test: mausezahn / tcpdump not found on the BNG |
| 708 | Log Upstream test |
| 709 | 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] | 710 | ... ${dst['dp_iface_ip_qinq']} ${dst['dp_iface_name']} ${src_iface_name} |
Girish Gowdra | 66cd95d | 2021-07-08 10:31:54 -0700 | [diff] [blame] | 711 | ... 0 tcp ${src['c_tag']} ${src['s_tag']} upstream vlan |
Andy Bavier | 7613b9a | 2020-07-08 07:25:47 -0700 | [diff] [blame] | 712 | ... ${bng_ip} ${bng_user} ${bng_pass} ${dst['container_type']} ${dst['container_name']} |
| 713 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 714 | Log Downstream test |
| 715 | ${rg_ip} ${stderr} ${rc}= Execute Remote Command |
| 716 | ... ifconfig ${src['dp_iface_name']} | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1 }' |
| 717 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 718 | Should Be Equal As Integers ${rc} 0 Could not get RG's IP address |
| 719 | 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] | 720 | ... ${rg_ip} ${src_iface_name} ${dst['dp_iface_name']} |
| 721 | ... 0 tcp ${src['c_tag']} ${src['s_tag']} downstream tcp |
Andy Bavier | 7613b9a | 2020-07-08 07:25:47 -0700 | [diff] [blame] | 722 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 723 | ... ${bng_ip} ${bng_user} ${bng_pass} ${dst['container_type']} ${dst['container_name']} |
| 724 | END |
| 725 | |
Hardik Windlass | 16cdf96 | 2020-04-29 15:26:50 +0530 | [diff] [blame] | 726 | Test Disable and Enable OLT PON Port for DT |
| 727 | [Documentation] Validates E2E Ping Connectivity and object states for the given scenario: |
| 728 | ... Assuming that all the ONUs are DHCP/pingable (i.e. assuming sanityDt test was executed) |
| 729 | ... Perform disable on the OLT PON Port and validate that the pings do not succeed |
| 730 | ... 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] | 731 | [Tags] functionalDt DisableEnableOltPonPortDt VOL-2577 soak |
Girish Gowdra | 8fd9696 | 2021-12-14 16:20:04 +0530 | [diff] [blame] | 732 | [Setup] Run Keywords Start Logging DisableEnableOltPonPortDt |
| 733 | ... AND Run Keyword If ${has_dataplane} Set Non-Critical Tag for XGSPON Tech |
Hardik Windlass | 4353133 | 2021-05-19 07:07:03 +0000 | [diff] [blame] | 734 | [Teardown] Run Keywords Run Keyword If ${logging} Collect Logs |
Hardik Windlass | 16cdf96 | 2020-04-29 15:26:50 +0530 | [diff] [blame] | 735 | ... AND Stop Logging DisableEnableOltPonPortDt |
Hardik Windlass | 41701e8 | 2021-01-12 17:44:44 +0000 | [diff] [blame] | 736 | FOR ${I} IN RANGE 0 ${olt_count} |
| 737 | ${olt_serial_number}= Get From Dictionary ${olt_ids}[${I}] sn |
| 738 | Disable Enable PON Port Per OLT DT ${olt_serial_number} |
Hardik Windlass | 16cdf96 | 2020-04-29 15:26:50 +0530 | [diff] [blame] | 739 | END |
| 740 | |
Hardik Windlass | 91cc529 | 2021-07-26 10:09:40 +0000 | [diff] [blame] | 741 | Data plane Bandwidth profile update verification for DT |
| 742 | [Documentation] Test bandwidth profile is updated for one subscriber and not changed for other subscribers. |
| 743 | ... Assumes iperf3 and jq installed on client and iperf -s running on DHCP server |
| 744 | ... Assumes Default and User_Bandwidth2 profiles are configured as bandwidth profiles |
| 745 | [Tags] non-critical dataplaneDt BandwidthProfileUpdateTCPDt VOL-2549 |
| 746 | [Setup] Start Logging BandwidthProfileUpdateTCPDt |
| 747 | [Teardown] Run Keywords Collect Logs |
| 748 | ... AND Stop Logging BandwidthProfileUpdateTCPDt |
| 749 | ... AND Send File To Onos ${CURDIR}/../../tests/data/${POD_NAME}-sadis-DT.json |
| 750 | Pass Execution If '${has_dataplane}'=='False' |
| 751 | ... Bandwidth profile validation can be done only in physical pod. Skipping this test in BBSIM. |
| 752 | Delete All Devices And Verify |
| 753 | Run Keyword If ${has_dataplane} Clean Up Linux |
| 754 | Setup |
Hardik Windlass | 5d537ad | 2021-11-16 06:01:54 +0000 | [diff] [blame] | 755 | Perform Sanity Test DT |
Hardik Windlass | 91cc529 | 2021-07-26 10:09:40 +0000 | [diff] [blame] | 756 | # Update the Bandwidth Profile for the First Subscriber under test |
| 757 | ${src}= Set Variable ${hosts.src[${0}]} |
| 758 | ${dst}= Set Variable ${hosts.dst[${0}]} |
| 759 | ${of_id}= Get ofID From OLT List ${src['olt']} |
TorstenThieme | dda3765 | 2021-11-11 16:22:05 +0000 | [diff] [blame] | 760 | ${nni_port}= Wait Until Keyword Succeeds ${timeout} 2s Get NNI Port in ONOS ${of_id} |
Hardik Windlass | 91cc529 | 2021-07-26 10:09:40 +0000 | [diff] [blame] | 761 | ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']} |
| 762 | ... ${of_id} ${src['uni_id']} |
Hardik Windlass | 78bb0fd | 2022-06-21 15:11:54 +0530 | [diff] [blame] | 763 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
Hardik Windlass | 91cc529 | 2021-07-26 10:09:40 +0000 | [diff] [blame] | 764 | ${subscriber_id}= Set Variable ${of_id}/${onu_port} |
| 765 | ${oldBwName} Get Bandwidth Profile Name For Given Subscriber ${subscriber_id} upstreamBandwidthProfile |
| 766 | # Delete the existing subscriber |
| 767 | Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command use single connection ${ONOS_SSH_IP} |
| 768 | ... ${ONOS_SSH_PORT} volt-remove-subscriber-access ${of_id} ${onu_port} |
| 769 | # Verify VOLTHA flows for ONU under test is Zero |
| 770 | Run Keyword Wait Until Keyword Succeeds ${timeout} 5s Validate Device Flows |
| 771 | ... ${onu_device_id} 0 |
| 772 | # Disable and Re-Enable the ONU (To replicate DT current workflow) |
| 773 | # TODO: Delete and Auto-Discovery Add of ONU (not yet supported) |
| 774 | Disable Device ${onu_device_id} |
Hardik Windlass | 5d537ad | 2021-11-16 06:01:54 +0000 | [diff] [blame] | 775 | Wait Until Keyword Succeeds ${timeout} 5s |
Hardik Windlass | 91cc529 | 2021-07-26 10:09:40 +0000 | [diff] [blame] | 776 | ... Validate Device DISABLED UNKNOWN |
| 777 | ... REACHABLE ${src['onu']} |
| 778 | Enable Device ${onu_device_id} |
Hardik Windlass | 5d537ad | 2021-11-16 06:01:54 +0000 | [diff] [blame] | 779 | Wait Until Keyword Succeeds 360s 5s |
Hardik Windlass | 91cc529 | 2021-07-26 10:09:40 +0000 | [diff] [blame] | 780 | ... Validate Device ENABLED ACTIVE |
| 781 | ... REACHABLE ${src['onu']} |
| 782 | # Change the bandwidth profile and load the configuration |
| 783 | ${newBwName} Set Variable If ${oldBwName} == 'Default' 'User_Bandwidth2' 'Default' |
| 784 | ${cmd} Catenate |
| 785 | ... sed 's/upstreamBandwidthProfile": "${oldBwName}"/upstreamBandwidthProfile": "${newBwName}"/g' |
| 786 | ... ${CURDIR}/../../tests/data/${POD_NAME}-sadis-DT.json > ${CURDIR}/../../tests/data/${POD_NAME}-sadis-new.json |
| 787 | ${rc} Run and Return RC ${cmd} |
| 788 | Send File To Onos ${CURDIR}/../../tests/data/${POD_NAME}-sadis-new.json |
| 789 | # Re-add the subscriber with new bandwidth profile |
| 790 | Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command use single connection ${ONOS_SSH_IP} |
| 791 | ... ${ONOS_SSH_PORT} volt-add-subscriber-access ${of_id} ${onu_port} |
| 792 | # Verify subscriber access flows are added for the ONU port |
| 793 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 794 | ... Verify Subscriber Access Flows Added For ONU DT ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id} |
| 795 | ... ${onu_port} ${nni_port} ${src['s_tag']} |
| 796 | # Verify ONU state in voltha |
| 797 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s Validate Device |
| 798 | ... ENABLED ACTIVE REACHABLE |
| 799 | ... ${src['onu']} onu=True onu_reason=omci-flows-pushed |
| 800 | # Verify Meters in ONOS |
Hardik Windlass | 5d537ad | 2021-11-16 06:01:54 +0000 | [diff] [blame] | 801 | Wait Until Keyword Succeeds ${timeout} 5s |
Hardik Windlass | 91cc529 | 2021-07-26 10:09:40 +0000 | [diff] [blame] | 802 | ... Verify Meters in ONOS Ietf ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id} ${onu_port} |
Hardik Windlass | 3f75b60 | 2021-12-14 05:55:18 +0000 | [diff] [blame] | 803 | # Workaround for issue seen in VOL-4489. Keep this workaround until VOL-4489 is fixed. |
| 804 | Run Keyword If ${has_dataplane} Reboot XGSPON ONU ${src['olt']} ${src['onu']} omci-flows-pushed |
| 805 | # Workaround ends here for issue seen in VOL-4489. |
Hardik Windlass | 91cc529 | 2021-07-26 10:09:40 +0000 | [diff] [blame] | 806 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Validate DHCP and Ping True |
| 807 | ... True ${src['dp_iface_name']} ${src['s_tag']} ${src['c_tag']} ${dst['dp_iface_ip_qinq']} |
| 808 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 809 | ... ${dst['dp_iface_name']} ${dst['ip']} ${dst['user']} ${dst['pass']} ${dst['container_type']} |
| 810 | ... ${dst['container_name']} |
| 811 | # Verify new bandwidth profile is applied and other subscribers are working fine |
| 812 | ${checkBwName} Get Bandwidth Profile Name For Given Subscriber ${subscriber_id} upstreamBandwidthProfile |
| 813 | Should Be Equal ${checkBwName} ${newBwName} The bandwidth profile is not updated properly |
| 814 | FOR ${I} IN RANGE 0 ${num_all_onus} |
| 815 | ${src}= Set Variable ${hosts.src[${I}]} |
| 816 | ${dst}= Set Variable ${hosts.dst[${I}]} |
| 817 | ${of_id}= Get ofID From OLT List ${src['olt']} |
| 818 | # Check for iperf3 and jq tools |
| 819 | ${stdout} ${stderr} ${rc}= Execute Remote Command which iperf3 jq |
| 820 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 821 | Pass Execution If ${rc} != 0 Skipping test: iperf3 / jq not found on the RG |
| 822 | |
| 823 | ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']} |
Emrehan UZUN | abef518 | 2021-11-26 10:54:24 +0000 | [diff] [blame] | 824 | ... ${of_id} ${src['uni_id']} |
Hardik Windlass | 91cc529 | 2021-07-26 10:09:40 +0000 | [diff] [blame] | 825 | ${subscriber_id}= Set Variable ${of_id}/${onu_port} |
| 826 | ${bandwidth_profile_name} Get Bandwidth Profile Name For Given Subscriber ${subscriber_id} |
| 827 | ... upstreamBandwidthProfile |
| 828 | ${us_cir} ${us_cbs} ${us_pir} ${us_pbs} ${us_gir}= Get Bandwidth Profile Details Ietf Rest |
| 829 | ... ${bandwidth_profile_name} |
| 830 | ${limiting_bw_value_upstream}= Set Variable If ${us_pir} != 0 ${us_pir} ${us_gir} |
| 831 | ${bandwidth_profile_name} Get Bandwidth Profile Name For Given Subscriber ${subscriber_id} |
| 832 | ... downstreamBandwidthProfile |
| 833 | ${ds_cir} ${ds_cbs} ${ds_pir} ${ds_pbs} ${ds_gir}= Get Bandwidth Profile Details Ietf Rest |
| 834 | ... ${bandwidth_profile_name} |
| 835 | ${limiting_bw_value_dnstream}= Set Variable If ${ds_pir} != 0 ${ds_pir} ${ds_gir} |
| 836 | |
| 837 | # Stream TCP packets from RG to server |
| 838 | ${updict}= Run Iperf3 Test Client ${src} server=${dst['dp_iface_ip_qinq']} |
| 839 | ... args=-t 30 |
| 840 | ${actual_upstream_bw_used}= Evaluate ${updict['end']['sum_received']['bits_per_second']}/1000 |
| 841 | |
| 842 | # Stream TCP packets from server to RG |
| 843 | ${dndict}= Run Iperf3 Test Client ${src} server=${dst['dp_iface_ip_qinq']} |
| 844 | ... args=-R -t 30 |
| 845 | ${actual_dnstream_bw_used}= Evaluate ${dndict['end']['sum_received']['bits_per_second']}/1000 |
| 846 | |
| 847 | ${pct_limit_up}= Evaluate 100*${actual_upstream_bw_used}/${limiting_bw_value_upstream} |
| 848 | ${pct_limit_dn}= Evaluate 100*${actual_dnstream_bw_used}/${limiting_bw_value_dnstream} |
| 849 | Log Up: bwprof ${limiting_bw_value_upstream}Kbps, got ${actual_upstream_bw_used}Kbps (${pct_limit_up}%) |
| 850 | Log Down: bwprof ${limiting_bw_value_dnstream}Kbps, got ${actual_dnstream_bw_used}Kbps (${pct_limit_dn}%) |
| 851 | |
| 852 | Should Be True ${pct_limit_up} <= ${upper_margin_pct} |
| 853 | ... The upstream bandwidth exceeded the limit (${pct_limit_up}% of limit) |
| 854 | # VOL-3125: downstream bw limit not enforced. Uncomment when fixed. |
| 855 | #Should Be True ${pct_limit_dn} <= ${upper_margin_pct} |
| 856 | #... The downstream bandwidth exceeded the limit (${pct_limit_dn}% of limit) |
| 857 | Should Be True ${pct_limit_up} >= ${lower_margin_pct} |
| 858 | ... The upstream bandwidth guarantee was not met (${pct_limit_up}% of resv) |
| 859 | Should Be True ${pct_limit_dn} >= ${lower_margin_pct} |
| 860 | ... The downstream bandwidth guarantee was not met (${pct_limit_dn}% of resv) |
| 861 | END |
| 862 | |
Hardik Windlass | b75cf1b | 2021-01-18 06:59:09 +0000 | [diff] [blame] | 863 | |
| 864 | Test ONU Delete and Auto-Discovery for DT |
| 865 | [Documentation] Tests the voltctl delete and Auto-Discovery of the ONU |
Andrea Campanella | 92e21b0 | 2022-01-04 15:32:04 +0100 | [diff] [blame] | 866 | [Tags] functionalDt VOL-3098 ONUAutoDiscoveryDt |
Hardik Windlass | b75cf1b | 2021-01-18 06:59:09 +0000 | [diff] [blame] | 867 | [Setup] Start Logging ONUAutoDiscoveryDt |
| 868 | [Teardown] Run Keywords Run Keyword If ${logging} Collect Logs |
| 869 | ... AND Stop Logging ONUAutoDiscoveryDt |
| 870 | Clear All Devices Then Create New Device |
| 871 | # Performing Sanity Test to make sure subscribers are all AUTH+DHCP and pingable |
| 872 | Run Keyword If ${has_dataplane} Clean Up Linux |
| 873 | Perform Sanity Test DT |
| 874 | FOR ${I} IN RANGE 0 ${num_all_onus} |
| 875 | ${src}= Set Variable ${hosts.src[${I}]} |
| 876 | ${dst}= Set Variable ${hosts.dst[${I}]} |
Hardik Windlass | b75cf1b | 2021-01-18 06:59:09 +0000 | [diff] [blame] | 877 | ${of_id}= Get ofID From OLT List ${src['olt']} |
Andrea Campanella | 92e21b0 | 2022-01-04 15:32:04 +0100 | [diff] [blame] | 878 | ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s |
| 879 | ... Get ONU Port in ONOS ${src['onu']} ${of_id} |
Hardik Windlass | 78bb0fd | 2022-06-21 15:11:54 +0530 | [diff] [blame] | 880 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
Hardik Windlass | b75cf1b | 2021-01-18 06:59:09 +0000 | [diff] [blame] | 881 | ${nni_port}= Wait Until Keyword Succeeds ${timeout} 2s Get NNI Port in ONOS ${of_id} |
Hardik Windlass | 7a9e1f2 | 2022-03-09 05:33:34 +0000 | [diff] [blame] | 882 | # Remove Subscriber |
| 883 | Execute ONOS CLI Command use single connection ${ONOS_SSH_IP} ${ONOS_SSH_PORT} |
| 884 | ... volt-remove-subscriber-access ${of_id} ${onu_port} |
| 885 | # Additional sleep to let subscriber delete process |
| 886 | Sleep 10s |
Hardik Windlass | b75cf1b | 2021-01-18 06:59:09 +0000 | [diff] [blame] | 887 | # Delete ONU and Verify Ping Fails |
| 888 | Delete Device ${onu_device_id} |
| 889 | Run Keyword If ${has_dataplane} Verify ping is successful except for given device |
| 890 | ... ${num_all_onus} ${src['onu']} |
| 891 | # Verify that no pending flows exist for the ONU port |
| 892 | Wait Until Keyword Succeeds ${timeout} 2s |
| 893 | ... Verify No Pending Flows For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port} |
| 894 | # ONU Auto-Discovery |
| 895 | ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s |
Emrehan UZUN | abef518 | 2021-11-26 10:54:24 +0000 | [diff] [blame] | 896 | ... Get ONU Port in ONOS ${src['onu']} ${of_id} ${src['uni_id']} |
Hardik Windlass | b75cf1b | 2021-01-18 06:59:09 +0000 | [diff] [blame] | 897 | # Check ONU port is Enabled in ONOS |
| 898 | Wait Until Keyword Succeeds ${timeout} 2s |
Emrehan UZUN | abef518 | 2021-11-26 10:54:24 +0000 | [diff] [blame] | 899 | ... Verify UNI Port Is Enabled ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${src['onu']} ${src['uni_id']} |
Hardik Windlass | b75cf1b | 2021-01-18 06:59:09 +0000 | [diff] [blame] | 900 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
| 901 | Run Keyword If ${has_dataplane} Clean Up Linux ${onu_device_id} |
Hardik Windlass | 7a9e1f2 | 2022-03-09 05:33:34 +0000 | [diff] [blame] | 902 | # Re-Add Subscriber |
| 903 | Execute ONOS CLI Command use single connection ${ONOS_SSH_IP} ${ONOS_SSH_PORT} |
| 904 | ... volt-add-subscriber-access ${of_id} ${onu_port} |
Hardik Windlass | b75cf1b | 2021-01-18 06:59:09 +0000 | [diff] [blame] | 905 | # Verify ONU state in voltha |
| 906 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 907 | ... Validate Device ENABLED ACTIVE REACHABLE |
| 908 | ... ${src['onu']} onu=True onu_reason=omci-flows-pushed |
| 909 | # Verify that no pending flows exist for the ONU port |
| 910 | Wait Until Keyword Succeeds ${timeout} 2s |
| 911 | ... Verify No Pending Flows For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port} |
| 912 | # Verify subscriber access flows are added for the ONU port |
| 913 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 914 | ... Verify Subscriber Access Flows Added For ONU DT ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id} |
| 915 | ... ${onu_port} ${nni_port} ${src['s_tag']} |
| 916 | # Verify Meters in ONOS |
| 917 | Wait Until Keyword Succeeds ${timeout} 5s |
| 918 | ... Verify Meters in ONOS Ietf ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id} ${onu_port} |
| 919 | Run Keyword If ${has_dataplane} Validate DHCP and Ping True |
| 920 | ... True ${src['dp_iface_name']} ${src['s_tag']} ${src['c_tag']} ${dst['dp_iface_ip_qinq']} |
| 921 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 922 | ... ${dst['dp_iface_name']} ${dst['ip']} ${dst['user']} ${dst['pass']} ${dst['container_type']} |
| 923 | ... ${dst['container_name']} |
| 924 | END |
| 925 | # Verify flows for all OLTs |
| 926 | Wait Until Keyword Succeeds ${timeout} 5s Validate All OLT Flows |
| 927 | |
| 928 | |
Hardik Windlass | a3d04b9 | 2020-02-17 15:06:05 +0000 | [diff] [blame] | 929 | *** Keywords *** |
| 930 | Setup Suite |
| 931 | [Documentation] Set up the test suite |
| 932 | Common Test Suite Setup |
Hung-Wei Chiu | cc6e655 | 2020-06-04 12:57:38 -0700 | [diff] [blame] | 933 | #Restore all ONUs |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 934 | #Run Keyword If ${has_dataplane} RestoreONUs ${num_all_onus} |
Suchitra Vemuri | 1d8e817 | 2020-06-17 17:43:56 -0700 | [diff] [blame] | 935 | #power_switch.robot needs it to support different vendor's power switch |
| 936 | ${switch_type}= Get Variable Value ${web_power_switch.type} |
| 937 | Run Keyword If "${switch_type}"!="" Set Global Variable ${powerswitch_type} ${switch_type} |
Hardik Windlass | a3d04b9 | 2020-02-17 15:06:05 +0000 | [diff] [blame] | 938 | |
| 939 | Clear All Devices Then Create New Device |
| 940 | [Documentation] Remove any devices from VOLTHA and ONOS |
| 941 | # Remove all devices from voltha and nos |
| 942 | Delete All Devices and Verify |
| 943 | # Execute normal test Setup Keyword |
| 944 | Setup |
Girish Gowdra | d2c0e9d | 2021-11-23 14:40:23 -0800 | [diff] [blame] | 945 | |
Joey Armstrong | b215128 | 2023-01-12 09:38:28 -0500 | [diff] [blame] | 946 | Validate Performance Intervals |
| 947 | [Documentation] Validates all intervals (one per second) of iPerf3 result |
| 948 | [Arguments] ${bidirdict} |
| 949 | ${actual_intervals}= Get From Dictionary ${bidirdict} intervals |
| 950 | ${number_intervals}= Get Length ${actual_intervals} |
| 951 | ${result_interval}= Set Variable True |
| 952 | FOR ${INDEX} IN RANGE 0 ${number_intervals} |
| 953 | ${interval}= Get From List ${actual_intervals} ${INDEX} |
| 954 | ${streams}= Get From Dictionary ${interval} streams |
| 955 | ${interval_upstream}= Get From List ${streams} 0 |
| 956 | ${interval_dnstream}= Get From List ${streams} 1 |
| 957 | ${interval_upstream_bw_used}= Evaluate ${interval_upstream['bits_per_second']}/1000 |
| 958 | ${interval_dnstream_bw_used}= Evaluate ${interval_dnstream['bits_per_second']}/1000 |
| 959 | Run Keyword If ${interval_upstream_bw_used} < 5000 |
| 960 | ... LOG The upstream bandwidth in interval ${INDEX} was too less (${interval_upstream_bw_used} of resv) |
| 961 | Run Keyword If ${interval_dnstream_bw_used} < 5000 |
| 962 | ... LOG: The upstream bandwidth in interval ${INDEX} was too less (${interval_upstream_bw_used} of resv) |
| 963 | ${result_interval}= Set Variable If (${interval_upstream_bw_used} < 5000 or ${interval_upstream_bw_used} < 5000) |
| 964 | ... False ${result_interval} |
| 965 | END |
| 966 | [Return] ${result_interval} |