David Bainbridge | f81cd64 | 2019-11-20 00:14:47 +0000 | [diff] [blame] | 1 | # Copyright 2017 - present Open Networking Foundation |
Suchitra Vemuri | 65cd65f | 2019-08-30 14:39:22 -0700 | [diff] [blame] | 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. |
Matteo Scandolo | 1294aeb | 2019-09-24 16:20:32 -0700 | [diff] [blame] | 14 | # FIXME Can we use the same test against BBSim and Hardware? |
| 15 | |
Suchitra Vemuri | 65cd65f | 2019-08-30 14:39:22 -0700 | [diff] [blame] | 16 | *** Settings *** |
Zack Williams | ec53a1b | 2019-09-16 15:50:52 -0700 | [diff] [blame] | 17 | Documentation Test various end-to-end scenarios |
Suchitra Vemuri | 65cd65f | 2019-08-30 14:39:22 -0700 | [diff] [blame] | 18 | Suite Setup Setup Suite |
Suchitra Vemuri | 65cd65f | 2019-08-30 14:39:22 -0700 | [diff] [blame] | 19 | Test Setup Setup |
| 20 | Test Teardown Teardown |
Andy Bavier | ba9866b | 2019-10-11 07:11:53 -0700 | [diff] [blame] | 21 | Suite Teardown Teardown Suite |
Suchitra Vemuri | 65cd65f | 2019-08-30 14:39:22 -0700 | [diff] [blame] | 22 | Library Collections |
| 23 | Library String |
| 24 | Library OperatingSystem |
| 25 | Library XML |
| 26 | Library RequestsLibrary |
Andy Bavier | ba9866b | 2019-10-11 07:11:53 -0700 | [diff] [blame] | 27 | Library ../../libraries/DependencyLibrary.py |
Suchitra Vemuri | b8ed2d5 | 2019-09-30 13:22:51 -0700 | [diff] [blame] | 28 | Resource ../../libraries/onos.robot |
| 29 | Resource ../../libraries/voltctl.robot |
David Bainbridge | f81cd64 | 2019-11-20 00:14:47 +0000 | [diff] [blame] | 30 | Resource ../../libraries/voltha.robot |
Suchitra Vemuri | b8ed2d5 | 2019-09-30 13:22:51 -0700 | [diff] [blame] | 31 | Resource ../../libraries/utils.robot |
Andy Bavier | ba9866b | 2019-10-11 07:11:53 -0700 | [diff] [blame] | 32 | Resource ../../libraries/k8s.robot |
Suchitra Vemuri | b8ed2d5 | 2019-09-30 13:22:51 -0700 | [diff] [blame] | 33 | Resource ../../variables/variables.robot |
Suchitra Vemuri | 1d8e817 | 2020-06-17 17:43:56 -0700 | [diff] [blame] | 34 | Resource ../../libraries/power_switch.robot |
Suchitra Vemuri | 65cd65f | 2019-08-30 14:39:22 -0700 | [diff] [blame] | 35 | |
| 36 | *** Variables *** |
Zack Williams | ec53a1b | 2019-09-16 15:50:52 -0700 | [diff] [blame] | 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 |
Zack Williams | a8fe75a | 2020-01-10 14:25:27 -0700 | [diff] [blame] | 44 | ${NAMESPACE} voltha |
Hardik Windlass | 4288c6a | 2021-09-28 07:22:06 +0000 | [diff] [blame] | 45 | ${INFRA_NAMESPACE} default |
suraj gour | d64356b | 2019-11-07 13:26:20 +0000 | [diff] [blame] | 46 | # For below variable value, using deployment name as using grep for |
| 47 | # parsing radius pod name, we can also use full radius pod name |
Zack Williams | a8fe75a | 2020-01-10 14:25:27 -0700 | [diff] [blame] | 48 | ${RESTART_POD_NAME} radius |
Andy Bavier | ba9866b | 2019-10-11 07:11:53 -0700 | [diff] [blame] | 49 | ${timeout} 60s |
Zack Williams | ec53a1b | 2019-09-16 15:50:52 -0700 | [diff] [blame] | 50 | ${of_id} 0 |
| 51 | ${logical_id} 0 |
Andrea Campanella | 86e2406 | 2020-08-05 19:09:18 +0200 | [diff] [blame] | 52 | ${uprate} 0 |
| 53 | ${dnrate} 0 |
Andy Bavier | ba9866b | 2019-10-11 07:11:53 -0700 | [diff] [blame] | 54 | ${has_dataplane} True |
Andy Bavier | ba9866b | 2019-10-11 07:11:53 -0700 | [diff] [blame] | 55 | ${teardown_device} False |
Zack Williams | a8fe75a | 2020-01-10 14:25:27 -0700 | [diff] [blame] | 56 | ${scripts} ../../scripts |
Hardik Windlass | c4d1fd6 | 2022-04-12 13:12:28 +0000 | [diff] [blame] | 57 | # flag to reboot OLT through Power Switch |
| 58 | ${power_cycle_olt} False |
Suchitra Vemuri | 65cd65f | 2019-08-30 14:39:22 -0700 | [diff] [blame] | 59 | |
Gayathri.Selvan | 92d1686 | 2020-03-19 14:47:58 +0000 | [diff] [blame] | 60 | # For dataplane bandwidth testing |
| 61 | ${upper_margin_pct} 105 # Allow 5% over the limit |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 62 | ${lower_margin_pct} 90 # Allow 8% under the limit |
Gayathri.Selvan | 92d1686 | 2020-03-19 14:47:58 +0000 | [diff] [blame] | 63 | ${udp_rate_multiplier} 1.10 # Send UDP at bw profile limit * rate_multiplier |
Andy Bavier | c80a274 | 2020-08-28 10:59:05 -0700 | [diff] [blame] | 64 | ${udp_packet_bytes} 1470 # UDP payload in bytes |
Gayathri.Selvan | 92d1686 | 2020-03-19 14:47:58 +0000 | [diff] [blame] | 65 | |
Andy Bavier | abeba26 | 2020-02-07 16:22:16 -0700 | [diff] [blame] | 66 | # Per-test logging on failure is turned off by default; set this variable to enable |
| 67 | ${container_log_dir} ${None} |
| 68 | |
Matteo Scandolo | da1c64b | 2021-07-20 10:14:49 -0700 | [diff] [blame] | 69 | # logging flag to enable Collect Logs, can be passed via the command line too |
| 70 | # example: -v logging:False |
| 71 | ${logging} True |
| 72 | |
Suchitra Vemuri | 65cd65f | 2019-08-30 14:39:22 -0700 | [diff] [blame] | 73 | *** Test Cases *** |
Hardik Windlass | c4d1fd6 | 2022-04-12 13:12:28 +0000 | [diff] [blame] | 74 | Reboot ONUs and OLTs Physically |
| 75 | [Documentation] This test reboots ONUs and OLTs physically before execution all the tests |
Suchitra Vemuri | 1d8e817 | 2020-06-17 17:43:56 -0700 | [diff] [blame] | 76 | ... Test case runs only on the PODs that are configured with PowerSwitch that |
| 77 | ... controls the power off/on ONUs/OLT remotely (simulating a physical reboot) |
Hardik Windlass | c4d1fd6 | 2022-04-12 13:12:28 +0000 | [diff] [blame] | 78 | [Tags] functional PowerSwitch RebootAllONUsOLTs |
| 79 | [Setup] Start Logging RebootAllONUsOLTs |
Suchitra Vemuri | 1d8e817 | 2020-06-17 17:43:56 -0700 | [diff] [blame] | 80 | [Teardown] Run Keywords Collect Logs |
Hardik Windlass | c4d1fd6 | 2022-04-12 13:12:28 +0000 | [diff] [blame] | 81 | ... AND Stop Logging RebootAllONUsOLTs |
| 82 | Perform Reboot ONUs and OLTs Physically ${power_cycle_olt} |
Suchitra Vemuri | 1d8e817 | 2020-06-17 17:43:56 -0700 | [diff] [blame] | 83 | |
Suchitra Vemuri | 65cd65f | 2019-08-30 14:39:22 -0700 | [diff] [blame] | 84 | Sanity E2E Test for OLT/ONU on POD |
| 85 | [Documentation] Validates E2E Ping Connectivity and object states for the given scenario: |
| 86 | ... Validate successful authentication/DHCP/E2E ping for the tech profile that is used |
Andy Bavier | ba9866b | 2019-10-11 07:11:53 -0700 | [diff] [blame] | 87 | [Tags] sanity test1 |
Andy Bavier | e187eda | 2020-04-20 15:00:02 -0700 | [diff] [blame] | 88 | [Setup] Run Keywords Start Logging SanityTest |
Andy Bavier | 4a8450e | 2020-02-04 08:58:37 -0700 | [diff] [blame] | 89 | ... AND Setup |
| 90 | [Teardown] Run Keywords Collect Logs |
Andy Bavier | abeba26 | 2020-02-07 16:22:16 -0700 | [diff] [blame] | 91 | ... AND Stop Logging SanityTest |
Suchitra Vemuri | c5295a3 | 2019-12-15 20:32:04 -0800 | [diff] [blame] | 92 | Run Keyword If ${has_dataplane} Clean Up Linux |
Hardik Windlass | 58b23a3 | 2022-05-10 11:06:48 +0530 | [diff] [blame] | 93 | Perform Sanity Test |
Suchitra Vemuri | 65cd65f | 2019-08-30 14:39:22 -0700 | [diff] [blame] | 94 | |
Suchitra Vemuri | 6db8941 | 2019-11-14 14:52:54 -0800 | [diff] [blame] | 95 | Test Disable and Enable ONU |
| 96 | [Documentation] Validates E2E Ping Connectivity and object states for the given scenario: |
| 97 | ... Assuming that test1 was executed where all the ONUs are authenticated/DHCP/pingable |
| 98 | ... Perform disable on the ONUs and validate that the pings do not succeed |
| 99 | ... Perform enable on the ONUs and validate that the pings are successful |
Hardik Windlass | 1ed2eee | 2021-06-25 09:51:03 +0000 | [diff] [blame] | 100 | [Tags] functional DisableEnableONU released multi-uni |
Girish Gowdra | 8fd9696 | 2021-12-14 16:20:04 +0530 | [diff] [blame] | 101 | [Setup] Run Keywords Start Logging DisableEnableONU |
| 102 | ... AND Run Keyword If ${has_dataplane} Set Non-Critical Tag for XGSPON Tech |
Andy Bavier | 4a8450e | 2020-02-04 08:58:37 -0700 | [diff] [blame] | 103 | [Teardown] Run Keywords Collect Logs |
Andy Bavier | abeba26 | 2020-02-07 16:22:16 -0700 | [diff] [blame] | 104 | ... AND Stop Logging DisableEnableONU |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 105 | FOR ${I} IN RANGE 0 ${num_all_onus} |
Suchitra Vemuri | 6db8941 | 2019-11-14 14:52:54 -0800 | [diff] [blame] | 106 | ${src}= Set Variable ${hosts.src[${I}]} |
| 107 | ${dst}= Set Variable ${hosts.dst[${I}]} |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 108 | ${of_id}= Get ofID From OLT List ${src['olt']} |
TorstenThieme | dda3765 | 2021-11-11 16:22:05 +0000 | [diff] [blame] | 109 | ${nni_port}= Wait Until Keyword Succeeds ${timeout} 2s Get NNI Port in ONOS ${of_id} |
Suchitra Vemuri | 6db8941 | 2019-11-14 14:52:54 -0800 | [diff] [blame] | 110 | ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']} |
Hardik Windlass | 1ed2eee | 2021-06-25 09:51:03 +0000 | [diff] [blame] | 111 | ... ${of_id} ${src['uni_id']} |
Hardik Windlass | 78bb0fd | 2022-06-21 15:11:54 +0530 | [diff] [blame] | 112 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
Suchitra Vemuri | 6db8941 | 2019-11-14 14:52:54 -0800 | [diff] [blame] | 113 | Disable Device ${onu_device_id} |
Andy Bavier | 46c8be3 | 2020-01-21 10:06:27 -0700 | [diff] [blame] | 114 | Wait Until Keyword Succeeds 20s 2s Test Devices Disabled in VOLTHA Id=${onu_device_id} |
Andy Bavier | 33e6dd3 | 2020-01-16 13:35:20 -0700 | [diff] [blame] | 115 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure |
Hardik Windlass | 58b23a3 | 2022-05-10 11:06:48 +0530 | [diff] [blame] | 116 | ... Wait Until Keyword Succeeds ${timeout} 2s |
Zack Williams | a8fe75a | 2020-01-10 14:25:27 -0700 | [diff] [blame] | 117 | ... Check Ping False ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']} |
| 118 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
Suchitra Vemuri | 6db8941 | 2019-11-14 14:52:54 -0800 | [diff] [blame] | 119 | Enable Device ${onu_device_id} |
Girish Gowdra | fc0bdf2 | 2021-12-06 16:57:50 +0530 | [diff] [blame] | 120 | Wait Until Keyword Succeeds ${timeout} 5s |
| 121 | ... Validate Device ENABLED ACTIVE |
| 122 | ... REACHABLE ${src['onu']} onu=True onu_reason=omci-flows-pushed |
| 123 | # Workaround for issue seen in VOL-4489. Keep this workaround until VOL-4489 is fixed. |
| 124 | Run Keyword If ${has_dataplane} Reboot XGSPON ONU ${src['olt']} ${src['onu']} omci-flows-pushed |
| 125 | # Workaround ends here for issue seen in VOL-4489. |
Suchitra Vemuri | 6db8941 | 2019-11-14 14:52:54 -0800 | [diff] [blame] | 126 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
ubuntu | 6b6e7d4 | 2020-03-02 12:35:42 -0800 | [diff] [blame] | 127 | ... Validate Subscriber DHCP Allocation ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port} |
Hardik Windlass | 2180763 | 2020-04-14 16:24:55 +0530 | [diff] [blame] | 128 | # Verify subscriber access flows are added for the ONU port |
Hardik Windlass | 58b23a3 | 2022-05-10 11:06:48 +0530 | [diff] [blame] | 129 | Wait Until Keyword Succeeds ${timeout} 5s |
Hardik Windlass | 2180763 | 2020-04-14 16:24:55 +0530 | [diff] [blame] | 130 | ... Verify Subscriber Access Flows Added For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id} |
| 131 | ... ${onu_port} ${nni_port} ${src['c_tag']} ${src['s_tag']} |
Andy Bavier | 33e6dd3 | 2020-01-16 13:35:20 -0700 | [diff] [blame] | 132 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure |
Hardik Windlass | 58b23a3 | 2022-05-10 11:06:48 +0530 | [diff] [blame] | 133 | ... Wait Until Keyword Succeeds ${timeout} 2s |
Zack Williams | a8fe75a | 2020-01-10 14:25:27 -0700 | [diff] [blame] | 134 | ... Check Ping True ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']} |
| 135 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
Suchitra Vemuri | 6db8941 | 2019-11-14 14:52:54 -0800 | [diff] [blame] | 136 | END |
| 137 | |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 138 | Test Subscriber Delete and Add |
| 139 | [Documentation] Validates E2E Ping Connectivity and object states for the given scenario: |
| 140 | ... Assuming that all the ONUs are authenticated/DHCP/pingable |
Zack Williams | a8fe75a | 2020-01-10 14:25:27 -0700 | [diff] [blame] | 141 | ... Delete a subscriber and validate that the pings do not succeed |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 142 | ... Re-add the subscriber and validate that the pings are successful |
Hardik Windlass | 1ed2eee | 2021-06-25 09:51:03 +0000 | [diff] [blame] | 143 | [Tags] functional SubAddDelete released multi-uni |
Girish Gowdra | fbdddc1 | 2021-12-17 15:39:55 +0530 | [diff] [blame] | 144 | [Setup] Run Keywords Start Logging SubAddDelete |
| 145 | ... AND Run Keyword If ${has_dataplane} Set Non-Critical Tag for XGSPON Tech |
Andy Bavier | 4a8450e | 2020-02-04 08:58:37 -0700 | [diff] [blame] | 146 | [Teardown] Run Keywords Collect Logs |
Andy Bavier | abeba26 | 2020-02-07 16:22:16 -0700 | [diff] [blame] | 147 | ... AND Stop Logging SubAddDelete |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 148 | FOR ${I} IN RANGE 0 ${num_all_onus} |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 149 | ${src}= Set Variable ${hosts.src[${I}]} |
| 150 | ${dst}= Set Variable ${hosts.dst[${I}]} |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 151 | ${of_id}= Get ofID From OLT List ${src['olt']} |
TorstenThieme | dda3765 | 2021-11-11 16:22:05 +0000 | [diff] [blame] | 152 | ${nni_port}= Wait Until Keyword Succeeds ${timeout} 2s Get NNI Port in ONOS ${of_id} |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 153 | ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']} |
Hardik Windlass | 1ed2eee | 2021-06-25 09:51:03 +0000 | [diff] [blame] | 154 | ... ${of_id} ${src['uni_id']} |
Hardik Windlass | 78bb0fd | 2022-06-21 15:11:54 +0530 | [diff] [blame] | 155 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
TorstenThieme | 4e2168e | 2021-06-22 14:01:47 +0000 | [diff] [blame] | 156 | Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command use single connection ${ONOS_SSH_IP} |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 157 | ... ${ONOS_SSH_PORT} volt-remove-subscriber-access ${of_id} ${onu_port} |
Hardik Windlass | 58b23a3 | 2022-05-10 11:06:48 +0530 | [diff] [blame] | 158 | Wait Until Keyword Succeeds ${timeout} 2s |
Suchitra Vemuri | 9da4430 | 2020-03-04 14:24:49 -0800 | [diff] [blame] | 159 | ... Verify No Pending Flows For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port} |
Andy Bavier | 33e6dd3 | 2020-01-16 13:35:20 -0700 | [diff] [blame] | 160 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure |
Hardik Windlass | 58b23a3 | 2022-05-10 11:06:48 +0530 | [diff] [blame] | 161 | ... Wait Until Keyword Succeeds ${timeout} 2s |
Zack Williams | a8fe75a | 2020-01-10 14:25:27 -0700 | [diff] [blame] | 162 | ... Check Ping False ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']} |
| 163 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
TorstenThieme | 4e2168e | 2021-06-22 14:01:47 +0000 | [diff] [blame] | 164 | Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command use single connection ${ONOS_SSH_IP} |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 165 | ... ${ONOS_SSH_PORT} volt-add-subscriber-access ${of_id} ${onu_port} |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 166 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
Suchitra Vemuri | 9da4430 | 2020-03-04 14:24:49 -0800 | [diff] [blame] | 167 | ... Verify No Pending Flows For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port} |
| 168 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
ubuntu | 6b6e7d4 | 2020-03-02 12:35:42 -0800 | [diff] [blame] | 169 | ... Validate Subscriber DHCP Allocation ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port} |
Hardik Windlass | 2180763 | 2020-04-14 16:24:55 +0530 | [diff] [blame] | 170 | # Verify subscriber access flows are added for the ONU port |
Hardik Windlass | 58b23a3 | 2022-05-10 11:06:48 +0530 | [diff] [blame] | 171 | Wait Until Keyword Succeeds ${timeout} 5s |
Hardik Windlass | 2180763 | 2020-04-14 16:24:55 +0530 | [diff] [blame] | 172 | ... Verify Subscriber Access Flows Added For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id} |
| 173 | ... ${onu_port} ${nni_port} ${src['c_tag']} ${src['s_tag']} |
Andy Bavier | 33e6dd3 | 2020-01-16 13:35:20 -0700 | [diff] [blame] | 174 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure |
Hardik Windlass | 58b23a3 | 2022-05-10 11:06:48 +0530 | [diff] [blame] | 175 | ... Wait Until Keyword Succeeds ${timeout} 2s |
Zack Williams | a8fe75a | 2020-01-10 14:25:27 -0700 | [diff] [blame] | 176 | ... Check Ping True ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']} |
| 177 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 178 | END |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 179 | |
suraj gour | d5cfdbb | 2019-12-13 12:44:55 +0000 | [diff] [blame] | 180 | Check DHCP attempt fails when subscriber is not added |
| 181 | [Documentation] Validates when removed subscriber access, DHCP attempt, ping fails and |
| 182 | ... when again added subscriber access, DHCP attempt, ping succeeds |
Zack Williams | a8fe75a | 2020-01-10 14:25:27 -0700 | [diff] [blame] | 183 | ... Assuming that test1 or sanity test was executed where all the ONUs are authenticated/DHCP/pingable |
Hardik Windlass | 1ed2eee | 2021-06-25 09:51:03 +0000 | [diff] [blame] | 184 | [Tags] functional SubsRemoveDHCP released multi-uni |
Andy Bavier | e187eda | 2020-04-20 15:00:02 -0700 | [diff] [blame] | 185 | [Setup] Start Logging SubsRemoveDHCP |
Andy Bavier | 4a8450e | 2020-02-04 08:58:37 -0700 | [diff] [blame] | 186 | [Teardown] Run Keywords Collect Logs |
Andy Bavier | abeba26 | 2020-02-07 16:22:16 -0700 | [diff] [blame] | 187 | ... AND Stop Logging SubsRemoveDHCP |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 188 | FOR ${I} IN RANGE 0 ${num_all_onus} |
suraj gour | d5cfdbb | 2019-12-13 12:44:55 +0000 | [diff] [blame] | 189 | ${src}= Set Variable ${hosts.src[${I}]} |
| 190 | ${dst}= Set Variable ${hosts.dst[${I}]} |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 191 | ${of_id}= Get ofID From OLT List ${src['olt']} |
TorstenThieme | dda3765 | 2021-11-11 16:22:05 +0000 | [diff] [blame] | 192 | ${nni_port}= Wait Until Keyword Succeeds ${timeout} 2s Get NNI Port in ONOS ${of_id} |
suraj gour | d5cfdbb | 2019-12-13 12:44:55 +0000 | [diff] [blame] | 193 | ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']} |
Hardik Windlass | 1ed2eee | 2021-06-25 09:51:03 +0000 | [diff] [blame] | 194 | ... ${of_id} ${src['uni_id']} |
Hardik Windlass | 78bb0fd | 2022-06-21 15:11:54 +0530 | [diff] [blame] | 195 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 196 | Run Keyword And Ignore Error Login And Run Command On Remote System killall dhclient ${src['ip']} |
| 197 | ... ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 198 | Run Keyword And Ignore Error Login And Run Command On Remote System ps -ef | grep dhclient ${src['ip']} |
| 199 | ... ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
TorstenThieme | 4e2168e | 2021-06-22 14:01:47 +0000 | [diff] [blame] | 200 | Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command use single connection ${ONOS_SSH_IP} |
suraj gour | d5cfdbb | 2019-12-13 12:44:55 +0000 | [diff] [blame] | 201 | ... ${ONOS_SSH_PORT} volt-remove-subscriber-access ${of_id} ${onu_port} |
Suchitra Vemuri | 8f1d306 | 2020-02-28 11:57:37 -0800 | [diff] [blame] | 202 | Sleep 15s |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 203 | Run Keyword And Ignore Error Login And Run Command On Remote System ps -ef | grep dhclient ${src['ip']} |
| 204 | ... ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
Zack Williams | a8fe75a | 2020-01-10 14:25:27 -0700 | [diff] [blame] | 205 | Run Keyword If ${has_dataplane} Wait Until Keyword Succeeds ${timeout} 2s |
| 206 | ... Delete IP Addresses from Interface on Remote Host ${src['dp_iface_name']} ${src['ip']} |
| 207 | ... ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 208 | Run Keyword And Ignore Error Login And Run Command On Remote System |
| 209 | ... ifconfig | grep -A 10 ens ${src['ip']} |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 210 | ... ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
suraj gour | d5cfdbb | 2019-12-13 12:44:55 +0000 | [diff] [blame] | 211 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Validate DHCP and Ping False |
| 212 | ... False ${src['dp_iface_name']} ${src['s_tag']} ${src['c_tag']} ${dst['dp_iface_ip_qinq']} |
| 213 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 214 | ... ${dst['dp_iface_name']} ${dst['ip']} ${dst['user']} ${dst['pass']} ${dst['container_type']} |
| 215 | ... ${dst['container_name']} |
TorstenThieme | 4e2168e | 2021-06-22 14:01:47 +0000 | [diff] [blame] | 216 | Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command use single connection ${ONOS_SSH_IP} |
suraj gour | d5cfdbb | 2019-12-13 12:44:55 +0000 | [diff] [blame] | 217 | ... ${ONOS_SSH_PORT} volt-add-subscriber-access ${of_id} ${onu_port} |
Suchitra Vemuri | 9da4430 | 2020-03-04 14:24:49 -0800 | [diff] [blame] | 218 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
| 219 | ... Verify No Pending Flows For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port} |
Hardik Windlass | 2180763 | 2020-04-14 16:24:55 +0530 | [diff] [blame] | 220 | # Verify subscriber access flows are added for the ONU port |
Hardik Windlass | 58b23a3 | 2022-05-10 11:06:48 +0530 | [diff] [blame] | 221 | Wait Until Keyword Succeeds ${timeout} 5s |
Hardik Windlass | 2180763 | 2020-04-14 16:24:55 +0530 | [diff] [blame] | 222 | ... Verify Subscriber Access Flows Added For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id} |
| 223 | ... ${onu_port} ${nni_port} ${src['c_tag']} ${src['s_tag']} |
suraj gour | d5cfdbb | 2019-12-13 12:44:55 +0000 | [diff] [blame] | 224 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Validate DHCP and Ping True |
| 225 | ... True ${src['dp_iface_name']} ${src['s_tag']} ${src['c_tag']} ${dst['dp_iface_ip_qinq']} |
| 226 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 227 | ... ${dst['dp_iface_name']} ${dst['ip']} ${dst['user']} ${dst['pass']} ${dst['container_type']} |
| 228 | ... ${dst['container_name']} |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 229 | END |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 230 | |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 231 | Test Disable and Enable ONU scenario for ATT workflow |
| 232 | [Documentation] Validates E2E Ping Connectivity and object states for the given scenario: |
| 233 | ... Assuming that test1 was executed where all the ONUs are authenticated/DHCP/pingable |
| 234 | ... Perform disable on the ONUs, call volt-remove-subscriber and validate that the pings do not succeed |
Zack Williams | a8fe75a | 2020-01-10 14:25:27 -0700 | [diff] [blame] | 235 | ... Perform enable on the ONUs, authentication check, volt-add-subscriber-access and |
| 236 | ... validate that the pings are successful |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 237 | ... VOL-2284 |
Hardik Windlass | 1ed2eee | 2021-06-25 09:51:03 +0000 | [diff] [blame] | 238 | [Tags] functional ATT_DisableEnableONU released multi-uni |
Girish Gowdra | 8fd9696 | 2021-12-14 16:20:04 +0530 | [diff] [blame] | 239 | [Setup] Run Keywords Start Logging ATT_DisableEnableONU |
| 240 | ... AND Run Keyword If ${has_dataplane} Set Non-Critical Tag for XGSPON Tech |
Andy Bavier | 4a8450e | 2020-02-04 08:58:37 -0700 | [diff] [blame] | 241 | [Teardown] Run Keywords Collect Logs |
Andy Bavier | abeba26 | 2020-02-07 16:22:16 -0700 | [diff] [blame] | 242 | ... AND Stop Logging ATT_DisableEnableONU |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 243 | FOR ${I} IN RANGE 0 ${num_all_onus} |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 244 | ${src}= Set Variable ${hosts.src[${I}]} |
| 245 | ${dst}= Set Variable ${hosts.dst[${I}]} |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 246 | ${of_id}= Get ofID From OLT List ${src['olt']} |
TorstenThieme | dda3765 | 2021-11-11 16:22:05 +0000 | [diff] [blame] | 247 | ${nni_port}= Wait Until Keyword Succeeds ${timeout} 2s Get NNI Port in ONOS ${of_id} |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 248 | ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']} |
Hardik Windlass | 1ed2eee | 2021-06-25 09:51:03 +0000 | [diff] [blame] | 249 | ... ${of_id} ${src['uni_id']} |
Hardik Windlass | 78bb0fd | 2022-06-21 15:11:54 +0530 | [diff] [blame] | 250 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
Hardik Windlass | 58b23a3 | 2022-05-10 11:06:48 +0530 | [diff] [blame] | 251 | Wait Until Keyword Succeeds 120s 2s |
Hardik Windlass | 3901567 | 2021-07-05 05:48:08 +0000 | [diff] [blame] | 252 | ... Verify UNI Port Is Enabled ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${src['onu']} ${src['uni_id']} |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 253 | Disable Device ${onu_device_id} |
Hardik Windlass | 5e214b2 | 2021-02-26 10:37:14 +0000 | [diff] [blame] | 254 | Wait Until Keyword Succeeds ${timeout} 2s Test Devices Disabled in VOLTHA Id=${onu_device_id} |
TorstenThieme | 4e2168e | 2021-06-22 14:01:47 +0000 | [diff] [blame] | 255 | Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command use single connection ${ONOS_SSH_IP} |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 256 | ... ${ONOS_SSH_PORT} volt-remove-subscriber-access ${of_id} ${onu_port} |
Zack Williams | a8fe75a | 2020-01-10 14:25:27 -0700 | [diff] [blame] | 257 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure |
Hardik Windlass | 58b23a3 | 2022-05-10 11:06:48 +0530 | [diff] [blame] | 258 | ... Wait Until Keyword Succeeds ${timeout} 2s Check Ping |
Zack Williams | a8fe75a | 2020-01-10 14:25:27 -0700 | [diff] [blame] | 259 | ... False ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']} |
| 260 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
Hardik Windlass | 5e214b2 | 2021-02-26 10:37:14 +0000 | [diff] [blame] | 261 | ... ELSE Sleep 10s |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 262 | Enable Device ${onu_device_id} |
ubuntu | 6b6e7d4 | 2020-03-02 12:35:42 -0800 | [diff] [blame] | 263 | Wait Until Keyword Succeeds ${timeout} 2s Verify Eapol Flows Added For ONU ${ONOS_SSH_IP} |
Matteo Scandolo | 7e519fb | 2021-08-13 11:35:16 -0700 | [diff] [blame] | 264 | ... ${ONOS_SSH_PORT} ${of_id} ${onu_port} |
Girish Gowdra | fc0bdf2 | 2021-12-06 16:57:50 +0530 | [diff] [blame] | 265 | # Workaround for issue seen in VOL-4489. Keep this workaround until VOL-4489 is fixed. |
| 266 | Run Keyword If ${has_dataplane} Reboot XGSPON ONU ${src['olt']} ${src['onu']} omci-flows-pushed |
| 267 | # Workaround ends here for issue seen in VOL-4489. |
Zack Williams | a8fe75a | 2020-01-10 14:25:27 -0700 | [diff] [blame] | 268 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure |
| 269 | ... Validate Authentication After Reassociate True |
| 270 | ... ${src['dp_iface_name']} ${src['ip']} ${src['user']} ${src['pass']} |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 271 | ... ${src['container_type']} ${src['container_name']} |
ubuntu | 6b6e7d4 | 2020-03-02 12:35:42 -0800 | [diff] [blame] | 272 | Wait Until Keyword Succeeds ${timeout} 2s Verify ONU in AAA-Users ${ONOS_SSH_IP} |
Zack Williams | a8fe75a | 2020-01-10 14:25:27 -0700 | [diff] [blame] | 273 | ... ${ONOS_SSH_PORT} ${onu_port} |
TorstenThieme | 4e2168e | 2021-06-22 14:01:47 +0000 | [diff] [blame] | 274 | Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command use single connection ${ONOS_SSH_IP} |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 275 | ... ${ONOS_SSH_PORT} volt-add-subscriber-access ${of_id} ${onu_port} |
Hardik Windlass | 2180763 | 2020-04-14 16:24:55 +0530 | [diff] [blame] | 276 | # Verify subscriber access flows are added for the ONU port |
Hardik Windlass | 58b23a3 | 2022-05-10 11:06:48 +0530 | [diff] [blame] | 277 | Wait Until Keyword Succeeds ${timeout} 5s |
Hardik Windlass | 2180763 | 2020-04-14 16:24:55 +0530 | [diff] [blame] | 278 | ... Verify Subscriber Access Flows Added For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id} |
| 279 | ... ${onu_port} ${nni_port} ${src['c_tag']} ${src['s_tag']} |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 280 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Validate DHCP and Ping True |
Andy Bavier | 08ae585 | 2019-12-19 09:12:42 -0700 | [diff] [blame] | 281 | ... True ${src['dp_iface_name']} ${src['s_tag']} ${src['c_tag']} ${dst['dp_iface_ip_qinq']} |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 282 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 283 | ... ${dst['dp_iface_name']} ${dst['ip']} ${dst['user']} ${dst['pass']} ${dst['container_type']} |
| 284 | ... ${dst['container_name']} |
Hardik Windlass | 58b23a3 | 2022-05-10 11:06:48 +0530 | [diff] [blame] | 285 | Wait Until Keyword Succeeds ${timeout} 2s |
ubuntu | 6b6e7d4 | 2020-03-02 12:35:42 -0800 | [diff] [blame] | 286 | ... Validate Subscriber DHCP Allocation ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port} |
suraj gour | d5cfdbb | 2019-12-13 12:44:55 +0000 | [diff] [blame] | 287 | END |
suraj gour | d5cfdbb | 2019-12-13 12:44:55 +0000 | [diff] [blame] | 288 | |
Hardik Windlass | 2b37e71 | 2020-06-12 02:13:17 +0530 | [diff] [blame] | 289 | Test Disable and Enable OLT |
| 290 | [Documentation] Validates E2E Ping Connectivity and object states for the given scenario: |
| 291 | ... Assuming that test1 was executed where all the ONUs are authenticated/DHCP/pingable |
| 292 | ... Perform disable on the OLT and validate that the pings do not succeed |
| 293 | ... Perform enable on the OLT and validate that the pings are successful |
Hardik Windlass | 1ed2eee | 2021-06-25 09:51:03 +0000 | [diff] [blame] | 294 | [Tags] functional VOL-2410 DisableEnableOLT multi-uni |
Hardik Windlass | 2b37e71 | 2020-06-12 02:13:17 +0530 | [diff] [blame] | 295 | [Setup] Start Logging DisableEnableOLT |
| 296 | [Teardown] Run Keywords Collect Logs |
| 297 | ... AND Stop Logging DisableEnableOLT |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 298 | #Disable the OLTs and verify the OLT/ONUs are disabled properly |
| 299 | FOR ${I} IN RANGE 0 ${olt_count} |
| 300 | ${olt_serial_number}= Get From Dictionary ${olt_ids}[${I}] sn |
| 301 | ${olt_device_id}= Get OLTDeviceID From OLT List ${olt_serial_number} |
| 302 | ${rc} ${output}= Run and Return Rc and Output |
Matteo Scandolo | 5899be1 | 2020-11-11 15:38:07 -0800 | [diff] [blame] | 303 | ... voltctl -c ${VOLTCTL_CONFIG} device disable ${olt_device_id} |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 304 | Should Be Equal As Integers ${rc} 0 |
| 305 | Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Device DISABLED UNKNOWN REACHABLE |
| 306 | ... ${olt_serial_number} |
| 307 | END |
| 308 | # Validate the ONUs |
| 309 | FOR ${I} IN RANGE 0 ${num_all_onus} |
Hardik Windlass | 2b37e71 | 2020-06-12 02:13:17 +0530 | [diff] [blame] | 310 | ${src}= Set Variable ${hosts.src[${I}]} |
| 311 | ${dst}= Set Variable ${hosts.dst[${I}]} |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 312 | ${of_id}= Get ofID From OLT List ${src['olt']} |
Hardik Windlass | 58b23a3 | 2022-05-10 11:06:48 +0530 | [diff] [blame] | 313 | ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s |
Hardik Windlass | 1ed2eee | 2021-06-25 09:51:03 +0000 | [diff] [blame] | 314 | ... Get ONU Port in ONOS ${src['onu']} ${of_id} ${src['uni_id']} |
Hardik Windlass | 78bb0fd | 2022-06-21 15:11:54 +0530 | [diff] [blame] | 315 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
Hardik Windlass | 2b37e71 | 2020-06-12 02:13:17 +0530 | [diff] [blame] | 316 | Wait Until Keyword Succeeds ${timeout} 5s Validate Device ENABLED DISCOVERED |
| 317 | ... UNREACHABLE ${src['onu']} onu=false |
| 318 | #Verify that ping fails |
| 319 | Run Keyword If ${has_dataplane} |
Hardik Windlass | 58b23a3 | 2022-05-10 11:06:48 +0530 | [diff] [blame] | 320 | ... Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
Hardik Windlass | 2b37e71 | 2020-06-12 02:13:17 +0530 | [diff] [blame] | 321 | ... Check Ping False ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']} |
| 322 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 323 | # Remove Subscriber Access (To replicate ATT workflow) |
TorstenThieme | 4e2168e | 2021-06-22 14:01:47 +0000 | [diff] [blame] | 324 | Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command use single connection ${ONOS_SSH_IP} |
Hardik Windlass | 2b37e71 | 2020-06-12 02:13:17 +0530 | [diff] [blame] | 325 | ... ${ONOS_SSH_PORT} volt-remove-subscriber-access ${of_id} ${onu_port} |
Hardik Windlass | 2b37e71 | 2020-06-12 02:13:17 +0530 | [diff] [blame] | 326 | END |
| 327 | #Enable the OLT back and check ONU, OLT status are back to "ACTIVE" |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 328 | FOR ${I} IN RANGE 0 ${olt_count} |
| 329 | ${olt_serial_number}= Get From Dictionary ${olt_ids}[${I}] sn |
| 330 | ${olt_device_id}= Get OLTDeviceID From OLT List ${olt_serial_number} |
| 331 | Enable Device ${olt_device_id} |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 332 | Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Device ENABLED ACTIVE REACHABLE |
| 333 | ... ${olt_serial_number} |
| 334 | #TODO: Update for PON_OLT ETHERNET_NNI |
| 335 | #Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Port Types |
| 336 | #... PON_OLT ETHERNET_NNI |
| 337 | END |
Hardik Windlass | 2b37e71 | 2020-06-12 02:13:17 +0530 | [diff] [blame] | 338 | Run Keyword If ${has_dataplane} Clean Up Linux |
Hardik Windlass | 58b23a3 | 2022-05-10 11:06:48 +0530 | [diff] [blame] | 339 | Perform Sanity Test |
Hardik Windlass | 2b37e71 | 2020-06-12 02:13:17 +0530 | [diff] [blame] | 340 | |
Suchitra Vemuri | 937cd39 | 2020-01-12 17:10:42 -0800 | [diff] [blame] | 341 | Delete OLT, ReAdd OLT and Perform Sanity Test |
| 342 | [Documentation] Validates E2E Ping Connectivity and object states for the given scenario: |
| 343 | ... Disable and Delete the OLT |
| 344 | ... Create/Enable the same OLT again |
| 345 | ... Validate authentication/DHCP/E2E pings succeed for all the ONUs connected to the OLT |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 346 | [Tags] functional DeleteOLT released notready |
Andy Bavier | e187eda | 2020-04-20 15:00:02 -0700 | [diff] [blame] | 347 | [Setup] Start Logging DeleteOLT |
Andy Bavier | 4a8450e | 2020-02-04 08:58:37 -0700 | [diff] [blame] | 348 | [Teardown] Run Keywords Collect Logs |
Andy Bavier | abeba26 | 2020-02-07 16:22:16 -0700 | [diff] [blame] | 349 | ... AND Stop Logging DeleteOLT |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 350 | #TODO: Update test with new framework changes |
Suchitra Vemuri | 937cd39 | 2020-01-12 17:10:42 -0800 | [diff] [blame] | 351 | Run Keyword If ${has_dataplane} Clean Up Linux |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 352 | FOR ${I} IN RANGE 0 ${olt_count} |
| 353 | ${olt_serial_number}= Get From Dictionary ${olt_ids}[${I}] sn |
| 354 | ${of_id}= Get ofID From OLT List ${olt_serial_number} |
| 355 | Delete Device and Verify ${olt_serial_number} |
| 356 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 357 | ... Verify Device Flows Removed ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id} |
| 358 | END |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 359 | Run Keyword If ${has_dataplane} Clean Up Linux |
Suchitra Vemuri | 937cd39 | 2020-01-12 17:10:42 -0800 | [diff] [blame] | 360 | # Recreate the OLT |
Hardik Windlass | 480f3e2 | 2020-04-02 20:14:14 +0530 | [diff] [blame] | 361 | Setup |
Suchitra Vemuri | 937cd39 | 2020-01-12 17:10:42 -0800 | [diff] [blame] | 362 | Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test |
Suchitra Vemuri | 937cd39 | 2020-01-12 17:10:42 -0800 | [diff] [blame] | 363 | |
Hema | 567f301 | 2020-03-25 00:51:53 +0530 | [diff] [blame] | 364 | Check Mib State on OLT recreation after ONU, OLT deletion |
| 365 | [Documentation] Assuming that test1 was executed where all the ONUs are authenticated/DHCP/pingable, |
| 366 | ... Disable and Delete the ONU, Disable and Delete the OLT |
| 367 | ... Create/Enable the OLT again and Check for the Mib State of the ONUs |
| 368 | [Tags] functional CheckMibState notready |
Andy Bavier | e187eda | 2020-04-20 15:00:02 -0700 | [diff] [blame] | 369 | [Setup] Start Logging CheckMibState |
Hema | 567f301 | 2020-03-25 00:51:53 +0530 | [diff] [blame] | 370 | [Teardown] Run Keywords Collect Logs |
| 371 | ... AND Stop Logging CheckMibState |
Hema | 567f301 | 2020-03-25 00:51:53 +0530 | [diff] [blame] | 372 | #Disable and Delete the ONU |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 373 | FOR ${I} IN RANGE 0 ${num_all_onus} |
Hema | 567f301 | 2020-03-25 00:51:53 +0530 | [diff] [blame] | 374 | ${src}= Set Variable ${hosts.src[${I}]} |
| 375 | ${dst}= Set Variable ${hosts.dst[${I}]} |
Hema | 567f301 | 2020-03-25 00:51:53 +0530 | [diff] [blame] | 376 | ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']} |
Hardik Windlass | 1ed2eee | 2021-06-25 09:51:03 +0000 | [diff] [blame] | 377 | ... ${of_id} ${src['uni_id']} |
Hema | 567f301 | 2020-03-25 00:51:53 +0530 | [diff] [blame] | 378 | Disable Device ${onu_device_id} |
| 379 | Wait Until Keyword Succeeds 20s 2s Test Devices Disabled in VOLTHA Id=${onu_device_id} |
| 380 | Delete Device ${onu_device_id} |
| 381 | END |
| 382 | #Disable and Delete the OLT |
Hardik Windlass | 480f3e2 | 2020-04-02 20:14:14 +0530 | [diff] [blame] | 383 | Delete Device and Verify |
| 384 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 385 | ... Verify Device Flows Removed ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id} |
| 386 | # Recreate the OLT |
Hema | 567f301 | 2020-03-25 00:51:53 +0530 | [diff] [blame] | 387 | Run Keyword If ${has_dataplane} Sleep 180s |
Andrea Campanella | 3dcce27 | 2021-01-15 16:04:47 +0100 | [diff] [blame] | 388 | # This dneeds to be done in for loop, test is not ready |
| 389 | ${olt_device_id}= Run Keyword If "${list_olts}[${I}][type]" == "${None}" |
Suchitra Vemuri | 09f878d | 2021-02-10 18:19:04 -0800 | [diff] [blame] | 390 | ... Create Device ${list_olts}[${I}][ip] ${list_olts}[${I}][oltport] |
| 391 | ... ELSE Create Device ${list_olts}[${I}][ip] ${list_olts}[${I}][oltport] ${list_olts}[${I}][type] |
Hema | 567f301 | 2020-03-25 00:51:53 +0530 | [diff] [blame] | 392 | Set Suite Variable ${olt_device_id} |
| 393 | Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Device PREPROVISIONED |
Hardik Windlass | 8b44649 | 2021-06-10 06:25:23 +0000 | [diff] [blame] | 394 | ... UNKNOWN UNKNOWN ${olt_device_id} by_dev_id=True |
Hema | 567f301 | 2020-03-25 00:51:53 +0530 | [diff] [blame] | 395 | Enable Device ${olt_device_id} |
| 396 | Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Device ENABLED ACTIVE REACHABLE |
| 397 | ... ${olt_serial_number} |
| 398 | #Check for the ONU status and ONU Mib State should be "omci-flows-pushed" |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 399 | FOR ${I} IN RANGE 0 ${num_all_onus} |
Hema | 567f301 | 2020-03-25 00:51:53 +0530 | [diff] [blame] | 400 | ${src}= Set Variable ${hosts.src[${I}]} |
| 401 | ${dst}= Set Variable ${hosts.dst[${I}]} |
| 402 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
| 403 | ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']} |
Hardik Windlass | 1ed2eee | 2021-06-25 09:51:03 +0000 | [diff] [blame] | 404 | ... ${of_id} ${src['uni_id']} |
Suchitra Vemuri | cdc32d8 | 2020-07-17 12:24:46 -0700 | [diff] [blame] | 405 | Wait Until Keyword Succeeds 180s 5s Validate Device ENABLED ACTIVE |
Hema | 567f301 | 2020-03-25 00:51:53 +0530 | [diff] [blame] | 406 | ... REACHABLE ${src['onu']} onu=True onu_reason=omci-flows-pushed |
| 407 | END |
| 408 | |
Hema | 783279b | 2020-01-22 15:37:37 +0530 | [diff] [blame] | 409 | Test disable ONUs and OLT then delete ONUs and OLT |
| 410 | [Documentation] On deployed POD, disable the ONU, disable the OLT and then delete ONU and OLT. |
| 411 | ... This TC is to confirm that ONU removal is not impacting OLT |
| 412 | ... Devices will be removed during the execution of this TC |
| 413 | ... so calling setup at the end to add the devices back to avoid the confusion. |
Suchitra Vemuri | a7dae32 | 2020-02-19 22:38:18 -0800 | [diff] [blame] | 414 | [Tags] functional VOL-2354 DisableDeleteONUandOLT released |
Andy Bavier | e187eda | 2020-04-20 15:00:02 -0700 | [diff] [blame] | 415 | [Setup] Start Logging DisableDeleteONUandOLT |
Andy Bavier | 4a8450e | 2020-02-04 08:58:37 -0700 | [diff] [blame] | 416 | [Teardown] Run Keywords Collect Logs |
Andy Bavier | abeba26 | 2020-02-07 16:22:16 -0700 | [diff] [blame] | 417 | ... AND Stop Logging DisableDeleteONUandOLT |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 418 | #${olt_device_id}= Get Device ID From SN ${olt_serial_number} |
Suchitra Vemuri | 0217055 | 2021-03-23 16:40:50 -0700 | [diff] [blame] | 419 | @{onu_reason}= Create List tech-profile-config-downloaded-success omci-flows-pushed |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 420 | FOR ${I} IN RANGE 0 ${num_all_onus} |
Hema | 783279b | 2020-01-22 15:37:37 +0530 | [diff] [blame] | 421 | ${src}= Set Variable ${hosts.src[${I}]} |
| 422 | ${dst}= Set Variable ${hosts.dst[${I}]} |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 423 | ${of_id}= Get ofID From OLT List ${src['olt']} |
Hema | 783279b | 2020-01-22 15:37:37 +0530 | [diff] [blame] | 424 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
Hardik Windlass | 58b23a3 | 2022-05-10 11:06:48 +0530 | [diff] [blame] | 425 | Wait Until Keyword Succeeds 360s 5s |
Suchitra Vemuri | 014b603 | 2020-02-14 18:13:13 -0800 | [diff] [blame] | 426 | ... Validate Device ENABLED ACTIVE |
Suchitra Vemuri | 0217055 | 2021-03-23 16:40:50 -0700 | [diff] [blame] | 427 | ... REACHABLE ${src['onu']} onu=True onu_reason=${onu_reason} |
Hardik Windlass | 58b23a3 | 2022-05-10 11:06:48 +0530 | [diff] [blame] | 428 | Wait Until Keyword Succeeds ${timeout} 5s |
Suchitra Vemuri | 014b603 | 2020-02-14 18:13:13 -0800 | [diff] [blame] | 429 | ... Validate OLT Device ENABLED ACTIVE |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 430 | ... REACHABLE ${src['olt']} |
Hema | 783279b | 2020-01-22 15:37:37 +0530 | [diff] [blame] | 431 | ${rc} ${output}= Run and Return Rc and Output |
Matteo Scandolo | 5899be1 | 2020-11-11 15:38:07 -0800 | [diff] [blame] | 432 | ... voltctl -c ${VOLTCTL_CONFIG} device disable ${onu_device_id} |
Hema | 783279b | 2020-01-22 15:37:37 +0530 | [diff] [blame] | 433 | Should Be Equal As Integers ${rc} 0 |
Hardik Windlass | 58b23a3 | 2022-05-10 11:06:48 +0530 | [diff] [blame] | 434 | Wait Until Keyword Succeeds ${timeout} 5s |
Suchitra Vemuri | 014b603 | 2020-02-14 18:13:13 -0800 | [diff] [blame] | 435 | ... Validate Device DISABLED UNKNOWN |
Hema | 783279b | 2020-01-22 15:37:37 +0530 | [diff] [blame] | 436 | ... REACHABLE ${src['onu']} onu=false |
Hardik Windlass | 58b23a3 | 2022-05-10 11:06:48 +0530 | [diff] [blame] | 437 | Wait Until Keyword Succeeds 360s 5s |
Suchitra Vemuri | 014b603 | 2020-02-14 18:13:13 -0800 | [diff] [blame] | 438 | ... Validate OLT Device ENABLED ACTIVE |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 439 | ... REACHABLE ${src['olt']} |
Hema | 783279b | 2020-01-22 15:37:37 +0530 | [diff] [blame] | 440 | END |
Matteo Scandolo | 5899be1 | 2020-11-11 15:38:07 -0800 | [diff] [blame] | 441 | |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 442 | # Disable all OLTs |
| 443 | FOR ${I} IN RANGE 0 ${olt_count} |
| 444 | ${olt_serial_number}= Get From Dictionary ${olt_ids}[${I}] sn |
| 445 | ${olt_device_id}= Get OLTDeviceID From OLT List ${olt_serial_number} |
| 446 | ${rc} ${output}= Run and Return Rc and Output |
Matteo Scandolo | 5899be1 | 2020-11-11 15:38:07 -0800 | [diff] [blame] | 447 | ... voltctl -c ${VOLTCTL_CONFIG} device disable ${olt_device_id} |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 448 | Should Be Equal As Integers ${rc} 0 |
| 449 | Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Device DISABLED UNKNOWN REACHABLE |
| 450 | ... ${olt_serial_number} |
| 451 | END |
| 452 | # Validate ONUs after OLT disable |
| 453 | FOR ${I} IN RANGE 0 ${num_all_onus} |
Hema | 783279b | 2020-01-22 15:37:37 +0530 | [diff] [blame] | 454 | ${src}= Set Variable ${hosts.src[${I}]} |
| 455 | ${dst}= Set Variable ${hosts.dst[${I}]} |
| 456 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
Hardik Windlass | 58b23a3 | 2022-05-10 11:06:48 +0530 | [diff] [blame] | 457 | Wait Until Keyword Succeeds ${timeout} 5s |
Suchitra Vemuri | 014b603 | 2020-02-14 18:13:13 -0800 | [diff] [blame] | 458 | ... Validate Device DISABLED DISCOVERED |
| 459 | ... UNREACHABLE ${src['onu']} onu=false |
Hardik Windlass | 7da42ca | 2020-03-13 14:25:44 +0530 | [diff] [blame] | 460 | Delete Device ${onu_device_id} |
Hardik Windlass | 58b23a3 | 2022-05-10 11:06:48 +0530 | [diff] [blame] | 461 | Wait Until Keyword Succeeds ${timeout} 5s |
Suchitra Vemuri | 014b603 | 2020-02-14 18:13:13 -0800 | [diff] [blame] | 462 | ... Validate OLT Device DISABLED UNKNOWN |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 463 | ... REACHABLE ${src['olt']} |
Hema | 783279b | 2020-01-22 15:37:37 +0530 | [diff] [blame] | 464 | END |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 465 | # Delete all OLTs |
| 466 | Delete All Devices and Verify |
Hardik Windlass | 1ed2eee | 2021-06-25 09:51:03 +0000 | [diff] [blame] | 467 | # Re-create the Devices and Perform Sanity |
| 468 | Setup |
| 469 | Run Keyword If ${has_dataplane} Clean Up Linux |
Hardik Windlass | 58b23a3 | 2022-05-10 11:06:48 +0530 | [diff] [blame] | 470 | Perform Sanity Test |
David Bainbridge | f81cd64 | 2019-11-20 00:14:47 +0000 | [diff] [blame] | 471 | |
Suchitra Vemuri | 9a6dd6d | 2020-02-28 17:46:26 -0800 | [diff] [blame] | 472 | Validate authentication on a disabled ONU |
suraj gour | 472da1c | 2020-02-25 05:44:51 +0000 | [diff] [blame] | 473 | [Documentation] Assuming that test1 was executed where all the ONUs are authenticated/DHCP/pingable |
| 474 | ... Perform disable on the ONUs and validate that the authentication do not succeed |
| 475 | ... Perform enable on the ONUs and validate that authentication successful |
Hardik Windlass | 1ed2eee | 2021-06-25 09:51:03 +0000 | [diff] [blame] | 476 | [Tags] functional DisableONU_AuthCheck multi-uni |
Suchitra Vemuri | f7a033c | 2020-02-26 17:22:41 -0800 | [diff] [blame] | 477 | # Creates Devices in the Setup |
Hardik Windlass | 1ed2eee | 2021-06-25 09:51:03 +0000 | [diff] [blame] | 478 | [Setup] Start Logging DisableONU_AuthCheck |
Suchitra Vemuri | f7a033c | 2020-02-26 17:22:41 -0800 | [diff] [blame] | 479 | [Teardown] Run Keywords Collect Logs |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 480 | ... AND Delete All Devices and Verify |
Girish Gowdra | f244d5b | 2021-09-01 17:16:16 -0700 | [diff] [blame] | 481 | ... AND Run Keyword If ${logging} Collect Logs |
| 482 | ... AND Stop Logging DisableONU_AuthCheck |
Suchitra Vemuri | f7a033c | 2020-02-26 17:22:41 -0800 | [diff] [blame] | 483 | Clean WPA Process |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 484 | FOR ${I} IN RANGE 0 ${num_all_onus} |
suraj gour | 472da1c | 2020-02-25 05:44:51 +0000 | [diff] [blame] | 485 | ${src}= Set Variable ${hosts.src[${I}]} |
| 486 | ${dst}= Set Variable ${hosts.dst[${I}]} |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 487 | ${of_id}= Get ofID From OLT List ${src['olt']} |
suraj gour | 472da1c | 2020-02-25 05:44:51 +0000 | [diff] [blame] | 488 | ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']} |
Hardik Windlass | 1ed2eee | 2021-06-25 09:51:03 +0000 | [diff] [blame] | 489 | ... ${of_id} ${src['uni_id']} |
Hardik Windlass | 78bb0fd | 2022-06-21 15:11:54 +0530 | [diff] [blame] | 490 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
suraj gour | 472da1c | 2020-02-25 05:44:51 +0000 | [diff] [blame] | 491 | Disable Device ${onu_device_id} |
| 492 | Wait Until Keyword Succeeds ${timeout} 5s Validate Device DISABLED UNKNOWN |
| 493 | ... REACHABLE ${src['onu']} onu=false |
Andy Bavier | 84834d4 | 2020-02-25 13:49:50 -0700 | [diff] [blame] | 494 | ${wpa_log}= Run Keyword If ${has_dataplane} Catenate SEPARATOR=. |
| 495 | ... /tmp/wpa ${src['dp_iface_name']} log |
Suchitra Vemuri | f7a033c | 2020-02-26 17:22:41 -0800 | [diff] [blame] | 496 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Validate Authentication False |
| 497 | ... ${src['dp_iface_name']} wpa_supplicant.conf ${src['ip']} ${src['user']} ${src['pass']} |
Andy Bavier | 84834d4 | 2020-02-25 13:49:50 -0700 | [diff] [blame] | 498 | ... ${src['container_type']} ${src['container_name']} ${wpa_log} |
Suchitra Vemuri | f7a033c | 2020-02-26 17:22:41 -0800 | [diff] [blame] | 499 | Enable Device ${onu_device_id} |
| 500 | Run Keyword And Ignore Error Kill Linux Process [w]pa_supplicant ${src['ip']} |
| 501 | ... ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
Hardik Windlass | 58b23a3 | 2022-05-10 11:06:48 +0530 | [diff] [blame] | 502 | Wait Until Keyword Succeeds ${timeout} 5s Validate Device |
Suchitra Vemuri | f7a033c | 2020-02-26 17:22:41 -0800 | [diff] [blame] | 503 | ... ENABLED ACTIVE REACHABLE ${src['onu']} onu=True onu_reason=omci-flows-pushed |
| 504 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Validate Authentication True |
| 505 | ... ${src['dp_iface_name']} wpa_supplicant.conf ${src['ip']} ${src['user']} ${src['pass']} |
Andy Bavier | 84834d4 | 2020-02-25 13:49:50 -0700 | [diff] [blame] | 506 | ... ${src['container_type']} ${src['container_name']} ${wpa_log} |
suraj gour | 472da1c | 2020-02-25 05:44:51 +0000 | [diff] [blame] | 507 | Run Keyword and Ignore Error Get Device Output from Voltha ${onu_device_id} |
| 508 | END |
suraj gour | 472da1c | 2020-02-25 05:44:51 +0000 | [diff] [blame] | 509 | |
Gayathri.Selvan | 92d1686 | 2020-03-19 14:47:58 +0000 | [diff] [blame] | 510 | Data plane verification using TCP |
| 511 | [Documentation] Test bandwidth profile is met and not exceeded for each subscriber. |
| 512 | ... Assumes iperf3 and jq installed on client and iperf -s running on DHCP server |
Matteo Scandolo | ab48f9e | 2021-06-11 17:08:00 +0200 | [diff] [blame] | 513 | [Tags] non-critical dataplane BandwidthProfileTCP VOL-2052 |
Andy Bavier | dfbcaef | 2020-05-27 15:34:18 -0700 | [diff] [blame] | 514 | [Setup] Start Logging BandwidthProfileTCP |
| 515 | [Teardown] Run Keywords Collect Logs |
| 516 | ... AND Stop Logging BandwidthProfileTCP |
Andy Bavier | eff938d | 2020-06-29 18:27:49 -0700 | [diff] [blame] | 517 | Pass Execution If '${has_dataplane}'=='False' |
| 518 | ... Bandwidth profile validation can be done only in physical pod. Skipping this test in BBSIM. |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 519 | Delete All Devices And Verify |
| 520 | Run Keyword If ${has_dataplane} Clean Up Linux |
| 521 | setup |
Hardik Windlass | 58b23a3 | 2022-05-10 11:06:48 +0530 | [diff] [blame] | 522 | Perform Sanity Test |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 523 | |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 524 | FOR ${I} IN RANGE 0 ${num_all_onus} |
Gayathri.Selvan | 92d1686 | 2020-03-19 14:47:58 +0000 | [diff] [blame] | 525 | ${src}= Set Variable ${hosts.src[${I}]} |
| 526 | ${dst}= Set Variable ${hosts.dst[${I}]} |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 527 | ${of_id}= Get ofID From OLT List ${src['olt']} |
Andy Bavier | f6ab19c | 2020-05-14 10:34:47 -0700 | [diff] [blame] | 528 | |
| 529 | # Check for iperf3 and jq tools |
| 530 | ${stdout} ${stderr} ${rc}= Execute Remote Command which iperf3 jq |
| 531 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 532 | Pass Execution If ${rc} != 0 Skipping test: iperf3 / jq not found on the RG |
| 533 | |
Gayathri.Selvan | 92d1686 | 2020-03-19 14:47:58 +0000 | [diff] [blame] | 534 | ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']} |
Hardik Windlass | 1ed2eee | 2021-06-25 09:51:03 +0000 | [diff] [blame] | 535 | ... ${of_id} ${src['uni_id']} |
Gayathri.Selvan | 92d1686 | 2020-03-19 14:47:58 +0000 | [diff] [blame] | 536 | ${subscriber_id}= Set Variable ${of_id}/${onu_port} |
| 537 | ${bandwidth_profile_name} Get Bandwidth Profile Name For Given Subscriber ${subscriber_id} |
| 538 | ... upstreamBandwidthProfile |
Girish Gowdra | d769b41 | 2021-05-16 11:09:46 -0700 | [diff] [blame] | 539 | ${limiting_bw_value_upstream} Get Limiting Bandwidth Details ${bandwidth_profile_name} |
Gayathri.Selvan | 92d1686 | 2020-03-19 14:47:58 +0000 | [diff] [blame] | 540 | ${bandwidth_profile_name} Get Bandwidth Profile Name For Given Subscriber ${subscriber_id} |
| 541 | ... downstreamBandwidthProfile |
Girish Gowdra | d769b41 | 2021-05-16 11:09:46 -0700 | [diff] [blame] | 542 | ${limiting_bw_value_dnstream} Get Limiting Bandwidth Details ${bandwidth_profile_name} |
Gayathri.Selvan | 92d1686 | 2020-03-19 14:47:58 +0000 | [diff] [blame] | 543 | |
| 544 | # Stream TCP packets from RG to server |
| 545 | ${updict}= Run Iperf3 Test Client ${src} server=${dst['dp_iface_ip_qinq']} |
| 546 | ... args=-t 30 |
| 547 | ${actual_upstream_bw_used}= Evaluate ${updict['end']['sum_received']['bits_per_second']}/1000 |
| 548 | |
| 549 | # Stream TCP packets from server to RG |
| 550 | ${dndict}= Run Iperf3 Test Client ${src} server=${dst['dp_iface_ip_qinq']} |
| 551 | ... args=-R -t 30 |
| 552 | ${actual_dnstream_bw_used}= Evaluate ${dndict['end']['sum_received']['bits_per_second']}/1000 |
| 553 | |
| 554 | ${pct_limit_up}= Evaluate 100*${actual_upstream_bw_used}/${limiting_bw_value_upstream} |
| 555 | ${pct_limit_dn}= Evaluate 100*${actual_dnstream_bw_used}/${limiting_bw_value_dnstream} |
| 556 | Log Up: bwprof ${limiting_bw_value_upstream}Kbps, got ${actual_upstream_bw_used}Kbps (${pct_limit_up}%) |
| 557 | Log Down: bwprof ${limiting_bw_value_dnstream}Kbps, got ${actual_dnstream_bw_used}Kbps (${pct_limit_dn}%) |
| 558 | |
| 559 | Should Be True ${pct_limit_up} <= ${upper_margin_pct} |
| 560 | ... The upstream bandwidth exceeded the limit (${pct_limit_up}% of limit) |
Andy Bavier | eff938d | 2020-06-29 18:27:49 -0700 | [diff] [blame] | 561 | # VOL-3125: downstream bw limit not enforced. Uncomment when fixed. |
| 562 | #Should Be True ${pct_limit_dn} <= ${upper_margin_pct} |
| 563 | #... The downstream bandwidth exceeded the limit (${pct_limit_dn}% of limit) |
Gayathri.Selvan | 92d1686 | 2020-03-19 14:47:58 +0000 | [diff] [blame] | 564 | Should Be True ${pct_limit_up} >= ${lower_margin_pct} |
| 565 | ... The upstream bandwidth guarantee was not met (${pct_limit_up}% of resv) |
| 566 | Should Be True ${pct_limit_dn} >= ${lower_margin_pct} |
| 567 | ... The downstream bandwidth guarantee was not met (${pct_limit_dn}% of resv) |
| 568 | END |
| 569 | |
| 570 | Data plane verification using UDP |
| 571 | [Documentation] Test bandwidth profile is met and not exceeded for each subscriber. |
| 572 | ... Assumes iperf3 and jq installed on client and iperf -s running on DHCP server |
Matteo Scandolo | ab48f9e | 2021-06-11 17:08:00 +0200 | [diff] [blame] | 573 | [Tags] non-critical dataplane BandwidthProfileUDP VOL-2052 |
Andy Bavier | dfbcaef | 2020-05-27 15:34:18 -0700 | [diff] [blame] | 574 | [Setup] Start Logging BandwidthProfileUDP |
| 575 | [Teardown] Run Keywords Collect Logs |
| 576 | ... AND Stop Logging BandwidthProfileUDP |
Andy Bavier | eff938d | 2020-06-29 18:27:49 -0700 | [diff] [blame] | 577 | Pass Execution If '${has_dataplane}'=='False' |
| 578 | ... Bandwidth profile validation can be done only in physical pod. Skipping this test in BBSIM. |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 579 | FOR ${I} IN RANGE 0 ${num_all_onus} |
Gayathri.Selvan | 92d1686 | 2020-03-19 14:47:58 +0000 | [diff] [blame] | 580 | ${src}= Set Variable ${hosts.src[${I}]} |
| 581 | ${dst}= Set Variable ${hosts.dst[${I}]} |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 582 | ${of_id}= Get ofID From OLT List ${src['olt']} |
Andy Bavier | d59f977 | 2020-07-01 12:00:42 -0700 | [diff] [blame] | 583 | |
| 584 | # Check for iperf3 and jq tools |
| 585 | ${stdout} ${stderr} ${rc}= Execute Remote Command which iperf3 jq |
| 586 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 587 | Pass Execution If ${rc} != 0 Skipping test: iperf3 / jq not found on the RG |
| 588 | |
Gayathri.Selvan | 92d1686 | 2020-03-19 14:47:58 +0000 | [diff] [blame] | 589 | ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']} |
Hardik Windlass | 1ed2eee | 2021-06-25 09:51:03 +0000 | [diff] [blame] | 590 | ... ${of_id} ${src['uni_id']} |
Gayathri.Selvan | 92d1686 | 2020-03-19 14:47:58 +0000 | [diff] [blame] | 591 | ${subscriber_id}= Set Variable ${of_id}/${onu_port} |
| 592 | ${bandwidth_profile_name} Get Bandwidth Profile Name For Given Subscriber ${subscriber_id} |
| 593 | ... upstreamBandwidthProfile |
Girish Gowdra | d769b41 | 2021-05-16 11:09:46 -0700 | [diff] [blame] | 594 | ${limiting_bw_value_upstream} Get Limiting Bandwidth Details ${bandwidth_profile_name} |
Gayathri.Selvan | 92d1686 | 2020-03-19 14:47:58 +0000 | [diff] [blame] | 595 | ${bandwidth_profile_name} Get Bandwidth Profile Name For Given Subscriber ${subscriber_id} |
| 596 | ... downstreamBandwidthProfile |
Girish Gowdra | d769b41 | 2021-05-16 11:09:46 -0700 | [diff] [blame] | 597 | ${limiting_bw_value_dnstream} Get Limiting Bandwidth Details ${bandwidth_profile_name} |
Gayathri.Selvan | 92d1686 | 2020-03-19 14:47:58 +0000 | [diff] [blame] | 598 | |
| 599 | # Stream UDP packets from RG to server |
Andrea Campanella | 1d34bfc | 2020-08-06 09:58:49 +0200 | [diff] [blame] | 600 | ${uprate}= Run Keyword If ${limiting_bw_value_upstream} != 1000000 |
| 601 | ... Evaluate ${limiting_bw_value_upstream}*${udp_rate_multiplier} |
Andrea Campanella | 29341a3 | 2020-08-03 22:06:26 +0200 | [diff] [blame] | 602 | ... ELSE |
Andrea Campanella | 1d34bfc | 2020-08-06 09:58:49 +0200 | [diff] [blame] | 603 | ... Set Variable ${limiting_bw_value_upstream} |
Gayathri.Selvan | 92d1686 | 2020-03-19 14:47:58 +0000 | [diff] [blame] | 604 | ${updict}= Run Iperf3 Test Client ${src} server=${dst['dp_iface_ip_qinq']} |
Andy Bavier | 7dc5062 | 2020-05-28 14:34:12 -0700 | [diff] [blame] | 605 | ... args=-u -b ${uprate}K -t 30 -l ${udp_packet_bytes} --pacing-timer 0 |
Gayathri.Selvan | 92d1686 | 2020-03-19 14:47:58 +0000 | [diff] [blame] | 606 | # With UDP test, bits per second is the sending rate. Multiply by the loss rate to get the throughput. |
| 607 | ${actual_upstream_bw_used}= Evaluate |
| 608 | ... (100 - ${updict['end']['sum']['lost_percent']})*${updict['end']['sum']['bits_per_second']}/100000 |
| 609 | |
| 610 | # Stream UDP packets from server to RG |
Andrea Campanella | 1d34bfc | 2020-08-06 09:58:49 +0200 | [diff] [blame] | 611 | ${dnrate}= Run Keyword If ${limiting_bw_value_dnstream} != 1000000 |
| 612 | ... Evaluate ${limiting_bw_value_dnstream}*${udp_rate_multiplier} |
Andrea Campanella | 29341a3 | 2020-08-03 22:06:26 +0200 | [diff] [blame] | 613 | ... ELSE |
Andrea Campanella | 1d34bfc | 2020-08-06 09:58:49 +0200 | [diff] [blame] | 614 | ... Set Variable ${limiting_bw_value_dnstream} |
Gayathri.Selvan | 92d1686 | 2020-03-19 14:47:58 +0000 | [diff] [blame] | 615 | ${dndict}= Run Iperf3 Test Client ${src} server=${dst['dp_iface_ip_qinq']} |
Andy Bavier | 7dc5062 | 2020-05-28 14:34:12 -0700 | [diff] [blame] | 616 | ... args=-u -b ${dnrate}K -R -t 30 -l ${udp_packet_bytes} --pacing-timer 0 |
Gayathri.Selvan | 92d1686 | 2020-03-19 14:47:58 +0000 | [diff] [blame] | 617 | # With UDP test, bits per second is the sending rate. Multiply by the loss rate to get the throughput. |
| 618 | ${actual_dnstream_bw_used}= Evaluate |
| 619 | ... (100 - ${dndict['end']['sum']['lost_percent']})*${dndict['end']['sum']['bits_per_second']}/100000 |
| 620 | |
| 621 | ${pct_limit_up}= Evaluate 100*${actual_upstream_bw_used}/${limiting_bw_value_upstream} |
| 622 | ${pct_limit_dn}= Evaluate 100*${actual_dnstream_bw_used}/${limiting_bw_value_dnstream} |
| 623 | Log Up: bwprof ${limiting_bw_value_upstream}Kbps, got ${actual_upstream_bw_used}Kbps (${pct_limit_up}%) |
| 624 | Log Down: bwprof ${limiting_bw_value_dnstream}Kbps, got ${actual_dnstream_bw_used}Kbps (${pct_limit_dn}%) |
| 625 | |
| 626 | Should Be True ${pct_limit_up} <= ${upper_margin_pct} |
| 627 | ... The upstream bandwidth exceeded the limit (${pct_limit_up}% of limit) |
Andy Bavier | eff938d | 2020-06-29 18:27:49 -0700 | [diff] [blame] | 628 | # VOL-3125: downstream bw limit not enforced. Uncomment when fixed. |
| 629 | #Should Be True ${pct_limit_dn} <= ${upper_margin_pct} |
| 630 | #... The downstream bandwidth exceeded the limit (${pct_limit_dn}% of limit) |
Gayathri.Selvan | 92d1686 | 2020-03-19 14:47:58 +0000 | [diff] [blame] | 631 | Should Be True ${pct_limit_up} >= ${lower_margin_pct} |
| 632 | ... The upstream bandwidth guarantee was not met (${pct_limit_up}% of resv) |
| 633 | Should Be True ${pct_limit_dn} >= ${lower_margin_pct} |
| 634 | ... The downstream bandwidth guarantee was not met (${pct_limit_dn}% of resv) |
| 635 | END |
Suchitra Vemuri | f7a033c | 2020-02-26 17:22:41 -0800 | [diff] [blame] | 636 | |
Suraj Gour | 3365127 | 2020-05-04 10:10:16 +0530 | [diff] [blame] | 637 | Validate parsing of data traffic through voltha using tech profile |
| 638 | [Documentation] Assuming that test1 was executed where all the ONUs are authenticated/DHCP/pingable |
| 639 | ... Prerequisite tools : Tcpdump and Mausezahn traffic generator on both RG and DHCP/BNG VMs |
| 640 | ... Install jq tool to read json file, where test suite is being running |
Girish Gowdra | bbfbbc3 | 2021-05-17 14:36:58 -0700 | [diff] [blame] | 641 | ... This test sends TCP packets with pbits between 0 and 7 and validates that |
Suraj Gour | 3365127 | 2020-05-04 10:10:16 +0530 | [diff] [blame] | 642 | ... the pbits are preserved by the PON. |
Hardik Windlass | 04d791e | 2021-07-12 16:23:13 +0000 | [diff] [blame] | 643 | [Tags] dataplane TechProfile VOL-2054 notready |
Suraj Gour | 3365127 | 2020-05-04 10:10:16 +0530 | [diff] [blame] | 644 | [Setup] Start Logging TechProfile |
| 645 | [Teardown] Run Keywords Collect Logs |
| 646 | ... AND Stop Logging TechProfile |
| 647 | Pass Execution If '${has_dataplane}'=='False' |
| 648 | ... Skipping test: Technology profile validation can be done only in physical pod |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 649 | FOR ${I} IN RANGE 0 ${num_all_onus} |
Suraj Gour | 3365127 | 2020-05-04 10:10:16 +0530 | [diff] [blame] | 650 | ${src}= Set Variable ${hosts.src[${I}]} |
| 651 | ${dst}= Set Variable ${hosts.dst[${I}]} |
| 652 | |
| 653 | ${bng_ip}= Get Variable Value ${dst['noroot_ip']} |
| 654 | ${bng_user}= Get Variable Value ${dst['noroot_user']} |
| 655 | ${bng_pass}= Get Variable Value ${dst['noroot_pass']} |
Andy Bavier | f4b7d1d | 2020-06-30 11:14:04 -0700 | [diff] [blame] | 656 | Pass Execution If "${bng_ip}" == "${NONE}" or "${bng_user}" == "${NONE}" or "${bng_pass}" == "${NONE}" |
Suraj Gour | 3365127 | 2020-05-04 10:10:16 +0530 | [diff] [blame] | 657 | ... Skipping test: credentials for BNG login required in deployment config |
| 658 | |
| 659 | ${stdout} ${stderr} ${rc}= Execute Remote Command which mausezahn tcpdump |
| 660 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 661 | Pass Execution If ${rc} != 0 Skipping test: mausezahn / tcpdump not found on the RG |
| 662 | ${stdout} ${stderr} ${rc}= Execute Remote Command which mausezahn tcpdump |
| 663 | ... ${bng_ip} ${bng_user} ${bng_pass} ${dst['container_type']} ${dst['container_name']} |
| 664 | Pass Execution If ${rc} != 0 Skipping test: mausezahn / tcpdump not found on the BNG |
| 665 | Log Upstream test |
Andy Bavier | eff938d | 2020-06-29 18:27:49 -0700 | [diff] [blame] | 666 | Run Keyword If ${has_dataplane} Create traffic with each pbit and capture at other end |
Suraj Gour | 3365127 | 2020-05-04 10:10:16 +0530 | [diff] [blame] | 667 | ... ${dst['dp_iface_ip_qinq']} ${dst['dp_iface_name']} ${src['dp_iface_name']} |
Girish Gowdra | 66cd95d | 2021-07-08 10:31:54 -0700 | [diff] [blame] | 668 | ... 0 tcp 0 ${src['s_tag']} upstream vlan |
Suraj Gour | 3365127 | 2020-05-04 10:10:16 +0530 | [diff] [blame] | 669 | ... ${bng_ip} ${bng_user} ${bng_pass} ${dst['container_type']} ${dst['container_name']} |
| 670 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 671 | Log Downstream test |
| 672 | ${rg_ip} ${stderr} ${rc}= Execute Remote Command |
| 673 | ... ifconfig ${src['dp_iface_name']} | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1 }' |
| 674 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 675 | Should Be Equal As Integers ${rc} 0 Could not get RG's IP address |
Andy Bavier | eff938d | 2020-06-29 18:27:49 -0700 | [diff] [blame] | 676 | Run Keyword If ${has_dataplane} Create traffic with each pbit and capture at other end |
Girish Gowdra | 66cd95d | 2021-07-08 10:31:54 -0700 | [diff] [blame] | 677 | ... ${rg_ip} ${src['dp_iface_name']} ${dst['dp_iface_name']} |
| 678 | ... 0 tcp ${src['c_tag']} ${src['s_tag']} downstream tcp |
Suraj Gour | 3365127 | 2020-05-04 10:10:16 +0530 | [diff] [blame] | 679 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 680 | ... ${bng_ip} ${bng_user} ${bng_pass} ${dst['container_type']} ${dst['container_name']} |
| 681 | END |
| 682 | |
Hardik Windlass | 16cdf96 | 2020-04-29 15:26:50 +0530 | [diff] [blame] | 683 | Test Disable and Enable OLT PON Port |
| 684 | [Documentation] Validates E2E Ping Connectivity and object states for the given scenario: |
| 685 | ... Assuming that all the ONUs are DHCP/pingable (i.e. assuming sanityDt test was executed) |
| 686 | ... Perform disable on the OLT PON Port and validate that the pings do not succeed |
| 687 | ... Perform enable on the OLT PON Port and validate that the pings are successful |
Hardik Windlass | 1ed2eee | 2021-06-25 09:51:03 +0000 | [diff] [blame] | 688 | [Tags] functional DisableEnableOltPonPort VOL-2577 multi-uni |
Hardik Windlass | 16cdf96 | 2020-04-29 15:26:50 +0530 | [diff] [blame] | 689 | [Setup] Run Keywords Start Logging DisableEnableOltPonPort |
Girish Gowdra | 8fd9696 | 2021-12-14 16:20:04 +0530 | [diff] [blame] | 690 | ... AND Run Keyword If ${has_dataplane} Set Non-Critical Tag for XGSPON Tech |
Hardik Windlass | 16cdf96 | 2020-04-29 15:26:50 +0530 | [diff] [blame] | 691 | ... AND Setup |
| 692 | [Teardown] Run Keywords Collect Logs |
Hardik Windlass | 41701e8 | 2021-01-12 17:44:44 +0000 | [diff] [blame] | 693 | ... AND Delete All Devices and Verify |
Girish Gowdra | f244d5b | 2021-09-01 17:16:16 -0700 | [diff] [blame] | 694 | ... AND Run Keyword If ${logging} Collect Logs |
| 695 | ... AND Stop Logging DisableEnableOltPonPort |
Hardik Windlass | 16cdf96 | 2020-04-29 15:26:50 +0530 | [diff] [blame] | 696 | Run Keyword If ${has_dataplane} Clean Up Linux |
Hardik Windlass | 58b23a3 | 2022-05-10 11:06:48 +0530 | [diff] [blame] | 697 | Perform Sanity Test |
Hardik Windlass | 41701e8 | 2021-01-12 17:44:44 +0000 | [diff] [blame] | 698 | # Multi-OLTs |
| 699 | FOR ${I} IN RANGE 0 ${olt_count} |
| 700 | ${olt_serial_number}= Get From Dictionary ${olt_ids}[${I}] sn |
| 701 | Disable Enable PON Port Per OLT ${olt_serial_number} |
Hardik Windlass | 16cdf96 | 2020-04-29 15:26:50 +0530 | [diff] [blame] | 702 | END |
| 703 | |
Gayathri.Selvan | 5d23e52 | 2020-09-15 17:26:25 +0530 | [diff] [blame] | 704 | Data plane Bandwidth profile update verification |
| 705 | [Documentation] Test bandwidth profile is updated for one subscriber and not changed for other subscribers. |
| 706 | ... Assumes iperf3 and jq installed on client and iperf -s running on DHCP server |
| 707 | ... Assumes Default and User_Bandwidth2 profiles are configured as bandwidth profiles |
| 708 | [Tags] non-critical dataplane BandwidthProfileUpdateTCP VOL-2053 |
| 709 | [Setup] Start Logging BandwidthProfileUpdateTCP |
| 710 | [Teardown] Run Keywords Collect Logs |
| 711 | ... AND Stop Logging BandwidthProfileUpdateTCP |
| 712 | ... AND Send File To Onos ${CURDIR}/../../tests/data/${POD_NAME}-sadis.json |
| 713 | Pass Execution If '${has_dataplane}'=='False' |
| 714 | ... Bandwidth profile validation can be done only in physical pod. Skipping this test in BBSIM. |
| 715 | Delete All Devices And Verify |
| 716 | Run Keyword If ${has_dataplane} Clean Up Linux |
| 717 | Setup |
Hardik Windlass | 58b23a3 | 2022-05-10 11:06:48 +0530 | [diff] [blame] | 718 | Perform Sanity Test |
Gayathri.Selvan | 5d23e52 | 2020-09-15 17:26:25 +0530 | [diff] [blame] | 719 | # Update the Bandwidth Profile for the First Subscriber under test |
| 720 | ${src}= Set Variable ${hosts.src[${0}]} |
| 721 | ${dst}= Set Variable ${hosts.dst[${0}]} |
| 722 | ${of_id}= Get ofID From OLT List ${src['olt']} |
TorstenThieme | dda3765 | 2021-11-11 16:22:05 +0000 | [diff] [blame] | 723 | ${nni_port}= Wait Until Keyword Succeeds ${timeout} 2s Get NNI Port in ONOS ${of_id} |
Gayathri.Selvan | 5d23e52 | 2020-09-15 17:26:25 +0530 | [diff] [blame] | 724 | ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']} |
| 725 | ... ${of_id} ${src['uni_id']} |
| 726 | ${subscriber_id}= Set Variable ${of_id}/${onu_port} |
| 727 | ${oldBwName} Get Bandwidth Profile Name For Given Subscriber ${subscriber_id} upstreamBandwidthProfile |
| 728 | # Delete the existing subscriber |
| 729 | Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command use single connection ${ONOS_SSH_IP} |
| 730 | ... ${ONOS_SSH_PORT} volt-remove-subscriber-access ${of_id} ${onu_port} |
| 731 | # Change the bandwidth profile and load the configuration |
Hardik Windlass | aa41bb4 | 2021-07-23 15:32:43 +0000 | [diff] [blame] | 732 | ${newBwName} Set Variable If ${oldBwName} == 'Default' 'User_Bandwidth2' 'Default' |
Gayathri.Selvan | 5d23e52 | 2020-09-15 17:26:25 +0530 | [diff] [blame] | 733 | ${cmd} Catenate |
| 734 | ... sed 's/upstreamBandwidthProfile": "${oldBwName}"/upstreamBandwidthProfile": "${newBwName}"/g' |
| 735 | ... ${CURDIR}/../../tests/data/${POD_NAME}-sadis.json > ${CURDIR}/../../tests/data/${POD_NAME}-sadis-new.json |
| 736 | ${rc} Run and Return RC ${cmd} |
| 737 | Send File To Onos ${CURDIR}/../../tests/data/${POD_NAME}-sadis-new.json |
| 738 | # Re-add the subscriber with new bandwidth profile |
| 739 | Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command use single connection ${ONOS_SSH_IP} |
| 740 | ... ${ONOS_SSH_PORT} volt-add-subscriber-access ${of_id} ${onu_port} |
| 741 | # Verify that no pending flows exist for the ONU port |
| 742 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
| 743 | ... Verify No Pending Flows For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port} |
| 744 | # Verify subscriber access flows are added for the ONU port |
| 745 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 746 | ... Verify Subscriber Access Flows Added For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id} |
| 747 | ... ${onu_port} ${nni_port} ${src['c_tag']} ${src['s_tag']} |
| 748 | # Verify Meters in ONOS |
Hardik Windlass | 58b23a3 | 2022-05-10 11:06:48 +0530 | [diff] [blame] | 749 | Wait Until Keyword Succeeds ${timeout} 5s |
Gayathri.Selvan | 5d23e52 | 2020-09-15 17:26:25 +0530 | [diff] [blame] | 750 | ... Verify Meters in ONOS ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id} ${onu_port} |
| 751 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Validate DHCP and Ping True |
| 752 | ... True ${src['dp_iface_name']} ${src['s_tag']} ${src['c_tag']} ${dst['dp_iface_ip_qinq']} |
| 753 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 754 | ... ${dst['dp_iface_name']} ${dst['ip']} ${dst['user']} ${dst['pass']} ${dst['container_type']} |
| 755 | ... ${dst['container_name']} |
Hardik Windlass | 58b23a3 | 2022-05-10 11:06:48 +0530 | [diff] [blame] | 756 | Wait Until Keyword Succeeds ${timeout} 2s |
Gayathri.Selvan | 5d23e52 | 2020-09-15 17:26:25 +0530 | [diff] [blame] | 757 | ... Validate Subscriber DHCP Allocation ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port} |
| 758 | # Verify new bandwidth profile is applied and other subscribers are working fine |
| 759 | ${checkBwName} Get Bandwidth Profile Name For Given Subscriber ${subscriber_id} upstreamBandwidthProfile |
| 760 | Should Be Equal ${checkBwName} ${newBwName} The bandwidth profile is not updated properly |
| 761 | FOR ${I} IN RANGE 0 ${num_all_onus} |
| 762 | ${src}= Set Variable ${hosts.src[${I}]} |
| 763 | ${dst}= Set Variable ${hosts.dst[${I}]} |
| 764 | ${of_id}= Get ofID From OLT List ${src['olt']} |
| 765 | |
| 766 | # Check for iperf3 and jq tools |
| 767 | ${stdout} ${stderr} ${rc}= Execute Remote Command which iperf3 jq |
| 768 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 769 | Pass Execution If ${rc} != 0 Skipping test: iperf3 / jq not found on the RG |
| 770 | |
| 771 | ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']} |
| 772 | ... ${of_id} ${src['uni_id']} |
| 773 | ${subscriber_id}= Set Variable ${of_id}/${onu_port} |
| 774 | ${bandwidth_profile_name} Get Bandwidth Profile Name For Given Subscriber ${subscriber_id} |
| 775 | ... upstreamBandwidthProfile |
| 776 | ${limiting_bw_value_upstream} Get Limiting Bandwidth Details ${bandwidth_profile_name} |
| 777 | ${bandwidth_profile_name} Get Bandwidth Profile Name For Given Subscriber ${subscriber_id} |
| 778 | ... downstreamBandwidthProfile |
| 779 | ${limiting_bw_value_dnstream} Get Limiting Bandwidth Details ${bandwidth_profile_name} |
| 780 | |
| 781 | # Stream TCP packets from RG to server |
| 782 | ${updict}= Run Iperf3 Test Client ${src} server=${dst['dp_iface_ip_qinq']} |
| 783 | ... args=-t 30 |
| 784 | ${actual_upstream_bw_used}= Evaluate ${updict['end']['sum_received']['bits_per_second']}/1000 |
| 785 | |
| 786 | # Stream TCP packets from server to RG |
| 787 | ${dndict}= Run Iperf3 Test Client ${src} server=${dst['dp_iface_ip_qinq']} |
| 788 | ... args=-R -t 30 |
| 789 | ${actual_dnstream_bw_used}= Evaluate ${dndict['end']['sum_received']['bits_per_second']}/1000 |
| 790 | |
| 791 | ${pct_limit_up}= Evaluate 100*${actual_upstream_bw_used}/${limiting_bw_value_upstream} |
| 792 | ${pct_limit_dn}= Evaluate 100*${actual_dnstream_bw_used}/${limiting_bw_value_dnstream} |
| 793 | Log Up: bwprof ${limiting_bw_value_upstream}Kbps, got ${actual_upstream_bw_used}Kbps (${pct_limit_up}%) |
| 794 | Log Down: bwprof ${limiting_bw_value_dnstream}Kbps, got ${actual_dnstream_bw_used}Kbps (${pct_limit_dn}%) |
| 795 | |
| 796 | Should Be True ${pct_limit_up} <= ${upper_margin_pct} |
| 797 | ... The upstream bandwidth exceeded the limit (${pct_limit_up}% of limit) |
| 798 | # VOL-3125: downstream bw limit not enforced. Uncomment when fixed. |
| 799 | #Should Be True ${pct_limit_dn} <= ${upper_margin_pct} |
| 800 | #... The downstream bandwidth exceeded the limit (${pct_limit_dn}% of limit) |
| 801 | Should Be True ${pct_limit_up} >= ${lower_margin_pct} |
| 802 | ... The upstream bandwidth guarantee was not met (${pct_limit_up}% of resv) |
| 803 | Should Be True ${pct_limit_dn} >= ${lower_margin_pct} |
| 804 | ... The downstream bandwidth guarantee was not met (${pct_limit_dn}% of resv) |
| 805 | END |
| 806 | |
Hardik Windlass | b75cf1b | 2021-01-18 06:59:09 +0000 | [diff] [blame] | 807 | Test ONU Delete and Auto-Discovery |
| 808 | [Documentation] Tests the voltctl delete and Auto-Discovery of the ONU |
Andrea Campanella | 92e21b0 | 2022-01-04 15:32:04 +0100 | [diff] [blame] | 809 | [Tags] functional VOL-3098 ONUAutoDiscovery |
Hardik Windlass | b75cf1b | 2021-01-18 06:59:09 +0000 | [diff] [blame] | 810 | [Setup] Run Keywords Start Logging ONUAutoDiscovery |
| 811 | ... AND Setup |
| 812 | [Teardown] Run Keywords Collect Logs |
| 813 | ... AND Delete All Devices and Verify |
| 814 | ... AND Run Keyword If ${logging} Collect Logs |
| 815 | ... AND Stop Logging ONUAutoDiscovery |
| 816 | # Performing Sanity Test to make sure subscribers are all AUTH+DHCP and pingable |
| 817 | Run Keyword If ${has_dataplane} Clean Up Linux |
| 818 | Perform Sanity Test |
| 819 | FOR ${I} IN RANGE 0 ${num_all_onus} |
| 820 | ${src}= Set Variable ${hosts.src[${I}]} |
| 821 | ${dst}= Set Variable ${hosts.dst[${I}]} |
Hardik Windlass | b75cf1b | 2021-01-18 06:59:09 +0000 | [diff] [blame] | 822 | ${of_id}= Get ofID From OLT List ${src['olt']} |
| 823 | ${nni_port}= Wait Until Keyword Succeeds ${timeout} 2s Get NNI Port in ONOS ${of_id} |
| 824 | ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s |
| 825 | ... Get ONU Port in ONOS ${src['onu']} ${of_id} |
Hardik Windlass | 78bb0fd | 2022-06-21 15:11:54 +0530 | [diff] [blame] | 826 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
Hardik Windlass | b75cf1b | 2021-01-18 06:59:09 +0000 | [diff] [blame] | 827 | # Remove Subscriber Access (To replicate ATT workflow) |
| 828 | Execute ONOS CLI Command use single connection ${ONOS_SSH_IP} ${ONOS_SSH_PORT} |
| 829 | ... volt-remove-subscriber-access ${of_id} ${onu_port} |
| 830 | # Additional sleep to let subscriber delete process |
| 831 | Sleep 10s |
| 832 | # Delete ONU and Verify Ping Fails |
| 833 | Delete Device ${onu_device_id} |
| 834 | Run Keyword If ${has_dataplane} Verify ping is successful except for given device |
| 835 | ... ${num_all_onus} ${src['onu']} |
| 836 | # Verify that no pending flows exist for the ONU port |
| 837 | Wait Until Keyword Succeeds ${timeout} 2s |
| 838 | ... Verify No Pending Flows For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port} |
| 839 | # ONU Auto-Discovery |
| 840 | ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s |
| 841 | ... Get ONU Port in ONOS ${src['onu']} ${of_id} ${src['uni_id']} |
| 842 | # Check ONU port is Enabled in ONOS |
| 843 | Wait Until Keyword Succeeds ${timeout} 2s |
| 844 | ... Verify UNI Port Is Enabled ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${src['onu']} ${src['uni_id']} |
| 845 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
| 846 | Run Keyword If ${has_dataplane} Clean Up Linux ${onu_device_id} |
| 847 | # Verify default EAPOL flows are added for the ONU port |
| 848 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
| 849 | ... Verify Eapol Flows Added For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id} ${onu_port} |
| 850 | # Verify ONU state in voltha |
| 851 | Wait Until Keyword Succeeds ${timeout} 5s Validate Device ENABLED ACTIVE REACHABLE |
| 852 | ... ${src['onu']} onu=True onu_reason=omci-flows-pushed |
| 853 | # Perform Authentication |
| 854 | ${wpa_log}= Run Keyword If ${has_dataplane} Catenate SEPARATOR=. |
| 855 | ... /tmp/wpa ${src['dp_iface_name']} log |
| 856 | Run Keyword If ${has_dataplane} Validate Authentication True |
| 857 | ... ${src['dp_iface_name']} wpa_supplicant.conf ${src['ip']} ${src['user']} ${src['pass']} |
| 858 | ... ${src['container_type']} ${src['container_name']} ${wpa_log} |
| 859 | Wait Until Keyword Succeeds ${timeout} 2 |
| 860 | ... Verify ONU in AAA-Users ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port} |
| 861 | Execute ONOS CLI Command use single connection ${ONOS_SSH_IP} ${ONOS_SSH_PORT} |
| 862 | ... volt-add-subscriber-access ${of_id} ${onu_port} |
| 863 | # Verify that no pending flows exist for the ONU port |
| 864 | Wait Until Keyword Succeeds ${timeout} 2s |
| 865 | ... Verify No Pending Flows For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port} |
| 866 | # Verify subscriber access flows are added for the ONU port |
| 867 | Wait Until Keyword Succeeds ${timeout} 5s |
| 868 | ... Verify Subscriber Access Flows Added For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id} |
| 869 | ... ${onu_port} ${nni_port} ${src['c_tag']} ${src['s_tag']} |
| 870 | # Verify subscriber EAPOL flow is installed |
| 871 | Wait Until Keyword Succeeds ${timeout} 5s |
| 872 | ... Verify Eapol Flows Added For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id} |
| 873 | ... ${onu_port} ${src['c_tag']} |
| 874 | # Verify Meters in ONOS |
| 875 | Wait Until Keyword Succeeds ${timeout} 5s |
| 876 | ... Verify Meters in ONOS ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id} ${onu_port} |
| 877 | Run Keyword If ${has_dataplane} Validate DHCP and Ping True |
| 878 | ... True ${src['dp_iface_name']} ${src['s_tag']} ${src['c_tag']} ${dst['dp_iface_ip_qinq']} |
| 879 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 880 | ... ${dst['dp_iface_name']} ${dst['ip']} ${dst['user']} ${dst['pass']} ${dst['container_type']} |
| 881 | ... ${dst['container_name']} |
| 882 | Wait Until Keyword Succeeds ${timeout} 2s |
| 883 | ... Validate Subscriber DHCP Allocation ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port} |
| 884 | END |
| 885 | |
Suchitra Vemuri | 65cd65f | 2019-08-30 14:39:22 -0700 | [diff] [blame] | 886 | *** Keywords *** |
| 887 | Setup Suite |
Andy Bavier | 88cd9f6 | 2019-11-26 16:22:33 -0700 | [diff] [blame] | 888 | [Documentation] Set up the test suite |
| 889 | Common Test Suite Setup |
Hung-Wei Chiu | cc6e655 | 2020-06-04 12:57:38 -0700 | [diff] [blame] | 890 | #Restore all ONUs |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 891 | #Run Keyword If ${has_dataplane} RestoreONUs ${num_all_onus} |
Suchitra Vemuri | 1d8e817 | 2020-06-17 17:43:56 -0700 | [diff] [blame] | 892 | #power_switch.robot needs it to support different vendor's power switch |
| 893 | ${switch_type}= Get Variable Value ${web_power_switch.type} |
| 894 | Run Keyword If "${switch_type}"!="" Set Global Variable ${powerswitch_type} ${switch_type} |
Suchitra Vemuri | 65cd65f | 2019-08-30 14:39:22 -0700 | [diff] [blame] | 895 | |
David Bainbridge | f81cd64 | 2019-11-20 00:14:47 +0000 | [diff] [blame] | 896 | Clear All Devices Then Create New Device |
| 897 | [Documentation] Remove any devices from VOLTHA and ONOS |
David Bainbridge | f81cd64 | 2019-11-20 00:14:47 +0000 | [diff] [blame] | 898 | # Remove all devices from voltha and nos |
| 899 | Delete All Devices and Verify |
David Bainbridge | f81cd64 | 2019-11-20 00:14:47 +0000 | [diff] [blame] | 900 | # Execute normal test Setup Keyword |
| 901 | Setup |