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