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