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