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 | e187eda | 2020-04-20 15:00:02 -0700 | [diff] [blame] | 62 | [Setup] Run Keywords Start Logging SanityTest |
Andy Bavier | 4a8450e | 2020-02-04 08:58:37 -0700 | [diff] [blame] | 63 | ... AND Setup |
| 64 | [Teardown] Run Keywords Collect Logs |
Andy Bavier | abeba26 | 2020-02-07 16:22:16 -0700 | [diff] [blame] | 65 | ... AND Stop Logging SanityTest |
Suchitra Vemuri | c5295a3 | 2019-12-15 20:32:04 -0800 | [diff] [blame] | 66 | Run Keyword If ${has_dataplane} Clean Up Linux |
Zack Williams | a8fe75a | 2020-01-10 14:25:27 -0700 | [diff] [blame] | 67 | Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test |
Suchitra Vemuri | 65cd65f | 2019-08-30 14:39:22 -0700 | [diff] [blame] | 68 | |
Hema | 93762cf | 2020-01-29 19:59:28 +0530 | [diff] [blame] | 69 | Test Disable and Enable OLT |
| 70 | [Documentation] Validates E2E Ping Connectivity and object states for the given scenario: |
| 71 | ... Assuming that test1 was executed where all the ONUs are authenticated/DHCP/pingable |
| 72 | ... Perform disable on the OLT and validate that the pings do not succeed |
| 73 | ... Perform enable on the OLT and validate that the pings are successful |
Hardik Windlass | d03b62a | 2020-04-27 17:31:16 +0530 | [diff] [blame] | 74 | [Tags] functional VOL-2410 DisableEnableOLT |
Andy Bavier | e187eda | 2020-04-20 15:00:02 -0700 | [diff] [blame] | 75 | [Setup] Start Logging DisableEnableOLT |
Andy Bavier | 4a8450e | 2020-02-04 08:58:37 -0700 | [diff] [blame] | 76 | [Teardown] Run Keywords Collect Logs |
Andy Bavier | abeba26 | 2020-02-07 16:22:16 -0700 | [diff] [blame] | 77 | ... AND Stop Logging DisableEnableOLT |
Hema | 93762cf | 2020-01-29 19:59:28 +0530 | [diff] [blame] | 78 | #Disable the OLT and verify the OLT/ONUs are disabled properly |
| 79 | ${rc} ${output}= Run and Return Rc and Output ${VOLTCTL_CONFIG}; voltctl device disable ${olt_device_id} |
| 80 | Should Be Equal As Integers ${rc} 0 |
| 81 | Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Device DISABLED UNKNOWN REACHABLE |
| 82 | ... ${olt_serial_number} |
| 83 | FOR ${I} IN RANGE 0 ${num_onus} |
| 84 | ${src}= Set Variable ${hosts.src[${I}]} |
| 85 | ${dst}= Set Variable ${hosts.dst[${I}]} |
| 86 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
| 87 | Wait Until Keyword Succeeds ${timeout} 5s Validate Device ENABLED DISCOVERED |
| 88 | ... UNREACHABLE ${src['onu']} onu=false |
| 89 | #Verify that ping fails |
TorstenThieme | 754fec7 | 2020-02-18 07:24:46 +0000 | [diff] [blame] | 90 | Run Keyword If ${has_dataplane} |
| 91 | ... Run Keyword And Continue On Failure Wait Until Keyword Succeeds 60s 2s |
Hema | 93762cf | 2020-01-29 19:59:28 +0530 | [diff] [blame] | 92 | ... Check Ping False ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']} |
| 93 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}} |
| 94 | END |
| 95 | #Enable the OLT back and check ONU, OLT status are back to "ACTIVE" |
| 96 | Enable Device ${olt_device_id} |
| 97 | Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Device ENABLED ACTIVE REACHABLE |
| 98 | ... ${olt_serial_number} |
Hema | f64d34c | 2020-03-25 00:40:17 +0530 | [diff] [blame] | 99 | Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Port Types |
| 100 | ... PON_OLT ETHERNET_NNI |
Hema | 93762cf | 2020-01-29 19:59:28 +0530 | [diff] [blame] | 101 | FOR ${I} IN RANGE 0 ${num_onus} |
| 102 | ${src}= Set Variable ${hosts.src[${I}]} |
| 103 | ${dst}= Set Variable ${hosts.dst[${I}]} |
| 104 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
| 105 | ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']} |
| 106 | ... ${of_id} |
| 107 | Wait Until Keyword Succeeds ${timeout} 5s Validate Device ENABLED ACTIVE |
| 108 | ... REACHABLE ${src['onu']} onu=True onu_reason=omci-flows-pushed |
| 109 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
ubuntu | 6b6e7d4 | 2020-03-02 12:35:42 -0800 | [diff] [blame] | 110 | ... Validate Subscriber DHCP Allocation ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port} |
Hema | 93762cf | 2020-01-29 19:59:28 +0530 | [diff] [blame] | 111 | #Verify that ping workss fine again |
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 True ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']} |
| 115 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}} |
| 116 | Run Keyword and Ignore Error Collect Logs |
| 117 | END |
| 118 | |
| 119 | |
Suchitra Vemuri | 6db8941 | 2019-11-14 14:52:54 -0800 | [diff] [blame] | 120 | Test Disable and Enable ONU |
| 121 | [Documentation] Validates E2E Ping Connectivity and object states for the given scenario: |
| 122 | ... Assuming that test1 was executed where all the ONUs are authenticated/DHCP/pingable |
| 123 | ... Perform disable on the ONUs and validate that the pings do not succeed |
| 124 | ... Perform enable on the ONUs and validate that the pings are successful |
Suchitra Vemuri | 04245f7 | 2020-01-08 16:43:24 -0800 | [diff] [blame] | 125 | [Tags] functional DisableEnableONU released |
Andy Bavier | e187eda | 2020-04-20 15:00:02 -0700 | [diff] [blame] | 126 | [Setup] Start Logging DisableEnableONU |
Andy Bavier | 4a8450e | 2020-02-04 08:58:37 -0700 | [diff] [blame] | 127 | [Teardown] Run Keywords Collect Logs |
Andy Bavier | abeba26 | 2020-02-07 16:22:16 -0700 | [diff] [blame] | 128 | ... AND Stop Logging DisableEnableONU |
Suchitra Vemuri | 6db8941 | 2019-11-14 14:52:54 -0800 | [diff] [blame] | 129 | FOR ${I} IN RANGE 0 ${num_onus} |
| 130 | ${src}= Set Variable ${hosts.src[${I}]} |
| 131 | ${dst}= Set Variable ${hosts.dst[${I}]} |
Suchitra Vemuri | 6db8941 | 2019-11-14 14:52:54 -0800 | [diff] [blame] | 132 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
| 133 | ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']} |
| 134 | ... ${of_id} |
| 135 | Disable Device ${onu_device_id} |
Andy Bavier | 46c8be3 | 2020-01-21 10:06:27 -0700 | [diff] [blame] | 136 | 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] | 137 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure |
| 138 | ... Wait Until Keyword Succeeds 60s 2s |
Zack Williams | a8fe75a | 2020-01-10 14:25:27 -0700 | [diff] [blame] | 139 | ... Check Ping False ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']} |
| 140 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
Suchitra Vemuri | 6db8941 | 2019-11-14 14:52:54 -0800 | [diff] [blame] | 141 | Enable Device ${onu_device_id} |
| 142 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
ubuntu | 6b6e7d4 | 2020-03-02 12:35:42 -0800 | [diff] [blame] | 143 | ... Validate Subscriber DHCP Allocation ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port} |
Hardik Windlass | 2180763 | 2020-04-14 16:24:55 +0530 | [diff] [blame] | 144 | # Verify subscriber access flows are added for the ONU port |
| 145 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 146 | ... Verify Subscriber Access Flows Added For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id} |
| 147 | ... ${onu_port} ${nni_port} ${src['c_tag']} ${src['s_tag']} |
Andy Bavier | 33e6dd3 | 2020-01-16 13:35:20 -0700 | [diff] [blame] | 148 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure |
| 149 | ... Wait Until Keyword Succeeds 60s 2s |
Zack Williams | a8fe75a | 2020-01-10 14:25:27 -0700 | [diff] [blame] | 150 | ... Check Ping True ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']} |
| 151 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 152 | Run Keyword and Ignore Error Get Device Output from Voltha ${onu_device_id} |
| 153 | Run Keyword and Ignore Error Collect Logs |
Suchitra Vemuri | 6db8941 | 2019-11-14 14:52:54 -0800 | [diff] [blame] | 154 | END |
| 155 | |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 156 | Test Subscriber Delete and Add |
| 157 | [Documentation] Validates E2E Ping Connectivity and object states for the given scenario: |
| 158 | ... Assuming that all the ONUs are authenticated/DHCP/pingable |
Zack Williams | a8fe75a | 2020-01-10 14:25:27 -0700 | [diff] [blame] | 159 | ... Delete a subscriber and validate that the pings do not succeed |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 160 | ... Re-add the subscriber and validate that the pings are successful |
Suchitra Vemuri | 04245f7 | 2020-01-08 16:43:24 -0800 | [diff] [blame] | 161 | [Tags] functional SubAddDelete released |
Andy Bavier | e187eda | 2020-04-20 15:00:02 -0700 | [diff] [blame] | 162 | [Setup] Start Logging SubAddDelete |
Andy Bavier | 4a8450e | 2020-02-04 08:58:37 -0700 | [diff] [blame] | 163 | [Teardown] Run Keywords Collect Logs |
Andy Bavier | abeba26 | 2020-02-07 16:22:16 -0700 | [diff] [blame] | 164 | ... AND Stop Logging SubAddDelete |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 165 | FOR ${I} IN RANGE 0 ${num_onus} |
| 166 | ${src}= Set Variable ${hosts.src[${I}]} |
| 167 | ${dst}= Set Variable ${hosts.dst[${I}]} |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 168 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
| 169 | ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']} |
| 170 | ... ${of_id} |
ubuntu | 6b6e7d4 | 2020-03-02 12:35:42 -0800 | [diff] [blame] | 171 | 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] | 172 | ... ${ONOS_SSH_PORT} volt-remove-subscriber-access ${of_id} ${onu_port} |
| 173 | Sleep 10s |
Suchitra Vemuri | 9da4430 | 2020-03-04 14:24:49 -0800 | [diff] [blame] | 174 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
| 175 | ... 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] | 176 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure |
| 177 | ... Wait Until Keyword Succeeds 60s 2s |
Zack Williams | a8fe75a | 2020-01-10 14:25:27 -0700 | [diff] [blame] | 178 | ... Check Ping False ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']} |
| 179 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
ubuntu | 6b6e7d4 | 2020-03-02 12:35:42 -0800 | [diff] [blame] | 180 | 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] | 181 | ... ${ONOS_SSH_PORT} volt-add-subscriber-access ${of_id} ${onu_port} |
| 182 | Sleep 10s |
| 183 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
Suchitra Vemuri | 9da4430 | 2020-03-04 14:24:49 -0800 | [diff] [blame] | 184 | ... Verify No Pending Flows For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port} |
| 185 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
ubuntu | 6b6e7d4 | 2020-03-02 12:35:42 -0800 | [diff] [blame] | 186 | ... Validate Subscriber DHCP Allocation ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port} |
Hardik Windlass | 2180763 | 2020-04-14 16:24:55 +0530 | [diff] [blame] | 187 | # Verify subscriber access flows are added for the ONU port |
| 188 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 189 | ... Verify Subscriber Access Flows Added For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id} |
| 190 | ... ${onu_port} ${nni_port} ${src['c_tag']} ${src['s_tag']} |
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 | e187eda | 2020-04-20 15:00:02 -0700 | [diff] [blame] | 204 | [Setup] Start Logging SubsRemoveDHCP |
Andy Bavier | 4a8450e | 2020-02-04 08:58:37 -0700 | [diff] [blame] | 205 | [Teardown] Run Keywords Collect Logs |
Andy Bavier | abeba26 | 2020-02-07 16:22:16 -0700 | [diff] [blame] | 206 | ... AND Stop Logging SubsRemoveDHCP |
suraj gour | d5cfdbb | 2019-12-13 12:44:55 +0000 | [diff] [blame] | 207 | FOR ${I} IN RANGE 0 ${num_onus} |
| 208 | ${src}= Set Variable ${hosts.src[${I}]} |
| 209 | ${dst}= Set Variable ${hosts.dst[${I}]} |
Zack Williams | a8fe75a | 2020-01-10 14:25:27 -0700 | [diff] [blame] | 210 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
suraj gour | d5cfdbb | 2019-12-13 12:44:55 +0000 | [diff] [blame] | 211 | ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']} |
| 212 | ... ${of_id} |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 213 | Run Keyword And Ignore Error Login And Run Command On Remote System killall dhclient ${src['ip']} |
| 214 | ... ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 215 | Run Keyword And Ignore Error Login And Run Command On Remote System ps -ef | grep dhclient ${src['ip']} |
| 216 | ... ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
ubuntu | 6b6e7d4 | 2020-03-02 12:35:42 -0800 | [diff] [blame] | 217 | 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] | 218 | ... ${ONOS_SSH_PORT} volt-remove-subscriber-access ${of_id} ${onu_port} |
Suchitra Vemuri | 8f1d306 | 2020-02-28 11:57:37 -0800 | [diff] [blame] | 219 | Sleep 15s |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 220 | Run Keyword And Ignore Error Login And Run Command On Remote System ps -ef | grep dhclient ${src['ip']} |
| 221 | ... ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
Zack Williams | a8fe75a | 2020-01-10 14:25:27 -0700 | [diff] [blame] | 222 | Run Keyword If ${has_dataplane} Wait Until Keyword Succeeds ${timeout} 2s |
| 223 | ... Delete IP Addresses from Interface on Remote Host ${src['dp_iface_name']} ${src['ip']} |
| 224 | ... ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 225 | Run Keyword And Ignore Error Login And Run Command On Remote System |
| 226 | ... ifconfig | grep -A 10 ens ${src['ip']} |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 227 | ... ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
suraj gour | d5cfdbb | 2019-12-13 12:44:55 +0000 | [diff] [blame] | 228 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Validate DHCP and Ping False |
| 229 | ... False ${src['dp_iface_name']} ${src['s_tag']} ${src['c_tag']} ${dst['dp_iface_ip_qinq']} |
| 230 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 231 | ... ${dst['dp_iface_name']} ${dst['ip']} ${dst['user']} ${dst['pass']} ${dst['container_type']} |
| 232 | ... ${dst['container_name']} |
ubuntu | 6b6e7d4 | 2020-03-02 12:35:42 -0800 | [diff] [blame] | 233 | 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] | 234 | ... ${ONOS_SSH_PORT} volt-add-subscriber-access ${of_id} ${onu_port} |
Suchitra Vemuri | 9da4430 | 2020-03-04 14:24:49 -0800 | [diff] [blame] | 235 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
| 236 | ... 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] | 237 | # Verify subscriber access flows are added for the ONU port |
| 238 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 239 | ... Verify Subscriber Access Flows Added For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id} |
| 240 | ... ${onu_port} ${nni_port} ${src['c_tag']} ${src['s_tag']} |
suraj gour | d5cfdbb | 2019-12-13 12:44:55 +0000 | [diff] [blame] | 241 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Validate DHCP and Ping True |
| 242 | ... True ${src['dp_iface_name']} ${src['s_tag']} ${src['c_tag']} ${dst['dp_iface_ip_qinq']} |
| 243 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 244 | ... ${dst['dp_iface_name']} ${dst['ip']} ${dst['user']} ${dst['pass']} ${dst['container_type']} |
| 245 | ... ${dst['container_name']} |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 246 | Run Keyword and Ignore Error Collect Logs |
| 247 | END |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 248 | |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 249 | Test Disable and Enable ONU scenario for ATT workflow |
| 250 | [Documentation] Validates E2E Ping Connectivity and object states for the given scenario: |
| 251 | ... Assuming that test1 was executed where all the ONUs are authenticated/DHCP/pingable |
| 252 | ... 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] | 253 | ... Perform enable on the ONUs, authentication check, volt-add-subscriber-access and |
| 254 | ... validate that the pings are successful |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 255 | ... VOL-2284 |
Suchitra Vemuri | a7dae32 | 2020-02-19 22:38:18 -0800 | [diff] [blame] | 256 | [Tags] functional ATT_DisableEnableONU released |
Andy Bavier | e187eda | 2020-04-20 15:00:02 -0700 | [diff] [blame] | 257 | [Setup] Start Logging ATT_DisableEnableONU |
Andy Bavier | 4a8450e | 2020-02-04 08:58:37 -0700 | [diff] [blame] | 258 | [Teardown] Run Keywords Collect Logs |
Andy Bavier | abeba26 | 2020-02-07 16:22:16 -0700 | [diff] [blame] | 259 | ... AND Stop Logging 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 |
Hardik Windlass | 2180763 | 2020-04-14 16:24:55 +0530 | [diff] [blame] | 289 | # Verify subscriber access flows are added for the ONU port |
| 290 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 291 | ... Verify Subscriber Access Flows Added For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id} |
| 292 | ... ${onu_port} ${nni_port} ${src['c_tag']} ${src['s_tag']} |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 293 | 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] | 294 | ... 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] | 295 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 296 | ... ${dst['dp_iface_name']} ${dst['ip']} ${dst['user']} ${dst['pass']} ${dst['container_type']} |
| 297 | ... ${dst['container_name']} |
| 298 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
ubuntu | 6b6e7d4 | 2020-03-02 12:35:42 -0800 | [diff] [blame] | 299 | ... Validate Subscriber DHCP Allocation ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port} |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 300 | Run Keyword and Ignore Error Collect Logs |
suraj gour | d5cfdbb | 2019-12-13 12:44:55 +0000 | [diff] [blame] | 301 | END |
suraj gour | d5cfdbb | 2019-12-13 12:44:55 +0000 | [diff] [blame] | 302 | |
Suchitra Vemuri | 937cd39 | 2020-01-12 17:10:42 -0800 | [diff] [blame] | 303 | Delete OLT, ReAdd OLT and Perform Sanity Test |
| 304 | [Documentation] Validates E2E Ping Connectivity and object states for the given scenario: |
| 305 | ... Disable and Delete the OLT |
| 306 | ... Create/Enable the same OLT again |
| 307 | ... 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] | 308 | [Tags] functional DeleteOLT released |
Andy Bavier | e187eda | 2020-04-20 15:00:02 -0700 | [diff] [blame] | 309 | [Setup] Start Logging DeleteOLT |
Andy Bavier | 4a8450e | 2020-02-04 08:58:37 -0700 | [diff] [blame] | 310 | [Teardown] Run Keywords Collect Logs |
Andy Bavier | abeba26 | 2020-02-07 16:22:16 -0700 | [diff] [blame] | 311 | ... AND Stop Logging DeleteOLT |
Suchitra Vemuri | 937cd39 | 2020-01-12 17:10:42 -0800 | [diff] [blame] | 312 | Run Keyword If ${has_dataplane} Clean Up Linux |
Hardik Windlass | 480f3e2 | 2020-04-02 20:14:14 +0530 | [diff] [blame] | 313 | Delete Device and Verify |
| 314 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 315 | ... Verify Device Flows Removed ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id} |
Suchitra Vemuri | 937cd39 | 2020-01-12 17:10:42 -0800 | [diff] [blame] | 316 | Run Keyword and Ignore Error Collect Logs |
| 317 | # Recreate the OLT |
Hardik Windlass | 480f3e2 | 2020-04-02 20:14:14 +0530 | [diff] [blame] | 318 | Setup |
Suchitra Vemuri | 937cd39 | 2020-01-12 17:10:42 -0800 | [diff] [blame] | 319 | Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test |
Suchitra Vemuri | 937cd39 | 2020-01-12 17:10:42 -0800 | [diff] [blame] | 320 | |
Hema | 567f301 | 2020-03-25 00:51:53 +0530 | [diff] [blame] | 321 | Check Mib State on OLT recreation after ONU, OLT deletion |
| 322 | [Documentation] Assuming that test1 was executed where all the ONUs are authenticated/DHCP/pingable, |
| 323 | ... Disable and Delete the ONU, Disable and Delete the OLT |
| 324 | ... Create/Enable the OLT again and Check for the Mib State of the ONUs |
| 325 | [Tags] functional CheckMibState notready |
Andy Bavier | e187eda | 2020-04-20 15:00:02 -0700 | [diff] [blame] | 326 | [Setup] Start Logging CheckMibState |
Hema | 567f301 | 2020-03-25 00:51:53 +0530 | [diff] [blame] | 327 | [Teardown] Run Keywords Collect Logs |
| 328 | ... AND Stop Logging CheckMibState |
Hema | 567f301 | 2020-03-25 00:51:53 +0530 | [diff] [blame] | 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 | e187eda | 2020-04-20 15:00:02 -0700 | [diff] [blame] | 370 | [Setup] Start Logging DisableDeleteONUandOLT |
Andy Bavier | 4a8450e | 2020-02-04 08:58:37 -0700 | [diff] [blame] | 371 | [Teardown] Run Keywords Collect Logs |
Andy Bavier | abeba26 | 2020-02-07 16:22:16 -0700 | [diff] [blame] | 372 | ... AND Stop Logging DisableDeleteONUandOLT |
Suchitra Vemuri | ba4f371 | 2020-01-24 16:18:26 -0800 | [diff] [blame] | 373 | ${olt_device_id}= Get Device ID From SN ${olt_serial_number} |
Hema | 783279b | 2020-01-22 15:37:37 +0530 | [diff] [blame] | 374 | FOR ${I} IN RANGE 0 ${num_onus} |
| 375 | ${src}= Set Variable ${hosts.src[${I}]} |
| 376 | ${dst}= Set Variable ${hosts.dst[${I}]} |
| 377 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
Suchitra Vemuri | 014b603 | 2020-02-14 18:13:13 -0800 | [diff] [blame] | 378 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 379 | ... Validate Device ENABLED ACTIVE |
Hema | 783279b | 2020-01-22 15:37:37 +0530 | [diff] [blame] | 380 | ... REACHABLE ${src['onu']} onu=True onu_reason=omci-flows-pushed |
Suchitra Vemuri | 014b603 | 2020-02-14 18:13:13 -0800 | [diff] [blame] | 381 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 382 | ... Validate OLT Device ENABLED ACTIVE |
Hema | 783279b | 2020-01-22 15:37:37 +0530 | [diff] [blame] | 383 | ... REACHABLE ${olt_serial_number} |
| 384 | ${rc} ${output}= Run and Return Rc and Output |
| 385 | ... ${VOLTCTL_CONFIG}; voltctl device disable ${onu_device_id} |
| 386 | Should Be Equal As Integers ${rc} 0 |
Suchitra Vemuri | 014b603 | 2020-02-14 18:13:13 -0800 | [diff] [blame] | 387 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 388 | ... Validate Device DISABLED UNKNOWN |
Hema | 783279b | 2020-01-22 15:37:37 +0530 | [diff] [blame] | 389 | ... REACHABLE ${src['onu']} onu=false |
Suchitra Vemuri | 014b603 | 2020-02-14 18:13:13 -0800 | [diff] [blame] | 390 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 391 | ... Validate OLT Device ENABLED ACTIVE |
Hema | 783279b | 2020-01-22 15:37:37 +0530 | [diff] [blame] | 392 | ... REACHABLE ${olt_serial_number} |
| 393 | END |
| 394 | ${rc} ${output}= Run and Return Rc and Output ${VOLTCTL_CONFIG}; voltctl device disable ${olt_device_id} |
| 395 | Should Be Equal As Integers ${rc} 0 |
Suchitra Vemuri | 014b603 | 2020-02-14 18:13:13 -0800 | [diff] [blame] | 396 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 397 | ... Validate OLT Device DISABLED UNKNOWN REACHABLE |
Hema | 783279b | 2020-01-22 15:37:37 +0530 | [diff] [blame] | 398 | ... ${olt_serial_number} |
| 399 | FOR ${I} IN RANGE 0 ${num_onus} |
| 400 | ${src}= Set Variable ${hosts.src[${I}]} |
| 401 | ${dst}= Set Variable ${hosts.dst[${I}]} |
| 402 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
Suchitra Vemuri | 014b603 | 2020-02-14 18:13:13 -0800 | [diff] [blame] | 403 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 404 | ... Validate Device DISABLED DISCOVERED |
| 405 | ... UNREACHABLE ${src['onu']} onu=false |
Hardik Windlass | 7da42ca | 2020-03-13 14:25:44 +0530 | [diff] [blame] | 406 | Delete Device ${onu_device_id} |
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 OLT Device DISABLED UNKNOWN |
Hema | 783279b | 2020-01-22 15:37:37 +0530 | [diff] [blame] | 409 | ... REACHABLE ${olt_serial_number} |
| 410 | END |
Hardik Windlass | 7da42ca | 2020-03-13 14:25:44 +0530 | [diff] [blame] | 411 | Delete Device ${olt_device_id} |
Suchitra Vemuri | 014b603 | 2020-02-14 18:13:13 -0800 | [diff] [blame] | 412 | 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] | 413 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 414 | ... Verify Device Flows Removed ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id} |
David Bainbridge | f81cd64 | 2019-11-20 00:14:47 +0000 | [diff] [blame] | 415 | |
Suchitra Vemuri | 9a6dd6d | 2020-02-28 17:46:26 -0800 | [diff] [blame] | 416 | Validate authentication on a disabled ONU |
suraj gour | 472da1c | 2020-02-25 05:44:51 +0000 | [diff] [blame] | 417 | [Documentation] Assuming that test1 was executed where all the ONUs are authenticated/DHCP/pingable |
| 418 | ... Perform disable on the ONUs and validate that the authentication do not succeed |
| 419 | ... Perform enable on the ONUs and validate that authentication successful |
Suchitra Vemuri | f7a033c | 2020-02-26 17:22:41 -0800 | [diff] [blame] | 420 | [Tags] functional DisableONU_AuthCheck |
| 421 | # Creates Devices in the Setup |
Andy Bavier | e187eda | 2020-04-20 15:00:02 -0700 | [diff] [blame] | 422 | [Setup] Run Keywords Start Logging DisableONU_AuthCheck |
Suchitra Vemuri | f7a033c | 2020-02-26 17:22:41 -0800 | [diff] [blame] | 423 | ... AND Setup |
| 424 | [Teardown] Run Keywords Collect Logs |
| 425 | ... AND Stop Logging DisableONU_AuthCheck |
Suchitra Vemuri | f7a033c | 2020-02-26 17:22:41 -0800 | [diff] [blame] | 426 | ... AND Delete Device and Verify |
| 427 | Run Keyword and Ignore Error Collect Logs |
| 428 | Run Keyword If ${has_dataplane} Clean Up Linux |
| 429 | Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test |
| 430 | Clean WPA Process |
suraj gour | 472da1c | 2020-02-25 05:44:51 +0000 | [diff] [blame] | 431 | FOR ${I} IN RANGE 0 ${num_onus} |
| 432 | ${src}= Set Variable ${hosts.src[${I}]} |
| 433 | ${dst}= Set Variable ${hosts.dst[${I}]} |
Suchitra Vemuri | f7a033c | 2020-02-26 17:22:41 -0800 | [diff] [blame] | 434 | Run Keyword and Ignore Error Collect Logs |
suraj gour | 472da1c | 2020-02-25 05:44:51 +0000 | [diff] [blame] | 435 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
| 436 | ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']} |
| 437 | ... ${of_id} |
| 438 | Disable Device ${onu_device_id} |
| 439 | Wait Until Keyword Succeeds ${timeout} 5s Validate Device DISABLED UNKNOWN |
| 440 | ... REACHABLE ${src['onu']} onu=false |
Andy Bavier | 84834d4 | 2020-02-25 13:49:50 -0700 | [diff] [blame] | 441 | ${wpa_log}= Run Keyword If ${has_dataplane} Catenate SEPARATOR=. |
| 442 | ... /tmp/wpa ${src['dp_iface_name']} log |
Suchitra Vemuri | f7a033c | 2020-02-26 17:22:41 -0800 | [diff] [blame] | 443 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Validate Authentication False |
| 444 | ... ${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] | 445 | ... ${src['container_type']} ${src['container_name']} ${wpa_log} |
Suchitra Vemuri | f7a033c | 2020-02-26 17:22:41 -0800 | [diff] [blame] | 446 | Enable Device ${onu_device_id} |
| 447 | Run Keyword And Ignore Error Kill Linux Process [w]pa_supplicant ${src['ip']} |
| 448 | ... ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 449 | Run Keyword and Ignore Error Collect Logs |
| 450 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s Validate Device |
| 451 | ... ENABLED ACTIVE REACHABLE ${src['onu']} onu=True onu_reason=omci-flows-pushed |
| 452 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Validate Authentication True |
| 453 | ... ${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] | 454 | ... ${src['container_type']} ${src['container_name']} ${wpa_log} |
suraj gour | 472da1c | 2020-02-25 05:44:51 +0000 | [diff] [blame] | 455 | Run Keyword and Ignore Error Get Device Output from Voltha ${onu_device_id} |
| 456 | END |
| 457 | Run Keyword and Ignore Error Collect Logs |
| 458 | |
Suchitra Vemuri | f7a033c | 2020-02-26 17:22:41 -0800 | [diff] [blame] | 459 | |
Suchitra Vemuri | 65cd65f | 2019-08-30 14:39:22 -0700 | [diff] [blame] | 460 | *** Keywords *** |
| 461 | Setup Suite |
Andy Bavier | 88cd9f6 | 2019-11-26 16:22:33 -0700 | [diff] [blame] | 462 | [Documentation] Set up the test suite |
| 463 | Common Test Suite Setup |
Suchitra Vemuri | 65cd65f | 2019-08-30 14:39:22 -0700 | [diff] [blame] | 464 | |
David Bainbridge | f81cd64 | 2019-11-20 00:14:47 +0000 | [diff] [blame] | 465 | Clear All Devices Then Create New Device |
| 466 | [Documentation] Remove any devices from VOLTHA and ONOS |
David Bainbridge | f81cd64 | 2019-11-20 00:14:47 +0000 | [diff] [blame] | 467 | # Remove all devices from voltha and nos |
| 468 | Delete All Devices and Verify |
David Bainbridge | f81cd64 | 2019-11-20 00:14:47 +0000 | [diff] [blame] | 469 | # Execute normal test Setup Keyword |
| 470 | Setup |
| 471 | |