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 | |
| 54 | # Per-test logging on failure is turned off by default; set this variable to enable |
| 55 | ${container_log_dir} ${None} |
| 56 | |
| 57 | *** Test Cases *** |
| 58 | Sanity E2E Test for OLT/ONU on POD for DT |
| 59 | [Documentation] Validates E2E Ping Connectivity and object states for the given scenario: |
| 60 | ... Validate successful DHCP/E2E ping (no EAPOL and DHCP flows) for the tech profile that is used |
| 61 | ... Traffic sent with same vlan from different RGs, |
| 62 | ... should reach the NNI port on the OLT with the expected double tagged vlan ids |
| 63 | ... Inner vlans from the RG should not change |
Suchitra Vemuri | f2388ad | 2020-03-15 21:44:44 -0700 | [diff] [blame] | 64 | [Tags] sanityDt |
Andy Bavier | e187eda | 2020-04-20 15:00:02 -0700 | [diff] [blame] | 65 | [Setup] Run Keywords Start Logging SanityTestDt |
Hardik Windlass | a3d04b9 | 2020-02-17 15:06:05 +0000 | [diff] [blame] | 66 | ... AND Setup |
| 67 | [Teardown] Run Keywords Collect Logs |
| 68 | ... AND Stop Logging SanityTestDt |
Hardik Windlass | a3d04b9 | 2020-02-17 15:06:05 +0000 | [diff] [blame] | 69 | Run Keyword If ${has_dataplane} Clean Up Linux |
| 70 | Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test DT |
| 71 | |
Hardik Windlass | 35706ba | 2020-02-20 08:16:42 +0000 | [diff] [blame] | 72 | Test Subscriber Delete and Add for DT |
| 73 | [Documentation] Validates E2E Ping Connectivity and object states for the given scenario: |
Hardik Windlass | 63d5e00 | 2020-03-06 21:07:09 +0530 | [diff] [blame] | 74 | ... 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] | 75 | ... Delete a subscriber and validate that the pings do not succeed and state is purged |
| 76 | ... Disable and Enable the ONU (This is to replicate the existing DT behaviour) |
| 77 | ... 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] | 78 | [Tags] functionalDt SubAddDeleteDt |
Andy Bavier | e187eda | 2020-04-20 15:00:02 -0700 | [diff] [blame] | 79 | [Setup] Start Logging SubAddDeleteDt |
Hardik Windlass | 35706ba | 2020-02-20 08:16:42 +0000 | [diff] [blame] | 80 | [Teardown] Run Keywords Collect Logs |
| 81 | ... AND Stop Logging SubAddDeleteDt |
Hardik Windlass | 35706ba | 2020-02-20 08:16:42 +0000 | [diff] [blame] | 82 | FOR ${I} IN RANGE 0 ${num_onus} |
| 83 | ${src}= Set Variable ${hosts.src[${I}]} |
| 84 | ${dst}= Set Variable ${hosts.dst[${I}]} |
| 85 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
| 86 | ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']} |
| 87 | ... ${of_id} |
| 88 | # Remove Subscriber Access |
ubuntu | 6b6e7d4 | 2020-03-02 12:35:42 -0800 | [diff] [blame] | 89 | 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] | 90 | ... ${ONOS_SSH_PORT} volt-remove-subscriber-access ${of_id} ${onu_port} |
| 91 | Sleep 10s |
Hardik Windlass | fb5eace | 2020-03-26 14:49:01 +0530 | [diff] [blame] | 92 | # TODO: Yet to Verify on the GPON based Physical POD (VOL-2652) |
Hardik Windlass | 35706ba | 2020-02-20 08:16:42 +0000 | [diff] [blame] | 93 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure |
| 94 | ... Wait Until Keyword Succeeds 60s 2s |
| 95 | ... Check Ping False ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']} |
| 96 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
Hardik Windlass | fb5eace | 2020-03-26 14:49:01 +0530 | [diff] [blame] | 97 | # Number of Access Flows on ONOS equals 4 * the Number of Active ONUs (2 for each downstream and upstream) |
| 98 | ${onos_flows_count}= Evaluate 4 * ( ${num_onus} - 1 ) |
| 99 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 100 | ... 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] | 101 | ... ${of_id} ${onos_flows_count} |
Hardik Windlass | 35706ba | 2020-02-20 08:16:42 +0000 | [diff] [blame] | 102 | # Verify VOLTHA flows for OLT equals twice the number of ONUS (minus ONU under test) + 1 for LLDP |
| 103 | ${olt_flows}= Evaluate 2 * ( ${num_onus} - 1 ) + 1 |
| 104 | Run Keyword Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Flows ${olt_flows} |
| 105 | # Verify VOLTHA flows for ONU under test is Zero |
| 106 | Run Keyword Wait Until Keyword Succeeds ${timeout} 5s Validate Device Flows |
| 107 | ... ${onu_device_id} 0 |
| 108 | # Disable and Re-Enable the ONU (To replicate DT current workflow) |
| 109 | # TODO: Delete and Auto-Discovery Add of ONU (not yet supported) |
| 110 | Disable Device ${onu_device_id} |
| 111 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 112 | ... Validate Device DISABLED UNKNOWN |
| 113 | ... REACHABLE ${src['onu']} |
| 114 | Enable Device ${onu_device_id} |
| 115 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 116 | ... Validate Device ENABLED ACTIVE |
| 117 | ... REACHABLE ${src['onu']} |
| 118 | # Add Subscriber Access |
ubuntu | 6b6e7d4 | 2020-03-02 12:35:42 -0800 | [diff] [blame] | 119 | Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command ${ONOS_SSH_IP} |
Hardik Windlass | 35706ba | 2020-02-20 08:16:42 +0000 | [diff] [blame] | 120 | ... ${ONOS_SSH_PORT} volt-add-subscriber-access ${of_id} ${onu_port} |
| 121 | Sleep 10s |
Hardik Windlass | fb5eace | 2020-03-26 14:49:01 +0530 | [diff] [blame] | 122 | # Verify subscriber access flows are added for the ONU port |
| 123 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
Hardik Windlass | 25e1170 | 2020-03-30 20:05:19 +0530 | [diff] [blame] | 124 | ... Verify Subscriber Access Flows Added For ONU DT ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id} |
| 125 | ... ${onu_port} ${nni_port} ${src['s_tag']} |
Hardik Windlass | 35706ba | 2020-02-20 08:16:42 +0000 | [diff] [blame] | 126 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 127 | ... Validate Device ENABLED ACTIVE |
| 128 | ... REACHABLE ${src['onu']} onu=True onu_reason=omci-flows-pushed |
Hardik Windlass | fb5eace | 2020-03-26 14:49:01 +0530 | [diff] [blame] | 129 | # TODO: Yet to Verify on the GPON based Physical POD (VOL-2652) |
Hardik Windlass | 35706ba | 2020-02-20 08:16:42 +0000 | [diff] [blame] | 130 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure |
| 131 | ... Wait Until Keyword Succeeds 60s 2s |
| 132 | ... Check Ping True ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']} |
| 133 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 134 | Run Keyword and Ignore Error Get Device Output from Voltha ${onu_device_id} |
| 135 | Run Keyword and Ignore Error Collect Logs |
| 136 | END |
Hardik Windlass | fb5eace | 2020-03-26 14:49:01 +0530 | [diff] [blame] | 137 | # Verify ONOS Flows |
| 138 | # Number of Access Flows on ONOS equals 4 * the Number of Active ONUs (2 for each downstream and upstream) |
| 139 | ${onos_flows_count}= Evaluate 4 * ${num_onus} |
| 140 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
Hardik Windlass | 25e1170 | 2020-03-30 20:05:19 +0530 | [diff] [blame] | 141 | ... Verify Subscriber Access Flows Added Count DT ${ONOS_SSH_IP} ${ONOS_SSH_PORT} |
| 142 | ... ${of_id} ${onos_flows_count} |
Hardik Windlass | fb5eace | 2020-03-26 14:49:01 +0530 | [diff] [blame] | 143 | # Verify VOLTHA Flows |
Hardik Windlass | 35706ba | 2020-02-20 08:16:42 +0000 | [diff] [blame] | 144 | # Number of per OLT Flows equals Twice the Number of Active ONUs (each for downstream and upstream) + 1 for LLDP |
| 145 | ${olt_flows}= Evaluate 2 * ${num_onus} + 1 |
| 146 | # Number of per ONU Flows equals 2 (one each for downstream and upstream) |
| 147 | ${onu_flows}= Set Variable 2 |
| 148 | Run Keyword Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Flows ${olt_flows} |
| 149 | ${List_ONU_Serial} Create List |
| 150 | Set Suite Variable ${List_ONU_Serial} |
| 151 | Build ONU SN List ${List_ONU_Serial} |
| 152 | Log ${List_ONU_Serial} |
| 153 | Run Keyword Wait Until Keyword Succeeds ${timeout} 5s Validate ONU Flows |
| 154 | ... ${List_ONU_Serial} ${onu_flows} |
| 155 | |
Hardik Windlass | 63d5e00 | 2020-03-06 21:07:09 +0530 | [diff] [blame] | 156 | Test Disable and Enable ONU for DT |
| 157 | [Documentation] Validates E2E Ping Connectivity and object states for the given scenario: |
| 158 | ... Assuming that all the ONUs are DHCP/pingable (i.e. assuming sanityDt test was executed) |
| 159 | ... Perform disable on the ONUs and validate that the pings do not succeed |
| 160 | ... Perform enable on the ONUs and validate that the pings are successful |
Suchitra Vemuri | f2388ad | 2020-03-15 21:44:44 -0700 | [diff] [blame] | 161 | [Tags] functionalDt DisableEnableONUDt |
Andy Bavier | e187eda | 2020-04-20 15:00:02 -0700 | [diff] [blame] | 162 | [Setup] Start Logging DisableEnableONUDt |
Hardik Windlass | 63d5e00 | 2020-03-06 21:07:09 +0530 | [diff] [blame] | 163 | [Teardown] Run Keywords Collect Logs |
| 164 | ... AND Stop Logging DisableEnableONUDt |
Hardik Windlass | 63d5e00 | 2020-03-06 21:07:09 +0530 | [diff] [blame] | 165 | FOR ${I} IN RANGE 0 ${num_onus} |
| 166 | ${src}= Set Variable ${hosts.src[${I}]} |
| 167 | ${dst}= Set Variable ${hosts.dst[${I}]} |
| 168 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
| 169 | ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']} |
| 170 | ... ${of_id} |
| 171 | Disable Device ${onu_device_id} |
| 172 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 173 | ... Validate Device DISABLED UNKNOWN |
| 174 | ... REACHABLE ${src['onu']} onu=True onu_reason=omci-admin-lock |
| 175 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
| 176 | ... 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] | 177 | # TODO: Yet to Verify on the GPON based Physical POD (VOL-2652) |
Hardik Windlass | 63d5e00 | 2020-03-06 21:07:09 +0530 | [diff] [blame] | 178 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure |
| 179 | ... Wait Until Keyword Succeeds 60s 2s |
| 180 | ... Check Ping False ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']} |
| 181 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 182 | Sleep 5s |
| 183 | Enable Device ${onu_device_id} |
| 184 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 185 | ... Validate Device ENABLED ACTIVE |
| 186 | ... REACHABLE ${src['onu']} onu=True onu_reason=onu-reenabled |
| 187 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
| 188 | ... 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] | 189 | # TODO: Yet to Verify on the GPON based Physical POD (VOL-2652) |
Hardik Windlass | 63d5e00 | 2020-03-06 21:07:09 +0530 | [diff] [blame] | 190 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure |
| 191 | ... Wait Until Keyword Succeeds 60s 2s |
| 192 | ... Check Ping True ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']} |
| 193 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 194 | Run Keyword and Ignore Error Get Device Output from Voltha ${onu_device_id} |
| 195 | Run Keyword and Ignore Error Collect Logs |
| 196 | END |
| 197 | |
Hardik Windlass | aaea340 | 2020-03-10 19:45:45 +0530 | [diff] [blame] | 198 | Test Disable and Delete OLT for DT |
| 199 | [Documentation] Validates E2E Ping Connectivity and object states for the given scenario: |
| 200 | ... Assuming that all the ONUs are DHCP/pingable (i.e. assuming sanityDt test was executed) |
| 201 | ... Perform disable on the OLT and validate ONUs state and that the pings do not succeed |
| 202 | ... 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] | 203 | [Tags] functionalDt DisableDeleteOLTDt |
Andy Bavier | e187eda | 2020-04-20 15:00:02 -0700 | [diff] [blame] | 204 | [Setup] Start Logging DisableDeleteOLTDt |
Hardik Windlass | aaea340 | 2020-03-10 19:45:45 +0530 | [diff] [blame] | 205 | [Teardown] Run Keywords Collect Logs |
| 206 | ... AND Stop Logging DisableDeleteOLTDt |
Hardik Windlass | aaea340 | 2020-03-10 19:45:45 +0530 | [diff] [blame] | 207 | # Disable and Validate OLT Device |
| 208 | Disable Device ${olt_device_id} |
| 209 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 210 | ... Validate OLT Device DISABLED UNKNOWN REACHABLE |
| 211 | ... ${olt_serial_number} |
| 212 | # Validate ONUs |
| 213 | 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] | 214 | # Verify ONOS Flows |
| 215 | # Number of Access Flows on ONOS equals 4 * the Number of Active ONUs (2 for each downstream and upstream) |
| 216 | ${onos_flows_count}= Evaluate 4 * ${num_onus} |
| 217 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
Hardik Windlass | 25e1170 | 2020-03-30 20:05:19 +0530 | [diff] [blame] | 218 | ... Verify Subscriber Access Flows Added Count DT ${ONOS_SSH_IP} ${ONOS_SSH_PORT} |
| 219 | ... ${of_id} ${onos_flows_count} |
Hardik Windlass | fb5eace | 2020-03-26 14:49:01 +0530 | [diff] [blame] | 220 | # Verify VOLTHA Flows |
Hardik Windlass | aaea340 | 2020-03-10 19:45:45 +0530 | [diff] [blame] | 221 | # Number of per OLT Flows equals Twice the Number of Active ONUs (each for downstream and upstream) + 1 for LLDP |
| 222 | ${olt_flows}= Evaluate 2 * ${num_onus} + 1 |
| 223 | # Number of per ONU Flows equals 2 (one each for downstream and upstream) |
| 224 | ${onu_flows}= Set Variable 2 |
| 225 | Run Keyword Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Flows ${olt_flows} |
| 226 | ${List_ONU_Serial} Create List |
| 227 | Set Suite Variable ${List_ONU_Serial} |
| 228 | Build ONU SN List ${List_ONU_Serial} |
| 229 | Log ${List_ONU_Serial} |
| 230 | Run Keyword Wait Until Keyword Succeeds ${timeout} 5s Validate ONU Flows |
| 231 | ... ${List_ONU_Serial} ${onu_flows} |
| 232 | # Delete OLT and Validate Empty Device List |
| 233 | Delete Device ${olt_device_id} |
| 234 | 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] | 235 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 236 | ... Verify Device Flows Removed ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id} |
Hardik Windlass | aaea340 | 2020-03-10 19:45:45 +0530 | [diff] [blame] | 237 | Run Keyword and Ignore Error Collect Logs |
| 238 | # Re-do Setup (Recreate the OLT) and Perform Sanity Test DT |
| 239 | Run Keyword Setup |
| 240 | Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test DT |
Suchitra Vemuri | ae9cecb | 2020-03-12 12:59:14 -0700 | [diff] [blame] | 241 | Run Keyword If ${has_dataplane} Clean Up Linux |
Hardik Windlass | aaea340 | 2020-03-10 19:45:45 +0530 | [diff] [blame] | 242 | |
Hardik Windlass | 3b531fa | 2020-04-23 18:51:44 +0530 | [diff] [blame] | 243 | Test Disable and Enable OLT for DT |
| 244 | [Documentation] Validates E2E Ping Connectivity and object states for the given scenario: |
| 245 | ... Assuming that all the ONUs are DHCP/pingable (i.e. assuming sanityDt test was executed) |
| 246 | ... Perform disable on the OLT and validate that the pings do not succeed |
| 247 | ... Perform enable on the OLT and validate that the pings are successful |
Andrea Campanella | 3e2f1a0 | 2020-04-30 20:23:18 +0200 | [diff] [blame] | 248 | [Tags] functionalDt DisableEnableOLTDt notready |
Hardik Windlass | 3b531fa | 2020-04-23 18:51:44 +0530 | [diff] [blame] | 249 | [Setup] Start Logging DisableEnableOLTDt |
| 250 | [Teardown] Run Keywords Collect Logs |
| 251 | ... AND Stop Logging DisableEnableOLTDt |
| 252 | # Disable and Validate OLT Device |
| 253 | Disable Device ${olt_device_id} |
| 254 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 255 | ... Validate OLT Device DISABLED UNKNOWN REACHABLE |
| 256 | ... ${olt_serial_number} |
Hardik Windlass | 7c801e6 | 2020-05-04 19:33:21 +0530 | [diff] [blame] | 257 | FOR ${I} IN RANGE 0 ${num_onus} |
| 258 | ${src}= Set Variable ${hosts.src[${I}]} |
| 259 | ${dst}= Set Variable ${hosts.dst[${I}]} |
| 260 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
| 261 | ${onu_port}= Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
| 262 | ... Get ONU Port in ONOS ${src['onu']} ${of_id} |
| 263 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
| 264 | ... Verify ONU Port Is Disabled ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port} |
| 265 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure |
| 266 | ... Wait Until Keyword Succeeds 60s 2s |
| 267 | ... Check Ping False ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']} |
| 268 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 269 | # Remove Subscriber Access (To replicate DT workflow) |
| 270 | Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command ${ONOS_SSH_IP} |
| 271 | ... ${ONOS_SSH_PORT} volt-remove-subscriber-access ${of_id} ${onu_port} |
| 272 | # Delete ONU Device (To replicate DT workflow) |
| 273 | Delete Device ${onu_device_id} |
| 274 | END |
| 275 | Sleep 15s |
Hardik Windlass | 3b531fa | 2020-04-23 18:51:44 +0530 | [diff] [blame] | 276 | # Enable the OLT back and check ONU, OLT status are back to "ACTIVE" |
| 277 | Enable Device ${olt_device_id} |
| 278 | Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Device ENABLED ACTIVE REACHABLE |
| 279 | ... ${olt_serial_number} |
| 280 | Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Port Types |
| 281 | ... PON_OLT ETHERNET_NNI |
Hardik Windlass | 7c801e6 | 2020-05-04 19:33:21 +0530 | [diff] [blame] | 282 | # Waiting extra time for the ONUs to come up |
| 283 | Sleep 60s |
| 284 | Run Keyword If ${has_dataplane} Clean Up Linux |
| 285 | Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test DT |
Hardik Windlass | 3b531fa | 2020-04-23 18:51:44 +0530 | [diff] [blame] | 286 | |
| 287 | Test Delete and ReAdd OLT for DT |
| 288 | [Documentation] Validates E2E Ping Connectivity and object states for the given scenario: |
| 289 | ... Assuming that all the ONUs are DHCP/pingable (i.e. assuming sanityDt test was executed) |
| 290 | ... Disable and Delete the OLT |
| 291 | ... Create/Enable the same OLT again |
| 292 | ... Validate DHCP/E2E pings succeed for all the ONUs connected to the OLT |
| 293 | [Tags] functionalDt DeleteReAddOLTDt |
| 294 | [Setup] Start Logging DeleteReAddOLTDt |
| 295 | [Teardown] Run Keywords Collect Logs |
| 296 | ... AND Stop Logging DeleteReAddOLTDt |
| 297 | Run Keyword If ${has_dataplane} Clean Up Linux |
| 298 | Delete Device and Verify |
| 299 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 300 | ... Verify Device Flows Removed ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id} |
| 301 | Run Keyword and Ignore Error Collect Logs |
| 302 | # Recreate the OLT |
| 303 | Setup |
| 304 | Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test DT |
| 305 | |
| 306 | Test Disable ONUs and OLT Then Delete ONUs and OLT for DT |
| 307 | [Documentation] On deployed POD, disable the ONU, disable the OLT and then delete ONU and OLT. |
| 308 | ... This TC is to confirm that ONU removal is not impacting OLT |
| 309 | ... Devices will be removed during the execution of this TC |
| 310 | ... so calling setup at the end to add the devices back to avoid the confusion. |
| 311 | [Tags] functionalDt DisableDeleteONUOLTDt |
| 312 | [Setup] Start Logging DisableDeleteONUOLTDt |
| 313 | [Teardown] Run Keywords Collect Logs |
| 314 | ... AND Stop Logging DisableDeleteONUOLTDt |
| 315 | ${olt_device_id}= Get Device ID From SN ${olt_serial_number} |
| 316 | FOR ${I} IN RANGE 0 ${num_onus} |
| 317 | ${src}= Set Variable ${hosts.src[${I}]} |
| 318 | ${dst}= Set Variable ${hosts.dst[${I}]} |
| 319 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
| 320 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 321 | ... Validate Device ENABLED ACTIVE |
| 322 | ... REACHABLE ${src['onu']} onu=True onu_reason=omci-flows-pushed |
| 323 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 324 | ... Validate OLT Device ENABLED ACTIVE |
| 325 | ... REACHABLE ${olt_serial_number} |
| 326 | Disable Device ${onu_device_id} |
| 327 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 328 | ... Validate Device DISABLED UNKNOWN |
| 329 | ... REACHABLE ${src['onu']} onu=false |
| 330 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 331 | ... Validate OLT Device ENABLED ACTIVE |
| 332 | ... REACHABLE ${olt_serial_number} |
| 333 | END |
| 334 | Disable Device ${olt_device_id} |
| 335 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 336 | ... Validate OLT Device DISABLED UNKNOWN REACHABLE |
| 337 | ... ${olt_serial_number} |
| 338 | FOR ${I} IN RANGE 0 ${num_onus} |
| 339 | ${src}= Set Variable ${hosts.src[${I}]} |
| 340 | ${dst}= Set Variable ${hosts.dst[${I}]} |
| 341 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
| 342 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 343 | ... Validate Device DISABLED DISCOVERED |
| 344 | ... UNREACHABLE ${src['onu']} onu=false |
| 345 | Delete Device ${onu_device_id} |
| 346 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 347 | ... Validate OLT Device DISABLED UNKNOWN |
| 348 | ... REACHABLE ${olt_serial_number} |
| 349 | END |
| 350 | Delete Device ${olt_device_id} |
| 351 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s Test Empty Device List |
| 352 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 353 | ... Verify Device Flows Removed ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id} |
| 354 | # Re-do Setup (Recreate the OLT) and Perform Sanity Test DT |
| 355 | Run Keyword Setup |
| 356 | Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test DT |
| 357 | Run Keyword If ${has_dataplane} Clean Up Linux |
| 358 | |
Hardik Windlass | a3d04b9 | 2020-02-17 15:06:05 +0000 | [diff] [blame] | 359 | *** Keywords *** |
| 360 | Setup Suite |
| 361 | [Documentation] Set up the test suite |
| 362 | Common Test Suite Setup |
| 363 | |
| 364 | Clear All Devices Then Create New Device |
| 365 | [Documentation] Remove any devices from VOLTHA and ONOS |
| 366 | # Remove all devices from voltha and nos |
| 367 | Delete All Devices and Verify |
| 368 | # Execute normal test Setup Keyword |
| 369 | Setup |
| 370 | |