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 | 77f7abf | 2020-06-19 15:52:25 -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 |
Andy Bavier | ba9866b | 2019-10-11 07:11:53 -0700 | [diff] [blame] | 51 | ${has_dataplane} True |
Andy Bavier | ba9866b | 2019-10-11 07:11:53 -0700 | [diff] [blame] | 52 | ${teardown_device} False |
Zack Williams | a8fe75a | 2020-01-10 14:25:27 -0700 | [diff] [blame] | 53 | ${scripts} ../../scripts |
Suchitra Vemuri | 65cd65f | 2019-08-30 14:39:22 -0700 | [diff] [blame] | 54 | |
Andy Bavier | abeba26 | 2020-02-07 16:22:16 -0700 | [diff] [blame] | 55 | # Per-test logging on failure is turned off by default; set this variable to enable |
| 56 | ${container_log_dir} ${None} |
| 57 | |
Suchitra Vemuri | 65cd65f | 2019-08-30 14:39:22 -0700 | [diff] [blame] | 58 | *** Test Cases *** |
Suchitra Vemuri | 77f7abf | 2020-06-19 15:52:25 -0700 | [diff] [blame^] | 59 | Reboot ONUs Physically |
| 60 | [Documentation] This test reboots ONUs physically before execution all the tests |
| 61 | ... Test case runs only on the PODs that are configured with PowerSwitch that |
| 62 | ... controls the power off/on ONUs/OLT remotely (simulating a physical reboot) |
| 63 | [Tags] functional PowerSwitch RebootAllONUs |
| 64 | [Setup] Start Logging RebootAllONUs |
| 65 | [Teardown] Run Keywords Collect Logs |
| 66 | ... AND Stop Logging RebootAllONUs |
| 67 | Power Switch Connection Suite ${web_power_switch.ip} ${web_power_switch.user} ${web_power_switch.password} |
| 68 | FOR ${I} IN RANGE 0 ${num_onus} |
| 69 | ${src}= Set Variable ${hosts.src[${I}]} |
| 70 | Disable Switch Outlet ${src['power_switch_port']} |
| 71 | Sleep 60s |
| 72 | Enable Switch Outlet ${src['power_switch_port']} |
| 73 | Sleep 60s |
| 74 | END |
| 75 | |
Suchitra Vemuri | 65cd65f | 2019-08-30 14:39:22 -0700 | [diff] [blame] | 76 | Sanity E2E Test for OLT/ONU on POD |
| 77 | [Documentation] Validates E2E Ping Connectivity and object states for the given scenario: |
| 78 | ... 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] | 79 | [Tags] sanity test1 |
Andy Bavier | 4a8450e | 2020-02-04 08:58:37 -0700 | [diff] [blame] | 80 | [Setup] Run Keywords Announce Message START TEST SanityTest |
Andy Bavier | abeba26 | 2020-02-07 16:22:16 -0700 | [diff] [blame] | 81 | ... AND Start Logging SanityTest |
Andy Bavier | 4a8450e | 2020-02-04 08:58:37 -0700 | [diff] [blame] | 82 | ... AND Setup |
| 83 | [Teardown] Run Keywords Collect Logs |
Andy Bavier | abeba26 | 2020-02-07 16:22:16 -0700 | [diff] [blame] | 84 | ... AND Stop Logging SanityTest |
Andy Bavier | 4a8450e | 2020-02-04 08:58:37 -0700 | [diff] [blame] | 85 | ... AND Announce Message END TEST SanityTest |
Suchitra Vemuri | c5295a3 | 2019-12-15 20:32:04 -0800 | [diff] [blame] | 86 | Run Keyword If ${has_dataplane} Clean Up Linux |
Zack Williams | a8fe75a | 2020-01-10 14:25:27 -0700 | [diff] [blame] | 87 | Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test |
Suchitra Vemuri | 65cd65f | 2019-08-30 14:39:22 -0700 | [diff] [blame] | 88 | |
Hema | 93762cf | 2020-01-29 19:59:28 +0530 | [diff] [blame] | 89 | Test Disable and Enable OLT |
| 90 | [Documentation] Validates E2E Ping Connectivity and object states for the given scenario: |
| 91 | ... Assuming that test1 was executed where all the ONUs are authenticated/DHCP/pingable |
| 92 | ... Perform disable on the OLT and validate that the pings do not succeed |
| 93 | ... Perform enable on the OLT and validate that the pings are successful |
| 94 | [Tags] VOL-2410 DisableEnableOLT notready |
Andy Bavier | abeba26 | 2020-02-07 16:22:16 -0700 | [diff] [blame] | 95 | [Setup] Run Keywords Announce Message START TEST DisableEnableOLT |
| 96 | ... AND Start Logging DisableEnableOLT |
Andy Bavier | 4a8450e | 2020-02-04 08:58:37 -0700 | [diff] [blame] | 97 | [Teardown] Run Keywords Collect Logs |
Andy Bavier | abeba26 | 2020-02-07 16:22:16 -0700 | [diff] [blame] | 98 | ... AND Stop Logging DisableEnableOLT |
Andy Bavier | 4a8450e | 2020-02-04 08:58:37 -0700 | [diff] [blame] | 99 | ... AND Announce Message END TEST DisableEnableOLT |
Hema | 93762cf | 2020-01-29 19:59:28 +0530 | [diff] [blame] | 100 | #Disable the OLT and verify the OLT/ONUs are disabled properly |
| 101 | ${rc} ${output}= Run and Return Rc and Output ${VOLTCTL_CONFIG}; voltctl device disable ${olt_device_id} |
| 102 | Should Be Equal As Integers ${rc} 0 |
| 103 | Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Device DISABLED UNKNOWN REACHABLE |
| 104 | ... ${olt_serial_number} |
| 105 | FOR ${I} IN RANGE 0 ${num_onus} |
| 106 | ${src}= Set Variable ${hosts.src[${I}]} |
| 107 | ${dst}= Set Variable ${hosts.dst[${I}]} |
| 108 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
| 109 | Wait Until Keyword Succeeds ${timeout} 5s Validate Device ENABLED DISCOVERED |
| 110 | ... UNREACHABLE ${src['onu']} onu=false |
| 111 | #Verify that ping fails |
TorstenThieme | 754fec7 | 2020-02-18 07:24:46 +0000 | [diff] [blame] | 112 | Run Keyword If ${has_dataplane} |
| 113 | ... Run Keyword And Continue On Failure Wait Until Keyword Succeeds 60s 2s |
Hema | 93762cf | 2020-01-29 19:59:28 +0530 | [diff] [blame] | 114 | ... Check Ping False ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']} |
| 115 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}} |
| 116 | END |
| 117 | #Enable the OLT back and check ONU, OLT status are back to "ACTIVE" |
| 118 | Enable Device ${olt_device_id} |
| 119 | Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Device ENABLED ACTIVE REACHABLE |
| 120 | ... ${olt_serial_number} |
Hema | f64d34c | 2020-03-25 00:40:17 +0530 | [diff] [blame] | 121 | Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Port Types |
| 122 | ... PON_OLT ETHERNET_NNI |
Hema | 93762cf | 2020-01-29 19:59:28 +0530 | [diff] [blame] | 123 | FOR ${I} IN RANGE 0 ${num_onus} |
| 124 | ${src}= Set Variable ${hosts.src[${I}]} |
| 125 | ${dst}= Set Variable ${hosts.dst[${I}]} |
| 126 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
| 127 | ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']} |
| 128 | ... ${of_id} |
| 129 | Wait Until Keyword Succeeds ${timeout} 5s Validate Device ENABLED ACTIVE |
| 130 | ... REACHABLE ${src['onu']} onu=True onu_reason=omci-flows-pushed |
| 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} |
Hema | 93762cf | 2020-01-29 19:59:28 +0530 | [diff] [blame] | 133 | #Verify that ping workss fine again |
TorstenThieme | 754fec7 | 2020-02-18 07:24:46 +0000 | [diff] [blame] | 134 | Run Keyword If ${has_dataplane} |
| 135 | ... Run Keyword And Continue On Failure Wait Until Keyword Succeeds 60s 2s |
Hema | 93762cf | 2020-01-29 19:59:28 +0530 | [diff] [blame] | 136 | ... Check Ping True ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']} |
| 137 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}} |
| 138 | Run Keyword and Ignore Error Collect Logs |
| 139 | END |
| 140 | |
| 141 | |
Suchitra Vemuri | 6db8941 | 2019-11-14 14:52:54 -0800 | [diff] [blame] | 142 | Test Disable and Enable ONU |
| 143 | [Documentation] Validates E2E Ping Connectivity and object states for the given scenario: |
| 144 | ... Assuming that test1 was executed where all the ONUs are authenticated/DHCP/pingable |
| 145 | ... Perform disable on the ONUs and validate that the pings do not succeed |
| 146 | ... Perform enable on the ONUs and validate that the pings are successful |
Suchitra Vemuri | 04245f7 | 2020-01-08 16:43:24 -0800 | [diff] [blame] | 147 | [Tags] functional DisableEnableONU released |
Andy Bavier | abeba26 | 2020-02-07 16:22:16 -0700 | [diff] [blame] | 148 | [Setup] Run Keywords Announce Message START TEST DisableEnableONU |
| 149 | ... AND Start Logging DisableEnableONU |
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 DisableEnableONU |
Andy Bavier | 4a8450e | 2020-02-04 08:58:37 -0700 | [diff] [blame] | 152 | ... AND Announce Message END TEST DisableEnableONU |
Suchitra Vemuri | 6db8941 | 2019-11-14 14:52:54 -0800 | [diff] [blame] | 153 | FOR ${I} IN RANGE 0 ${num_onus} |
| 154 | ${src}= Set Variable ${hosts.src[${I}]} |
| 155 | ${dst}= Set Variable ${hosts.dst[${I}]} |
Suchitra Vemuri | 6db8941 | 2019-11-14 14:52:54 -0800 | [diff] [blame] | 156 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
| 157 | ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']} |
| 158 | ... ${of_id} |
| 159 | Disable Device ${onu_device_id} |
Andy Bavier | 46c8be3 | 2020-01-21 10:06:27 -0700 | [diff] [blame] | 160 | 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] | 161 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure |
| 162 | ... Wait Until Keyword Succeeds 60s 2s |
Zack Williams | a8fe75a | 2020-01-10 14:25:27 -0700 | [diff] [blame] | 163 | ... Check Ping False ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']} |
| 164 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
Suchitra Vemuri | 6db8941 | 2019-11-14 14:52:54 -0800 | [diff] [blame] | 165 | Enable Device ${onu_device_id} |
| 166 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
ubuntu | 6b6e7d4 | 2020-03-02 12:35:42 -0800 | [diff] [blame] | 167 | ... Validate Subscriber DHCP Allocation ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port} |
Andy Bavier | 33e6dd3 | 2020-01-16 13:35:20 -0700 | [diff] [blame] | 168 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure |
| 169 | ... Wait Until Keyword Succeeds 60s 2s |
Zack Williams | a8fe75a | 2020-01-10 14:25:27 -0700 | [diff] [blame] | 170 | ... Check Ping True ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']} |
| 171 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 172 | Run Keyword and Ignore Error Get Device Output from Voltha ${onu_device_id} |
| 173 | Run Keyword and Ignore Error Collect Logs |
Suchitra Vemuri | 6db8941 | 2019-11-14 14:52:54 -0800 | [diff] [blame] | 174 | END |
| 175 | |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 176 | Test Subscriber Delete and Add |
| 177 | [Documentation] Validates E2E Ping Connectivity and object states for the given scenario: |
| 178 | ... Assuming that all the ONUs are authenticated/DHCP/pingable |
Zack Williams | a8fe75a | 2020-01-10 14:25:27 -0700 | [diff] [blame] | 179 | ... Delete a subscriber and validate that the pings do not succeed |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 180 | ... Re-add the subscriber and validate that the pings are successful |
Suchitra Vemuri | 04245f7 | 2020-01-08 16:43:24 -0800 | [diff] [blame] | 181 | [Tags] functional SubAddDelete released |
Andy Bavier | abeba26 | 2020-02-07 16:22:16 -0700 | [diff] [blame] | 182 | [Setup] Run Keywords Announce Message START TEST SubAddDelete |
| 183 | ... AND Start Logging SubAddDelete |
Andy Bavier | 4a8450e | 2020-02-04 08:58:37 -0700 | [diff] [blame] | 184 | [Teardown] Run Keywords Collect Logs |
Andy Bavier | abeba26 | 2020-02-07 16:22:16 -0700 | [diff] [blame] | 185 | ... AND Stop Logging SubAddDelete |
Andy Bavier | 4a8450e | 2020-02-04 08:58:37 -0700 | [diff] [blame] | 186 | ... AND Announce Message END TEST SubAddDelete |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 187 | FOR ${I} IN RANGE 0 ${num_onus} |
| 188 | ${src}= Set Variable ${hosts.src[${I}]} |
| 189 | ${dst}= Set Variable ${hosts.dst[${I}]} |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 190 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
| 191 | ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']} |
| 192 | ... ${of_id} |
ubuntu | 6b6e7d4 | 2020-03-02 12:35:42 -0800 | [diff] [blame] | 193 | 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] | 194 | ... ${ONOS_SSH_PORT} volt-remove-subscriber-access ${of_id} ${onu_port} |
| 195 | Sleep 10s |
Suchitra Vemuri | 9da4430 | 2020-03-04 14:24:49 -0800 | [diff] [blame] | 196 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
| 197 | ... 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] | 198 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure |
| 199 | ... Wait Until Keyword Succeeds 60s 2s |
Zack Williams | a8fe75a | 2020-01-10 14:25:27 -0700 | [diff] [blame] | 200 | ... Check Ping False ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']} |
| 201 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
ubuntu | 6b6e7d4 | 2020-03-02 12:35:42 -0800 | [diff] [blame] | 202 | 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] | 203 | ... ${ONOS_SSH_PORT} volt-add-subscriber-access ${of_id} ${onu_port} |
| 204 | Sleep 10s |
| 205 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
Suchitra Vemuri | 9da4430 | 2020-03-04 14:24:49 -0800 | [diff] [blame] | 206 | ... Verify No Pending Flows For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port} |
| 207 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
ubuntu | 6b6e7d4 | 2020-03-02 12:35:42 -0800 | [diff] [blame] | 208 | ... Validate Subscriber DHCP Allocation ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port} |
Andy Bavier | 33e6dd3 | 2020-01-16 13:35:20 -0700 | [diff] [blame] | 209 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure |
| 210 | ... Wait Until Keyword Succeeds 60s 2s |
Zack Williams | a8fe75a | 2020-01-10 14:25:27 -0700 | [diff] [blame] | 211 | ... Check Ping True ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']} |
| 212 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 213 | Run Keyword and Ignore Error Get Device Output from Voltha ${onu_device_id} |
| 214 | Run Keyword and Ignore Error Collect Logs |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 215 | END |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 216 | |
suraj gour | d5cfdbb | 2019-12-13 12:44:55 +0000 | [diff] [blame] | 217 | Check DHCP attempt fails when subscriber is not added |
| 218 | [Documentation] Validates when removed subscriber access, DHCP attempt, ping fails and |
| 219 | ... when again added subscriber access, DHCP attempt, ping succeeds |
Zack Williams | a8fe75a | 2020-01-10 14:25:27 -0700 | [diff] [blame] | 220 | ... 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] | 221 | [Tags] functional SubsRemoveDHCP released |
Andy Bavier | abeba26 | 2020-02-07 16:22:16 -0700 | [diff] [blame] | 222 | [Setup] Run Keywords Announce Message START TEST SubsRemoveDHCP |
| 223 | ... AND Start Logging SubsRemoveDHCP |
Andy Bavier | 4a8450e | 2020-02-04 08:58:37 -0700 | [diff] [blame] | 224 | [Teardown] Run Keywords Collect Logs |
Andy Bavier | abeba26 | 2020-02-07 16:22:16 -0700 | [diff] [blame] | 225 | ... AND Stop Logging SubsRemoveDHCP |
Andy Bavier | 4a8450e | 2020-02-04 08:58:37 -0700 | [diff] [blame] | 226 | ... AND Announce Message END TEST SubsRemoveDHCP |
suraj gour | d5cfdbb | 2019-12-13 12:44:55 +0000 | [diff] [blame] | 227 | FOR ${I} IN RANGE 0 ${num_onus} |
| 228 | ${src}= Set Variable ${hosts.src[${I}]} |
| 229 | ${dst}= Set Variable ${hosts.dst[${I}]} |
Zack Williams | a8fe75a | 2020-01-10 14:25:27 -0700 | [diff] [blame] | 230 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
suraj gour | d5cfdbb | 2019-12-13 12:44:55 +0000 | [diff] [blame] | 231 | ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']} |
| 232 | ... ${of_id} |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 233 | Run Keyword And Ignore Error Login And Run Command On Remote System killall dhclient ${src['ip']} |
| 234 | ... ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 235 | Run Keyword And Ignore Error Login And Run Command On Remote System ps -ef | grep dhclient ${src['ip']} |
| 236 | ... ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
ubuntu | 6b6e7d4 | 2020-03-02 12:35:42 -0800 | [diff] [blame] | 237 | 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] | 238 | ... ${ONOS_SSH_PORT} volt-remove-subscriber-access ${of_id} ${onu_port} |
Suchitra Vemuri | 8f1d306 | 2020-02-28 11:57:37 -0800 | [diff] [blame] | 239 | Sleep 15s |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 240 | Run Keyword And Ignore Error Login And Run Command On Remote System ps -ef | grep dhclient ${src['ip']} |
| 241 | ... ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
Zack Williams | a8fe75a | 2020-01-10 14:25:27 -0700 | [diff] [blame] | 242 | Run Keyword If ${has_dataplane} Wait Until Keyword Succeeds ${timeout} 2s |
| 243 | ... Delete IP Addresses from Interface on Remote Host ${src['dp_iface_name']} ${src['ip']} |
| 244 | ... ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 245 | Run Keyword And Ignore Error Login And Run Command On Remote System |
| 246 | ... ifconfig | grep -A 10 ens ${src['ip']} |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 247 | ... ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
suraj gour | d5cfdbb | 2019-12-13 12:44:55 +0000 | [diff] [blame] | 248 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Validate DHCP and Ping False |
| 249 | ... False ${src['dp_iface_name']} ${src['s_tag']} ${src['c_tag']} ${dst['dp_iface_ip_qinq']} |
| 250 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 251 | ... ${dst['dp_iface_name']} ${dst['ip']} ${dst['user']} ${dst['pass']} ${dst['container_type']} |
| 252 | ... ${dst['container_name']} |
ubuntu | 6b6e7d4 | 2020-03-02 12:35:42 -0800 | [diff] [blame] | 253 | 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] | 254 | ... ${ONOS_SSH_PORT} volt-add-subscriber-access ${of_id} ${onu_port} |
Suchitra Vemuri | 9da4430 | 2020-03-04 14:24:49 -0800 | [diff] [blame] | 255 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
| 256 | ... Verify No Pending Flows For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port} |
suraj gour | d5cfdbb | 2019-12-13 12:44:55 +0000 | [diff] [blame] | 257 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Validate DHCP and Ping True |
| 258 | ... True ${src['dp_iface_name']} ${src['s_tag']} ${src['c_tag']} ${dst['dp_iface_ip_qinq']} |
| 259 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 260 | ... ${dst['dp_iface_name']} ${dst['ip']} ${dst['user']} ${dst['pass']} ${dst['container_type']} |
| 261 | ... ${dst['container_name']} |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 262 | Run Keyword and Ignore Error Collect Logs |
| 263 | END |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 264 | |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 265 | Test Disable and Enable ONU scenario for ATT workflow |
| 266 | [Documentation] Validates E2E Ping Connectivity and object states for the given scenario: |
| 267 | ... Assuming that test1 was executed where all the ONUs are authenticated/DHCP/pingable |
| 268 | ... 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] | 269 | ... Perform enable on the ONUs, authentication check, volt-add-subscriber-access and |
| 270 | ... validate that the pings are successful |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 271 | ... VOL-2284 |
Suchitra Vemuri | a7dae32 | 2020-02-19 22:38:18 -0800 | [diff] [blame] | 272 | [Tags] functional ATT_DisableEnableONU released |
Andy Bavier | abeba26 | 2020-02-07 16:22:16 -0700 | [diff] [blame] | 273 | [Setup] Run Keywords Announce Message START TEST ATT_DisableEnableONU |
| 274 | ... AND Start Logging ATT_DisableEnableONU |
Andy Bavier | 4a8450e | 2020-02-04 08:58:37 -0700 | [diff] [blame] | 275 | [Teardown] Run Keywords Collect Logs |
Andy Bavier | abeba26 | 2020-02-07 16:22:16 -0700 | [diff] [blame] | 276 | ... AND Stop Logging ATT_DisableEnableONU |
Andy Bavier | 4a8450e | 2020-02-04 08:58:37 -0700 | [diff] [blame] | 277 | ... AND Announce Message END TEST ATT_DisableEnableONU |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 278 | FOR ${I} IN RANGE 0 ${num_onus} |
| 279 | ${src}= Set Variable ${hosts.src[${I}]} |
| 280 | ${dst}= Set Variable ${hosts.dst[${I}]} |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 281 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
| 282 | ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']} |
| 283 | ... ${of_id} |
Suchitra Vemuri | 014b603 | 2020-02-14 18:13:13 -0800 | [diff] [blame] | 284 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds 120s 2s |
Suchitra Vemuri | 1ed9be7 | 2020-06-18 11:22:18 -0700 | [diff] [blame] | 285 | ... 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] | 286 | Disable Device ${onu_device_id} |
Suchitra Vemuri | 04245f7 | 2020-01-08 16:43:24 -0800 | [diff] [blame] | 287 | Sleep 5s |
ubuntu | 6b6e7d4 | 2020-03-02 12:35:42 -0800 | [diff] [blame] | 288 | 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] | 289 | ... ${ONOS_SSH_PORT} volt-remove-subscriber-access ${of_id} ${onu_port} |
Zack Williams | a8fe75a | 2020-01-10 14:25:27 -0700 | [diff] [blame] | 290 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure |
| 291 | ... Wait Until Keyword Succeeds 60s 2s Check Ping |
| 292 | ... False ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']} |
| 293 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 294 | ... ELSE sleep 60s |
| 295 | Enable Device ${onu_device_id} |
ubuntu | 6b6e7d4 | 2020-03-02 12:35:42 -0800 | [diff] [blame] | 296 | 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] | 297 | ... ${ONOS_SSH_PORT} ${onu_port} |
Zack Williams | a8fe75a | 2020-01-10 14:25:27 -0700 | [diff] [blame] | 298 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure |
| 299 | ... Validate Authentication After Reassociate True |
| 300 | ... ${src['dp_iface_name']} ${src['ip']} ${src['user']} ${src['pass']} |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 301 | ... ${src['container_type']} ${src['container_name']} |
ubuntu | 6b6e7d4 | 2020-03-02 12:35:42 -0800 | [diff] [blame] | 302 | 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] | 303 | ... ${ONOS_SSH_PORT} ${onu_port} |
ubuntu | 6b6e7d4 | 2020-03-02 12:35:42 -0800 | [diff] [blame] | 304 | 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] | 305 | ... ${ONOS_SSH_PORT} volt-add-subscriber-access ${of_id} ${onu_port} |
| 306 | Sleep 10s |
| 307 | 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] | 308 | ... 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] | 309 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 310 | ... ${dst['dp_iface_name']} ${dst['ip']} ${dst['user']} ${dst['pass']} ${dst['container_type']} |
| 311 | ... ${dst['container_name']} |
| 312 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
ubuntu | 6b6e7d4 | 2020-03-02 12:35:42 -0800 | [diff] [blame] | 313 | ... Validate Subscriber DHCP Allocation ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port} |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 314 | Run Keyword and Ignore Error Collect Logs |
suraj gour | d5cfdbb | 2019-12-13 12:44:55 +0000 | [diff] [blame] | 315 | END |
suraj gour | d5cfdbb | 2019-12-13 12:44:55 +0000 | [diff] [blame] | 316 | |
Suchitra Vemuri | 937cd39 | 2020-01-12 17:10:42 -0800 | [diff] [blame] | 317 | Delete OLT, ReAdd OLT and Perform Sanity Test |
| 318 | [Documentation] Validates E2E Ping Connectivity and object states for the given scenario: |
| 319 | ... Disable and Delete the OLT |
| 320 | ... Create/Enable the same OLT again |
| 321 | ... Validate authentication/DHCP/E2E pings succeed for all the ONUs connected to the OLT |
Suchitra Vemuri | a7dae32 | 2020-02-19 22:38:18 -0800 | [diff] [blame] | 322 | [Tags] functional DeleteOLT released |
Andy Bavier | abeba26 | 2020-02-07 16:22:16 -0700 | [diff] [blame] | 323 | [Setup] Run Keywords Announce Message START TEST DeleteOLT |
| 324 | ... AND Start Logging DeleteOLT |
Andy Bavier | 4a8450e | 2020-02-04 08:58:37 -0700 | [diff] [blame] | 325 | [Teardown] Run Keywords Collect Logs |
Andy Bavier | abeba26 | 2020-02-07 16:22:16 -0700 | [diff] [blame] | 326 | ... AND Stop Logging DeleteOLT |
Andy Bavier | 4a8450e | 2020-02-04 08:58:37 -0700 | [diff] [blame] | 327 | ... AND Announce Message END TEST DeleteOLT |
Suchitra Vemuri | 937cd39 | 2020-01-12 17:10:42 -0800 | [diff] [blame] | 328 | Run Keyword If ${has_dataplane} Clean Up Linux |
Hardik Windlass | b80b25b | 2020-04-02 20:14:14 +0530 | [diff] [blame] | 329 | Delete Device and Verify |
| 330 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 331 | ... Verify Device Flows Removed ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id} |
Suchitra Vemuri | 937cd39 | 2020-01-12 17:10:42 -0800 | [diff] [blame] | 332 | Run Keyword and Ignore Error Collect Logs |
| 333 | # Recreate the OLT |
Hardik Windlass | b80b25b | 2020-04-02 20:14:14 +0530 | [diff] [blame] | 334 | Setup |
Suchitra Vemuri | 937cd39 | 2020-01-12 17:10:42 -0800 | [diff] [blame] | 335 | Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test |
Suchitra Vemuri | 937cd39 | 2020-01-12 17:10:42 -0800 | [diff] [blame] | 336 | |
Hema | 567f301 | 2020-03-25 00:51:53 +0530 | [diff] [blame] | 337 | Check Mib State on OLT recreation after ONU, OLT deletion |
| 338 | [Documentation] Assuming that test1 was executed where all the ONUs are authenticated/DHCP/pingable, |
| 339 | ... Disable and Delete the ONU, Disable and Delete the OLT |
| 340 | ... Create/Enable the OLT again and Check for the Mib State of the ONUs |
| 341 | [Tags] functional CheckMibState notready |
| 342 | [Setup] Run Keywords Announce Message START TEST CheckMibState |
| 343 | ... AND Start Logging CheckMibState |
| 344 | [Teardown] Run Keywords Collect Logs |
| 345 | ... AND Stop Logging CheckMibState |
| 346 | ... AND Announce Message END TEST CheckMibState |
| 347 | #Disable and Delete the ONU |
| 348 | FOR ${I} IN RANGE 0 ${num_onus} |
| 349 | ${src}= Set Variable ${hosts.src[${I}]} |
| 350 | ${dst}= Set Variable ${hosts.dst[${I}]} |
| 351 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
| 352 | ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']} |
| 353 | ... ${of_id} |
| 354 | Disable Device ${onu_device_id} |
| 355 | Wait Until Keyword Succeeds 20s 2s Test Devices Disabled in VOLTHA Id=${onu_device_id} |
| 356 | Delete Device ${onu_device_id} |
| 357 | END |
| 358 | #Disable and Delete the OLT |
Hardik Windlass | b80b25b | 2020-04-02 20:14:14 +0530 | [diff] [blame] | 359 | Delete Device and Verify |
| 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 | # Recreate the OLT |
Hema | 567f301 | 2020-03-25 00:51:53 +0530 | [diff] [blame] | 363 | Run Keyword If ${has_dataplane} Sleep 180s |
| 364 | ${olt_device_id}= Create Device ${olt_ip} ${OLT_PORT} |
| 365 | Set Suite Variable ${olt_device_id} |
| 366 | Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Device PREPROVISIONED |
| 367 | ... UNKNOWN UNKNOWN ${olt_device_id} |
| 368 | Enable Device ${olt_device_id} |
| 369 | Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Device ENABLED ACTIVE REACHABLE |
| 370 | ... ${olt_serial_number} |
| 371 | #Check for the ONU status and ONU Mib State should be "omci-flows-pushed" |
| 372 | FOR ${I} IN RANGE 0 ${num_onus} |
| 373 | ${src}= Set Variable ${hosts.src[${I}]} |
| 374 | ${dst}= Set Variable ${hosts.dst[${I}]} |
| 375 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
| 376 | ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']} |
| 377 | ... ${of_id} |
| 378 | Wait Until Keyword Succeeds ${timeout} 5s Validate Device ENABLED ACTIVE |
| 379 | ... REACHABLE ${src['onu']} onu=True onu_reason=omci-flows-pushed |
| 380 | END |
| 381 | |
Hema | 783279b | 2020-01-22 15:37:37 +0530 | [diff] [blame] | 382 | Test disable ONUs and OLT then delete ONUs and OLT |
| 383 | [Documentation] On deployed POD, disable the ONU, disable the OLT and then delete ONU and OLT. |
| 384 | ... This TC is to confirm that ONU removal is not impacting OLT |
| 385 | ... Devices will be removed during the execution of this TC |
| 386 | ... 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] | 387 | [Tags] functional VOL-2354 DisableDeleteONUandOLT released |
Andy Bavier | abeba26 | 2020-02-07 16:22:16 -0700 | [diff] [blame] | 388 | [Setup] Run Keywords Announce Message START TEST DisableDeleteONUandOLT |
| 389 | ... AND Start Logging DisableDeleteONUandOLT |
Andy Bavier | 4a8450e | 2020-02-04 08:58:37 -0700 | [diff] [blame] | 390 | [Teardown] Run Keywords Collect Logs |
Andy Bavier | abeba26 | 2020-02-07 16:22:16 -0700 | [diff] [blame] | 391 | ... AND Stop Logging DisableDeleteONUandOLT |
Andy Bavier | 4a8450e | 2020-02-04 08:58:37 -0700 | [diff] [blame] | 392 | ... AND Announce Message END TEST DisableDeleteONUandOLT |
Suchitra Vemuri | ba4f371 | 2020-01-24 16:18:26 -0800 | [diff] [blame] | 393 | ${olt_device_id}= Get Device ID From SN ${olt_serial_number} |
Hema | 783279b | 2020-01-22 15:37:37 +0530 | [diff] [blame] | 394 | FOR ${I} IN RANGE 0 ${num_onus} |
| 395 | ${src}= Set Variable ${hosts.src[${I}]} |
| 396 | ${dst}= Set Variable ${hosts.dst[${I}]} |
| 397 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
Suchitra Vemuri | 014b603 | 2020-02-14 18:13:13 -0800 | [diff] [blame] | 398 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 399 | ... Validate Device ENABLED ACTIVE |
Hema | 783279b | 2020-01-22 15:37:37 +0530 | [diff] [blame] | 400 | ... REACHABLE ${src['onu']} onu=True onu_reason=omci-flows-pushed |
Suchitra Vemuri | 014b603 | 2020-02-14 18:13:13 -0800 | [diff] [blame] | 401 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 402 | ... Validate OLT Device ENABLED ACTIVE |
Hema | 783279b | 2020-01-22 15:37:37 +0530 | [diff] [blame] | 403 | ... REACHABLE ${olt_serial_number} |
| 404 | ${rc} ${output}= Run and Return Rc and Output |
| 405 | ... ${VOLTCTL_CONFIG}; voltctl device disable ${onu_device_id} |
| 406 | Should Be Equal As Integers ${rc} 0 |
Suchitra Vemuri | 014b603 | 2020-02-14 18:13:13 -0800 | [diff] [blame] | 407 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 408 | ... Validate Device DISABLED UNKNOWN |
Hema | 783279b | 2020-01-22 15:37:37 +0530 | [diff] [blame] | 409 | ... REACHABLE ${src['onu']} onu=false |
Suchitra Vemuri | 014b603 | 2020-02-14 18:13:13 -0800 | [diff] [blame] | 410 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 411 | ... Validate OLT Device ENABLED ACTIVE |
Hema | 783279b | 2020-01-22 15:37:37 +0530 | [diff] [blame] | 412 | ... REACHABLE ${olt_serial_number} |
| 413 | END |
| 414 | ${rc} ${output}= Run and Return Rc and Output ${VOLTCTL_CONFIG}; voltctl device disable ${olt_device_id} |
| 415 | Should Be Equal As Integers ${rc} 0 |
Suchitra Vemuri | 014b603 | 2020-02-14 18:13:13 -0800 | [diff] [blame] | 416 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 417 | ... Validate OLT Device DISABLED UNKNOWN REACHABLE |
Hema | 783279b | 2020-01-22 15:37:37 +0530 | [diff] [blame] | 418 | ... ${olt_serial_number} |
| 419 | FOR ${I} IN RANGE 0 ${num_onus} |
| 420 | ${src}= Set Variable ${hosts.src[${I}]} |
| 421 | ${dst}= Set Variable ${hosts.dst[${I}]} |
| 422 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
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 Device DISABLED DISCOVERED |
| 425 | ... UNREACHABLE ${src['onu']} onu=false |
Hardik Windlass | 7da42ca | 2020-03-13 14:25:44 +0530 | [diff] [blame] | 426 | Delete Device ${onu_device_id} |
Suchitra Vemuri | 014b603 | 2020-02-14 18:13:13 -0800 | [diff] [blame] | 427 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 428 | ... Validate OLT Device DISABLED UNKNOWN |
Hema | 783279b | 2020-01-22 15:37:37 +0530 | [diff] [blame] | 429 | ... REACHABLE ${olt_serial_number} |
| 430 | END |
Hardik Windlass | 7da42ca | 2020-03-13 14:25:44 +0530 | [diff] [blame] | 431 | Delete Device ${olt_device_id} |
Suchitra Vemuri | 014b603 | 2020-02-14 18:13:13 -0800 | [diff] [blame] | 432 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s Test Empty Device List |
Hardik Windlass | b80b25b | 2020-04-02 20:14:14 +0530 | [diff] [blame] | 433 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 434 | ... Verify Device Flows Removed ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id} |
David Bainbridge | f81cd64 | 2019-11-20 00:14:47 +0000 | [diff] [blame] | 435 | |
Suchitra Vemuri | 9a6dd6d | 2020-02-28 17:46:26 -0800 | [diff] [blame] | 436 | Validate authentication on a disabled ONU |
suraj gour | 472da1c | 2020-02-25 05:44:51 +0000 | [diff] [blame] | 437 | [Documentation] Assuming that test1 was executed where all the ONUs are authenticated/DHCP/pingable |
| 438 | ... Perform disable on the ONUs and validate that the authentication do not succeed |
| 439 | ... Perform enable on the ONUs and validate that authentication successful |
Suchitra Vemuri | f7a033c | 2020-02-26 17:22:41 -0800 | [diff] [blame] | 440 | [Tags] functional DisableONU_AuthCheck |
| 441 | # Creates Devices in the Setup |
| 442 | [Setup] Run Keywords Announce Message START TEST DisableDeleteONUandOLT |
| 443 | ... AND Start Logging DisableONU_AuthCheck |
| 444 | ... AND Setup |
| 445 | [Teardown] Run Keywords Collect Logs |
| 446 | ... AND Stop Logging DisableONU_AuthCheck |
| 447 | ... AND Announce Message END TEST DisableONU_AuthCheck |
| 448 | ... AND Delete Device and Verify |
| 449 | Run Keyword and Ignore Error Collect Logs |
| 450 | Run Keyword If ${has_dataplane} Clean Up Linux |
| 451 | Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test |
| 452 | Clean WPA Process |
suraj gour | 472da1c | 2020-02-25 05:44:51 +0000 | [diff] [blame] | 453 | FOR ${I} IN RANGE 0 ${num_onus} |
| 454 | ${src}= Set Variable ${hosts.src[${I}]} |
| 455 | ${dst}= Set Variable ${hosts.dst[${I}]} |
Suchitra Vemuri | f7a033c | 2020-02-26 17:22:41 -0800 | [diff] [blame] | 456 | Run Keyword and Ignore Error Collect Logs |
suraj gour | 472da1c | 2020-02-25 05:44:51 +0000 | [diff] [blame] | 457 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
| 458 | ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']} |
| 459 | ... ${of_id} |
| 460 | Disable Device ${onu_device_id} |
| 461 | Wait Until Keyword Succeeds ${timeout} 5s Validate Device DISABLED UNKNOWN |
| 462 | ... REACHABLE ${src['onu']} onu=false |
Andy Bavier | 84834d4 | 2020-02-25 13:49:50 -0700 | [diff] [blame] | 463 | ${wpa_log}= Run Keyword If ${has_dataplane} Catenate SEPARATOR=. |
| 464 | ... /tmp/wpa ${src['dp_iface_name']} log |
Suchitra Vemuri | f7a033c | 2020-02-26 17:22:41 -0800 | [diff] [blame] | 465 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Validate Authentication False |
| 466 | ... ${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] | 467 | ... ${src['container_type']} ${src['container_name']} ${wpa_log} |
Suchitra Vemuri | f7a033c | 2020-02-26 17:22:41 -0800 | [diff] [blame] | 468 | Enable Device ${onu_device_id} |
| 469 | Run Keyword And Ignore Error Kill Linux Process [w]pa_supplicant ${src['ip']} |
| 470 | ... ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 471 | Run Keyword and Ignore Error Collect Logs |
| 472 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s Validate Device |
| 473 | ... ENABLED ACTIVE REACHABLE ${src['onu']} onu=True onu_reason=omci-flows-pushed |
| 474 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Validate Authentication True |
| 475 | ... ${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] | 476 | ... ${src['container_type']} ${src['container_name']} ${wpa_log} |
suraj gour | 472da1c | 2020-02-25 05:44:51 +0000 | [diff] [blame] | 477 | Run Keyword and Ignore Error Get Device Output from Voltha ${onu_device_id} |
| 478 | END |
| 479 | Run Keyword and Ignore Error Collect Logs |
| 480 | |
Suchitra Vemuri | f7a033c | 2020-02-26 17:22:41 -0800 | [diff] [blame] | 481 | |
Suchitra Vemuri | 65cd65f | 2019-08-30 14:39:22 -0700 | [diff] [blame] | 482 | *** Keywords *** |
| 483 | Setup Suite |
Andy Bavier | 88cd9f6 | 2019-11-26 16:22:33 -0700 | [diff] [blame] | 484 | [Documentation] Set up the test suite |
| 485 | Common Test Suite Setup |
Hung-Wei Chiu | 228d7ae | 2020-05-29 22:16:56 +0000 | [diff] [blame] | 486 | #Restore all ONUs |
Hung-Wei Chiu | 5a2a55f | 2020-06-19 10:29:53 -0700 | [diff] [blame] | 487 | #Run Keyword If ${has_dataplane} RestoreONUs ${num_onus} |
Suchitra Vemuri | 77f7abf | 2020-06-19 15:52:25 -0700 | [diff] [blame^] | 488 | ${switch_type}= Get Variable Value ${web_power_switch.type} |
| 489 | Run Keyword If "${switch_type}"!="" Set Global Variable ${powerswitch_type} ${switch_type} |
| 490 | |
Suchitra Vemuri | 65cd65f | 2019-08-30 14:39:22 -0700 | [diff] [blame] | 491 | |
David Bainbridge | f81cd64 | 2019-11-20 00:14:47 +0000 | [diff] [blame] | 492 | Clear All Devices Then Create New Device |
| 493 | [Documentation] Remove any devices from VOLTHA and ONOS |
David Bainbridge | f81cd64 | 2019-11-20 00:14:47 +0000 | [diff] [blame] | 494 | # Remove all devices from voltha and nos |
| 495 | Delete All Devices and Verify |
David Bainbridge | f81cd64 | 2019-11-20 00:14:47 +0000 | [diff] [blame] | 496 | # Execute normal test Setup Keyword |
| 497 | Setup |
| 498 | |