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 |
| 34 | |
| 35 | *** Variables *** |
| 36 | ${POD_NAME} flex-ocp-cord |
| 37 | ${KUBERNETES_CONF} ${KUBERNETES_CONFIGS_DIR}/${POD_NAME}.conf |
| 38 | ${KUBERNETES_CONFIGS_DIR} ~/pod-configs/kubernetes-configs |
| 39 | #${KUBERNETES_CONFIGS_DIR} ${KUBERNETES_CONFIGS_DIR}/${POD_NAME}.conf |
| 40 | ${KUBERNETES_YAML} ${KUBERNETES_CONFIGS_DIR}/${POD_NAME}.yml |
| 41 | ${HELM_CHARTS_DIR} ~/helm-charts |
| 42 | ${VOLTHA_POD_NUM} 8 |
| 43 | ${NAMESPACE} voltha |
| 44 | # For below variable value, using deployment name as using grep for |
| 45 | # parsing radius pod name, we can also use full radius pod name |
| 46 | ${RESTART_POD_NAME} radius |
| 47 | ${timeout} 60s |
| 48 | ${of_id} 0 |
| 49 | ${logical_id} 0 |
| 50 | ${has_dataplane} True |
Hardik Windlass | ffbf060 | 2020-04-24 23:14:45 +0530 | [diff] [blame] | 51 | ${teardown_device} True |
Hardik Windlass | a3d04b9 | 2020-02-17 15:06:05 +0000 | [diff] [blame] | 52 | ${scripts} ../../scripts |
| 53 | |
Andy Bavier | e19991a | 2020-05-08 10:42:40 -0700 | [diff] [blame] | 54 | # For dataplane bandwidth testing |
| 55 | ${upper_margin_pct} 105 # Allow 5% over the limit |
Andy Bavier | f6ab19c | 2020-05-14 10:34:47 -0700 | [diff] [blame] | 56 | ${lower_margin_pct} 92 # Allow 8% under the limit |
Andy Bavier | e19991a | 2020-05-08 10:42:40 -0700 | [diff] [blame] | 57 | ${udp_rate_multiplier} 1.10 # Send UDP at bw profile limit * rate_multiplier |
| 58 | ${udp_packet_bytes} 1400 # UDP payload in bytes |
| 59 | |
Hardik Windlass | a3d04b9 | 2020-02-17 15:06:05 +0000 | [diff] [blame] | 60 | # Per-test logging on failure is turned off by default; set this variable to enable |
| 61 | ${container_log_dir} ${None} |
| 62 | |
| 63 | *** Test Cases *** |
| 64 | Sanity E2E Test for OLT/ONU on POD for DT |
| 65 | [Documentation] Validates E2E Ping Connectivity and object states for the given scenario: |
| 66 | ... Validate successful DHCP/E2E ping (no EAPOL and DHCP flows) for the tech profile that is used |
| 67 | ... Traffic sent with same vlan from different RGs, |
| 68 | ... should reach the NNI port on the OLT with the expected double tagged vlan ids |
| 69 | ... Inner vlans from the RG should not change |
Suchitra Vemuri | f2388ad | 2020-03-15 21:44:44 -0700 | [diff] [blame] | 70 | [Tags] sanityDt |
Andy Bavier | e187eda | 2020-04-20 15:00:02 -0700 | [diff] [blame] | 71 | [Setup] Run Keywords Start Logging SanityTestDt |
Hardik Windlass | a3d04b9 | 2020-02-17 15:06:05 +0000 | [diff] [blame] | 72 | ... AND Setup |
| 73 | [Teardown] Run Keywords Collect Logs |
| 74 | ... AND Stop Logging SanityTestDt |
Hardik Windlass | a3d04b9 | 2020-02-17 15:06:05 +0000 | [diff] [blame] | 75 | Run Keyword If ${has_dataplane} Clean Up Linux |
| 76 | Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test DT |
| 77 | |
Hardik Windlass | 35706ba | 2020-02-20 08:16:42 +0000 | [diff] [blame] | 78 | Test Subscriber Delete and Add for DT |
| 79 | [Documentation] Validates E2E Ping Connectivity and object states for the given scenario: |
Hardik Windlass | 63d5e00 | 2020-03-06 21:07:09 +0530 | [diff] [blame] | 80 | ... 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] | 81 | ... Delete a subscriber and validate that the pings do not succeed and state is purged |
| 82 | ... Disable and Enable the ONU (This is to replicate the existing DT behaviour) |
| 83 | ... 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] | 84 | [Tags] functionalDt SubAddDeleteDt |
Andy Bavier | e187eda | 2020-04-20 15:00:02 -0700 | [diff] [blame] | 85 | [Setup] Start Logging SubAddDeleteDt |
Hardik Windlass | 35706ba | 2020-02-20 08:16:42 +0000 | [diff] [blame] | 86 | [Teardown] Run Keywords Collect Logs |
| 87 | ... AND Stop Logging SubAddDeleteDt |
Hardik Windlass | 35706ba | 2020-02-20 08:16:42 +0000 | [diff] [blame] | 88 | FOR ${I} IN RANGE 0 ${num_onus} |
| 89 | ${src}= Set Variable ${hosts.src[${I}]} |
| 90 | ${dst}= Set Variable ${hosts.dst[${I}]} |
| 91 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
| 92 | ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']} |
| 93 | ... ${of_id} |
| 94 | # Remove Subscriber Access |
ubuntu | 6b6e7d4 | 2020-03-02 12:35:42 -0800 | [diff] [blame] | 95 | 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] | 96 | ... ${ONOS_SSH_PORT} volt-remove-subscriber-access ${of_id} ${onu_port} |
| 97 | Sleep 10s |
Hardik Windlass | fb5eace | 2020-03-26 14:49:01 +0530 | [diff] [blame] | 98 | # TODO: Yet to Verify on the GPON based Physical POD (VOL-2652) |
Hardik Windlass | 35706ba | 2020-02-20 08:16:42 +0000 | [diff] [blame] | 99 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure |
| 100 | ... Wait Until Keyword Succeeds 60s 2s |
| 101 | ... Check Ping False ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']} |
| 102 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
Hardik Windlass | fb5eace | 2020-03-26 14:49:01 +0530 | [diff] [blame] | 103 | # Number of Access Flows on ONOS equals 4 * the Number of Active ONUs (2 for each downstream and upstream) |
| 104 | ${onos_flows_count}= Evaluate 4 * ( ${num_onus} - 1 ) |
| 105 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 106 | ... 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] | 107 | ... ${of_id} ${onos_flows_count} |
Hardik Windlass | 35706ba | 2020-02-20 08:16:42 +0000 | [diff] [blame] | 108 | # Verify VOLTHA flows for OLT equals twice the number of ONUS (minus ONU under test) + 1 for LLDP |
| 109 | ${olt_flows}= Evaluate 2 * ( ${num_onus} - 1 ) + 1 |
| 110 | Run Keyword Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Flows ${olt_flows} |
| 111 | # Verify VOLTHA flows for ONU under test is Zero |
| 112 | Run Keyword Wait Until Keyword Succeeds ${timeout} 5s Validate Device Flows |
| 113 | ... ${onu_device_id} 0 |
| 114 | # Disable and Re-Enable the ONU (To replicate DT current workflow) |
| 115 | # TODO: Delete and Auto-Discovery Add of ONU (not yet supported) |
| 116 | Disable Device ${onu_device_id} |
| 117 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 118 | ... Validate Device DISABLED UNKNOWN |
| 119 | ... REACHABLE ${src['onu']} |
| 120 | Enable Device ${onu_device_id} |
| 121 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 122 | ... Validate Device ENABLED ACTIVE |
| 123 | ... REACHABLE ${src['onu']} |
| 124 | # Add Subscriber Access |
ubuntu | 6b6e7d4 | 2020-03-02 12:35:42 -0800 | [diff] [blame] | 125 | 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] | 126 | ... ${ONOS_SSH_PORT} volt-add-subscriber-access ${of_id} ${onu_port} |
| 127 | Sleep 10s |
Hardik Windlass | fb5eace | 2020-03-26 14:49:01 +0530 | [diff] [blame] | 128 | # Verify subscriber access flows are added for the ONU port |
| 129 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
Hardik Windlass | 25e1170 | 2020-03-30 20:05:19 +0530 | [diff] [blame] | 130 | ... Verify Subscriber Access Flows Added For ONU DT ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id} |
| 131 | ... ${onu_port} ${nni_port} ${src['s_tag']} |
Hardik Windlass | 35706ba | 2020-02-20 08:16:42 +0000 | [diff] [blame] | 132 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 133 | ... Validate Device ENABLED ACTIVE |
| 134 | ... REACHABLE ${src['onu']} onu=True onu_reason=omci-flows-pushed |
Hardik Windlass | fb5eace | 2020-03-26 14:49:01 +0530 | [diff] [blame] | 135 | # TODO: Yet to Verify on the GPON based Physical POD (VOL-2652) |
Hardik Windlass | 35706ba | 2020-02-20 08:16:42 +0000 | [diff] [blame] | 136 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure |
| 137 | ... Wait Until Keyword Succeeds 60s 2s |
| 138 | ... Check Ping True ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']} |
| 139 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 140 | Run Keyword and Ignore Error Get Device Output from Voltha ${onu_device_id} |
| 141 | Run Keyword and Ignore Error Collect Logs |
| 142 | END |
Hardik Windlass | fb5eace | 2020-03-26 14:49:01 +0530 | [diff] [blame] | 143 | # Verify ONOS Flows |
| 144 | # Number of Access Flows on ONOS equals 4 * the Number of Active ONUs (2 for each downstream and upstream) |
| 145 | ${onos_flows_count}= Evaluate 4 * ${num_onus} |
| 146 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
Hardik Windlass | 25e1170 | 2020-03-30 20:05:19 +0530 | [diff] [blame] | 147 | ... Verify Subscriber Access Flows Added Count DT ${ONOS_SSH_IP} ${ONOS_SSH_PORT} |
| 148 | ... ${of_id} ${onos_flows_count} |
Hardik Windlass | fb5eace | 2020-03-26 14:49:01 +0530 | [diff] [blame] | 149 | # Verify VOLTHA Flows |
Hardik Windlass | 35706ba | 2020-02-20 08:16:42 +0000 | [diff] [blame] | 150 | # Number of per OLT Flows equals Twice the Number of Active ONUs (each for downstream and upstream) + 1 for LLDP |
| 151 | ${olt_flows}= Evaluate 2 * ${num_onus} + 1 |
| 152 | # Number of per ONU Flows equals 2 (one each for downstream and upstream) |
| 153 | ${onu_flows}= Set Variable 2 |
| 154 | Run Keyword Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Flows ${olt_flows} |
| 155 | ${List_ONU_Serial} Create List |
| 156 | Set Suite Variable ${List_ONU_Serial} |
| 157 | Build ONU SN List ${List_ONU_Serial} |
| 158 | Log ${List_ONU_Serial} |
| 159 | Run Keyword Wait Until Keyword Succeeds ${timeout} 5s Validate ONU Flows |
| 160 | ... ${List_ONU_Serial} ${onu_flows} |
| 161 | |
Hardik Windlass | 63d5e00 | 2020-03-06 21:07:09 +0530 | [diff] [blame] | 162 | Test Disable and Enable ONU for DT |
| 163 | [Documentation] Validates E2E Ping Connectivity and object states for the given scenario: |
| 164 | ... Assuming that all the ONUs are DHCP/pingable (i.e. assuming sanityDt test was executed) |
| 165 | ... Perform disable on the ONUs and validate that the pings do not succeed |
| 166 | ... Perform enable on the ONUs and validate that the pings are successful |
Suchitra Vemuri | f2388ad | 2020-03-15 21:44:44 -0700 | [diff] [blame] | 167 | [Tags] functionalDt DisableEnableONUDt |
Andy Bavier | e187eda | 2020-04-20 15:00:02 -0700 | [diff] [blame] | 168 | [Setup] Start Logging DisableEnableONUDt |
Hardik Windlass | 63d5e00 | 2020-03-06 21:07:09 +0530 | [diff] [blame] | 169 | [Teardown] Run Keywords Collect Logs |
| 170 | ... AND Stop Logging DisableEnableONUDt |
Hardik Windlass | 63d5e00 | 2020-03-06 21:07:09 +0530 | [diff] [blame] | 171 | FOR ${I} IN RANGE 0 ${num_onus} |
| 172 | ${src}= Set Variable ${hosts.src[${I}]} |
| 173 | ${dst}= Set Variable ${hosts.dst[${I}]} |
| 174 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
| 175 | ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']} |
| 176 | ... ${of_id} |
| 177 | Disable Device ${onu_device_id} |
| 178 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 179 | ... Validate Device DISABLED UNKNOWN |
| 180 | ... REACHABLE ${src['onu']} onu=True onu_reason=omci-admin-lock |
| 181 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
| 182 | ... Verify ONU Port Is Disabled ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port} |
Hardik Windlass | fb5eace | 2020-03-26 14:49:01 +0530 | [diff] [blame] | 183 | # TODO: Yet to Verify on the GPON based Physical POD (VOL-2652) |
Hardik Windlass | 63d5e00 | 2020-03-06 21:07:09 +0530 | [diff] [blame] | 184 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure |
| 185 | ... Wait Until Keyword Succeeds 60s 2s |
| 186 | ... Check Ping False ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']} |
| 187 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 188 | Sleep 5s |
| 189 | Enable Device ${onu_device_id} |
| 190 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 191 | ... Validate Device ENABLED ACTIVE |
| 192 | ... REACHABLE ${src['onu']} onu=True onu_reason=onu-reenabled |
| 193 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
| 194 | ... Verify ONU Port Is Enabled ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port} |
Hardik Windlass | fb5eace | 2020-03-26 14:49:01 +0530 | [diff] [blame] | 195 | # TODO: Yet to Verify on the GPON based Physical POD (VOL-2652) |
Hardik Windlass | 63d5e00 | 2020-03-06 21:07:09 +0530 | [diff] [blame] | 196 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure |
| 197 | ... Wait Until Keyword Succeeds 60s 2s |
| 198 | ... Check Ping True ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']} |
| 199 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 200 | Run Keyword and Ignore Error Get Device Output from Voltha ${onu_device_id} |
| 201 | Run Keyword and Ignore Error Collect Logs |
| 202 | END |
| 203 | |
Hardik Windlass | aaea340 | 2020-03-10 19:45:45 +0530 | [diff] [blame] | 204 | Test Disable and Delete OLT for DT |
| 205 | [Documentation] Validates E2E Ping Connectivity and object states for the given scenario: |
| 206 | ... Assuming that all the ONUs are DHCP/pingable (i.e. assuming sanityDt test was executed) |
| 207 | ... Perform disable on the OLT and validate ONUs state and that the pings do not succeed |
| 208 | ... 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] | 209 | [Tags] functionalDt DisableDeleteOLTDt |
Suchitra Vemuri | 221398a | 2020-05-29 22:45:17 -0700 | [diff] [blame] | 210 | [Setup] Start Logging DisableDeleteOLTDt |
Hardik Windlass | aaea340 | 2020-03-10 19:45:45 +0530 | [diff] [blame] | 211 | [Teardown] Run Keywords Collect Logs |
| 212 | ... AND Stop Logging DisableDeleteOLTDt |
Hardik Windlass | aaea340 | 2020-03-10 19:45:45 +0530 | [diff] [blame] | 213 | # Disable and Validate OLT Device |
| 214 | Disable Device ${olt_device_id} |
| 215 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 216 | ... Validate OLT Device DISABLED UNKNOWN REACHABLE |
| 217 | ... ${olt_serial_number} |
| 218 | # Validate ONUs |
| 219 | 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] | 220 | # Verify ONOS Flows |
| 221 | # Number of Access Flows on ONOS equals 4 * the Number of Active ONUs (2 for each downstream and upstream) |
| 222 | ${onos_flows_count}= Evaluate 4 * ${num_onus} |
| 223 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
Hardik Windlass | 25e1170 | 2020-03-30 20:05:19 +0530 | [diff] [blame] | 224 | ... Verify Subscriber Access Flows Added Count DT ${ONOS_SSH_IP} ${ONOS_SSH_PORT} |
| 225 | ... ${of_id} ${onos_flows_count} |
Hardik Windlass | fb5eace | 2020-03-26 14:49:01 +0530 | [diff] [blame] | 226 | # Verify VOLTHA Flows |
Hardik Windlass | aaea340 | 2020-03-10 19:45:45 +0530 | [diff] [blame] | 227 | # Number of per OLT Flows equals Twice the Number of Active ONUs (each for downstream and upstream) + 1 for LLDP |
| 228 | ${olt_flows}= Evaluate 2 * ${num_onus} + 1 |
| 229 | # Number of per ONU Flows equals 2 (one each for downstream and upstream) |
| 230 | ${onu_flows}= Set Variable 2 |
| 231 | Run Keyword Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Flows ${olt_flows} |
| 232 | ${List_ONU_Serial} Create List |
| 233 | Set Suite Variable ${List_ONU_Serial} |
| 234 | Build ONU SN List ${List_ONU_Serial} |
| 235 | Log ${List_ONU_Serial} |
| 236 | Run Keyword Wait Until Keyword Succeeds ${timeout} 5s Validate ONU Flows |
| 237 | ... ${List_ONU_Serial} ${onu_flows} |
| 238 | # Delete OLT and Validate Empty Device List |
| 239 | Delete Device ${olt_device_id} |
| 240 | 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] | 241 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 242 | ... Verify Device Flows Removed ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id} |
Hardik Windlass | aaea340 | 2020-03-10 19:45:45 +0530 | [diff] [blame] | 243 | Run Keyword and Ignore Error Collect Logs |
| 244 | # Re-do Setup (Recreate the OLT) and Perform Sanity Test DT |
| 245 | Run Keyword Setup |
| 246 | Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test DT |
Suchitra Vemuri | ae9cecb | 2020-03-12 12:59:14 -0700 | [diff] [blame] | 247 | Run Keyword If ${has_dataplane} Clean Up Linux |
Hardik Windlass | aaea340 | 2020-03-10 19:45:45 +0530 | [diff] [blame] | 248 | |
Hardik Windlass | 3b531fa | 2020-04-23 18:51:44 +0530 | [diff] [blame] | 249 | Test Disable and Enable OLT for DT |
| 250 | [Documentation] Validates E2E Ping Connectivity and object states for the given scenario: |
| 251 | ... Assuming that all the ONUs are DHCP/pingable (i.e. assuming sanityDt test was executed) |
| 252 | ... Perform disable on the OLT and validate that the pings do not succeed |
| 253 | ... Perform enable on the OLT and validate that the pings are successful |
Suchitra Vemuri | 221398a | 2020-05-29 22:45:17 -0700 | [diff] [blame] | 254 | [Tags] functionalDt DisableEnableOLTDt notready |
Hardik Windlass | 3b531fa | 2020-04-23 18:51:44 +0530 | [diff] [blame] | 255 | [Setup] Start Logging DisableEnableOLTDt |
| 256 | [Teardown] Run Keywords Collect Logs |
| 257 | ... AND Stop Logging DisableEnableOLTDt |
| 258 | # Disable and Validate OLT Device |
| 259 | Disable Device ${olt_device_id} |
| 260 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 261 | ... Validate OLT Device DISABLED UNKNOWN REACHABLE |
| 262 | ... ${olt_serial_number} |
Hardik Windlass | 7c801e6 | 2020-05-04 19:33:21 +0530 | [diff] [blame] | 263 | FOR ${I} IN RANGE 0 ${num_onus} |
| 264 | ${src}= Set Variable ${hosts.src[${I}]} |
| 265 | ${dst}= Set Variable ${hosts.dst[${I}]} |
| 266 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
| 267 | ${onu_port}= Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
| 268 | ... Get ONU Port in ONOS ${src['onu']} ${of_id} |
| 269 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
| 270 | ... Verify ONU Port Is Disabled ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port} |
| 271 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure |
| 272 | ... Wait Until Keyword Succeeds 60s 2s |
| 273 | ... Check Ping False ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']} |
| 274 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 275 | # Remove Subscriber Access (To replicate DT workflow) |
| 276 | Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command ${ONOS_SSH_IP} |
| 277 | ... ${ONOS_SSH_PORT} volt-remove-subscriber-access ${of_id} ${onu_port} |
| 278 | # Delete ONU Device (To replicate DT workflow) |
| 279 | Delete Device ${onu_device_id} |
| 280 | END |
| 281 | Sleep 15s |
Hardik Windlass | 3b531fa | 2020-04-23 18:51:44 +0530 | [diff] [blame] | 282 | # Enable the OLT back and check ONU, OLT status are back to "ACTIVE" |
| 283 | Enable Device ${olt_device_id} |
| 284 | Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Device ENABLED ACTIVE REACHABLE |
| 285 | ... ${olt_serial_number} |
| 286 | Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Port Types |
| 287 | ... PON_OLT ETHERNET_NNI |
Hardik Windlass | 7c801e6 | 2020-05-04 19:33:21 +0530 | [diff] [blame] | 288 | # Waiting extra time for the ONUs to come up |
| 289 | Sleep 60s |
| 290 | Run Keyword If ${has_dataplane} Clean Up Linux |
| 291 | Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test DT |
Hardik Windlass | 3b531fa | 2020-04-23 18:51:44 +0530 | [diff] [blame] | 292 | |
| 293 | Test Delete and ReAdd OLT for DT |
| 294 | [Documentation] Validates E2E Ping Connectivity and object states for the given scenario: |
| 295 | ... Assuming that all the ONUs are DHCP/pingable (i.e. assuming sanityDt test was executed) |
| 296 | ... Disable and Delete the OLT |
| 297 | ... Create/Enable the same OLT again |
| 298 | ... Validate DHCP/E2E pings succeed for all the ONUs connected to the OLT |
| 299 | [Tags] functionalDt DeleteReAddOLTDt |
| 300 | [Setup] Start Logging DeleteReAddOLTDt |
| 301 | [Teardown] Run Keywords Collect Logs |
| 302 | ... AND Stop Logging DeleteReAddOLTDt |
| 303 | Run Keyword If ${has_dataplane} Clean Up Linux |
| 304 | Delete Device and Verify |
| 305 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 306 | ... Verify Device Flows Removed ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id} |
| 307 | Run Keyword and Ignore Error Collect Logs |
| 308 | # Recreate the OLT |
| 309 | Setup |
| 310 | Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test DT |
| 311 | |
| 312 | Test Disable ONUs and OLT Then Delete ONUs and OLT for DT |
| 313 | [Documentation] On deployed POD, disable the ONU, disable the OLT and then delete ONU and OLT. |
| 314 | ... This TC is to confirm that ONU removal is not impacting OLT |
| 315 | ... Devices will be removed during the execution of this TC |
| 316 | ... so calling setup at the end to add the devices back to avoid the confusion. |
| 317 | [Tags] functionalDt DisableDeleteONUOLTDt |
| 318 | [Setup] Start Logging DisableDeleteONUOLTDt |
| 319 | [Teardown] Run Keywords Collect Logs |
| 320 | ... AND Stop Logging DisableDeleteONUOLTDt |
| 321 | ${olt_device_id}= Get Device ID From SN ${olt_serial_number} |
| 322 | FOR ${I} IN RANGE 0 ${num_onus} |
| 323 | ${src}= Set Variable ${hosts.src[${I}]} |
| 324 | ${dst}= Set Variable ${hosts.dst[${I}]} |
| 325 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
| 326 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 327 | ... Validate Device ENABLED ACTIVE |
| 328 | ... REACHABLE ${src['onu']} onu=True onu_reason=omci-flows-pushed |
| 329 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 330 | ... Validate OLT Device ENABLED ACTIVE |
| 331 | ... REACHABLE ${olt_serial_number} |
| 332 | Disable Device ${onu_device_id} |
| 333 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 334 | ... Validate Device DISABLED UNKNOWN |
| 335 | ... REACHABLE ${src['onu']} onu=false |
| 336 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 337 | ... Validate OLT Device ENABLED ACTIVE |
| 338 | ... REACHABLE ${olt_serial_number} |
| 339 | END |
| 340 | Disable Device ${olt_device_id} |
| 341 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 342 | ... Validate OLT Device DISABLED UNKNOWN REACHABLE |
| 343 | ... ${olt_serial_number} |
| 344 | FOR ${I} IN RANGE 0 ${num_onus} |
| 345 | ${src}= Set Variable ${hosts.src[${I}]} |
| 346 | ${dst}= Set Variable ${hosts.dst[${I}]} |
| 347 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
| 348 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 349 | ... Validate Device DISABLED DISCOVERED |
| 350 | ... UNREACHABLE ${src['onu']} onu=false |
| 351 | Delete Device ${onu_device_id} |
| 352 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 353 | ... Validate OLT Device DISABLED UNKNOWN |
| 354 | ... REACHABLE ${olt_serial_number} |
| 355 | END |
| 356 | Delete Device ${olt_device_id} |
| 357 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s Test Empty Device List |
| 358 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 359 | ... Verify Device Flows Removed ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id} |
| 360 | # Re-do Setup (Recreate the OLT) and Perform Sanity Test DT |
| 361 | Run Keyword Setup |
| 362 | Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test DT |
| 363 | Run Keyword If ${has_dataplane} Clean Up Linux |
| 364 | |
Andy Bavier | e19991a | 2020-05-08 10:42:40 -0700 | [diff] [blame] | 365 | Data plane verification using TCP for DT |
| 366 | [Documentation] Test bandwidth profile is met and not exceeded for each subscriber. |
| 367 | ... Assumes iperf3 and jq installed on client and iperf -s running on DHCP server |
Andy Bavier | 1b144eb | 2020-05-28 11:22:11 -0700 | [diff] [blame] | 368 | [Tags] dataplaneDt BandwidthProfileTCPDt VOL-3061 notready |
Andy Bavier | dfbcaef | 2020-05-27 15:34:18 -0700 | [diff] [blame] | 369 | [Setup] Start Logging BandwidthProfileTCPDt |
| 370 | [Teardown] Run Keywords Collect Logs |
| 371 | ... AND Stop Logging BandwidthProfileTCPDt |
Andy Bavier | e19991a | 2020-05-08 10:42:40 -0700 | [diff] [blame] | 372 | Pass Execution If '${has_dataplane}'=='False' Bandwidth profile validation can be done only in |
| 373 | ... physical pod. Skipping this test in BBSIM. |
Andy Bavier | d74f33c | 2020-05-12 12:45:36 -0700 | [diff] [blame] | 374 | ${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] | 375 | FOR ${I} IN RANGE 0 ${num_onus} |
| 376 | ${src}= Set Variable ${hosts.src[${I}]} |
| 377 | ${dst}= Set Variable ${hosts.dst[${I}]} |
Andy Bavier | f6ab19c | 2020-05-14 10:34:47 -0700 | [diff] [blame] | 378 | |
| 379 | # Check for iperf3 and jq tools |
| 380 | ${stdout} ${stderr} ${rc}= Execute Remote Command which iperf3 jq |
| 381 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 382 | Pass Execution If ${rc} != 0 Skipping test: iperf3 / jq not found on the RG |
| 383 | |
Andy Bavier | e19991a | 2020-05-08 10:42:40 -0700 | [diff] [blame] | 384 | ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']} |
| 385 | ... ${of_id} |
| 386 | ${subscriber_id}= Set Variable ${of_id}/${onu_port} |
| 387 | ${bandwidth_profile_name} Get Bandwidth Profile Name For Given Subscriber ${subscriber_id} |
| 388 | ... upstreamBandwidthProfile |
| 389 | ${limiting_bw_value_upstream} Get Bandwidth Details ${bandwidth_profile_name} |
| 390 | ${bandwidth_profile_name} Get Bandwidth Profile Name For Given Subscriber ${subscriber_id} |
| 391 | ... downstreamBandwidthProfile |
| 392 | ${limiting_bw_value_dnstream} Get Bandwidth Details ${bandwidth_profile_name} |
| 393 | |
| 394 | # Stream TCP packets from RG to server |
| 395 | ${updict}= Run Iperf3 Test Client ${src} server=${dst['dp_iface_ip_qinq']} |
| 396 | ... args=-t 30 |
| 397 | ${actual_upstream_bw_used}= Evaluate ${updict['end']['sum_received']['bits_per_second']}/1000 |
| 398 | |
| 399 | # Stream TCP packets from server to RG |
| 400 | ${dndict}= Run Iperf3 Test Client ${src} server=${dst['dp_iface_ip_qinq']} |
| 401 | ... args=-R -t 30 |
| 402 | ${actual_dnstream_bw_used}= Evaluate ${dndict['end']['sum_received']['bits_per_second']}/1000 |
| 403 | |
| 404 | ${pct_limit_up}= Evaluate 100*${actual_upstream_bw_used}/${limiting_bw_value_upstream} |
| 405 | ${pct_limit_dn}= Evaluate 100*${actual_dnstream_bw_used}/${limiting_bw_value_dnstream} |
| 406 | Log Up: bwprof ${limiting_bw_value_upstream}Kbps, got ${actual_upstream_bw_used}Kbps (${pct_limit_up}%) |
| 407 | Log Down: bwprof ${limiting_bw_value_dnstream}Kbps, got ${actual_dnstream_bw_used}Kbps (${pct_limit_dn}%) |
| 408 | |
| 409 | Should Be True ${pct_limit_up} <= ${upper_margin_pct} |
| 410 | ... The upstream bandwidth exceeded the limit (${pct_limit_up}% of limit) |
| 411 | Should Be True ${pct_limit_dn} <= ${upper_margin_pct} |
| 412 | ... The downstream bandwidth exceeded the limit (${pct_limit_dn}% of limit) |
| 413 | Should Be True ${pct_limit_up} >= ${lower_margin_pct} |
| 414 | ... The upstream bandwidth guarantee was not met (${pct_limit_up}% of resv) |
| 415 | Should Be True ${pct_limit_dn} >= ${lower_margin_pct} |
| 416 | ... The downstream bandwidth guarantee was not met (${pct_limit_dn}% of resv) |
| 417 | END |
| 418 | |
| 419 | Data plane verification using UDP for DT |
| 420 | [Documentation] Test bandwidth profile is met and not exceeded for each subscriber. |
| 421 | ... Assumes iperf3 and jq installed on client and iperf -s running on DHCP server |
Andy Bavier | dfbcaef | 2020-05-27 15:34:18 -0700 | [diff] [blame] | 422 | [Tags] dataplaneDt BandwidthProfileUDPDt VOL-3061 notready |
| 423 | [Setup] Start Logging BandwidthProfileUDPDt |
| 424 | [Teardown] Run Keywords Collect Logs |
| 425 | ... AND Stop Logging BandwidthProfileUDPDt |
Andy Bavier | e19991a | 2020-05-08 10:42:40 -0700 | [diff] [blame] | 426 | Pass Execution If '${has_dataplane}'=='False' Bandwidth profile validation can be done only in |
| 427 | ... physical pod. Skipping this test in BBSIM. |
Andy Bavier | d74f33c | 2020-05-12 12:45:36 -0700 | [diff] [blame] | 428 | ${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] | 429 | FOR ${I} IN RANGE 0 ${num_onus} |
| 430 | ${src}= Set Variable ${hosts.src[${I}]} |
| 431 | ${dst}= Set Variable ${hosts.dst[${I}]} |
| 432 | ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']} |
| 433 | ... ${of_id} |
| 434 | ${subscriber_id}= Set Variable ${of_id}/${onu_port} |
| 435 | ${bandwidth_profile_name} Get Bandwidth Profile Name For Given Subscriber ${subscriber_id} |
| 436 | ... upstreamBandwidthProfile |
| 437 | ${limiting_bw_value_upstream} Get Bandwidth Details ${bandwidth_profile_name} |
| 438 | ${bandwidth_profile_name} Get Bandwidth Profile Name For Given Subscriber ${subscriber_id} |
| 439 | ... downstreamBandwidthProfile |
| 440 | ${limiting_bw_value_dnstream} Get Bandwidth Details ${bandwidth_profile_name} |
| 441 | |
| 442 | # Stream UDP packets from RG to server |
| 443 | ${uprate}= Evaluate ${limiting_bw_value_upstream}*${udp_rate_multiplier} |
| 444 | ${updict}= Run Iperf3 Test Client ${src} server=${dst['dp_iface_ip_qinq']} |
Andy Bavier | 7dc5062 | 2020-05-28 14:34:12 -0700 | [diff] [blame] | 445 | ... 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] | 446 | # With UDP test, bits per second is the sending rate. Multiply by the loss rate to get the throughput. |
| 447 | ${actual_upstream_bw_used}= Evaluate |
| 448 | ... (100 - ${updict['end']['sum']['lost_percent']})*${updict['end']['sum']['bits_per_second']}/100000 |
| 449 | |
| 450 | # Stream UDP packets from server to RG |
| 451 | ${dnrate}= Evaluate ${limiting_bw_value_dnstream}*${udp_rate_multiplier} |
| 452 | ${dndict}= Run Iperf3 Test Client ${src} server=${dst['dp_iface_ip_qinq']} |
Andy Bavier | 7dc5062 | 2020-05-28 14:34:12 -0700 | [diff] [blame] | 453 | ... 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] | 454 | # With UDP test, bits per second is the sending rate. Multiply by the loss rate to get the throughput. |
| 455 | ${actual_dnstream_bw_used}= Evaluate |
| 456 | ... (100 - ${dndict['end']['sum']['lost_percent']})*${dndict['end']['sum']['bits_per_second']}/100000 |
| 457 | |
| 458 | ${pct_limit_up}= Evaluate 100*${actual_upstream_bw_used}/${limiting_bw_value_upstream} |
| 459 | ${pct_limit_dn}= Evaluate 100*${actual_dnstream_bw_used}/${limiting_bw_value_dnstream} |
| 460 | Log Up: bwprof ${limiting_bw_value_upstream}Kbps, got ${actual_upstream_bw_used}Kbps (${pct_limit_up}%) |
| 461 | Log Down: bwprof ${limiting_bw_value_dnstream}Kbps, got ${actual_dnstream_bw_used}Kbps (${pct_limit_dn}%) |
| 462 | |
| 463 | Should Be True ${pct_limit_up} <= ${upper_margin_pct} |
| 464 | ... The upstream bandwidth exceeded the limit (${pct_limit_up}% of limit) |
| 465 | Should Be True ${pct_limit_dn} <= ${upper_margin_pct} |
| 466 | ... The downstream bandwidth exceeded the limit (${pct_limit_dn}% of limit) |
| 467 | Should Be True ${pct_limit_up} >= ${lower_margin_pct} |
| 468 | ... The upstream bandwidth guarantee was not met (${pct_limit_up}% of resv) |
| 469 | Should Be True ${pct_limit_dn} >= ${lower_margin_pct} |
| 470 | ... The downstream bandwidth guarantee was not met (${pct_limit_dn}% of resv) |
| 471 | END |
| 472 | |
Hardik Windlass | a3d04b9 | 2020-02-17 15:06:05 +0000 | [diff] [blame] | 473 | *** Keywords *** |
| 474 | Setup Suite |
| 475 | [Documentation] Set up the test suite |
| 476 | Common Test Suite Setup |
Hung-Wei Chiu | cc6e655 | 2020-06-04 12:57:38 -0700 | [diff] [blame] | 477 | #Restore all ONUs |
| 478 | Run Keyword If ${has_dataplane} RestoreONUs ${num_onus} |
Hardik Windlass | a3d04b9 | 2020-02-17 15:06:05 +0000 | [diff] [blame] | 479 | |
| 480 | Clear All Devices Then Create New Device |
| 481 | [Documentation] Remove any devices from VOLTHA and ONOS |
| 482 | # Remove all devices from voltha and nos |
| 483 | Delete All Devices and Verify |
| 484 | # Execute normal test Setup Keyword |
| 485 | Setup |
| 486 | |