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 |
suraj gour | d64356b | 2019-11-07 13:26:20 +0000 | [diff] [blame] | 45 | # For below variable value, using deployment name as using grep for |
| 46 | # parsing radius pod name, we can also use full radius pod name |
Zack Williams | a8fe75a | 2020-01-10 14:25:27 -0700 | [diff] [blame] | 47 | ${RESTART_POD_NAME} radius |
Andy Bavier | ba9866b | 2019-10-11 07:11:53 -0700 | [diff] [blame] | 48 | ${timeout} 60s |
Zack Williams | ec53a1b | 2019-09-16 15:50:52 -0700 | [diff] [blame] | 49 | ${of_id} 0 |
| 50 | ${logical_id} 0 |
Andrea Campanella | 86e2406 | 2020-08-05 19:09:18 +0200 | [diff] [blame] | 51 | ${uprate} 0 |
| 52 | ${dnrate} 0 |
Andy Bavier | ba9866b | 2019-10-11 07:11:53 -0700 | [diff] [blame] | 53 | ${has_dataplane} True |
Andy Bavier | ba9866b | 2019-10-11 07:11:53 -0700 | [diff] [blame] | 54 | ${teardown_device} False |
Zack Williams | a8fe75a | 2020-01-10 14:25:27 -0700 | [diff] [blame] | 55 | ${scripts} ../../scripts |
Suchitra Vemuri | 65cd65f | 2019-08-30 14:39:22 -0700 | [diff] [blame] | 56 | |
Gayathri.Selvan | 92d1686 | 2020-03-19 14:47:58 +0000 | [diff] [blame] | 57 | # For dataplane bandwidth testing |
| 58 | ${upper_margin_pct} 105 # Allow 5% over the limit |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 59 | ${lower_margin_pct} 90 # Allow 8% under the limit |
Gayathri.Selvan | 92d1686 | 2020-03-19 14:47:58 +0000 | [diff] [blame] | 60 | ${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] | 61 | ${udp_packet_bytes} 1470 # UDP payload in bytes |
Gayathri.Selvan | 92d1686 | 2020-03-19 14:47:58 +0000 | [diff] [blame] | 62 | |
Andy Bavier | abeba26 | 2020-02-07 16:22:16 -0700 | [diff] [blame] | 63 | # Per-test logging on failure is turned off by default; set this variable to enable |
| 64 | ${container_log_dir} ${None} |
| 65 | |
Suchitra Vemuri | 65cd65f | 2019-08-30 14:39:22 -0700 | [diff] [blame] | 66 | *** Test Cases *** |
Suchitra Vemuri | 1d8e817 | 2020-06-17 17:43:56 -0700 | [diff] [blame] | 67 | Reboot ONUs Physically |
| 68 | [Documentation] This test reboots ONUs physically before execution all the tests |
| 69 | ... Test case runs only on the PODs that are configured with PowerSwitch that |
| 70 | ... controls the power off/on ONUs/OLT remotely (simulating a physical reboot) |
| 71 | [Tags] functional PowerSwitch RebootAllONUs |
| 72 | [Setup] Start Logging RebootAllONUs |
| 73 | [Teardown] Run Keywords Collect Logs |
| 74 | ... AND Stop Logging RebootAllONUs |
| 75 | 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] | 76 | FOR ${I} IN RANGE 0 ${num_all_onus} |
Suchitra Vemuri | 1d8e817 | 2020-06-17 17:43:56 -0700 | [diff] [blame] | 77 | ${src}= Set Variable ${hosts.src[${I}]} |
| 78 | ${dst}= Set Variable ${hosts.dst[${I}]} |
| 79 | Disable Switch Outlet ${src['power_switch_port']} |
| 80 | Sleep 60s |
| 81 | Enable Switch Outlet ${src['power_switch_port']} |
| 82 | Sleep 60s |
| 83 | END |
| 84 | |
Suchitra Vemuri | 65cd65f | 2019-08-30 14:39:22 -0700 | [diff] [blame] | 85 | Sanity E2E Test for OLT/ONU on POD |
| 86 | [Documentation] Validates E2E Ping Connectivity and object states for the given scenario: |
| 87 | ... 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] | 88 | [Tags] sanity test1 |
Andy Bavier | e187eda | 2020-04-20 15:00:02 -0700 | [diff] [blame] | 89 | [Setup] Run Keywords Start Logging SanityTest |
Andy Bavier | 4a8450e | 2020-02-04 08:58:37 -0700 | [diff] [blame] | 90 | ... AND Setup |
| 91 | [Teardown] Run Keywords Collect Logs |
Andy Bavier | abeba26 | 2020-02-07 16:22:16 -0700 | [diff] [blame] | 92 | ... AND Stop Logging SanityTest |
Suchitra Vemuri | c5295a3 | 2019-12-15 20:32:04 -0800 | [diff] [blame] | 93 | Run Keyword If ${has_dataplane} Clean Up Linux |
Zack Williams | a8fe75a | 2020-01-10 14:25:27 -0700 | [diff] [blame] | 94 | Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test |
Suchitra Vemuri | 65cd65f | 2019-08-30 14:39:22 -0700 | [diff] [blame] | 95 | |
Suchitra Vemuri | 6db8941 | 2019-11-14 14:52:54 -0800 | [diff] [blame] | 96 | Test Disable and Enable ONU |
| 97 | [Documentation] Validates E2E Ping Connectivity and object states for the given scenario: |
| 98 | ... Assuming that test1 was executed where all the ONUs are authenticated/DHCP/pingable |
| 99 | ... Perform disable on the ONUs and validate that the pings do not succeed |
| 100 | ... Perform enable on the ONUs and validate that the pings are successful |
Suchitra Vemuri | 04245f7 | 2020-01-08 16:43:24 -0800 | [diff] [blame] | 101 | [Tags] functional DisableEnableONU released |
Andy Bavier | e187eda | 2020-04-20 15:00:02 -0700 | [diff] [blame] | 102 | [Setup] Start Logging DisableEnableONU |
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']} |
Suchitra Vemuri | 6db8941 | 2019-11-14 14:52:54 -0800 | [diff] [blame] | 109 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
| 110 | ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']} |
| 111 | ... ${of_id} |
| 112 | Disable Device ${onu_device_id} |
Andy Bavier | 46c8be3 | 2020-01-21 10:06:27 -0700 | [diff] [blame] | 113 | 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] | 114 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure |
| 115 | ... Wait Until Keyword Succeeds 60s 2s |
Zack Williams | a8fe75a | 2020-01-10 14:25:27 -0700 | [diff] [blame] | 116 | ... Check Ping False ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']} |
| 117 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
Suchitra Vemuri | 6db8941 | 2019-11-14 14:52:54 -0800 | [diff] [blame] | 118 | Enable Device ${onu_device_id} |
| 119 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
ubuntu | 6b6e7d4 | 2020-03-02 12:35:42 -0800 | [diff] [blame] | 120 | ... Validate Subscriber DHCP Allocation ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port} |
Hardik Windlass | 2180763 | 2020-04-14 16:24:55 +0530 | [diff] [blame] | 121 | # Verify subscriber access flows are added for the ONU port |
| 122 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 123 | ... Verify Subscriber Access Flows Added For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id} |
| 124 | ... ${onu_port} ${nni_port} ${src['c_tag']} ${src['s_tag']} |
Andy Bavier | 33e6dd3 | 2020-01-16 13:35:20 -0700 | [diff] [blame] | 125 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure |
| 126 | ... Wait Until Keyword Succeeds 60s 2s |
Zack Williams | a8fe75a | 2020-01-10 14:25:27 -0700 | [diff] [blame] | 127 | ... Check Ping True ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']} |
| 128 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 129 | Run Keyword and Ignore Error Get Device Output from Voltha ${onu_device_id} |
| 130 | Run Keyword and Ignore Error Collect Logs |
Suchitra Vemuri | 6db8941 | 2019-11-14 14:52:54 -0800 | [diff] [blame] | 131 | END |
| 132 | |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 133 | Test Subscriber Delete and Add |
| 134 | [Documentation] Validates E2E Ping Connectivity and object states for the given scenario: |
| 135 | ... Assuming that all the ONUs are authenticated/DHCP/pingable |
Zack Williams | a8fe75a | 2020-01-10 14:25:27 -0700 | [diff] [blame] | 136 | ... Delete a subscriber and validate that the pings do not succeed |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 137 | ... Re-add the subscriber and validate that the pings are successful |
Suchitra Vemuri | 04245f7 | 2020-01-08 16:43:24 -0800 | [diff] [blame] | 138 | [Tags] functional SubAddDelete released |
Andy Bavier | e187eda | 2020-04-20 15:00:02 -0700 | [diff] [blame] | 139 | [Setup] Start Logging SubAddDelete |
Andy Bavier | 4a8450e | 2020-02-04 08:58:37 -0700 | [diff] [blame] | 140 | [Teardown] Run Keywords Collect Logs |
Andy Bavier | abeba26 | 2020-02-07 16:22:16 -0700 | [diff] [blame] | 141 | ... AND Stop Logging SubAddDelete |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 142 | FOR ${I} IN RANGE 0 ${num_all_onus} |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 143 | ${src}= Set Variable ${hosts.src[${I}]} |
| 144 | ${dst}= Set Variable ${hosts.dst[${I}]} |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 145 | ${of_id}= Get ofID From OLT List ${src['olt']} |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 146 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
| 147 | ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']} |
| 148 | ... ${of_id} |
ubuntu | 6b6e7d4 | 2020-03-02 12:35:42 -0800 | [diff] [blame] | 149 | Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command ${ONOS_SSH_IP} |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 150 | ... ${ONOS_SSH_PORT} volt-remove-subscriber-access ${of_id} ${onu_port} |
| 151 | Sleep 10s |
Suchitra Vemuri | 9da4430 | 2020-03-04 14:24:49 -0800 | [diff] [blame] | 152 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
| 153 | ... 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] | 154 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure |
| 155 | ... Wait Until Keyword Succeeds 60s 2s |
Zack Williams | a8fe75a | 2020-01-10 14:25:27 -0700 | [diff] [blame] | 156 | ... Check Ping False ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']} |
| 157 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
ubuntu | 6b6e7d4 | 2020-03-02 12:35:42 -0800 | [diff] [blame] | 158 | Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command ${ONOS_SSH_IP} |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 159 | ... ${ONOS_SSH_PORT} volt-add-subscriber-access ${of_id} ${onu_port} |
| 160 | Sleep 10s |
| 161 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
Suchitra Vemuri | 9da4430 | 2020-03-04 14:24:49 -0800 | [diff] [blame] | 162 | ... Verify No Pending Flows For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port} |
| 163 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
ubuntu | 6b6e7d4 | 2020-03-02 12:35:42 -0800 | [diff] [blame] | 164 | ... Validate Subscriber DHCP Allocation ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port} |
Hardik Windlass | 2180763 | 2020-04-14 16:24:55 +0530 | [diff] [blame] | 165 | # Verify subscriber access flows are added for the ONU port |
| 166 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 167 | ... Verify Subscriber Access Flows Added For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id} |
| 168 | ... ${onu_port} ${nni_port} ${src['c_tag']} ${src['s_tag']} |
Andy Bavier | 33e6dd3 | 2020-01-16 13:35:20 -0700 | [diff] [blame] | 169 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure |
| 170 | ... Wait Until Keyword Succeeds 60s 2s |
Zack Williams | a8fe75a | 2020-01-10 14:25:27 -0700 | [diff] [blame] | 171 | ... Check Ping True ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']} |
| 172 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 173 | Run Keyword and Ignore Error Get Device Output from Voltha ${onu_device_id} |
| 174 | Run Keyword and Ignore Error Collect Logs |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 175 | END |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 176 | |
suraj gour | d5cfdbb | 2019-12-13 12:44:55 +0000 | [diff] [blame] | 177 | Check DHCP attempt fails when subscriber is not added |
| 178 | [Documentation] Validates when removed subscriber access, DHCP attempt, ping fails and |
| 179 | ... when again added subscriber access, DHCP attempt, ping succeeds |
Zack Williams | a8fe75a | 2020-01-10 14:25:27 -0700 | [diff] [blame] | 180 | ... Assuming that test1 or sanity test was executed where all the ONUs are authenticated/DHCP/pingable |
Suchitra Vemuri | 04245f7 | 2020-01-08 16:43:24 -0800 | [diff] [blame] | 181 | [Tags] functional SubsRemoveDHCP released |
Andy Bavier | e187eda | 2020-04-20 15:00:02 -0700 | [diff] [blame] | 182 | [Setup] Start Logging SubsRemoveDHCP |
Andy Bavier | 4a8450e | 2020-02-04 08:58:37 -0700 | [diff] [blame] | 183 | [Teardown] Run Keywords Collect Logs |
Andy Bavier | abeba26 | 2020-02-07 16:22:16 -0700 | [diff] [blame] | 184 | ... AND Stop Logging SubsRemoveDHCP |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 185 | FOR ${I} IN RANGE 0 ${num_all_onus} |
suraj gour | d5cfdbb | 2019-12-13 12:44:55 +0000 | [diff] [blame] | 186 | ${src}= Set Variable ${hosts.src[${I}]} |
| 187 | ${dst}= Set Variable ${hosts.dst[${I}]} |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 188 | ${of_id}= Get ofID From OLT List ${src['olt']} |
Zack Williams | a8fe75a | 2020-01-10 14:25:27 -0700 | [diff] [blame] | 189 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
suraj gour | d5cfdbb | 2019-12-13 12:44:55 +0000 | [diff] [blame] | 190 | ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']} |
| 191 | ... ${of_id} |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 192 | Run Keyword And Ignore Error Login And Run Command On Remote System killall dhclient ${src['ip']} |
| 193 | ... ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 194 | Run Keyword And Ignore Error Login And Run Command On Remote System ps -ef | grep dhclient ${src['ip']} |
| 195 | ... ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
ubuntu | 6b6e7d4 | 2020-03-02 12:35:42 -0800 | [diff] [blame] | 196 | Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command ${ONOS_SSH_IP} |
suraj gour | d5cfdbb | 2019-12-13 12:44:55 +0000 | [diff] [blame] | 197 | ... ${ONOS_SSH_PORT} volt-remove-subscriber-access ${of_id} ${onu_port} |
Suchitra Vemuri | 8f1d306 | 2020-02-28 11:57:37 -0800 | [diff] [blame] | 198 | Sleep 15s |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 199 | Run Keyword And Ignore Error Login And Run Command On Remote System ps -ef | grep dhclient ${src['ip']} |
| 200 | ... ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
Zack Williams | a8fe75a | 2020-01-10 14:25:27 -0700 | [diff] [blame] | 201 | Run Keyword If ${has_dataplane} Wait Until Keyword Succeeds ${timeout} 2s |
| 202 | ... Delete IP Addresses from Interface on Remote Host ${src['dp_iface_name']} ${src['ip']} |
| 203 | ... ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 204 | Run Keyword And Ignore Error Login And Run Command On Remote System |
| 205 | ... ifconfig | grep -A 10 ens ${src['ip']} |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 206 | ... ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
suraj gour | d5cfdbb | 2019-12-13 12:44:55 +0000 | [diff] [blame] | 207 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Validate DHCP and Ping False |
| 208 | ... False ${src['dp_iface_name']} ${src['s_tag']} ${src['c_tag']} ${dst['dp_iface_ip_qinq']} |
| 209 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 210 | ... ${dst['dp_iface_name']} ${dst['ip']} ${dst['user']} ${dst['pass']} ${dst['container_type']} |
| 211 | ... ${dst['container_name']} |
ubuntu | 6b6e7d4 | 2020-03-02 12:35:42 -0800 | [diff] [blame] | 212 | Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command ${ONOS_SSH_IP} |
suraj gour | d5cfdbb | 2019-12-13 12:44:55 +0000 | [diff] [blame] | 213 | ... ${ONOS_SSH_PORT} volt-add-subscriber-access ${of_id} ${onu_port} |
Suchitra Vemuri | 40fdf3c | 2020-05-28 23:41:03 -0700 | [diff] [blame] | 214 | Sleep 10s |
Suchitra Vemuri | 9da4430 | 2020-03-04 14:24:49 -0800 | [diff] [blame] | 215 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
| 216 | ... 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] | 217 | # Verify subscriber access flows are added for the ONU port |
| 218 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 219 | ... Verify Subscriber Access Flows Added For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id} |
| 220 | ... ${onu_port} ${nni_port} ${src['c_tag']} ${src['s_tag']} |
suraj gour | d5cfdbb | 2019-12-13 12:44:55 +0000 | [diff] [blame] | 221 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Validate DHCP and Ping True |
| 222 | ... True ${src['dp_iface_name']} ${src['s_tag']} ${src['c_tag']} ${dst['dp_iface_ip_qinq']} |
| 223 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 224 | ... ${dst['dp_iface_name']} ${dst['ip']} ${dst['user']} ${dst['pass']} ${dst['container_type']} |
| 225 | ... ${dst['container_name']} |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 226 | Run Keyword and Ignore Error Collect Logs |
| 227 | END |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 228 | |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 229 | Test Disable and Enable ONU scenario for ATT workflow |
| 230 | [Documentation] Validates E2E Ping Connectivity and object states for the given scenario: |
| 231 | ... Assuming that test1 was executed where all the ONUs are authenticated/DHCP/pingable |
| 232 | ... 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] | 233 | ... Perform enable on the ONUs, authentication check, volt-add-subscriber-access and |
| 234 | ... validate that the pings are successful |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 235 | ... VOL-2284 |
Suchitra Vemuri | a7dae32 | 2020-02-19 22:38:18 -0800 | [diff] [blame] | 236 | [Tags] functional ATT_DisableEnableONU released |
Andy Bavier | e187eda | 2020-04-20 15:00:02 -0700 | [diff] [blame] | 237 | [Setup] Start Logging ATT_DisableEnableONU |
Andy Bavier | 4a8450e | 2020-02-04 08:58:37 -0700 | [diff] [blame] | 238 | [Teardown] Run Keywords Collect Logs |
Andy Bavier | abeba26 | 2020-02-07 16:22:16 -0700 | [diff] [blame] | 239 | ... AND Stop Logging ATT_DisableEnableONU |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 240 | FOR ${I} IN RANGE 0 ${num_all_onus} |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 241 | ${src}= Set Variable ${hosts.src[${I}]} |
| 242 | ${dst}= Set Variable ${hosts.dst[${I}]} |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 243 | ${of_id}= Get ofID From OLT List ${src['olt']} |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 244 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
| 245 | ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']} |
| 246 | ... ${of_id} |
Suchitra Vemuri | 014b603 | 2020-02-14 18:13:13 -0800 | [diff] [blame] | 247 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds 120s 2s |
Suchitra Vemuri | 760bdd3 | 2020-06-17 12:34:48 -0700 | [diff] [blame] | 248 | ... Verify ONU Port Is Enabled ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${src['onu']} |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 249 | Disable Device ${onu_device_id} |
Suchitra Vemuri | 3158f3c | 2020-05-28 17:58:26 -0700 | [diff] [blame] | 250 | Sleep 10s |
ubuntu | 6b6e7d4 | 2020-03-02 12:35:42 -0800 | [diff] [blame] | 251 | Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command ${ONOS_SSH_IP} |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 252 | ... ${ONOS_SSH_PORT} volt-remove-subscriber-access ${of_id} ${onu_port} |
Zack Williams | a8fe75a | 2020-01-10 14:25:27 -0700 | [diff] [blame] | 253 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure |
| 254 | ... Wait Until Keyword Succeeds 60s 2s Check Ping |
| 255 | ... False ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']} |
| 256 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 257 | ... ELSE sleep 60s |
| 258 | Enable Device ${onu_device_id} |
ubuntu | 6b6e7d4 | 2020-03-02 12:35:42 -0800 | [diff] [blame] | 259 | Wait Until Keyword Succeeds ${timeout} 2s Verify Eapol Flows Added For ONU ${ONOS_SSH_IP} |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 260 | ... ${ONOS_SSH_PORT} ${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 | ... Validate Authentication After Reassociate True |
| 263 | ... ${src['dp_iface_name']} ${src['ip']} ${src['user']} ${src['pass']} |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 264 | ... ${src['container_type']} ${src['container_name']} |
ubuntu | 6b6e7d4 | 2020-03-02 12:35:42 -0800 | [diff] [blame] | 265 | 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] | 266 | ... ${ONOS_SSH_PORT} ${onu_port} |
ubuntu | 6b6e7d4 | 2020-03-02 12:35:42 -0800 | [diff] [blame] | 267 | Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command ${ONOS_SSH_IP} |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 268 | ... ${ONOS_SSH_PORT} volt-add-subscriber-access ${of_id} ${onu_port} |
Suchitra Vemuri | 3158f3c | 2020-05-28 17:58:26 -0700 | [diff] [blame] | 269 | Sleep 10s |
Hardik Windlass | 2180763 | 2020-04-14 16:24:55 +0530 | [diff] [blame] | 270 | # Verify subscriber access flows are added for the ONU port |
| 271 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 272 | ... Verify Subscriber Access Flows Added For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id} |
| 273 | ... ${onu_port} ${nni_port} ${src['c_tag']} ${src['s_tag']} |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 274 | 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] | 275 | ... 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] | 276 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 277 | ... ${dst['dp_iface_name']} ${dst['ip']} ${dst['user']} ${dst['pass']} ${dst['container_type']} |
| 278 | ... ${dst['container_name']} |
| 279 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
ubuntu | 6b6e7d4 | 2020-03-02 12:35:42 -0800 | [diff] [blame] | 280 | ... Validate Subscriber DHCP Allocation ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port} |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 281 | Run Keyword and Ignore Error Collect Logs |
suraj gour | d5cfdbb | 2019-12-13 12:44:55 +0000 | [diff] [blame] | 282 | END |
suraj gour | d5cfdbb | 2019-12-13 12:44:55 +0000 | [diff] [blame] | 283 | |
Hardik Windlass | 2b37e71 | 2020-06-12 02:13:17 +0530 | [diff] [blame] | 284 | Test Disable and Enable OLT |
| 285 | [Documentation] Validates E2E Ping Connectivity and object states for the given scenario: |
| 286 | ... Assuming that test1 was executed where all the ONUs are authenticated/DHCP/pingable |
| 287 | ... Perform disable on the OLT and validate that the pings do not succeed |
| 288 | ... Perform enable on the OLT and validate that the pings are successful |
| 289 | [Tags] functional VOL-2410 DisableEnableOLT |
| 290 | [Setup] Start Logging DisableEnableOLT |
| 291 | [Teardown] Run Keywords Collect Logs |
| 292 | ... AND Stop Logging DisableEnableOLT |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 293 | #Disable the OLTs and verify the OLT/ONUs are disabled properly |
| 294 | FOR ${I} IN RANGE 0 ${olt_count} |
| 295 | ${olt_serial_number}= Get From Dictionary ${olt_ids}[${I}] sn |
| 296 | ${olt_device_id}= Get OLTDeviceID From OLT List ${olt_serial_number} |
| 297 | ${rc} ${output}= Run and Return Rc and Output |
| 298 | ... ${VOLTCTL_CONFIG}; voltctl device disable ${olt_device_id} |
| 299 | Should Be Equal As Integers ${rc} 0 |
| 300 | Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Device DISABLED UNKNOWN REACHABLE |
| 301 | ... ${olt_serial_number} |
| 302 | END |
| 303 | # Validate the ONUs |
| 304 | FOR ${I} IN RANGE 0 ${num_all_onus} |
Hardik Windlass | 2b37e71 | 2020-06-12 02:13:17 +0530 | [diff] [blame] | 305 | ${src}= Set Variable ${hosts.src[${I}]} |
| 306 | ${dst}= Set Variable ${hosts.dst[${I}]} |
| 307 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 308 | ${of_id}= Get ofID From OLT List ${src['olt']} |
Hardik Windlass | 2b37e71 | 2020-06-12 02:13:17 +0530 | [diff] [blame] | 309 | ${onu_port}= Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
| 310 | ... Get ONU Port in ONOS ${src['onu']} ${of_id} |
| 311 | Wait Until Keyword Succeeds ${timeout} 5s Validate Device ENABLED DISCOVERED |
| 312 | ... UNREACHABLE ${src['onu']} onu=false |
| 313 | #Verify that ping fails |
| 314 | Run Keyword If ${has_dataplane} |
| 315 | ... Run Keyword And Continue On Failure Wait Until Keyword Succeeds 60s 2s |
| 316 | ... Check Ping False ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']} |
| 317 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 318 | # Remove Subscriber Access (To replicate ATT workflow) |
| 319 | Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command ${ONOS_SSH_IP} |
| 320 | ... ${ONOS_SSH_PORT} volt-remove-subscriber-access ${of_id} ${onu_port} |
| 321 | Sleep 10s |
| 322 | END |
| 323 | #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] | 324 | FOR ${I} IN RANGE 0 ${olt_count} |
| 325 | ${olt_serial_number}= Get From Dictionary ${olt_ids}[${I}] sn |
| 326 | ${olt_device_id}= Get OLTDeviceID From OLT List ${olt_serial_number} |
| 327 | Enable Device ${olt_device_id} |
| 328 | Sleep 15s |
| 329 | Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Device ENABLED ACTIVE REACHABLE |
| 330 | ... ${olt_serial_number} |
| 331 | #TODO: Update for PON_OLT ETHERNET_NNI |
| 332 | #Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Port Types |
| 333 | #... PON_OLT ETHERNET_NNI |
| 334 | END |
Hardik Windlass | 2b37e71 | 2020-06-12 02:13:17 +0530 | [diff] [blame] | 335 | Run Keyword If ${has_dataplane} Clean Up Linux |
| 336 | Wait Until Keyword Succeeds ${timeout} 5s Perform Sanity Test |
| 337 | |
Suchitra Vemuri | 937cd39 | 2020-01-12 17:10:42 -0800 | [diff] [blame] | 338 | Delete OLT, ReAdd OLT and Perform Sanity Test |
| 339 | [Documentation] Validates E2E Ping Connectivity and object states for the given scenario: |
| 340 | ... Disable and Delete the OLT |
| 341 | ... Create/Enable the same OLT again |
| 342 | ... 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] | 343 | [Tags] functional DeleteOLT released notready |
Andy Bavier | e187eda | 2020-04-20 15:00:02 -0700 | [diff] [blame] | 344 | [Setup] Start Logging DeleteOLT |
Andy Bavier | 4a8450e | 2020-02-04 08:58:37 -0700 | [diff] [blame] | 345 | [Teardown] Run Keywords Collect Logs |
Andy Bavier | abeba26 | 2020-02-07 16:22:16 -0700 | [diff] [blame] | 346 | ... AND Stop Logging DeleteOLT |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 347 | #TODO: Update test with new framework changes |
Suchitra Vemuri | 937cd39 | 2020-01-12 17:10:42 -0800 | [diff] [blame] | 348 | Run Keyword If ${has_dataplane} Clean Up Linux |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 349 | FOR ${I} IN RANGE 0 ${olt_count} |
| 350 | ${olt_serial_number}= Get From Dictionary ${olt_ids}[${I}] sn |
| 351 | ${of_id}= Get ofID From OLT List ${olt_serial_number} |
| 352 | Delete Device and Verify ${olt_serial_number} |
| 353 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 354 | ... Verify Device Flows Removed ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id} |
| 355 | END |
Suchitra Vemuri | 937cd39 | 2020-01-12 17:10:42 -0800 | [diff] [blame] | 356 | Run Keyword and Ignore Error Collect Logs |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 357 | Run Keyword If ${has_dataplane} Clean Up Linux |
Suchitra Vemuri | 937cd39 | 2020-01-12 17:10:42 -0800 | [diff] [blame] | 358 | # Recreate the OLT |
Hardik Windlass | 480f3e2 | 2020-04-02 20:14:14 +0530 | [diff] [blame] | 359 | Setup |
Suchitra Vemuri | 937cd39 | 2020-01-12 17:10:42 -0800 | [diff] [blame] | 360 | Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test |
Suchitra Vemuri | 937cd39 | 2020-01-12 17:10:42 -0800 | [diff] [blame] | 361 | |
Hema | 567f301 | 2020-03-25 00:51:53 +0530 | [diff] [blame] | 362 | Check Mib State on OLT recreation after ONU, OLT deletion |
| 363 | [Documentation] Assuming that test1 was executed where all the ONUs are authenticated/DHCP/pingable, |
| 364 | ... Disable and Delete the ONU, Disable and Delete the OLT |
| 365 | ... Create/Enable the OLT again and Check for the Mib State of the ONUs |
| 366 | [Tags] functional CheckMibState notready |
Andy Bavier | e187eda | 2020-04-20 15:00:02 -0700 | [diff] [blame] | 367 | [Setup] Start Logging CheckMibState |
Hema | 567f301 | 2020-03-25 00:51:53 +0530 | [diff] [blame] | 368 | [Teardown] Run Keywords Collect Logs |
| 369 | ... AND Stop Logging CheckMibState |
Hema | 567f301 | 2020-03-25 00:51:53 +0530 | [diff] [blame] | 370 | #Disable and Delete the ONU |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 371 | FOR ${I} IN RANGE 0 ${num_all_onus} |
Hema | 567f301 | 2020-03-25 00:51:53 +0530 | [diff] [blame] | 372 | ${src}= Set Variable ${hosts.src[${I}]} |
| 373 | ${dst}= Set Variable ${hosts.dst[${I}]} |
| 374 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
| 375 | ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']} |
| 376 | ... ${of_id} |
| 377 | Disable Device ${onu_device_id} |
| 378 | Wait Until Keyword Succeeds 20s 2s Test Devices Disabled in VOLTHA Id=${onu_device_id} |
| 379 | Delete Device ${onu_device_id} |
| 380 | END |
| 381 | #Disable and Delete the OLT |
Hardik Windlass | 480f3e2 | 2020-04-02 20:14:14 +0530 | [diff] [blame] | 382 | Delete Device and Verify |
| 383 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 384 | ... Verify Device Flows Removed ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id} |
| 385 | # Recreate the OLT |
Hema | 567f301 | 2020-03-25 00:51:53 +0530 | [diff] [blame] | 386 | Run Keyword If ${has_dataplane} Sleep 180s |
| 387 | ${olt_device_id}= Create Device ${olt_ip} ${OLT_PORT} |
| 388 | Set Suite Variable ${olt_device_id} |
| 389 | Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Device PREPROVISIONED |
| 390 | ... UNKNOWN UNKNOWN ${olt_device_id} |
| 391 | Enable Device ${olt_device_id} |
| 392 | Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Device ENABLED ACTIVE REACHABLE |
| 393 | ... ${olt_serial_number} |
| 394 | #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] | 395 | FOR ${I} IN RANGE 0 ${num_all_onus} |
Hema | 567f301 | 2020-03-25 00:51:53 +0530 | [diff] [blame] | 396 | ${src}= Set Variable ${hosts.src[${I}]} |
| 397 | ${dst}= Set Variable ${hosts.dst[${I}]} |
| 398 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
| 399 | ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']} |
| 400 | ... ${of_id} |
Suchitra Vemuri | cdc32d8 | 2020-07-17 12:24:46 -0700 | [diff] [blame] | 401 | Wait Until Keyword Succeeds 180s 5s Validate Device ENABLED ACTIVE |
Hema | 567f301 | 2020-03-25 00:51:53 +0530 | [diff] [blame] | 402 | ... REACHABLE ${src['onu']} onu=True onu_reason=omci-flows-pushed |
| 403 | END |
| 404 | |
Hema | 783279b | 2020-01-22 15:37:37 +0530 | [diff] [blame] | 405 | Test disable ONUs and OLT then delete ONUs and OLT |
| 406 | [Documentation] On deployed POD, disable the ONU, disable the OLT and then delete ONU and OLT. |
| 407 | ... This TC is to confirm that ONU removal is not impacting OLT |
| 408 | ... Devices will be removed during the execution of this TC |
| 409 | ... 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] | 410 | [Tags] functional VOL-2354 DisableDeleteONUandOLT released |
Andy Bavier | e187eda | 2020-04-20 15:00:02 -0700 | [diff] [blame] | 411 | [Setup] Start Logging DisableDeleteONUandOLT |
Andy Bavier | 4a8450e | 2020-02-04 08:58:37 -0700 | [diff] [blame] | 412 | [Teardown] Run Keywords Collect Logs |
Andy Bavier | abeba26 | 2020-02-07 16:22:16 -0700 | [diff] [blame] | 413 | ... AND Stop Logging DisableDeleteONUandOLT |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 414 | #${olt_device_id}= Get Device ID From SN ${olt_serial_number} |
| 415 | FOR ${I} IN RANGE 0 ${num_all_onus} |
Hema | 783279b | 2020-01-22 15:37:37 +0530 | [diff] [blame] | 416 | ${src}= Set Variable ${hosts.src[${I}]} |
| 417 | ${dst}= Set Variable ${hosts.dst[${I}]} |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 418 | ${of_id}= Get ofID From OLT List ${src['olt']} |
Hema | 783279b | 2020-01-22 15:37:37 +0530 | [diff] [blame] | 419 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
Suchitra Vemuri | cdc32d8 | 2020-07-17 12:24:46 -0700 | [diff] [blame] | 420 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds 360s 5s |
Suchitra Vemuri | 014b603 | 2020-02-14 18:13:13 -0800 | [diff] [blame] | 421 | ... Validate Device ENABLED ACTIVE |
Hema | 783279b | 2020-01-22 15:37:37 +0530 | [diff] [blame] | 422 | ... REACHABLE ${src['onu']} onu=True onu_reason=omci-flows-pushed |
Suchitra Vemuri | 014b603 | 2020-02-14 18:13:13 -0800 | [diff] [blame] | 423 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 424 | ... Validate OLT Device ENABLED ACTIVE |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 425 | ... REACHABLE ${src['olt']} |
Hema | 783279b | 2020-01-22 15:37:37 +0530 | [diff] [blame] | 426 | ${rc} ${output}= Run and Return Rc and Output |
| 427 | ... ${VOLTCTL_CONFIG}; voltctl device disable ${onu_device_id} |
| 428 | Should Be Equal As Integers ${rc} 0 |
Suchitra Vemuri | 014b603 | 2020-02-14 18:13:13 -0800 | [diff] [blame] | 429 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 430 | ... Validate Device DISABLED UNKNOWN |
Hema | 783279b | 2020-01-22 15:37:37 +0530 | [diff] [blame] | 431 | ... REACHABLE ${src['onu']} onu=false |
Suchitra Vemuri | cdc32d8 | 2020-07-17 12:24:46 -0700 | [diff] [blame] | 432 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds 360s 5s |
Suchitra Vemuri | 014b603 | 2020-02-14 18:13:13 -0800 | [diff] [blame] | 433 | ... Validate OLT Device ENABLED ACTIVE |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 434 | ... REACHABLE ${src['olt']} |
Hema | 783279b | 2020-01-22 15:37:37 +0530 | [diff] [blame] | 435 | END |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 436 | # Disable all OLTs |
| 437 | FOR ${I} IN RANGE 0 ${olt_count} |
| 438 | ${olt_serial_number}= Get From Dictionary ${olt_ids}[${I}] sn |
| 439 | ${olt_device_id}= Get OLTDeviceID From OLT List ${olt_serial_number} |
| 440 | ${rc} ${output}= Run and Return Rc and Output |
| 441 | ... ${VOLTCTL_CONFIG}; voltctl device disable ${olt_device_id} |
| 442 | Should Be Equal As Integers ${rc} 0 |
| 443 | Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Device DISABLED UNKNOWN REACHABLE |
| 444 | ... ${olt_serial_number} |
| 445 | END |
| 446 | # Validate ONUs after OLT disable |
| 447 | FOR ${I} IN RANGE 0 ${num_all_onus} |
Hema | 783279b | 2020-01-22 15:37:37 +0530 | [diff] [blame] | 448 | ${src}= Set Variable ${hosts.src[${I}]} |
| 449 | ${dst}= Set Variable ${hosts.dst[${I}]} |
| 450 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
Suchitra Vemuri | 014b603 | 2020-02-14 18:13:13 -0800 | [diff] [blame] | 451 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 452 | ... Validate Device DISABLED DISCOVERED |
| 453 | ... UNREACHABLE ${src['onu']} onu=false |
Hardik Windlass | 7da42ca | 2020-03-13 14:25:44 +0530 | [diff] [blame] | 454 | Delete Device ${onu_device_id} |
Suchitra Vemuri | 014b603 | 2020-02-14 18:13:13 -0800 | [diff] [blame] | 455 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 456 | ... Validate OLT Device DISABLED UNKNOWN |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 457 | ... REACHABLE ${src['olt']} |
Hema | 783279b | 2020-01-22 15:37:37 +0530 | [diff] [blame] | 458 | END |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 459 | # Delete all OLTs |
| 460 | Delete All Devices and Verify |
| 461 | #Delete Device ${olt_device_id} |
| 462 | #Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s Test Empty Device List |
| 463 | #Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 464 | #... Verify Device Flows Removed ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id} |
David Bainbridge | f81cd64 | 2019-11-20 00:14:47 +0000 | [diff] [blame] | 465 | |
Suchitra Vemuri | 9a6dd6d | 2020-02-28 17:46:26 -0800 | [diff] [blame] | 466 | Validate authentication on a disabled ONU |
suraj gour | 472da1c | 2020-02-25 05:44:51 +0000 | [diff] [blame] | 467 | [Documentation] Assuming that test1 was executed where all the ONUs are authenticated/DHCP/pingable |
| 468 | ... Perform disable on the ONUs and validate that the authentication do not succeed |
| 469 | ... Perform enable on the ONUs and validate that authentication successful |
Suchitra Vemuri | f7a033c | 2020-02-26 17:22:41 -0800 | [diff] [blame] | 470 | [Tags] functional DisableONU_AuthCheck |
| 471 | # Creates Devices in the Setup |
Andy Bavier | e187eda | 2020-04-20 15:00:02 -0700 | [diff] [blame] | 472 | [Setup] Run Keywords Start Logging DisableONU_AuthCheck |
Suchitra Vemuri | f7a033c | 2020-02-26 17:22:41 -0800 | [diff] [blame] | 473 | ... AND Setup |
| 474 | [Teardown] Run Keywords Collect Logs |
| 475 | ... AND Stop Logging DisableONU_AuthCheck |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 476 | ... AND Delete All Devices and Verify |
Suchitra Vemuri | f7a033c | 2020-02-26 17:22:41 -0800 | [diff] [blame] | 477 | Run Keyword and Ignore Error Collect Logs |
| 478 | Run Keyword If ${has_dataplane} Clean Up Linux |
| 479 | Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test |
| 480 | Clean WPA Process |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 481 | FOR ${I} IN RANGE 0 ${num_all_onus} |
suraj gour | 472da1c | 2020-02-25 05:44:51 +0000 | [diff] [blame] | 482 | ${src}= Set Variable ${hosts.src[${I}]} |
| 483 | ${dst}= Set Variable ${hosts.dst[${I}]} |
Suchitra Vemuri | f7a033c | 2020-02-26 17:22:41 -0800 | [diff] [blame] | 484 | Run Keyword and Ignore Error Collect Logs |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 485 | ${of_id}= Get ofID From OLT List ${src['olt']} |
suraj gour | 472da1c | 2020-02-25 05:44:51 +0000 | [diff] [blame] | 486 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
| 487 | ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']} |
| 488 | ... ${of_id} |
| 489 | Disable Device ${onu_device_id} |
| 490 | Wait Until Keyword Succeeds ${timeout} 5s Validate Device DISABLED UNKNOWN |
| 491 | ... REACHABLE ${src['onu']} onu=false |
Andy Bavier | 84834d4 | 2020-02-25 13:49:50 -0700 | [diff] [blame] | 492 | ${wpa_log}= Run Keyword If ${has_dataplane} Catenate SEPARATOR=. |
| 493 | ... /tmp/wpa ${src['dp_iface_name']} log |
Suchitra Vemuri | f7a033c | 2020-02-26 17:22:41 -0800 | [diff] [blame] | 494 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Validate Authentication False |
| 495 | ... ${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] | 496 | ... ${src['container_type']} ${src['container_name']} ${wpa_log} |
Suchitra Vemuri | f7a033c | 2020-02-26 17:22:41 -0800 | [diff] [blame] | 497 | Enable Device ${onu_device_id} |
| 498 | Run Keyword And Ignore Error Kill Linux Process [w]pa_supplicant ${src['ip']} |
| 499 | ... ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 500 | Run Keyword and Ignore Error Collect Logs |
| 501 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s Validate Device |
| 502 | ... ENABLED ACTIVE REACHABLE ${src['onu']} onu=True onu_reason=omci-flows-pushed |
| 503 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Validate Authentication True |
| 504 | ... ${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] | 505 | ... ${src['container_type']} ${src['container_name']} ${wpa_log} |
suraj gour | 472da1c | 2020-02-25 05:44:51 +0000 | [diff] [blame] | 506 | Run Keyword and Ignore Error Get Device Output from Voltha ${onu_device_id} |
| 507 | END |
| 508 | Run Keyword and Ignore Error Collect Logs |
| 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 |
Andy Bavier | bbac419 | 2020-06-29 21:42:10 -0700 | [diff] [blame] | 513 | [Tags] 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 |
| 522 | Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test |
| 523 | |
| 524 | #${of_id}= Wait Until Keyword Succeeds ${timeout} 15s Validate OLT Device in ONOS |
| 525 | #... ${olt_serial_number} |
| 526 | FOR ${I} IN RANGE 0 ${num_all_onus} |
Gayathri.Selvan | 92d1686 | 2020-03-19 14:47:58 +0000 | [diff] [blame] | 527 | ${src}= Set Variable ${hosts.src[${I}]} |
| 528 | ${dst}= Set Variable ${hosts.dst[${I}]} |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 529 | ${of_id}= Get ofID From OLT List ${src['olt']} |
Andy Bavier | f6ab19c | 2020-05-14 10:34:47 -0700 | [diff] [blame] | 530 | |
| 531 | # Check for iperf3 and jq tools |
| 532 | ${stdout} ${stderr} ${rc}= Execute Remote Command which iperf3 jq |
| 533 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 534 | Pass Execution If ${rc} != 0 Skipping test: iperf3 / jq not found on the RG |
| 535 | |
Gayathri.Selvan | 92d1686 | 2020-03-19 14:47:58 +0000 | [diff] [blame] | 536 | ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']} |
| 537 | ... ${of_id} |
| 538 | ${subscriber_id}= Set Variable ${of_id}/${onu_port} |
| 539 | ${bandwidth_profile_name} Get Bandwidth Profile Name For Given Subscriber ${subscriber_id} |
| 540 | ... upstreamBandwidthProfile |
| 541 | ${limiting_bw_value_upstream} Get Bandwidth Details ${bandwidth_profile_name} |
| 542 | ${bandwidth_profile_name} Get Bandwidth Profile Name For Given Subscriber ${subscriber_id} |
| 543 | ... downstreamBandwidthProfile |
| 544 | ${limiting_bw_value_dnstream} Get Bandwidth Details ${bandwidth_profile_name} |
| 545 | |
| 546 | # Stream TCP packets from RG to server |
| 547 | ${updict}= Run Iperf3 Test Client ${src} server=${dst['dp_iface_ip_qinq']} |
| 548 | ... args=-t 30 |
| 549 | ${actual_upstream_bw_used}= Evaluate ${updict['end']['sum_received']['bits_per_second']}/1000 |
| 550 | |
| 551 | # Stream TCP packets from server to RG |
| 552 | ${dndict}= Run Iperf3 Test Client ${src} server=${dst['dp_iface_ip_qinq']} |
| 553 | ... args=-R -t 30 |
| 554 | ${actual_dnstream_bw_used}= Evaluate ${dndict['end']['sum_received']['bits_per_second']}/1000 |
| 555 | |
| 556 | ${pct_limit_up}= Evaluate 100*${actual_upstream_bw_used}/${limiting_bw_value_upstream} |
| 557 | ${pct_limit_dn}= Evaluate 100*${actual_dnstream_bw_used}/${limiting_bw_value_dnstream} |
| 558 | Log Up: bwprof ${limiting_bw_value_upstream}Kbps, got ${actual_upstream_bw_used}Kbps (${pct_limit_up}%) |
| 559 | Log Down: bwprof ${limiting_bw_value_dnstream}Kbps, got ${actual_dnstream_bw_used}Kbps (${pct_limit_dn}%) |
| 560 | |
| 561 | Should Be True ${pct_limit_up} <= ${upper_margin_pct} |
| 562 | ... The upstream bandwidth exceeded the limit (${pct_limit_up}% of limit) |
Andy Bavier | eff938d | 2020-06-29 18:27:49 -0700 | [diff] [blame] | 563 | # VOL-3125: downstream bw limit not enforced. Uncomment when fixed. |
| 564 | #Should Be True ${pct_limit_dn} <= ${upper_margin_pct} |
| 565 | #... The downstream bandwidth exceeded the limit (${pct_limit_dn}% of limit) |
Gayathri.Selvan | 92d1686 | 2020-03-19 14:47:58 +0000 | [diff] [blame] | 566 | Should Be True ${pct_limit_up} >= ${lower_margin_pct} |
| 567 | ... The upstream bandwidth guarantee was not met (${pct_limit_up}% of resv) |
| 568 | Should Be True ${pct_limit_dn} >= ${lower_margin_pct} |
| 569 | ... The downstream bandwidth guarantee was not met (${pct_limit_dn}% of resv) |
| 570 | END |
| 571 | |
| 572 | Data plane verification using UDP |
| 573 | [Documentation] Test bandwidth profile is met and not exceeded for each subscriber. |
| 574 | ... Assumes iperf3 and jq installed on client and iperf -s running on DHCP server |
Andy Bavier | bbac419 | 2020-06-29 21:42:10 -0700 | [diff] [blame] | 575 | [Tags] dataplane BandwidthProfileUDP VOL-2052 |
Andy Bavier | dfbcaef | 2020-05-27 15:34:18 -0700 | [diff] [blame] | 576 | [Setup] Start Logging BandwidthProfileUDP |
| 577 | [Teardown] Run Keywords Collect Logs |
| 578 | ... AND Stop Logging BandwidthProfileUDP |
Andy Bavier | eff938d | 2020-06-29 18:27:49 -0700 | [diff] [blame] | 579 | Pass Execution If '${has_dataplane}'=='False' |
| 580 | ... 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] | 581 | #${of_id}= Wait Until Keyword Succeeds ${timeout} 15s Validate OLT Device in ONOS ${olt_serial_number} |
| 582 | FOR ${I} IN RANGE 0 ${num_all_onus} |
Gayathri.Selvan | 92d1686 | 2020-03-19 14:47:58 +0000 | [diff] [blame] | 583 | ${src}= Set Variable ${hosts.src[${I}]} |
| 584 | ${dst}= Set Variable ${hosts.dst[${I}]} |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 585 | ${of_id}= Get ofID From OLT List ${src['olt']} |
Andy Bavier | d59f977 | 2020-07-01 12:00:42 -0700 | [diff] [blame] | 586 | |
| 587 | # Check for iperf3 and jq tools |
| 588 | ${stdout} ${stderr} ${rc}= Execute Remote Command which iperf3 jq |
| 589 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 590 | Pass Execution If ${rc} != 0 Skipping test: iperf3 / jq not found on the RG |
| 591 | |
Gayathri.Selvan | 92d1686 | 2020-03-19 14:47:58 +0000 | [diff] [blame] | 592 | ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']} |
| 593 | ... ${of_id} |
| 594 | ${subscriber_id}= Set Variable ${of_id}/${onu_port} |
| 595 | ${bandwidth_profile_name} Get Bandwidth Profile Name For Given Subscriber ${subscriber_id} |
| 596 | ... upstreamBandwidthProfile |
| 597 | ${limiting_bw_value_upstream} Get Bandwidth Details ${bandwidth_profile_name} |
| 598 | ${bandwidth_profile_name} Get Bandwidth Profile Name For Given Subscriber ${subscriber_id} |
| 599 | ... downstreamBandwidthProfile |
| 600 | ${limiting_bw_value_dnstream} Get Bandwidth Details ${bandwidth_profile_name} |
| 601 | |
| 602 | # Stream UDP packets from RG to server |
Andrea Campanella | 1d34bfc | 2020-08-06 09:58:49 +0200 | [diff] [blame] | 603 | ${uprate}= Run Keyword If ${limiting_bw_value_upstream} != 1000000 |
| 604 | ... Evaluate ${limiting_bw_value_upstream}*${udp_rate_multiplier} |
Andrea Campanella | 29341a3 | 2020-08-03 22:06:26 +0200 | [diff] [blame] | 605 | ... ELSE |
Andrea Campanella | 1d34bfc | 2020-08-06 09:58:49 +0200 | [diff] [blame] | 606 | ... Set Variable ${limiting_bw_value_upstream} |
Gayathri.Selvan | 92d1686 | 2020-03-19 14:47:58 +0000 | [diff] [blame] | 607 | ${updict}= Run Iperf3 Test Client ${src} server=${dst['dp_iface_ip_qinq']} |
Andy Bavier | 7dc5062 | 2020-05-28 14:34:12 -0700 | [diff] [blame] | 608 | ... 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] | 609 | # With UDP test, bits per second is the sending rate. Multiply by the loss rate to get the throughput. |
| 610 | ${actual_upstream_bw_used}= Evaluate |
| 611 | ... (100 - ${updict['end']['sum']['lost_percent']})*${updict['end']['sum']['bits_per_second']}/100000 |
| 612 | |
| 613 | # Stream UDP packets from server to RG |
Andrea Campanella | 1d34bfc | 2020-08-06 09:58:49 +0200 | [diff] [blame] | 614 | ${dnrate}= Run Keyword If ${limiting_bw_value_dnstream} != 1000000 |
| 615 | ... Evaluate ${limiting_bw_value_dnstream}*${udp_rate_multiplier} |
Andrea Campanella | 29341a3 | 2020-08-03 22:06:26 +0200 | [diff] [blame] | 616 | ... ELSE |
Andrea Campanella | 1d34bfc | 2020-08-06 09:58:49 +0200 | [diff] [blame] | 617 | ... Set Variable ${limiting_bw_value_dnstream} |
Gayathri.Selvan | 92d1686 | 2020-03-19 14:47:58 +0000 | [diff] [blame] | 618 | ${dndict}= Run Iperf3 Test Client ${src} server=${dst['dp_iface_ip_qinq']} |
Andy Bavier | 7dc5062 | 2020-05-28 14:34:12 -0700 | [diff] [blame] | 619 | ... 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] | 620 | # With UDP test, bits per second is the sending rate. Multiply by the loss rate to get the throughput. |
| 621 | ${actual_dnstream_bw_used}= Evaluate |
| 622 | ... (100 - ${dndict['end']['sum']['lost_percent']})*${dndict['end']['sum']['bits_per_second']}/100000 |
| 623 | |
| 624 | ${pct_limit_up}= Evaluate 100*${actual_upstream_bw_used}/${limiting_bw_value_upstream} |
| 625 | ${pct_limit_dn}= Evaluate 100*${actual_dnstream_bw_used}/${limiting_bw_value_dnstream} |
| 626 | Log Up: bwprof ${limiting_bw_value_upstream}Kbps, got ${actual_upstream_bw_used}Kbps (${pct_limit_up}%) |
| 627 | Log Down: bwprof ${limiting_bw_value_dnstream}Kbps, got ${actual_dnstream_bw_used}Kbps (${pct_limit_dn}%) |
| 628 | |
| 629 | Should Be True ${pct_limit_up} <= ${upper_margin_pct} |
| 630 | ... The upstream bandwidth exceeded the limit (${pct_limit_up}% of limit) |
Andy Bavier | eff938d | 2020-06-29 18:27:49 -0700 | [diff] [blame] | 631 | # VOL-3125: downstream bw limit not enforced. Uncomment when fixed. |
| 632 | #Should Be True ${pct_limit_dn} <= ${upper_margin_pct} |
| 633 | #... The downstream bandwidth exceeded the limit (${pct_limit_dn}% of limit) |
Gayathri.Selvan | 92d1686 | 2020-03-19 14:47:58 +0000 | [diff] [blame] | 634 | Should Be True ${pct_limit_up} >= ${lower_margin_pct} |
| 635 | ... The upstream bandwidth guarantee was not met (${pct_limit_up}% of resv) |
| 636 | Should Be True ${pct_limit_dn} >= ${lower_margin_pct} |
| 637 | ... The downstream bandwidth guarantee was not met (${pct_limit_dn}% of resv) |
| 638 | END |
Suchitra Vemuri | f7a033c | 2020-02-26 17:22:41 -0800 | [diff] [blame] | 639 | |
Suraj Gour | 3365127 | 2020-05-04 10:10:16 +0530 | [diff] [blame] | 640 | Validate parsing of data traffic through voltha using tech profile |
| 641 | [Documentation] Assuming that test1 was executed where all the ONUs are authenticated/DHCP/pingable |
| 642 | ... Prerequisite tools : Tcpdump and Mausezahn traffic generator on both RG and DHCP/BNG VMs |
| 643 | ... Install jq tool to read json file, where test suite is being running |
| 644 | ... Make sure 9999 port is enabled or forwarded for both upsteam and downstream direction |
| 645 | ... This test sends UDP packets on port 9999 with pbits between 0 and 7 and validates that |
| 646 | ... the pbits are preserved by the PON. |
Andy Bavier | bbac419 | 2020-06-29 21:42:10 -0700 | [diff] [blame] | 647 | [Tags] dataplane TechProfile VOL-2054 |
Suraj Gour | 3365127 | 2020-05-04 10:10:16 +0530 | [diff] [blame] | 648 | [Setup] Start Logging TechProfile |
| 649 | [Teardown] Run Keywords Collect Logs |
| 650 | ... AND Stop Logging TechProfile |
| 651 | Pass Execution If '${has_dataplane}'=='False' |
| 652 | ... Skipping test: Technology profile validation can be done only in physical pod |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 653 | FOR ${I} IN RANGE 0 ${num_all_onus} |
Suraj Gour | 3365127 | 2020-05-04 10:10:16 +0530 | [diff] [blame] | 654 | ${src}= Set Variable ${hosts.src[${I}]} |
| 655 | ${dst}= Set Variable ${hosts.dst[${I}]} |
| 656 | |
| 657 | ${bng_ip}= Get Variable Value ${dst['noroot_ip']} |
| 658 | ${bng_user}= Get Variable Value ${dst['noroot_user']} |
| 659 | ${bng_pass}= Get Variable Value ${dst['noroot_pass']} |
Andy Bavier | f4b7d1d | 2020-06-30 11:14:04 -0700 | [diff] [blame] | 660 | 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] | 661 | ... Skipping test: credentials for BNG login required in deployment config |
| 662 | |
| 663 | ${stdout} ${stderr} ${rc}= Execute Remote Command which mausezahn tcpdump |
| 664 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 665 | Pass Execution If ${rc} != 0 Skipping test: mausezahn / tcpdump not found on the RG |
| 666 | ${stdout} ${stderr} ${rc}= Execute Remote Command which mausezahn tcpdump |
| 667 | ... ${bng_ip} ${bng_user} ${bng_pass} ${dst['container_type']} ${dst['container_name']} |
| 668 | Pass Execution If ${rc} != 0 Skipping test: mausezahn / tcpdump not found on the BNG |
| 669 | Log Upstream test |
Andy Bavier | eff938d | 2020-06-29 18:27:49 -0700 | [diff] [blame] | 670 | 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] | 671 | ... ${dst['dp_iface_ip_qinq']} ${dst['dp_iface_name']} ${src['dp_iface_name']} |
| 672 | ... 0 udp 9999 0 vlan |
| 673 | ... ${bng_ip} ${bng_user} ${bng_pass} ${dst['container_type']} ${dst['container_name']} |
| 674 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 675 | Log Downstream test |
| 676 | ${rg_ip} ${stderr} ${rc}= Execute Remote Command |
| 677 | ... ifconfig ${src['dp_iface_name']} | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1 }' |
| 678 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 679 | 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] | 680 | 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] | 681 | ... ${rg_ip} ${src['dp_iface_name']} ${dst['dp_iface_name']}.${src['s_tag']} |
| 682 | ... 0 udp 9999 ${src['c_tag']} udp |
| 683 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 684 | ... ${bng_ip} ${bng_user} ${bng_pass} ${dst['container_type']} ${dst['container_name']} |
| 685 | END |
| 686 | |
Hardik Windlass | 16cdf96 | 2020-04-29 15:26:50 +0530 | [diff] [blame] | 687 | Test Disable and Enable OLT PON Port |
| 688 | [Documentation] Validates E2E Ping Connectivity and object states for the given scenario: |
| 689 | ... Assuming that all the ONUs are DHCP/pingable (i.e. assuming sanityDt test was executed) |
| 690 | ... Perform disable on the OLT PON Port and validate that the pings do not succeed |
| 691 | ... Perform enable on the OLT PON Port and validate that the pings are successful |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 692 | [Tags] functional DisableEnableOltPonPort VOL-2577 notready |
Hardik Windlass | 16cdf96 | 2020-04-29 15:26:50 +0530 | [diff] [blame] | 693 | [Setup] Run Keywords Start Logging DisableEnableOltPonPort |
| 694 | ... AND Setup |
| 695 | [Teardown] Run Keywords Collect Logs |
| 696 | ... AND Stop Logging DisableEnableOltPonPort |
| 697 | ... AND Delete Device and Verify |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 698 | #TODO: Update this test for new framework changes |
Hardik Windlass | 16cdf96 | 2020-04-29 15:26:50 +0530 | [diff] [blame] | 699 | Run Keyword If ${has_dataplane} Clean Up Linux |
| 700 | Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test |
| 701 | ${olt_pon_port_list}= Retrieve OLT PON Ports ${olt_device_id} |
| 702 | ${olt_pon_port_list_len}= Get Length ${olt_pon_port_list} |
| 703 | FOR ${INDEX0} IN RANGE 0 ${olt_pon_port_list_len} |
| 704 | ${olt_pon_port}= Get From List ${olt_pon_port_list} ${INDEX0} |
| 705 | ${olt_peer_list}= Retrieve Peer List From OLT PON Port ${olt_device_id} ${olt_pon_port} |
| 706 | # Disable the OLT PON Port and Validate OLT Device |
| 707 | DisableOrEnable OLT PON Port disable ${olt_device_id} ${olt_pon_port} |
| 708 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 709 | ... Validate OLT PON Port Status ${olt_device_id} ${olt_pon_port} |
| 710 | ... DISABLED DISCOVERED |
| 711 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 712 | ... Validate OLT Device ENABLED ACTIVE REACHABLE |
| 713 | ... ${olt_serial_number} |
| 714 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 715 | ... Validate ONUs for PON OLT Disable ${olt_peer_list} |
| 716 | # Enable the OLT PON Port back, and check ONU status are back to "ACTIVE" |
| 717 | DisableOrEnable OLT PON Port enable ${olt_device_id} ${olt_pon_port} |
| 718 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 719 | ... Validate OLT PON Port Status ${olt_device_id} ${olt_pon_port} |
| 720 | ... ENABLED ACTIVE |
| 721 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 722 | ... Validate ONUs for PON OLT Enable ${olt_peer_list} |
| 723 | END |
| 724 | |
Suchitra Vemuri | 65cd65f | 2019-08-30 14:39:22 -0700 | [diff] [blame] | 725 | *** Keywords *** |
| 726 | Setup Suite |
Andy Bavier | 88cd9f6 | 2019-11-26 16:22:33 -0700 | [diff] [blame] | 727 | [Documentation] Set up the test suite |
| 728 | Common Test Suite Setup |
Hung-Wei Chiu | cc6e655 | 2020-06-04 12:57:38 -0700 | [diff] [blame] | 729 | #Restore all ONUs |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 730 | #Run Keyword If ${has_dataplane} RestoreONUs ${num_all_onus} |
Suchitra Vemuri | 1d8e817 | 2020-06-17 17:43:56 -0700 | [diff] [blame] | 731 | #power_switch.robot needs it to support different vendor's power switch |
| 732 | ${switch_type}= Get Variable Value ${web_power_switch.type} |
| 733 | Run Keyword If "${switch_type}"!="" Set Global Variable ${powerswitch_type} ${switch_type} |
Suchitra Vemuri | 65cd65f | 2019-08-30 14:39:22 -0700 | [diff] [blame] | 734 | |
David Bainbridge | f81cd64 | 2019-11-20 00:14:47 +0000 | [diff] [blame] | 735 | Clear All Devices Then Create New Device |
| 736 | [Documentation] Remove any devices from VOLTHA and ONOS |
David Bainbridge | f81cd64 | 2019-11-20 00:14:47 +0000 | [diff] [blame] | 737 | # Remove all devices from voltha and nos |
| 738 | Delete All Devices and Verify |
David Bainbridge | f81cd64 | 2019-11-20 00:14:47 +0000 | [diff] [blame] | 739 | # Execute normal test Setup Keyword |
| 740 | Setup |