Hardik Windlass | a3d04b9 | 2020-02-17 15:06:05 +0000 | [diff] [blame] | 1 | # Copyright 2017 - present Open Networking Foundation |
| 2 | # |
| 3 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | # you may not use this file except in compliance with the License. |
| 5 | # You may obtain a copy of the License at |
| 6 | # |
| 7 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | # |
| 9 | # Unless required by applicable law or agreed to in writing, software |
| 10 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | # See the License for the specific language governing permissions and |
| 13 | # limitations under the License. |
| 14 | # FIXME Can we use the same test against BBSim and Hardware? |
| 15 | |
| 16 | *** Settings *** |
| 17 | Documentation Test various end-to-end scenarios |
| 18 | Suite Setup Setup Suite |
| 19 | Test Setup Setup |
| 20 | Test Teardown Teardown |
| 21 | Suite Teardown Teardown Suite |
| 22 | Library Collections |
| 23 | Library String |
| 24 | Library OperatingSystem |
| 25 | Library XML |
| 26 | Library RequestsLibrary |
| 27 | Library ../../libraries/DependencyLibrary.py |
| 28 | Resource ../../libraries/onos.robot |
| 29 | Resource ../../libraries/voltctl.robot |
| 30 | Resource ../../libraries/voltha.robot |
| 31 | Resource ../../libraries/utils.robot |
| 32 | Resource ../../libraries/k8s.robot |
| 33 | Resource ../../variables/variables.robot |
Suchitra Vemuri | 1d8e817 | 2020-06-17 17:43:56 -0700 | [diff] [blame] | 34 | Resource ../../libraries/power_switch.robot |
Hardik Windlass | a3d04b9 | 2020-02-17 15:06:05 +0000 | [diff] [blame] | 35 | |
| 36 | *** Variables *** |
| 37 | ${POD_NAME} flex-ocp-cord |
| 38 | ${KUBERNETES_CONF} ${KUBERNETES_CONFIGS_DIR}/${POD_NAME}.conf |
| 39 | ${KUBERNETES_CONFIGS_DIR} ~/pod-configs/kubernetes-configs |
| 40 | #${KUBERNETES_CONFIGS_DIR} ${KUBERNETES_CONFIGS_DIR}/${POD_NAME}.conf |
| 41 | ${KUBERNETES_YAML} ${KUBERNETES_CONFIGS_DIR}/${POD_NAME}.yml |
| 42 | ${HELM_CHARTS_DIR} ~/helm-charts |
| 43 | ${VOLTHA_POD_NUM} 8 |
| 44 | ${NAMESPACE} voltha |
| 45 | # For below variable value, using deployment name as using grep for |
| 46 | # parsing radius pod name, we can also use full radius pod name |
| 47 | ${RESTART_POD_NAME} radius |
Suchitra Vemuri | e9c6ca6 | 2020-07-27 16:44:53 -0700 | [diff] [blame] | 48 | ${timeout} 360s |
Hardik Windlass | a3d04b9 | 2020-02-17 15:06:05 +0000 | [diff] [blame] | 49 | ${of_id} 0 |
| 50 | ${logical_id} 0 |
| 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} |
Suchitra Vemuri | cdc32d8 | 2020-07-17 12:24:46 -0700 | [diff] [blame] | 140 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds 360s 5s |
Hardik Windlass | 35706ba | 2020-02-20 08:16:42 +0000 | [diff] [blame] | 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']} |
Suchitra Vemuri | cdc32d8 | 2020-07-17 12:24:46 -0700 | [diff] [blame] | 151 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds 360s 5s |
Hardik Windlass | 35706ba | 2020-02-20 08:16:42 +0000 | [diff] [blame] | 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} |
Suchitra Vemuri | cdc32d8 | 2020-07-17 12:24:46 -0700 | [diff] [blame] | 209 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds 360s 5s |
Hardik Windlass | 63d5e00 | 2020-03-06 21:07:09 +0530 | [diff] [blame] | 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 |
| 327 | # Recreate the OLT |
| 328 | Setup |
| 329 | Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test DT |
| 330 | |
| 331 | Test Disable ONUs and OLT Then Delete ONUs and OLT for DT |
| 332 | [Documentation] On deployed POD, disable the ONU, disable the OLT and then delete ONU and OLT. |
| 333 | ... This TC is to confirm that ONU removal is not impacting OLT |
| 334 | ... Devices will be removed during the execution of this TC |
| 335 | ... so calling setup at the end to add the devices back to avoid the confusion. |
| 336 | [Tags] functionalDt DisableDeleteONUOLTDt |
| 337 | [Setup] Start Logging DisableDeleteONUOLTDt |
| 338 | [Teardown] Run Keywords Collect Logs |
| 339 | ... AND Stop Logging DisableDeleteONUOLTDt |
| 340 | ${olt_device_id}= Get Device ID From SN ${olt_serial_number} |
| 341 | FOR ${I} IN RANGE 0 ${num_onus} |
| 342 | ${src}= Set Variable ${hosts.src[${I}]} |
| 343 | ${dst}= Set Variable ${hosts.dst[${I}]} |
| 344 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
| 345 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 346 | ... Validate Device ENABLED ACTIVE |
| 347 | ... REACHABLE ${src['onu']} onu=True onu_reason=omci-flows-pushed |
| 348 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 349 | ... Validate OLT Device ENABLED ACTIVE |
| 350 | ... REACHABLE ${olt_serial_number} |
| 351 | Disable Device ${onu_device_id} |
| 352 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 353 | ... Validate Device DISABLED UNKNOWN |
| 354 | ... REACHABLE ${src['onu']} onu=false |
| 355 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 356 | ... Validate OLT Device ENABLED ACTIVE |
| 357 | ... REACHABLE ${olt_serial_number} |
| 358 | END |
| 359 | Disable Device ${olt_device_id} |
| 360 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 361 | ... Validate OLT Device DISABLED UNKNOWN REACHABLE |
| 362 | ... ${olt_serial_number} |
| 363 | FOR ${I} IN RANGE 0 ${num_onus} |
| 364 | ${src}= Set Variable ${hosts.src[${I}]} |
| 365 | ${dst}= Set Variable ${hosts.dst[${I}]} |
| 366 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
| 367 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 368 | ... Validate Device DISABLED DISCOVERED |
| 369 | ... UNREACHABLE ${src['onu']} onu=false |
| 370 | Delete Device ${onu_device_id} |
| 371 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 372 | ... Validate OLT Device DISABLED UNKNOWN |
| 373 | ... REACHABLE ${olt_serial_number} |
| 374 | END |
| 375 | Delete Device ${olt_device_id} |
| 376 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s Test Empty Device List |
| 377 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 378 | ... Verify Device Flows Removed ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id} |
| 379 | # Re-do Setup (Recreate the OLT) and Perform Sanity Test DT |
| 380 | Run Keyword Setup |
| 381 | Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test DT |
| 382 | Run Keyword If ${has_dataplane} Clean Up Linux |
| 383 | |
Andy Bavier | e19991a | 2020-05-08 10:42:40 -0700 | [diff] [blame] | 384 | Data plane verification using TCP for DT |
| 385 | [Documentation] Test bandwidth profile is met and not exceeded for each subscriber. |
| 386 | ... Assumes iperf3 and jq installed on client and iperf -s running on DHCP server |
Andy Bavier | 7613b9a | 2020-07-08 07:25:47 -0700 | [diff] [blame] | 387 | [Tags] dataplaneDt BandwidthProfileTCPDt VOL-3061 |
Andy Bavier | dfbcaef | 2020-05-27 15:34:18 -0700 | [diff] [blame] | 388 | [Setup] Start Logging BandwidthProfileTCPDt |
| 389 | [Teardown] Run Keywords Collect Logs |
| 390 | ... AND Stop Logging BandwidthProfileTCPDt |
Andy Bavier | e19991a | 2020-05-08 10:42:40 -0700 | [diff] [blame] | 391 | Pass Execution If '${has_dataplane}'=='False' Bandwidth profile validation can be done only in |
| 392 | ... physical pod. Skipping this test in BBSIM. |
Andy Bavier | d74f33c | 2020-05-12 12:45:36 -0700 | [diff] [blame] | 393 | ${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] | 394 | FOR ${I} IN RANGE 0 ${num_onus} |
| 395 | ${src}= Set Variable ${hosts.src[${I}]} |
| 396 | ${dst}= Set Variable ${hosts.dst[${I}]} |
Andy Bavier | f6ab19c | 2020-05-14 10:34:47 -0700 | [diff] [blame] | 397 | |
| 398 | # Check for iperf3 and jq tools |
| 399 | ${stdout} ${stderr} ${rc}= Execute Remote Command which iperf3 jq |
| 400 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 401 | Pass Execution If ${rc} != 0 Skipping test: iperf3 / jq not found on the RG |
| 402 | |
Andy Bavier | e19991a | 2020-05-08 10:42:40 -0700 | [diff] [blame] | 403 | ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']} |
| 404 | ... ${of_id} |
| 405 | ${subscriber_id}= Set Variable ${of_id}/${onu_port} |
| 406 | ${bandwidth_profile_name} Get Bandwidth Profile Name For Given Subscriber ${subscriber_id} |
| 407 | ... upstreamBandwidthProfile |
| 408 | ${limiting_bw_value_upstream} Get Bandwidth Details ${bandwidth_profile_name} |
| 409 | ${bandwidth_profile_name} Get Bandwidth Profile Name For Given Subscriber ${subscriber_id} |
| 410 | ... downstreamBandwidthProfile |
| 411 | ${limiting_bw_value_dnstream} Get Bandwidth Details ${bandwidth_profile_name} |
| 412 | |
| 413 | # Stream TCP packets from RG to server |
| 414 | ${updict}= Run Iperf3 Test Client ${src} server=${dst['dp_iface_ip_qinq']} |
| 415 | ... args=-t 30 |
| 416 | ${actual_upstream_bw_used}= Evaluate ${updict['end']['sum_received']['bits_per_second']}/1000 |
| 417 | |
| 418 | # Stream TCP packets from server to RG |
| 419 | ${dndict}= Run Iperf3 Test Client ${src} server=${dst['dp_iface_ip_qinq']} |
| 420 | ... args=-R -t 30 |
| 421 | ${actual_dnstream_bw_used}= Evaluate ${dndict['end']['sum_received']['bits_per_second']}/1000 |
| 422 | |
| 423 | ${pct_limit_up}= Evaluate 100*${actual_upstream_bw_used}/${limiting_bw_value_upstream} |
| 424 | ${pct_limit_dn}= Evaluate 100*${actual_dnstream_bw_used}/${limiting_bw_value_dnstream} |
| 425 | Log Up: bwprof ${limiting_bw_value_upstream}Kbps, got ${actual_upstream_bw_used}Kbps (${pct_limit_up}%) |
| 426 | Log Down: bwprof ${limiting_bw_value_dnstream}Kbps, got ${actual_dnstream_bw_used}Kbps (${pct_limit_dn}%) |
| 427 | |
| 428 | Should Be True ${pct_limit_up} <= ${upper_margin_pct} |
| 429 | ... The upstream bandwidth exceeded the limit (${pct_limit_up}% of limit) |
Andy Bavier | 7613b9a | 2020-07-08 07:25:47 -0700 | [diff] [blame] | 430 | # VOL-3125: downstream bw limit not enforced. Uncomment when fixed. |
| 431 | #Should Be True ${pct_limit_dn} <= ${upper_margin_pct} |
| 432 | #... The downstream bandwidth exceeded the limit (${pct_limit_dn}% of limit) |
Andy Bavier | e19991a | 2020-05-08 10:42:40 -0700 | [diff] [blame] | 433 | Should Be True ${pct_limit_up} >= ${lower_margin_pct} |
| 434 | ... The upstream bandwidth guarantee was not met (${pct_limit_up}% of resv) |
| 435 | Should Be True ${pct_limit_dn} >= ${lower_margin_pct} |
| 436 | ... The downstream bandwidth guarantee was not met (${pct_limit_dn}% of resv) |
| 437 | END |
| 438 | |
| 439 | Data plane verification using UDP for DT |
| 440 | [Documentation] Test bandwidth profile is met and not exceeded for each subscriber. |
| 441 | ... Assumes iperf3 and jq installed on client and iperf -s running on DHCP server |
Andy Bavier | 7613b9a | 2020-07-08 07:25:47 -0700 | [diff] [blame] | 442 | [Tags] dataplaneDt BandwidthProfileUDPDt VOL-3061 |
Andy Bavier | dfbcaef | 2020-05-27 15:34:18 -0700 | [diff] [blame] | 443 | [Setup] Start Logging BandwidthProfileUDPDt |
| 444 | [Teardown] Run Keywords Collect Logs |
| 445 | ... AND Stop Logging BandwidthProfileUDPDt |
Andy Bavier | e19991a | 2020-05-08 10:42:40 -0700 | [diff] [blame] | 446 | Pass Execution If '${has_dataplane}'=='False' Bandwidth profile validation can be done only in |
| 447 | ... physical pod. Skipping this test in BBSIM. |
Andy Bavier | d74f33c | 2020-05-12 12:45:36 -0700 | [diff] [blame] | 448 | ${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] | 449 | FOR ${I} IN RANGE 0 ${num_onus} |
| 450 | ${src}= Set Variable ${hosts.src[${I}]} |
| 451 | ${dst}= Set Variable ${hosts.dst[${I}]} |
Andy Bavier | 7613b9a | 2020-07-08 07:25:47 -0700 | [diff] [blame] | 452 | |
| 453 | # Check for iperf3 and jq tools |
| 454 | ${stdout} ${stderr} ${rc}= Execute Remote Command which iperf3 jq |
| 455 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 456 | Pass Execution If ${rc} != 0 Skipping test: iperf3 / jq not found on the RG |
| 457 | |
Andy Bavier | e19991a | 2020-05-08 10:42:40 -0700 | [diff] [blame] | 458 | ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']} |
| 459 | ... ${of_id} |
| 460 | ${subscriber_id}= Set Variable ${of_id}/${onu_port} |
| 461 | ${bandwidth_profile_name} Get Bandwidth Profile Name For Given Subscriber ${subscriber_id} |
| 462 | ... upstreamBandwidthProfile |
| 463 | ${limiting_bw_value_upstream} Get Bandwidth Details ${bandwidth_profile_name} |
| 464 | ${bandwidth_profile_name} Get Bandwidth Profile Name For Given Subscriber ${subscriber_id} |
| 465 | ... downstreamBandwidthProfile |
| 466 | ${limiting_bw_value_dnstream} Get Bandwidth Details ${bandwidth_profile_name} |
| 467 | |
| 468 | # Stream UDP packets from RG to server |
| 469 | ${uprate}= Evaluate ${limiting_bw_value_upstream}*${udp_rate_multiplier} |
| 470 | ${updict}= Run Iperf3 Test Client ${src} server=${dst['dp_iface_ip_qinq']} |
Andy Bavier | 7dc5062 | 2020-05-28 14:34:12 -0700 | [diff] [blame] | 471 | ... 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] | 472 | # With UDP test, bits per second is the sending rate. Multiply by the loss rate to get the throughput. |
| 473 | ${actual_upstream_bw_used}= Evaluate |
| 474 | ... (100 - ${updict['end']['sum']['lost_percent']})*${updict['end']['sum']['bits_per_second']}/100000 |
| 475 | |
| 476 | # Stream UDP packets from server to RG |
| 477 | ${dnrate}= Evaluate ${limiting_bw_value_dnstream}*${udp_rate_multiplier} |
| 478 | ${dndict}= Run Iperf3 Test Client ${src} server=${dst['dp_iface_ip_qinq']} |
Andy Bavier | 7dc5062 | 2020-05-28 14:34:12 -0700 | [diff] [blame] | 479 | ... 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] | 480 | # With UDP test, bits per second is the sending rate. Multiply by the loss rate to get the throughput. |
| 481 | ${actual_dnstream_bw_used}= Evaluate |
| 482 | ... (100 - ${dndict['end']['sum']['lost_percent']})*${dndict['end']['sum']['bits_per_second']}/100000 |
| 483 | |
| 484 | ${pct_limit_up}= Evaluate 100*${actual_upstream_bw_used}/${limiting_bw_value_upstream} |
| 485 | ${pct_limit_dn}= Evaluate 100*${actual_dnstream_bw_used}/${limiting_bw_value_dnstream} |
| 486 | Log Up: bwprof ${limiting_bw_value_upstream}Kbps, got ${actual_upstream_bw_used}Kbps (${pct_limit_up}%) |
| 487 | Log Down: bwprof ${limiting_bw_value_dnstream}Kbps, got ${actual_dnstream_bw_used}Kbps (${pct_limit_dn}%) |
| 488 | |
| 489 | Should Be True ${pct_limit_up} <= ${upper_margin_pct} |
| 490 | ... The upstream bandwidth exceeded the limit (${pct_limit_up}% of limit) |
Andy Bavier | 7613b9a | 2020-07-08 07:25:47 -0700 | [diff] [blame] | 491 | # VOL-3125: downstream bw limit not enforced. Uncomment when fixed. |
| 492 | #Should Be True ${pct_limit_dn} <= ${upper_margin_pct} |
| 493 | #... The downstream bandwidth exceeded the limit (${pct_limit_dn}% of limit) |
Andy Bavier | e19991a | 2020-05-08 10:42:40 -0700 | [diff] [blame] | 494 | Should Be True ${pct_limit_up} >= ${lower_margin_pct} |
| 495 | ... The upstream bandwidth guarantee was not met (${pct_limit_up}% of resv) |
| 496 | Should Be True ${pct_limit_dn} >= ${lower_margin_pct} |
| 497 | ... The downstream bandwidth guarantee was not met (${pct_limit_dn}% of resv) |
| 498 | END |
| 499 | |
Andy Bavier | 7613b9a | 2020-07-08 07:25:47 -0700 | [diff] [blame] | 500 | Validate parsing of data traffic through voltha using tech profile |
| 501 | [Documentation] Assuming that test1 was executed where all the ONUs are authenticated/DHCP/pingable |
| 502 | ... Prerequisite tools : Tcpdump and Mausezahn traffic generator on both RG and DHCP/BNG VMs |
| 503 | ... Install jq tool to read json file, where test suite is being running |
| 504 | ... Make sure 9999 port is enabled or forwarded for both upsteam and downstream direction |
| 505 | ... This test sends UDP packets on port 9999 with pbits between 0 and 7 and validates that |
| 506 | ... the pbits are preserved by the PON. |
| 507 | [Tags] dataplaneDt TechProfileDt VOL-3291 |
| 508 | [Setup] Start Logging TechProfileDt |
| 509 | [Teardown] Run Keywords Collect Logs |
| 510 | ... AND Stop Logging TechProfileDt |
| 511 | Pass Execution If '${has_dataplane}'=='False' |
| 512 | ... Skipping test: Technology profile validation can be done only in physical pod |
| 513 | FOR ${I} IN RANGE 0 ${num_onus} |
| 514 | ${src}= Set Variable ${hosts.src[${I}]} |
| 515 | ${dst}= Set Variable ${hosts.dst[${I}]} |
| 516 | |
Andy Bavier | 275414a | 2020-07-16 13:07:17 -0700 | [diff] [blame] | 517 | ${src_iface_name}= Fetch From Left ${src['dp_iface_name']} . |
| 518 | |
Andy Bavier | 7613b9a | 2020-07-08 07:25:47 -0700 | [diff] [blame] | 519 | ${bng_ip}= Get Variable Value ${dst['noroot_ip']} |
| 520 | ${bng_user}= Get Variable Value ${dst['noroot_user']} |
| 521 | ${bng_pass}= Get Variable Value ${dst['noroot_pass']} |
| 522 | Pass Execution If "${bng_ip}" == "${NONE}" or "${bng_user}" == "${NONE}" or "${bng_pass}" == "${NONE}" |
| 523 | ... Skipping test: credentials for BNG login required in deployment config |
| 524 | |
| 525 | ${stdout} ${stderr} ${rc}= Execute Remote Command which mausezahn tcpdump |
| 526 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 527 | Pass Execution If ${rc} != 0 Skipping test: mausezahn / tcpdump not found on the RG |
| 528 | ${stdout} ${stderr} ${rc}= Execute Remote Command which mausezahn tcpdump |
| 529 | ... ${bng_ip} ${bng_user} ${bng_pass} ${dst['container_type']} ${dst['container_name']} |
| 530 | Pass Execution If ${rc} != 0 Skipping test: mausezahn / tcpdump not found on the BNG |
| 531 | Log Upstream test |
| 532 | Run Keyword If ${has_dataplane} Create traffic with each pbit and capture at other end |
Andy Bavier | 275414a | 2020-07-16 13:07:17 -0700 | [diff] [blame] | 533 | ... ${dst['dp_iface_ip_qinq']} ${dst['dp_iface_name']} ${src_iface_name} |
| 534 | ... 0 udp 9999 ${src['c_tag']} vlan |
Andy Bavier | 7613b9a | 2020-07-08 07:25:47 -0700 | [diff] [blame] | 535 | ... ${bng_ip} ${bng_user} ${bng_pass} ${dst['container_type']} ${dst['container_name']} |
| 536 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 537 | Log Downstream test |
| 538 | ${rg_ip} ${stderr} ${rc}= Execute Remote Command |
| 539 | ... ifconfig ${src['dp_iface_name']} | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1 }' |
| 540 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 541 | Should Be Equal As Integers ${rc} 0 Could not get RG's IP address |
| 542 | Run Keyword If ${has_dataplane} Create traffic with each pbit and capture at other end |
Andy Bavier | 275414a | 2020-07-16 13:07:17 -0700 | [diff] [blame] | 543 | ... ${rg_ip} ${src_iface_name} ${dst['dp_iface_name']}.${src['s_tag']} |
Andy Bavier | 7613b9a | 2020-07-08 07:25:47 -0700 | [diff] [blame] | 544 | ... 0 udp 9999 ${src['c_tag']} udp |
| 545 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 546 | ... ${bng_ip} ${bng_user} ${bng_pass} ${dst['container_type']} ${dst['container_name']} |
| 547 | END |
| 548 | |
Hardik Windlass | a3d04b9 | 2020-02-17 15:06:05 +0000 | [diff] [blame] | 549 | *** Keywords *** |
| 550 | Setup Suite |
| 551 | [Documentation] Set up the test suite |
| 552 | Common Test Suite Setup |
Hung-Wei Chiu | cc6e655 | 2020-06-04 12:57:38 -0700 | [diff] [blame] | 553 | #Restore all ONUs |
Suchitra Vemuri | 1d8e817 | 2020-06-17 17:43:56 -0700 | [diff] [blame] | 554 | #Run Keyword If ${has_dataplane} RestoreONUs ${num_onus} |
| 555 | #power_switch.robot needs it to support different vendor's power switch |
| 556 | ${switch_type}= Get Variable Value ${web_power_switch.type} |
| 557 | Run Keyword If "${switch_type}"!="" Set Global Variable ${powerswitch_type} ${switch_type} |
Hardik Windlass | a3d04b9 | 2020-02-17 15:06:05 +0000 | [diff] [blame] | 558 | |
| 559 | Clear All Devices Then Create New Device |
| 560 | [Documentation] Remove any devices from VOLTHA and ONOS |
| 561 | # Remove all devices from voltha and nos |
| 562 | Delete All Devices and Verify |
| 563 | # Execute normal test Setup Keyword |
| 564 | Setup |
| 565 | |