Hardik Windlass | a3d04b9 | 2020-02-17 15:06:05 +0000 | [diff] [blame] | 1 | # Copyright 2017 - present Open Networking Foundation |
| 2 | # |
| 3 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | # you may not use this file except in compliance with the License. |
| 5 | # You may obtain a copy of the License at |
| 6 | # |
| 7 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | # |
| 9 | # Unless required by applicable law or agreed to in writing, software |
| 10 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | # See the License for the specific language governing permissions and |
| 13 | # limitations under the License. |
| 14 | # FIXME Can we use the same test against BBSim and Hardware? |
| 15 | |
| 16 | *** Settings *** |
| 17 | Documentation Test various end-to-end scenarios |
| 18 | Suite Setup Setup Suite |
| 19 | Test Setup Setup |
| 20 | Test Teardown Teardown |
| 21 | Suite Teardown Teardown Suite |
| 22 | Library Collections |
| 23 | Library String |
| 24 | Library OperatingSystem |
| 25 | Library XML |
| 26 | Library RequestsLibrary |
| 27 | Library ../../libraries/DependencyLibrary.py |
| 28 | Resource ../../libraries/onos.robot |
| 29 | Resource ../../libraries/voltctl.robot |
| 30 | Resource ../../libraries/voltha.robot |
| 31 | Resource ../../libraries/utils.robot |
| 32 | Resource ../../libraries/k8s.robot |
| 33 | Resource ../../variables/variables.robot |
Suchitra Vemuri | 1d8e817 | 2020-06-17 17:43:56 -0700 | [diff] [blame] | 34 | Resource ../../libraries/power_switch.robot |
Hardik Windlass | a3d04b9 | 2020-02-17 15:06:05 +0000 | [diff] [blame] | 35 | |
| 36 | *** Variables *** |
| 37 | ${POD_NAME} flex-ocp-cord |
| 38 | ${KUBERNETES_CONF} ${KUBERNETES_CONFIGS_DIR}/${POD_NAME}.conf |
| 39 | ${KUBERNETES_CONFIGS_DIR} ~/pod-configs/kubernetes-configs |
| 40 | #${KUBERNETES_CONFIGS_DIR} ${KUBERNETES_CONFIGS_DIR}/${POD_NAME}.conf |
| 41 | ${KUBERNETES_YAML} ${KUBERNETES_CONFIGS_DIR}/${POD_NAME}.yml |
| 42 | ${HELM_CHARTS_DIR} ~/helm-charts |
| 43 | ${VOLTHA_POD_NUM} 8 |
| 44 | ${NAMESPACE} voltha |
| 45 | # For below variable value, using deployment name as using grep for |
| 46 | # parsing radius pod name, we can also use full radius pod name |
| 47 | ${RESTART_POD_NAME} radius |
Suchitra Vemuri | e9c6ca6 | 2020-07-27 16:44:53 -0700 | [diff] [blame] | 48 | ${timeout} 360s |
Hardik Windlass | a3d04b9 | 2020-02-17 15:06:05 +0000 | [diff] [blame] | 49 | ${of_id} 0 |
| 50 | ${logical_id} 0 |
Andrea Campanella | 86e2406 | 2020-08-05 19:09:18 +0200 | [diff] [blame] | 51 | ${uprate} 0 |
| 52 | ${dnrate} 0 |
Hardik Windlass | a3d04b9 | 2020-02-17 15:06:05 +0000 | [diff] [blame] | 53 | ${has_dataplane} True |
Hardik Windlass | ffbf060 | 2020-04-24 23:14:45 +0530 | [diff] [blame] | 54 | ${teardown_device} True |
Hardik Windlass | a3d04b9 | 2020-02-17 15:06:05 +0000 | [diff] [blame] | 55 | ${scripts} ../../scripts |
| 56 | |
Andy Bavier | e19991a | 2020-05-08 10:42:40 -0700 | [diff] [blame] | 57 | # For dataplane bandwidth testing |
| 58 | ${upper_margin_pct} 105 # Allow 5% over the limit |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 59 | ${lower_margin_pct} 90 # Allow 8% under the limit |
Andy Bavier | e19991a | 2020-05-08 10:42:40 -0700 | [diff] [blame] | 60 | ${udp_rate_multiplier} 1.10 # Send UDP at bw profile limit * rate_multiplier |
Andy Bavier | c80a274 | 2020-08-28 10:59:05 -0700 | [diff] [blame] | 61 | ${udp_packet_bytes} 1470 # UDP payload in bytes |
Andy Bavier | e19991a | 2020-05-08 10:42:40 -0700 | [diff] [blame] | 62 | |
Hardik Windlass | a3d04b9 | 2020-02-17 15:06:05 +0000 | [diff] [blame] | 63 | # Per-test logging on failure is turned off by default; set this variable to enable |
| 64 | ${container_log_dir} ${None} |
| 65 | |
| 66 | *** Test Cases *** |
Suchitra Vemuri | 1d8e817 | 2020-06-17 17:43:56 -0700 | [diff] [blame] | 67 | Reboot DT ONUs Physically |
| 68 | [Documentation] This test reboots ONUs physically before execution all the tests |
| 69 | ... Test case runs only on the PODs that are configured with PowerSwitch that |
| 70 | ... controls the power off/on ONUs/OLT remotely (simulating a physical reboot) |
Suchitra Vemuri | 228f880 | 2021-03-10 13:14:17 -0800 | [diff] [blame] | 71 | [Tags] functionalDt PowerSwitch RebootAllDTONUs soak |
Suchitra Vemuri | 1d8e817 | 2020-06-17 17:43:56 -0700 | [diff] [blame] | 72 | [Setup] Start Logging RebootAllDTONUs |
| 73 | [Teardown] Run Keywords Collect Logs |
| 74 | ... AND Stop Logging RebootAllDTONUs |
| 75 | Power Switch Connection Suite ${web_power_switch.ip} ${web_power_switch.user} ${web_power_switch.password} |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 76 | FOR ${I} IN RANGE 0 ${num_all_onus} |
Suchitra Vemuri | 1d8e817 | 2020-06-17 17:43:56 -0700 | [diff] [blame] | 77 | ${src}= Set Variable ${hosts.src[${I}]} |
| 78 | ${dst}= Set Variable ${hosts.dst[${I}]} |
| 79 | Disable Switch Outlet ${src['power_switch_port']} |
Hardik Windlass | 5e214b2 | 2021-02-26 10:37:14 +0000 | [diff] [blame] | 80 | Sleep 10s |
Suchitra Vemuri | 1d8e817 | 2020-06-17 17:43:56 -0700 | [diff] [blame] | 81 | Enable Switch Outlet ${src['power_switch_port']} |
Suchitra Vemuri | 1d8e817 | 2020-06-17 17:43:56 -0700 | [diff] [blame] | 82 | END |
| 83 | |
Hardik Windlass | a3d04b9 | 2020-02-17 15:06:05 +0000 | [diff] [blame] | 84 | Sanity E2E Test for OLT/ONU on POD for DT |
| 85 | [Documentation] Validates E2E Ping Connectivity and object states for the given scenario: |
| 86 | ... Validate successful DHCP/E2E ping (no EAPOL and DHCP flows) for the tech profile that is used |
| 87 | ... Traffic sent with same vlan from different RGs, |
| 88 | ... should reach the NNI port on the OLT with the expected double tagged vlan ids |
| 89 | ... Inner vlans from the RG should not change |
Suchitra Vemuri | 228f880 | 2021-03-10 13:14:17 -0800 | [diff] [blame] | 90 | [Tags] sanityDt soak |
Andy Bavier | e187eda | 2020-04-20 15:00:02 -0700 | [diff] [blame] | 91 | [Setup] Run Keywords Start Logging SanityTestDt |
Hardik Windlass | a3d04b9 | 2020-02-17 15:06:05 +0000 | [diff] [blame] | 92 | ... AND Setup |
| 93 | [Teardown] Run Keywords Collect Logs |
| 94 | ... AND Stop Logging SanityTestDt |
Hardik Windlass | a3d04b9 | 2020-02-17 15:06:05 +0000 | [diff] [blame] | 95 | Run Keyword If ${has_dataplane} Clean Up Linux |
| 96 | Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test DT |
| 97 | |
Hardik Windlass | 35706ba | 2020-02-20 08:16:42 +0000 | [diff] [blame] | 98 | Test Subscriber Delete and Add for DT |
| 99 | [Documentation] Validates E2E Ping Connectivity and object states for the given scenario: |
Hardik Windlass | 63d5e00 | 2020-03-06 21:07:09 +0530 | [diff] [blame] | 100 | ... 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] | 101 | ... Delete a subscriber and validate that the pings do not succeed and state is purged |
| 102 | ... Disable and Enable the ONU (This is to replicate the existing DT behaviour) |
| 103 | ... Re-add the subscriber, and validate that the flows are present and pings are successful |
Suchitra Vemuri | 228f880 | 2021-03-10 13:14:17 -0800 | [diff] [blame] | 104 | [Tags] functionalDt SubAddDeleteDt soak |
Andy Bavier | e187eda | 2020-04-20 15:00:02 -0700 | [diff] [blame] | 105 | [Setup] Start Logging SubAddDeleteDt |
Hardik Windlass | 35706ba | 2020-02-20 08:16:42 +0000 | [diff] [blame] | 106 | [Teardown] Run Keywords Collect Logs |
| 107 | ... AND Stop Logging SubAddDeleteDt |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 108 | FOR ${I} IN RANGE 0 ${num_all_onus} |
Hardik Windlass | 35706ba | 2020-02-20 08:16:42 +0000 | [diff] [blame] | 109 | ${src}= Set Variable ${hosts.src[${I}]} |
| 110 | ${dst}= Set Variable ${hosts.dst[${I}]} |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 111 | ${of_id}= Get ofID From OLT List ${src['olt']} |
Hardik Windlass | 35706ba | 2020-02-20 08:16:42 +0000 | [diff] [blame] | 112 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 113 | ${olt_device_id}= Get OLTDeviceID From OLT List ${src['olt']} |
Andrea Campanella | d848de0 | 2020-11-24 10:23:41 +0100 | [diff] [blame] | 114 | ${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] | 115 | ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']} |
| 116 | ... ${of_id} |
| 117 | # Remove Subscriber Access |
ubuntu | 6b6e7d4 | 2020-03-02 12:35:42 -0800 | [diff] [blame] | 118 | Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command ${ONOS_SSH_IP} |
Hardik Windlass | 35706ba | 2020-02-20 08:16:42 +0000 | [diff] [blame] | 119 | ... ${ONOS_SSH_PORT} volt-remove-subscriber-access ${of_id} ${onu_port} |
Hardik Windlass | 35706ba | 2020-02-20 08:16:42 +0000 | [diff] [blame] | 120 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure |
| 121 | ... Wait Until Keyword Succeeds 60s 2s |
| 122 | ... Check Ping False ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']} |
| 123 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
Andrea Campanella | d848de0 | 2020-11-24 10:23:41 +0100 | [diff] [blame] | 124 | |
Hardik Windlass | fb5eace | 2020-03-26 14:49:01 +0530 | [diff] [blame] | 125 | # 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] | 126 | ${onos_flows_count}= Evaluate 4 * ( ${num_of_olt_onus} - 1 ) |
Hardik Windlass | fb5eace | 2020-03-26 14:49:01 +0530 | [diff] [blame] | 127 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 128 | ... Verify Subscriber Access Flows Added Count DT ${ONOS_SSH_IP} ${ONOS_SSH_PORT} |
Suchitra Vemuri | 93db32b | 2020-11-23 21:27:05 -0800 | [diff] [blame] | 129 | ... ${of_id} ${onos_flows_count} |
Hardik Windlass | 35706ba | 2020-02-20 08:16:42 +0000 | [diff] [blame] | 130 | # 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] | 131 | ${olt_flows}= Evaluate 2 * ( ${num_of_olt_onus} - 1 ) + 1 |
Hardik Windlass | 35706ba | 2020-02-20 08:16:42 +0000 | [diff] [blame] | 132 | 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] | 133 | ... ${olt_device_id} |
Hardik Windlass | 35706ba | 2020-02-20 08:16:42 +0000 | [diff] [blame] | 134 | # Verify VOLTHA flows for ONU under test is Zero |
| 135 | Run Keyword Wait Until Keyword Succeeds ${timeout} 5s Validate Device Flows |
| 136 | ... ${onu_device_id} 0 |
| 137 | # Disable and Re-Enable the ONU (To replicate DT current workflow) |
| 138 | # TODO: Delete and Auto-Discovery Add of ONU (not yet supported) |
| 139 | Disable Device ${onu_device_id} |
| 140 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 141 | ... Validate Device DISABLED UNKNOWN |
| 142 | ... REACHABLE ${src['onu']} |
| 143 | Enable Device ${onu_device_id} |
Suchitra Vemuri | cdc32d8 | 2020-07-17 12:24:46 -0700 | [diff] [blame] | 144 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds 360s 5s |
Hardik Windlass | 35706ba | 2020-02-20 08:16:42 +0000 | [diff] [blame] | 145 | ... Validate Device ENABLED ACTIVE |
| 146 | ... REACHABLE ${src['onu']} |
| 147 | # Add Subscriber Access |
ubuntu | 6b6e7d4 | 2020-03-02 12:35:42 -0800 | [diff] [blame] | 148 | Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command ${ONOS_SSH_IP} |
Hardik Windlass | 35706ba | 2020-02-20 08:16:42 +0000 | [diff] [blame] | 149 | ... ${ONOS_SSH_PORT} volt-add-subscriber-access ${of_id} ${onu_port} |
Hardik Windlass | fb5eace | 2020-03-26 14:49:01 +0530 | [diff] [blame] | 150 | # Verify subscriber access flows are added for the ONU port |
| 151 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
Hardik Windlass | 25e1170 | 2020-03-30 20:05:19 +0530 | [diff] [blame] | 152 | ... Verify Subscriber Access Flows Added For ONU DT ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id} |
| 153 | ... ${onu_port} ${nni_port} ${src['s_tag']} |
Suchitra Vemuri | cdc32d8 | 2020-07-17 12:24:46 -0700 | [diff] [blame] | 154 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds 360s 5s |
Hardik Windlass | 35706ba | 2020-02-20 08:16:42 +0000 | [diff] [blame] | 155 | ... Validate Device ENABLED ACTIVE |
| 156 | ... REACHABLE ${src['onu']} onu=True onu_reason=omci-flows-pushed |
Hardik Windlass | fb5eace | 2020-03-26 14:49:01 +0530 | [diff] [blame] | 157 | # TODO: Yet to Verify on the GPON based Physical POD (VOL-2652) |
Hardik Windlass | 35706ba | 2020-02-20 08:16:42 +0000 | [diff] [blame] | 158 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure |
| 159 | ... Wait Until Keyword Succeeds 60s 2s |
| 160 | ... Check Ping True ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']} |
| 161 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
Hardik Windlass | 35706ba | 2020-02-20 08:16:42 +0000 | [diff] [blame] | 162 | END |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 163 | # Verify flows for all OLTs |
| 164 | Run Keyword Wait Until Keyword Succeeds ${timeout} 5s Validate All OLT Flows |
Hardik Windlass | 35706ba | 2020-02-20 08:16:42 +0000 | [diff] [blame] | 165 | |
Hardik Windlass | 63d5e00 | 2020-03-06 21:07:09 +0530 | [diff] [blame] | 166 | Test Disable and Enable ONU for DT |
| 167 | [Documentation] Validates E2E Ping Connectivity and object states for the given scenario: |
| 168 | ... Assuming that all the ONUs are DHCP/pingable (i.e. assuming sanityDt test was executed) |
| 169 | ... Perform disable on the ONUs and validate that the pings do not succeed |
| 170 | ... Perform enable on the ONUs and validate that the pings are successful |
Suchitra Vemuri | 228f880 | 2021-03-10 13:14:17 -0800 | [diff] [blame] | 171 | [Tags] functionalDt DisableEnableONUDt soak |
Andy Bavier | e187eda | 2020-04-20 15:00:02 -0700 | [diff] [blame] | 172 | [Setup] Start Logging DisableEnableONUDt |
Hardik Windlass | 63d5e00 | 2020-03-06 21:07:09 +0530 | [diff] [blame] | 173 | [Teardown] Run Keywords Collect Logs |
| 174 | ... AND Stop Logging DisableEnableONUDt |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 175 | FOR ${I} IN RANGE 0 ${num_all_onus} |
Hardik Windlass | 63d5e00 | 2020-03-06 21:07:09 +0530 | [diff] [blame] | 176 | ${src}= Set Variable ${hosts.src[${I}]} |
| 177 | ${dst}= Set Variable ${hosts.dst[${I}]} |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 178 | ${of_id}= Get ofID From OLT List ${src['olt']} |
Hardik Windlass | 63d5e00 | 2020-03-06 21:07:09 +0530 | [diff] [blame] | 179 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
| 180 | ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']} |
| 181 | ... ${of_id} |
| 182 | Disable Device ${onu_device_id} |
| 183 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 184 | ... Validate Device DISABLED UNKNOWN |
| 185 | ... REACHABLE ${src['onu']} onu=True onu_reason=omci-admin-lock |
| 186 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
Suchitra Vemuri | 760bdd3 | 2020-06-17 12:34:48 -0700 | [diff] [blame] | 187 | ... Verify ONU Port Is Disabled ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${src['onu']} |
Hardik Windlass | fb5eace | 2020-03-26 14:49:01 +0530 | [diff] [blame] | 188 | # TODO: Yet to Verify on the GPON based Physical POD (VOL-2652) |
Hardik Windlass | 63d5e00 | 2020-03-06 21:07:09 +0530 | [diff] [blame] | 189 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure |
| 190 | ... Wait Until Keyword Succeeds 60s 2s |
| 191 | ... Check Ping False ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']} |
| 192 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 193 | Sleep 5s |
| 194 | Enable Device ${onu_device_id} |
Suchitra Vemuri | cdc32d8 | 2020-07-17 12:24:46 -0700 | [diff] [blame] | 195 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds 360s 5s |
Hardik Windlass | 63d5e00 | 2020-03-06 21:07:09 +0530 | [diff] [blame] | 196 | ... Validate Device ENABLED ACTIVE |
| 197 | ... REACHABLE ${src['onu']} onu=True onu_reason=onu-reenabled |
| 198 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
Suchitra Vemuri | 760bdd3 | 2020-06-17 12:34:48 -0700 | [diff] [blame] | 199 | ... Verify ONU Port Is Enabled ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${src['onu']} |
Hardik Windlass | fb5eace | 2020-03-26 14:49:01 +0530 | [diff] [blame] | 200 | # TODO: Yet to Verify on the GPON based Physical POD (VOL-2652) |
Hardik Windlass | 63d5e00 | 2020-03-06 21:07:09 +0530 | [diff] [blame] | 201 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure |
| 202 | ... Wait Until Keyword Succeeds 60s 2s |
| 203 | ... Check Ping True ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']} |
| 204 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
Hardik Windlass | 63d5e00 | 2020-03-06 21:07:09 +0530 | [diff] [blame] | 205 | END |
| 206 | |
Hardik Windlass | aaea340 | 2020-03-10 19:45:45 +0530 | [diff] [blame] | 207 | Test Disable and Delete OLT for DT |
| 208 | [Documentation] Validates E2E Ping Connectivity and object states for the given scenario: |
| 209 | ... Assuming that all the ONUs are DHCP/pingable (i.e. assuming sanityDt test was executed) |
| 210 | ... Perform disable on the OLT and validate ONUs state and that the pings do not succeed |
| 211 | ... Perform delete on the OLT, Re-do Setup (Recreate the OLT) and Perform Sanity Test DT |
Suchitra Vemuri | f2388ad | 2020-03-15 21:44:44 -0700 | [diff] [blame] | 212 | [Tags] functionalDt DisableDeleteOLTDt |
Suchitra Vemuri | 221398a | 2020-05-29 22:45:17 -0700 | [diff] [blame] | 213 | [Setup] Start Logging DisableDeleteOLTDt |
Hardik Windlass | aaea340 | 2020-03-10 19:45:45 +0530 | [diff] [blame] | 214 | [Teardown] Run Keywords Collect Logs |
| 215 | ... AND Stop Logging DisableDeleteOLTDt |
Hardik Windlass | aaea340 | 2020-03-10 19:45:45 +0530 | [diff] [blame] | 216 | # Disable and Validate OLT Device |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 217 | FOR ${I} IN RANGE 0 ${olt_count} |
| 218 | ${olt_serial_number}= Get From Dictionary ${olt_ids}[${I}] sn |
| 219 | ${olt_device_id}= Get OLTDeviceID From OLT List ${olt_serial_number} |
| 220 | Disable Device ${olt_device_id} |
| 221 | ${of_id}= Get ofID From OLT List ${olt_serial_number} |
| 222 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 223 | ... Validate OLT Device DISABLED UNKNOWN REACHABLE |
| 224 | ... ${olt_serial_number} |
| 225 | Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Device DISABLED UNKNOWN REACHABLE |
| 226 | ... ${olt_serial_number} |
| 227 | ${num_onus}= Set Variable ${list_olts}[${I}][onucount] |
| 228 | # Validate ONUs |
| 229 | Run Keyword Wait Until Keyword Succeeds ${timeout} 5s Validate ONUs After OLT Disable |
Andrea Campanella | 4e50788 | 2020-11-26 11:33:11 +0100 | [diff] [blame] | 230 | ... ${num_onus} ${olt_serial_number} |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 231 | # Verify ONOS Flows |
| 232 | # Number of Access Flows on ONOS equals 4 * the Number of Active ONUs (2 for each downstream and upstream) |
| 233 | ${onos_flows_count}= Evaluate 4 * ${num_onus} |
| 234 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 235 | ... Verify Subscriber Access Flows Added Count DT ${ONOS_SSH_IP} ${ONOS_SSH_PORT} |
| 236 | ... ${of_id} ${onos_flows_count} |
| 237 | # Verify VOLTHA Flows |
| 238 | # Number of per OLT Flows equals Twice the Number of Active ONUs (each for downstream and upstream) + 1 for LLDP |
| 239 | ${olt_flows}= Evaluate 2 * ${num_onus} + 1 |
| 240 | # Number of per ONU Flows equals 2 (one each for downstream and upstream) |
| 241 | ${onu_flows}= Set Variable 2 |
| 242 | Run Keyword Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Flows ${olt_flows} |
| 243 | ... ${olt_device_id} |
| 244 | ${List_ONU_Serial} Create List |
| 245 | Set Suite Variable ${List_ONU_Serial} |
Andrea Campanella | 99a548b | 2020-11-18 09:50:32 +0100 | [diff] [blame] | 246 | Build ONU SN List ${List_ONU_Serial} ${olt_serial_number} ${num_onus} |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 247 | Log ${List_ONU_Serial} |
| 248 | Run Keyword Wait Until Keyword Succeeds ${timeout} 5s Validate ONU Flows |
| 249 | ... ${List_ONU_Serial} ${onu_flows} |
| 250 | # Delete OLT and Validate Empty Device List |
| 251 | Delete Device ${olt_device_id} |
Andrea Campanella | 4e50788 | 2020-11-26 11:33:11 +0100 | [diff] [blame] | 252 | # Check that the OLT and the ONUs are actually removed from the system |
| 253 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s Validate Device Removed |
| 254 | ... ${olt_serial_number} |
| 255 | Run Keyword and Continue On Failure Validate all ONUS for OLT Removed ${num_all_onus} ${hosts} |
| 256 | ... ${olt_serial_number} ${timeout} |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 257 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 258 | ... Verify Device Flows Removed ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id} |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 259 | END |
Hardik Windlass | aaea340 | 2020-03-10 19:45:45 +0530 | [diff] [blame] | 260 | # Re-do Setup (Recreate the OLT) and Perform Sanity Test DT |
| 261 | Run Keyword Setup |
Suchitra Vemuri | ae9cecb | 2020-03-12 12:59:14 -0700 | [diff] [blame] | 262 | Run Keyword If ${has_dataplane} Clean Up Linux |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 263 | Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test DT |
| 264 | #Run Keyword If ${has_dataplane} Clean Up Linux |
Hardik Windlass | aaea340 | 2020-03-10 19:45:45 +0530 | [diff] [blame] | 265 | |
Hardik Windlass | 3b531fa | 2020-04-23 18:51:44 +0530 | [diff] [blame] | 266 | Test Disable and Enable OLT for DT |
| 267 | [Documentation] Validates E2E Ping Connectivity and object states for the given scenario: |
| 268 | ... Assuming that all the ONUs are DHCP/pingable (i.e. assuming sanityDt test was executed) |
| 269 | ... Perform disable on the OLT and validate that the pings do not succeed |
| 270 | ... Perform enable on the OLT and validate that the pings are successful |
Suchitra Vemuri | 228f880 | 2021-03-10 13:14:17 -0800 | [diff] [blame] | 271 | [Tags] functionalDt DisableEnableOLTDt soak |
Hardik Windlass | 3b531fa | 2020-04-23 18:51:44 +0530 | [diff] [blame] | 272 | [Setup] Start Logging DisableEnableOLTDt |
| 273 | [Teardown] Run Keywords Collect Logs |
| 274 | ... AND Stop Logging DisableEnableOLTDt |
| 275 | # Disable and Validate OLT Device |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 276 | FOR ${I} IN RANGE 0 ${olt_count} |
| 277 | ${olt_serial_number}= Get From Dictionary ${olt_ids}[${I}] sn |
| 278 | ${olt_device_id}= Get OLTDeviceID From OLT List ${olt_serial_number} |
| 279 | ${rc} ${output}= Run and Return Rc and Output |
| 280 | ... ${VOLTCTL_CONFIG}; voltctl device disable ${olt_device_id} |
| 281 | Should Be Equal As Integers ${rc} 0 |
| 282 | Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Device DISABLED UNKNOWN REACHABLE |
| 283 | ... ${olt_serial_number} |
| 284 | END |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 285 | # Validate ONUs |
| 286 | FOR ${I} IN RANGE 0 ${num_all_onus} |
Hardik Windlass | 7c801e6 | 2020-05-04 19:33:21 +0530 | [diff] [blame] | 287 | ${src}= Set Variable ${hosts.src[${I}]} |
| 288 | ${dst}= Set Variable ${hosts.dst[${I}]} |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 289 | ${of_id}= Get ofID From OLT List ${src['olt']} |
Hardik Windlass | 7c801e6 | 2020-05-04 19:33:21 +0530 | [diff] [blame] | 290 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
| 291 | ${onu_port}= Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
| 292 | ... Get ONU Port in ONOS ${src['onu']} ${of_id} |
| 293 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
Suchitra Vemuri | 760bdd3 | 2020-06-17 12:34:48 -0700 | [diff] [blame] | 294 | ... Verify ONU Port Is Disabled ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${src['onu']} |
Hardik Windlass | 7c801e6 | 2020-05-04 19:33:21 +0530 | [diff] [blame] | 295 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure |
| 296 | ... Wait Until Keyword Succeeds 60s 2s |
| 297 | ... Check Ping False ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']} |
| 298 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 299 | # Remove Subscriber Access (To replicate DT workflow) |
| 300 | Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command ${ONOS_SSH_IP} |
| 301 | ... ${ONOS_SSH_PORT} volt-remove-subscriber-access ${of_id} ${onu_port} |
| 302 | # Delete ONU Device (To replicate DT workflow) |
| 303 | Delete Device ${onu_device_id} |
| 304 | END |
Hardik Windlass | 2b37e71 | 2020-06-12 02:13:17 +0530 | [diff] [blame] | 305 | Sleep 5s |
Hardik Windlass | 3b531fa | 2020-04-23 18:51:44 +0530 | [diff] [blame] | 306 | # 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] | 307 | FOR ${I} IN RANGE 0 ${olt_count} |
| 308 | ${olt_serial_number}= Get From Dictionary ${olt_ids}[${I}] sn |
| 309 | ${olt_device_id}= Get OLTDeviceID From OLT List ${olt_serial_number} |
| 310 | Enable Device ${olt_device_id} |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 311 | Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Device ENABLED ACTIVE REACHABLE |
| 312 | ... ${olt_serial_number} |
| 313 | #TODO: Update for PON_OLT ETHERNET_NNI |
| 314 | #Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Port Types |
| 315 | #... PON_OLT ETHERNET_NNI |
| 316 | END |
Hardik Windlass | 7c801e6 | 2020-05-04 19:33:21 +0530 | [diff] [blame] | 317 | # Waiting extra time for the ONUs to come up |
| 318 | Sleep 60s |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 319 | Run Keyword If ${has_dataplane} Clean Up Linux |
Hardik Windlass | 7c801e6 | 2020-05-04 19:33:21 +0530 | [diff] [blame] | 320 | Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test DT |
Hardik Windlass | 3b531fa | 2020-04-23 18:51:44 +0530 | [diff] [blame] | 321 | |
| 322 | Test Delete and ReAdd OLT for DT |
| 323 | [Documentation] Validates E2E Ping Connectivity and object states for the given scenario: |
| 324 | ... Assuming that all the ONUs are DHCP/pingable (i.e. assuming sanityDt test was executed) |
| 325 | ... Disable and Delete the OLT |
| 326 | ... Create/Enable the same OLT again |
| 327 | ... Validate DHCP/E2E pings succeed for all the ONUs connected to the OLT |
| 328 | [Tags] functionalDt DeleteReAddOLTDt |
| 329 | [Setup] Start Logging DeleteReAddOLTDt |
| 330 | [Teardown] Run Keywords Collect Logs |
| 331 | ... AND Stop Logging DeleteReAddOLTDt |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 332 | FOR ${I} IN RANGE 0 ${olt_count} |
| 333 | ${olt_serial_number}= Get From Dictionary ${olt_ids}[${I}] sn |
| 334 | ${of_id}= Get ofID From OLT List ${olt_serial_number} |
| 335 | Delete Device and Verify ${olt_serial_number} |
| 336 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 337 | ... Verify Device Flows Removed ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id} |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 338 | END |
| 339 | # Recreate the OLTs |
Hardik Windlass | 3b531fa | 2020-04-23 18:51:44 +0530 | [diff] [blame] | 340 | Setup |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 341 | Run Keyword If ${has_dataplane} Clean Up Linux |
Hardik Windlass | 3b531fa | 2020-04-23 18:51:44 +0530 | [diff] [blame] | 342 | Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test DT |
| 343 | |
| 344 | Test Disable ONUs and OLT Then Delete ONUs and OLT for DT |
| 345 | [Documentation] On deployed POD, disable the ONU, disable the OLT and then delete ONU and OLT. |
| 346 | ... This TC is to confirm that ONU removal is not impacting OLT |
| 347 | ... Devices will be removed during the execution of this TC |
| 348 | ... so calling setup at the end to add the devices back to avoid the confusion. |
| 349 | [Tags] functionalDt DisableDeleteONUOLTDt |
| 350 | [Setup] Start Logging DisableDeleteONUOLTDt |
| 351 | [Teardown] Run Keywords Collect Logs |
| 352 | ... AND Stop Logging DisableDeleteONUOLTDt |
Suchitra Vemuri | 0217055 | 2021-03-23 16:40:50 -0700 | [diff] [blame] | 353 | @{onu_reason}= Create List initial-mib-downloaded omci-flows-pushed |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 354 | FOR ${I} IN RANGE 0 ${num_all_onus} |
Hardik Windlass | 3b531fa | 2020-04-23 18:51:44 +0530 | [diff] [blame] | 355 | ${src}= Set Variable ${hosts.src[${I}]} |
| 356 | ${dst}= Set Variable ${hosts.dst[${I}]} |
| 357 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
| 358 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 359 | ... Validate Device ENABLED ACTIVE |
Suchitra Vemuri | 0217055 | 2021-03-23 16:40:50 -0700 | [diff] [blame] | 360 | ... REACHABLE ${src['onu']} onu=True onu_reason=${onu_reason} |
Hardik Windlass | 3b531fa | 2020-04-23 18:51:44 +0530 | [diff] [blame] | 361 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 362 | ... Validate OLT Device ENABLED ACTIVE |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 363 | ... REACHABLE ${src['olt']} |
Hardik Windlass | 3b531fa | 2020-04-23 18:51:44 +0530 | [diff] [blame] | 364 | Disable Device ${onu_device_id} |
| 365 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 366 | ... Validate Device DISABLED UNKNOWN |
| 367 | ... REACHABLE ${src['onu']} onu=false |
| 368 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 369 | ... Validate OLT Device ENABLED ACTIVE |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 370 | ... REACHABLE ${src['olt']} |
Hardik Windlass | 3b531fa | 2020-04-23 18:51:44 +0530 | [diff] [blame] | 371 | END |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 372 | # Disable all OLTs |
| 373 | FOR ${I} IN RANGE 0 ${olt_count} |
| 374 | ${olt_serial_number}= Get From Dictionary ${olt_ids}[${I}] sn |
| 375 | ${olt_device_id}= Get OLTDeviceID From OLT List ${olt_serial_number} |
| 376 | ${rc} ${output}= Run and Return Rc and Output |
| 377 | ... ${VOLTCTL_CONFIG}; voltctl device disable ${olt_device_id} |
| 378 | Should Be Equal As Integers ${rc} 0 |
| 379 | Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Device DISABLED UNKNOWN REACHABLE |
| 380 | ... ${olt_serial_number} |
| 381 | END |
| 382 | # Validate ONUs after OLT disable |
| 383 | FOR ${I} IN RANGE 0 ${num_all_onus} |
Hardik Windlass | 3b531fa | 2020-04-23 18:51:44 +0530 | [diff] [blame] | 384 | ${src}= Set Variable ${hosts.src[${I}]} |
| 385 | ${dst}= Set Variable ${hosts.dst[${I}]} |
| 386 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
| 387 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 388 | ... Validate Device DISABLED DISCOVERED |
| 389 | ... UNREACHABLE ${src['onu']} onu=false |
| 390 | Delete Device ${onu_device_id} |
| 391 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 392 | ... Validate OLT Device DISABLED UNKNOWN |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 393 | ... REACHABLE ${src['olt']} |
Hardik Windlass | 3b531fa | 2020-04-23 18:51:44 +0530 | [diff] [blame] | 394 | END |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 395 | # Delete all OLTs |
| 396 | Delete All Devices and Verify |
| 397 | |
| 398 | #Delete Device ${olt_device_id} |
| 399 | #TODO: Fix the following assertion |
| 400 | #Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s Test Empty Device List |
| 401 | #Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 402 | #... Verify Device Flows Removed ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id} |
| 403 | |
Hardik Windlass | 3b531fa | 2020-04-23 18:51:44 +0530 | [diff] [blame] | 404 | # Re-do Setup (Recreate the OLT) and Perform Sanity Test DT |
| 405 | Run Keyword Setup |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 406 | Run Keyword If ${has_dataplane} Clean Up Linux |
Hardik Windlass | 3b531fa | 2020-04-23 18:51:44 +0530 | [diff] [blame] | 407 | Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test DT |
Hardik Windlass | 3b531fa | 2020-04-23 18:51:44 +0530 | [diff] [blame] | 408 | |
Andy Bavier | e19991a | 2020-05-08 10:42:40 -0700 | [diff] [blame] | 409 | Data plane verification using TCP for DT |
| 410 | [Documentation] Test bandwidth profile is met and not exceeded for each subscriber. |
| 411 | ... Assumes iperf3 and jq installed on client and iperf -s running on DHCP server |
Andy Bavier | 7613b9a | 2020-07-08 07:25:47 -0700 | [diff] [blame] | 412 | [Tags] dataplaneDt BandwidthProfileTCPDt VOL-3061 |
Andy Bavier | dfbcaef | 2020-05-27 15:34:18 -0700 | [diff] [blame] | 413 | [Setup] Start Logging BandwidthProfileTCPDt |
| 414 | [Teardown] Run Keywords Collect Logs |
| 415 | ... AND Stop Logging BandwidthProfileTCPDt |
Andy Bavier | e19991a | 2020-05-08 10:42:40 -0700 | [diff] [blame] | 416 | Pass Execution If '${has_dataplane}'=='False' Bandwidth profile validation can be done only in |
| 417 | ... physical pod. Skipping this test in BBSIM. |
Suchitra Vemuri | a4e3e07 | 2020-11-06 14:23:47 -0800 | [diff] [blame] | 418 | Delete All Devices And Verify |
| 419 | Run Keyword If ${has_dataplane} Clean Up Linux |
| 420 | setup |
| 421 | Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test DT |
| 422 | |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 423 | #${of_id}= Wait Until Keyword Succeeds ${timeout} 15s Validate OLT Device in ONOS |
| 424 | #... ${olt_serial_number} |
| 425 | FOR ${I} IN RANGE 0 ${num_all_onus} |
Andy Bavier | e19991a | 2020-05-08 10:42:40 -0700 | [diff] [blame] | 426 | ${src}= Set Variable ${hosts.src[${I}]} |
| 427 | ${dst}= Set Variable ${hosts.dst[${I}]} |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 428 | ${of_id}= Get ofID From OLT List ${src['olt']} |
Andy Bavier | f6ab19c | 2020-05-14 10:34:47 -0700 | [diff] [blame] | 429 | # Check for iperf3 and jq tools |
| 430 | ${stdout} ${stderr} ${rc}= Execute Remote Command which iperf3 jq |
| 431 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 432 | Pass Execution If ${rc} != 0 Skipping test: iperf3 / jq not found on the RG |
| 433 | |
Andy Bavier | e19991a | 2020-05-08 10:42:40 -0700 | [diff] [blame] | 434 | ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']} |
| 435 | ... ${of_id} |
| 436 | ${subscriber_id}= Set Variable ${of_id}/${onu_port} |
| 437 | ${bandwidth_profile_name} Get Bandwidth Profile Name For Given Subscriber ${subscriber_id} |
| 438 | ... upstreamBandwidthProfile |
| 439 | ${limiting_bw_value_upstream} Get Bandwidth Details ${bandwidth_profile_name} |
| 440 | ${bandwidth_profile_name} Get Bandwidth Profile Name For Given Subscriber ${subscriber_id} |
| 441 | ... downstreamBandwidthProfile |
| 442 | ${limiting_bw_value_dnstream} Get Bandwidth Details ${bandwidth_profile_name} |
| 443 | |
| 444 | # Stream TCP packets from RG to server |
| 445 | ${updict}= Run Iperf3 Test Client ${src} server=${dst['dp_iface_ip_qinq']} |
| 446 | ... args=-t 30 |
| 447 | ${actual_upstream_bw_used}= Evaluate ${updict['end']['sum_received']['bits_per_second']}/1000 |
| 448 | |
| 449 | # Stream TCP packets from server to RG |
| 450 | ${dndict}= Run Iperf3 Test Client ${src} server=${dst['dp_iface_ip_qinq']} |
| 451 | ... args=-R -t 30 |
| 452 | ${actual_dnstream_bw_used}= Evaluate ${dndict['end']['sum_received']['bits_per_second']}/1000 |
| 453 | |
| 454 | ${pct_limit_up}= Evaluate 100*${actual_upstream_bw_used}/${limiting_bw_value_upstream} |
| 455 | ${pct_limit_dn}= Evaluate 100*${actual_dnstream_bw_used}/${limiting_bw_value_dnstream} |
| 456 | Log Up: bwprof ${limiting_bw_value_upstream}Kbps, got ${actual_upstream_bw_used}Kbps (${pct_limit_up}%) |
| 457 | Log Down: bwprof ${limiting_bw_value_dnstream}Kbps, got ${actual_dnstream_bw_used}Kbps (${pct_limit_dn}%) |
| 458 | |
| 459 | Should Be True ${pct_limit_up} <= ${upper_margin_pct} |
| 460 | ... The upstream bandwidth exceeded the limit (${pct_limit_up}% of limit) |
Andy Bavier | 7613b9a | 2020-07-08 07:25:47 -0700 | [diff] [blame] | 461 | # VOL-3125: downstream bw limit not enforced. Uncomment when fixed. |
| 462 | #Should Be True ${pct_limit_dn} <= ${upper_margin_pct} |
| 463 | #... The downstream bandwidth exceeded the limit (${pct_limit_dn}% of limit) |
Andy Bavier | e19991a | 2020-05-08 10:42:40 -0700 | [diff] [blame] | 464 | Should Be True ${pct_limit_up} >= ${lower_margin_pct} |
| 465 | ... The upstream bandwidth guarantee was not met (${pct_limit_up}% of resv) |
| 466 | Should Be True ${pct_limit_dn} >= ${lower_margin_pct} |
| 467 | ... The downstream bandwidth guarantee was not met (${pct_limit_dn}% of resv) |
| 468 | END |
| 469 | |
| 470 | Data plane verification using UDP for DT |
| 471 | [Documentation] Test bandwidth profile is met and not exceeded for each subscriber. |
| 472 | ... Assumes iperf3 and jq installed on client and iperf -s running on DHCP server |
Andy Bavier | 7613b9a | 2020-07-08 07:25:47 -0700 | [diff] [blame] | 473 | [Tags] dataplaneDt BandwidthProfileUDPDt VOL-3061 |
Andy Bavier | dfbcaef | 2020-05-27 15:34:18 -0700 | [diff] [blame] | 474 | [Setup] Start Logging BandwidthProfileUDPDt |
| 475 | [Teardown] Run Keywords Collect Logs |
| 476 | ... AND Stop Logging BandwidthProfileUDPDt |
Andy Bavier | e19991a | 2020-05-08 10:42:40 -0700 | [diff] [blame] | 477 | Pass Execution If '${has_dataplane}'=='False' Bandwidth profile validation can be done only in |
| 478 | ... physical pod. Skipping this test in BBSIM. |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 479 | FOR ${I} IN RANGE 0 ${num_all_onus} |
Andy Bavier | e19991a | 2020-05-08 10:42:40 -0700 | [diff] [blame] | 480 | ${src}= Set Variable ${hosts.src[${I}]} |
| 481 | ${dst}= Set Variable ${hosts.dst[${I}]} |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 482 | ${of_id}= Get ofID From OLT List ${src['olt']} |
Andy Bavier | 7613b9a | 2020-07-08 07:25:47 -0700 | [diff] [blame] | 483 | |
| 484 | # Check for iperf3 and jq tools |
| 485 | ${stdout} ${stderr} ${rc}= Execute Remote Command which iperf3 jq |
| 486 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 487 | Pass Execution If ${rc} != 0 Skipping test: iperf3 / jq not found on the RG |
| 488 | |
Andy Bavier | e19991a | 2020-05-08 10:42:40 -0700 | [diff] [blame] | 489 | ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']} |
| 490 | ... ${of_id} |
| 491 | ${subscriber_id}= Set Variable ${of_id}/${onu_port} |
| 492 | ${bandwidth_profile_name} Get Bandwidth Profile Name For Given Subscriber ${subscriber_id} |
| 493 | ... upstreamBandwidthProfile |
| 494 | ${limiting_bw_value_upstream} Get Bandwidth Details ${bandwidth_profile_name} |
| 495 | ${bandwidth_profile_name} Get Bandwidth Profile Name For Given Subscriber ${subscriber_id} |
| 496 | ... downstreamBandwidthProfile |
| 497 | ${limiting_bw_value_dnstream} Get Bandwidth Details ${bandwidth_profile_name} |
| 498 | |
| 499 | # Stream UDP packets from RG to server |
Andrea Campanella | 1d34bfc | 2020-08-06 09:58:49 +0200 | [diff] [blame] | 500 | ${uprate}= Run Keyword If ${limiting_bw_value_upstream} != 1000000 |
| 501 | ... Evaluate ${limiting_bw_value_upstream}*${udp_rate_multiplier} |
Andrea Campanella | 580e049 | 2020-08-05 15:35:48 +0200 | [diff] [blame] | 502 | ... ELSE |
Andrea Campanella | 1d34bfc | 2020-08-06 09:58:49 +0200 | [diff] [blame] | 503 | ... Set Variable ${limiting_bw_value_upstream} |
Andrea Campanella | 580e049 | 2020-08-05 15:35:48 +0200 | [diff] [blame] | 504 | |
Andy Bavier | e19991a | 2020-05-08 10:42:40 -0700 | [diff] [blame] | 505 | ${updict}= Run Iperf3 Test Client ${src} server=${dst['dp_iface_ip_qinq']} |
Andy Bavier | 7dc5062 | 2020-05-28 14:34:12 -0700 | [diff] [blame] | 506 | ... 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] | 507 | # With UDP test, bits per second is the sending rate. Multiply by the loss rate to get the throughput. |
| 508 | ${actual_upstream_bw_used}= Evaluate |
| 509 | ... (100 - ${updict['end']['sum']['lost_percent']})*${updict['end']['sum']['bits_per_second']}/100000 |
| 510 | |
| 511 | # Stream UDP packets from server to RG |
Andrea Campanella | 1d34bfc | 2020-08-06 09:58:49 +0200 | [diff] [blame] | 512 | ${dnrate}= Run Keyword If ${limiting_bw_value_dnstream} != 1000000 |
| 513 | ... Evaluate ${limiting_bw_value_dnstream}*${udp_rate_multiplier} |
Andrea Campanella | 580e049 | 2020-08-05 15:35:48 +0200 | [diff] [blame] | 514 | ... ELSE |
Andrea Campanella | 1d34bfc | 2020-08-06 09:58:49 +0200 | [diff] [blame] | 515 | ... Set Variable ${limiting_bw_value_dnstream} |
Andy Bavier | e19991a | 2020-05-08 10:42:40 -0700 | [diff] [blame] | 516 | ${dndict}= Run Iperf3 Test Client ${src} server=${dst['dp_iface_ip_qinq']} |
Andy Bavier | 7dc5062 | 2020-05-28 14:34:12 -0700 | [diff] [blame] | 517 | ... 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] | 518 | # With UDP test, bits per second is the sending rate. Multiply by the loss rate to get the throughput. |
| 519 | ${actual_dnstream_bw_used}= Evaluate |
| 520 | ... (100 - ${dndict['end']['sum']['lost_percent']})*${dndict['end']['sum']['bits_per_second']}/100000 |
| 521 | |
| 522 | ${pct_limit_up}= Evaluate 100*${actual_upstream_bw_used}/${limiting_bw_value_upstream} |
| 523 | ${pct_limit_dn}= Evaluate 100*${actual_dnstream_bw_used}/${limiting_bw_value_dnstream} |
| 524 | Log Up: bwprof ${limiting_bw_value_upstream}Kbps, got ${actual_upstream_bw_used}Kbps (${pct_limit_up}%) |
| 525 | Log Down: bwprof ${limiting_bw_value_dnstream}Kbps, got ${actual_dnstream_bw_used}Kbps (${pct_limit_dn}%) |
| 526 | |
| 527 | Should Be True ${pct_limit_up} <= ${upper_margin_pct} |
| 528 | ... The upstream bandwidth exceeded the limit (${pct_limit_up}% of limit) |
Andy Bavier | 7613b9a | 2020-07-08 07:25:47 -0700 | [diff] [blame] | 529 | # VOL-3125: downstream bw limit not enforced. Uncomment when fixed. |
| 530 | #Should Be True ${pct_limit_dn} <= ${upper_margin_pct} |
| 531 | #... The downstream bandwidth exceeded the limit (${pct_limit_dn}% of limit) |
Andy Bavier | e19991a | 2020-05-08 10:42:40 -0700 | [diff] [blame] | 532 | Should Be True ${pct_limit_up} >= ${lower_margin_pct} |
| 533 | ... The upstream bandwidth guarantee was not met (${pct_limit_up}% of resv) |
| 534 | Should Be True ${pct_limit_dn} >= ${lower_margin_pct} |
| 535 | ... The downstream bandwidth guarantee was not met (${pct_limit_dn}% of resv) |
| 536 | END |
| 537 | |
Andy Bavier | 7613b9a | 2020-07-08 07:25:47 -0700 | [diff] [blame] | 538 | Validate parsing of data traffic through voltha using tech profile |
| 539 | [Documentation] Assuming that test1 was executed where all the ONUs are authenticated/DHCP/pingable |
| 540 | ... Prerequisite tools : Tcpdump and Mausezahn traffic generator on both RG and DHCP/BNG VMs |
| 541 | ... Install jq tool to read json file, where test suite is being running |
| 542 | ... Make sure 9999 port is enabled or forwarded for both upsteam and downstream direction |
| 543 | ... This test sends UDP packets on port 9999 with pbits between 0 and 7 and validates that |
| 544 | ... the pbits are preserved by the PON. |
| 545 | [Tags] dataplaneDt TechProfileDt VOL-3291 |
| 546 | [Setup] Start Logging TechProfileDt |
| 547 | [Teardown] Run Keywords Collect Logs |
| 548 | ... AND Stop Logging TechProfileDt |
| 549 | Pass Execution If '${has_dataplane}'=='False' |
| 550 | ... Skipping test: Technology profile validation can be done only in physical pod |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 551 | FOR ${I} IN RANGE 0 ${num_all_onus} |
Andy Bavier | 7613b9a | 2020-07-08 07:25:47 -0700 | [diff] [blame] | 552 | ${src}= Set Variable ${hosts.src[${I}]} |
| 553 | ${dst}= Set Variable ${hosts.dst[${I}]} |
| 554 | |
Andy Bavier | 275414a | 2020-07-16 13:07:17 -0700 | [diff] [blame] | 555 | ${src_iface_name}= Fetch From Left ${src['dp_iface_name']} . |
| 556 | |
Andy Bavier | 7613b9a | 2020-07-08 07:25:47 -0700 | [diff] [blame] | 557 | ${bng_ip}= Get Variable Value ${dst['noroot_ip']} |
| 558 | ${bng_user}= Get Variable Value ${dst['noroot_user']} |
| 559 | ${bng_pass}= Get Variable Value ${dst['noroot_pass']} |
| 560 | Pass Execution If "${bng_ip}" == "${NONE}" or "${bng_user}" == "${NONE}" or "${bng_pass}" == "${NONE}" |
| 561 | ... Skipping test: credentials for BNG login required in deployment config |
| 562 | |
| 563 | ${stdout} ${stderr} ${rc}= Execute Remote Command which mausezahn tcpdump |
| 564 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 565 | Pass Execution If ${rc} != 0 Skipping test: mausezahn / tcpdump not found on the RG |
| 566 | ${stdout} ${stderr} ${rc}= Execute Remote Command which mausezahn tcpdump |
| 567 | ... ${bng_ip} ${bng_user} ${bng_pass} ${dst['container_type']} ${dst['container_name']} |
| 568 | Pass Execution If ${rc} != 0 Skipping test: mausezahn / tcpdump not found on the BNG |
| 569 | Log Upstream test |
| 570 | 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] | 571 | ... ${dst['dp_iface_ip_qinq']} ${dst['dp_iface_name']} ${src_iface_name} |
| 572 | ... 0 udp 9999 ${src['c_tag']} vlan |
Andy Bavier | 7613b9a | 2020-07-08 07:25:47 -0700 | [diff] [blame] | 573 | ... ${bng_ip} ${bng_user} ${bng_pass} ${dst['container_type']} ${dst['container_name']} |
| 574 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 575 | Log Downstream test |
| 576 | ${rg_ip} ${stderr} ${rc}= Execute Remote Command |
| 577 | ... ifconfig ${src['dp_iface_name']} | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1 }' |
| 578 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 579 | Should Be Equal As Integers ${rc} 0 Could not get RG's IP address |
| 580 | 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] | 581 | ... ${rg_ip} ${src_iface_name} ${dst['dp_iface_name']}.${src['s_tag']} |
Andy Bavier | 7613b9a | 2020-07-08 07:25:47 -0700 | [diff] [blame] | 582 | ... 0 udp 9999 ${src['c_tag']} udp |
| 583 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 584 | ... ${bng_ip} ${bng_user} ${bng_pass} ${dst['container_type']} ${dst['container_name']} |
| 585 | END |
| 586 | |
Hardik Windlass | 16cdf96 | 2020-04-29 15:26:50 +0530 | [diff] [blame] | 587 | Test Disable and Enable OLT PON Port for DT |
| 588 | [Documentation] Validates E2E Ping Connectivity and object states for the given scenario: |
| 589 | ... Assuming that all the ONUs are DHCP/pingable (i.e. assuming sanityDt test was executed) |
| 590 | ... Perform disable on the OLT PON Port and validate that the pings do not succeed |
| 591 | ... Perform enable on the OLT PON Port and validate that the pings are successful |
Hardik Windlass | 41701e8 | 2021-01-12 17:44:44 +0000 | [diff] [blame] | 592 | [Tags] functionalDt DisableEnableOltPonPortDt VOL-2577 |
Hardik Windlass | 16cdf96 | 2020-04-29 15:26:50 +0530 | [diff] [blame] | 593 | [Setup] Start Logging DisableEnableOltPonPortDt |
| 594 | [Teardown] Run Keywords Collect Logs |
| 595 | ... AND Stop Logging DisableEnableOltPonPortDt |
Hardik Windlass | 41701e8 | 2021-01-12 17:44:44 +0000 | [diff] [blame] | 596 | FOR ${I} IN RANGE 0 ${olt_count} |
| 597 | ${olt_serial_number}= Get From Dictionary ${olt_ids}[${I}] sn |
| 598 | Disable Enable PON Port Per OLT DT ${olt_serial_number} |
Hardik Windlass | 16cdf96 | 2020-04-29 15:26:50 +0530 | [diff] [blame] | 599 | END |
| 600 | |
Hardik Windlass | a3d04b9 | 2020-02-17 15:06:05 +0000 | [diff] [blame] | 601 | *** Keywords *** |
| 602 | Setup Suite |
| 603 | [Documentation] Set up the test suite |
| 604 | Common Test Suite Setup |
Hung-Wei Chiu | cc6e655 | 2020-06-04 12:57:38 -0700 | [diff] [blame] | 605 | #Restore all ONUs |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 606 | #Run Keyword If ${has_dataplane} RestoreONUs ${num_all_onus} |
Suchitra Vemuri | 1d8e817 | 2020-06-17 17:43:56 -0700 | [diff] [blame] | 607 | #power_switch.robot needs it to support different vendor's power switch |
| 608 | ${switch_type}= Get Variable Value ${web_power_switch.type} |
| 609 | Run Keyword If "${switch_type}"!="" Set Global Variable ${powerswitch_type} ${switch_type} |
Hardik Windlass | a3d04b9 | 2020-02-17 15:06:05 +0000 | [diff] [blame] | 610 | |
| 611 | Clear All Devices Then Create New Device |
| 612 | [Documentation] Remove any devices from VOLTHA and ONOS |
| 613 | # Remove all devices from voltha and nos |
| 614 | Delete All Devices and Verify |
| 615 | # Execute normal test Setup Keyword |
| 616 | Setup |