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