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