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 |
| 51 | ${external_libs} True |
| 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 | |
| 55 | *** Test Cases *** |
| 56 | Sanity E2E Test for OLT/ONU on POD |
| 57 | [Documentation] Validates E2E Ping Connectivity and object states for the given scenario: |
| 58 | ... 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] | 59 | [Tags] sanity test1 |
Andy Bavier | 4a8450e | 2020-02-04 08:58:37 -0700 | [diff] [blame] | 60 | [Setup] Run Keywords Announce Message START TEST SanityTest |
| 61 | ... AND Setup |
| 62 | [Teardown] Run Keywords Collect Logs |
| 63 | ... AND Announce Message END TEST SanityTest |
Suchitra Vemuri | c5295a3 | 2019-12-15 20:32:04 -0800 | [diff] [blame] | 64 | Run Keyword If ${has_dataplane} Clean Up Linux |
Zack Williams | a8fe75a | 2020-01-10 14:25:27 -0700 | [diff] [blame] | 65 | Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test |
Suchitra Vemuri | 65cd65f | 2019-08-30 14:39:22 -0700 | [diff] [blame] | 66 | |
Hema | 93762cf | 2020-01-29 19:59:28 +0530 | [diff] [blame] | 67 | Test Disable and Enable OLT |
| 68 | [Documentation] Validates E2E Ping Connectivity and object states for the given scenario: |
| 69 | ... Assuming that test1 was executed where all the ONUs are authenticated/DHCP/pingable |
| 70 | ... Perform disable on the OLT and validate that the pings do not succeed |
| 71 | ... Perform enable on the OLT and validate that the pings are successful |
| 72 | [Tags] VOL-2410 DisableEnableOLT notready |
Andy Bavier | 4a8450e | 2020-02-04 08:58:37 -0700 | [diff] [blame] | 73 | [Setup] Announce Message START TEST DisableEnableOLT |
| 74 | [Teardown] Run Keywords Collect Logs |
| 75 | ... AND Announce Message END TEST DisableEnableOLT |
Hema | 93762cf | 2020-01-29 19:59:28 +0530 | [diff] [blame] | 76 | #Disable the OLT and verify the OLT/ONUs are disabled properly |
| 77 | ${rc} ${output}= Run and Return Rc and Output ${VOLTCTL_CONFIG}; voltctl device disable ${olt_device_id} |
| 78 | Should Be Equal As Integers ${rc} 0 |
| 79 | Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Device DISABLED UNKNOWN REACHABLE |
| 80 | ... ${olt_serial_number} |
| 81 | FOR ${I} IN RANGE 0 ${num_onus} |
| 82 | ${src}= Set Variable ${hosts.src[${I}]} |
| 83 | ${dst}= Set Variable ${hosts.dst[${I}]} |
| 84 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
| 85 | Wait Until Keyword Succeeds ${timeout} 5s Validate Device ENABLED DISCOVERED |
| 86 | ... UNREACHABLE ${src['onu']} onu=false |
| 87 | #Verify that ping fails |
| 88 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds 60s 2s |
| 89 | ... Check Ping False ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']} |
| 90 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}} |
| 91 | END |
| 92 | #Enable the OLT back and check ONU, OLT status are back to "ACTIVE" |
| 93 | Enable Device ${olt_device_id} |
| 94 | Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Device ENABLED ACTIVE REACHABLE |
| 95 | ... ${olt_serial_number} |
| 96 | FOR ${I} IN RANGE 0 ${num_onus} |
| 97 | ${src}= Set Variable ${hosts.src[${I}]} |
| 98 | ${dst}= Set Variable ${hosts.dst[${I}]} |
| 99 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
| 100 | ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']} |
| 101 | ... ${of_id} |
| 102 | Wait Until Keyword Succeeds ${timeout} 5s Validate Device ENABLED ACTIVE |
| 103 | ... REACHABLE ${src['onu']} onu=True onu_reason=omci-flows-pushed |
| 104 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
| 105 | ... Validate Subscriber DHCP Allocation ${k8s_node_ip} ${ONOS_SSH_PORT} ${onu_port} |
| 106 | #Verify that ping workss fine again |
| 107 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds 60s 2s |
| 108 | ... Check Ping True ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']} |
| 109 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']}} |
| 110 | Run Keyword and Ignore Error Collect Logs |
| 111 | END |
| 112 | |
| 113 | |
Suchitra Vemuri | 6db8941 | 2019-11-14 14:52:54 -0800 | [diff] [blame] | 114 | Test Disable and Enable ONU |
| 115 | [Documentation] Validates E2E Ping Connectivity and object states for the given scenario: |
| 116 | ... Assuming that test1 was executed where all the ONUs are authenticated/DHCP/pingable |
| 117 | ... Perform disable on the ONUs and validate that the pings do not succeed |
| 118 | ... Perform enable on the ONUs and validate that the pings are successful |
Suchitra Vemuri | 04245f7 | 2020-01-08 16:43:24 -0800 | [diff] [blame] | 119 | [Tags] functional DisableEnableONU released |
Andy Bavier | 4a8450e | 2020-02-04 08:58:37 -0700 | [diff] [blame] | 120 | [Setup] Announce Message START TEST DisableEnableONU |
| 121 | [Teardown] Run Keywords Collect Logs |
| 122 | ... AND Announce Message END TEST DisableEnableONU |
Suchitra Vemuri | 6db8941 | 2019-11-14 14:52:54 -0800 | [diff] [blame] | 123 | FOR ${I} IN RANGE 0 ${num_onus} |
| 124 | ${src}= Set Variable ${hosts.src[${I}]} |
| 125 | ${dst}= Set Variable ${hosts.dst[${I}]} |
Suchitra Vemuri | 6db8941 | 2019-11-14 14:52:54 -0800 | [diff] [blame] | 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 | Disable Device ${onu_device_id} |
Suchitra Vemuri | 15e1525 | 2020-01-20 17:38:49 -0800 | [diff] [blame] | 130 | #Test Devices Disabled in VOLTHA Id=${onu_device_id} |
Andy Bavier | 33e6dd3 | 2020-01-16 13:35:20 -0700 | [diff] [blame] | 131 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure |
| 132 | ... Wait Until Keyword Succeeds 60s 2s |
Zack Williams | a8fe75a | 2020-01-10 14:25:27 -0700 | [diff] [blame] | 133 | ... Check Ping False ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']} |
| 134 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
Suchitra Vemuri | 6db8941 | 2019-11-14 14:52:54 -0800 | [diff] [blame] | 135 | Enable Device ${onu_device_id} |
| 136 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
| 137 | ... Validate Subscriber DHCP Allocation ${k8s_node_ip} ${ONOS_SSH_PORT} ${onu_port} |
Andy Bavier | 33e6dd3 | 2020-01-16 13:35:20 -0700 | [diff] [blame] | 138 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure |
| 139 | ... Wait Until Keyword Succeeds 60s 2s |
Zack Williams | a8fe75a | 2020-01-10 14:25:27 -0700 | [diff] [blame] | 140 | ... Check Ping True ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']} |
| 141 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 142 | Run Keyword and Ignore Error Get Device Output from Voltha ${onu_device_id} |
| 143 | Run Keyword and Ignore Error Collect Logs |
Suchitra Vemuri | 6db8941 | 2019-11-14 14:52:54 -0800 | [diff] [blame] | 144 | END |
| 145 | |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 146 | Test Subscriber Delete and Add |
| 147 | [Documentation] Validates E2E Ping Connectivity and object states for the given scenario: |
| 148 | ... Assuming that all the ONUs are authenticated/DHCP/pingable |
Zack Williams | a8fe75a | 2020-01-10 14:25:27 -0700 | [diff] [blame] | 149 | ... Delete a subscriber and validate that the pings do not succeed |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 150 | ... Re-add the subscriber and validate that the pings are successful |
Suchitra Vemuri | 04245f7 | 2020-01-08 16:43:24 -0800 | [diff] [blame] | 151 | [Tags] functional SubAddDelete released |
Andy Bavier | 4a8450e | 2020-02-04 08:58:37 -0700 | [diff] [blame] | 152 | [Setup] Announce Message START TEST SubAddDelete |
| 153 | [Teardown] Run Keywords Collect Logs |
| 154 | ... AND Announce Message END TEST SubAddDelete |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 155 | FOR ${I} IN RANGE 0 ${num_onus} |
| 156 | ${src}= Set Variable ${hosts.src[${I}]} |
| 157 | ${dst}= Set Variable ${hosts.dst[${I}]} |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 158 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
| 159 | ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']} |
| 160 | ... ${of_id} |
| 161 | Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command ${k8s_node_ip} |
| 162 | ... ${ONOS_SSH_PORT} volt-remove-subscriber-access ${of_id} ${onu_port} |
| 163 | Sleep 10s |
Andy Bavier | 33e6dd3 | 2020-01-16 13:35:20 -0700 | [diff] [blame] | 164 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure |
| 165 | ... Wait Until Keyword Succeeds 60s 2s |
Zack Williams | a8fe75a | 2020-01-10 14:25:27 -0700 | [diff] [blame] | 166 | ... Check Ping False ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']} |
| 167 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 168 | Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command ${k8s_node_ip} |
| 169 | ... ${ONOS_SSH_PORT} volt-add-subscriber-access ${of_id} ${onu_port} |
| 170 | Sleep 10s |
| 171 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
| 172 | ... Validate Subscriber DHCP Allocation ${k8s_node_ip} ${ONOS_SSH_PORT} ${onu_port} |
Andy Bavier | 33e6dd3 | 2020-01-16 13:35:20 -0700 | [diff] [blame] | 173 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure |
| 174 | ... Wait Until Keyword Succeeds 60s 2s |
Zack Williams | a8fe75a | 2020-01-10 14:25:27 -0700 | [diff] [blame] | 175 | ... Check Ping True ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']} |
| 176 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 177 | Run Keyword and Ignore Error Get Device Output from Voltha ${onu_device_id} |
| 178 | Run Keyword and Ignore Error Collect Logs |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 179 | END |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 180 | |
suraj gour | d64356b | 2019-11-07 13:26:20 +0000 | [diff] [blame] | 181 | Check OLT/ONU Authentication After Radius Pod Restart |
suraj gour | 7f6d5fe | 2019-11-29 10:56:35 +0000 | [diff] [blame] | 182 | [Documentation] After radius restart, triggers reassociation, checks status and |
| 183 | ... authentication, validates dhcp and ping. Note : wpa reassociate works only when |
| 184 | ... wpa supplicant is running in background hence it is recommended to remove |
| 185 | ... teardown from previous test or uncomment 'Teardown None'. |
| 186 | ... Assuming that test1 was executed where all the ONUs are authenticated/DHCP/pingable |
Suchitra Vemuri | 04245f7 | 2020-01-08 16:43:24 -0800 | [diff] [blame] | 187 | [Tags] functional RadiusRestart released |
Andy Bavier | 4a8450e | 2020-02-04 08:58:37 -0700 | [diff] [blame] | 188 | [Setup] Announce Message START TEST RadiusRestart |
| 189 | [Teardown] Run Keywords Collect Logs |
| 190 | ... AND Announce Message END TEST RadiusRestart |
suraj gour | d64356b | 2019-11-07 13:26:20 +0000 | [diff] [blame] | 191 | Wait Until Keyword Succeeds ${timeout} 15s Restart Pod ${NAMESPACE} ${RESTART_POD_NAME} |
suraj gour | d64356b | 2019-11-07 13:26:20 +0000 | [diff] [blame] | 192 | FOR ${I} IN RANGE 0 ${num_onus} |
| 193 | ${src}= Set Variable ${hosts.src[${I}]} |
| 194 | ${dst}= Set Variable ${hosts.dst[${I}]} |
suraj gour | d64356b | 2019-11-07 13:26:20 +0000 | [diff] [blame] | 195 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
Zack Williams | a8fe75a | 2020-01-10 14:25:27 -0700 | [diff] [blame] | 196 | ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s |
| 197 | ... Get ONU Port in ONOS ${src['onu']} ${of_id} |
| 198 | Wait Until Keyword Succeeds ${timeout} 2s |
| 199 | ... Verify Eapol Flows Added For ONU ${k8s_node_ip} ${ONOS_SSH_PORT} ${onu_port} |
| 200 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure |
| 201 | ... Validate Authentication After Reassociate True ${src['dp_iface_name']} |
| 202 | ... ${src['ip']} ${src['user']} ${src['pass']} |
suraj gour | d64356b | 2019-11-07 13:26:20 +0000 | [diff] [blame] | 203 | ... ${src['container_type']} ${src['container_name']} |
| 204 | Wait Until Keyword Succeeds ${timeout} 2s Verify ONU in AAA-Users ${k8s_node_ip} |
Zack Williams | a8fe75a | 2020-01-10 14:25:27 -0700 | [diff] [blame] | 205 | ... ${ONOS_SSH_PORT} ${onu_port} |
| 206 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure |
| 207 | ... Validate DHCP and Ping True True ${src['dp_iface_name']} |
| 208 | ... ${src['s_tag']} ${src['c_tag']} ${dst['dp_iface_ip_qinq']} |
| 209 | ... ${src['ip']} ${src['user']} ${src['pass']} |
| 210 | ... ${src['container_type']} ${src['container_name']} |
| 211 | ... ${dst['dp_iface_name']} ${dst['ip']} ${dst['user']} |
| 212 | ... ${dst['pass']} ${dst['container_type']} ${dst['container_name']} |
suraj gour | d64356b | 2019-11-07 13:26:20 +0000 | [diff] [blame] | 213 | Wait Until Keyword Succeeds ${timeout} 2s Run Keyword And Continue On Failure |
| 214 | ... Validate Subscriber DHCP Allocation ${k8s_node_ip} ${ONOS_SSH_PORT} ${onu_port} |
Zack Williams | a8fe75a | 2020-01-10 14:25:27 -0700 | [diff] [blame] | 215 | Run Keyword and Ignore Error Get Device Output from Voltha ${onu_device_id} |
| 216 | Run Keyword and Ignore Error Collect Logs |
suraj gour | d64356b | 2019-11-07 13:26:20 +0000 | [diff] [blame] | 217 | END |
| 218 | |
suraj gour | d5cfdbb | 2019-12-13 12:44:55 +0000 | [diff] [blame] | 219 | Check DHCP attempt fails when subscriber is not added |
| 220 | [Documentation] Validates when removed subscriber access, DHCP attempt, ping fails and |
| 221 | ... when again added subscriber access, DHCP attempt, ping succeeds |
Zack Williams | a8fe75a | 2020-01-10 14:25:27 -0700 | [diff] [blame] | 222 | ... 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] | 223 | [Tags] functional SubsRemoveDHCP released |
Andy Bavier | 4a8450e | 2020-02-04 08:58:37 -0700 | [diff] [blame] | 224 | [Setup] Announce Message START TEST SubsRemoveDHCP |
| 225 | [Teardown] Run Keywords Collect Logs |
| 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']} |
suraj gour | d5cfdbb | 2019-12-13 12:44:55 +0000 | [diff] [blame] | 237 | Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command ${k8s_node_ip} |
| 238 | ... ${ONOS_SSH_PORT} volt-remove-subscriber-access ${of_id} ${onu_port} |
Zack Williams | a8fe75a | 2020-01-10 14:25:27 -0700 | [diff] [blame] | 239 | Sleep 5s |
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']} |
| 253 | Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command ${k8s_node_ip} |
| 254 | ... ${ONOS_SSH_PORT} volt-add-subscriber-access ${of_id} ${onu_port} |
| 255 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Validate DHCP and Ping True |
| 256 | ... True ${src['dp_iface_name']} ${src['s_tag']} ${src['c_tag']} ${dst['dp_iface_ip_qinq']} |
| 257 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 258 | ... ${dst['dp_iface_name']} ${dst['ip']} ${dst['user']} ${dst['pass']} ${dst['container_type']} |
| 259 | ... ${dst['container_name']} |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 260 | Run Keyword and Ignore Error Collect Logs |
| 261 | END |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 262 | |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 263 | Test Disable and Enable ONU scenario for ATT workflow |
| 264 | [Documentation] Validates E2E Ping Connectivity and object states for the given scenario: |
| 265 | ... Assuming that test1 was executed where all the ONUs are authenticated/DHCP/pingable |
| 266 | ... 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] | 267 | ... Perform enable on the ONUs, authentication check, volt-add-subscriber-access and |
| 268 | ... validate that the pings are successful |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 269 | ... VOL-2284 |
Suchitra Vemuri | 04245f7 | 2020-01-08 16:43:24 -0800 | [diff] [blame] | 270 | [Tags] functional ATT_DisableEnableONU |
Andy Bavier | 4a8450e | 2020-02-04 08:58:37 -0700 | [diff] [blame] | 271 | [Setup] Announce Message START TEST ATT_DisableEnableONU |
| 272 | [Teardown] Run Keywords Collect Logs |
| 273 | ... AND Announce Message END TEST ATT_DisableEnableONU |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 274 | FOR ${I} IN RANGE 0 ${num_onus} |
| 275 | ${src}= Set Variable ${hosts.src[${I}]} |
| 276 | ${dst}= Set Variable ${hosts.dst[${I}]} |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 277 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
| 278 | ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']} |
| 279 | ... ${of_id} |
| 280 | Disable Device ${onu_device_id} |
Suchitra Vemuri | 04245f7 | 2020-01-08 16:43:24 -0800 | [diff] [blame] | 281 | Sleep 5s |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 282 | Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command ${k8s_node_ip} |
| 283 | ... ${ONOS_SSH_PORT} volt-remove-subscriber-access ${of_id} ${onu_port} |
Zack Williams | a8fe75a | 2020-01-10 14:25:27 -0700 | [diff] [blame] | 284 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure |
| 285 | ... Wait Until Keyword Succeeds 60s 2s Check Ping |
| 286 | ... False ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']} |
| 287 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 288 | ... ELSE sleep 60s |
| 289 | Enable Device ${onu_device_id} |
| 290 | Wait Until Keyword Succeeds ${timeout} 2s Verify Eapol Flows Added For ONU ${k8s_node_ip} |
| 291 | ... ${ONOS_SSH_PORT} ${onu_port} |
Zack Williams | a8fe75a | 2020-01-10 14:25:27 -0700 | [diff] [blame] | 292 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure |
| 293 | ... Validate Authentication After Reassociate True |
| 294 | ... ${src['dp_iface_name']} ${src['ip']} ${src['user']} ${src['pass']} |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 295 | ... ${src['container_type']} ${src['container_name']} |
| 296 | Wait Until Keyword Succeeds ${timeout} 2s Verify ONU in AAA-Users ${k8s_node_ip} |
Zack Williams | a8fe75a | 2020-01-10 14:25:27 -0700 | [diff] [blame] | 297 | ... ${ONOS_SSH_PORT} ${onu_port} |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 298 | Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command ${k8s_node_ip} |
| 299 | ... ${ONOS_SSH_PORT} volt-add-subscriber-access ${of_id} ${onu_port} |
| 300 | Sleep 10s |
| 301 | 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] | 302 | ... 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] | 303 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 304 | ... ${dst['dp_iface_name']} ${dst['ip']} ${dst['user']} ${dst['pass']} ${dst['container_type']} |
| 305 | ... ${dst['container_name']} |
| 306 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
| 307 | ... Validate Subscriber DHCP Allocation ${k8s_node_ip} ${ONOS_SSH_PORT} ${onu_port} |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 308 | Run Keyword and Ignore Error Collect Logs |
suraj gour | d5cfdbb | 2019-12-13 12:44:55 +0000 | [diff] [blame] | 309 | END |
suraj gour | d5cfdbb | 2019-12-13 12:44:55 +0000 | [diff] [blame] | 310 | |
Suchitra Vemuri | 937cd39 | 2020-01-12 17:10:42 -0800 | [diff] [blame] | 311 | Delete OLT, ReAdd OLT and Perform Sanity Test |
| 312 | [Documentation] Validates E2E Ping Connectivity and object states for the given scenario: |
| 313 | ... Disable and Delete the OLT |
| 314 | ... Create/Enable the same OLT again |
| 315 | ... Validate authentication/DHCP/E2E pings succeed for all the ONUs connected to the OLT |
Suchitra Vemuri | 2fa9bba | 2020-01-22 17:38:48 -0800 | [diff] [blame] | 316 | [Tags] functional DeleteOLT |
Andy Bavier | 4a8450e | 2020-02-04 08:58:37 -0700 | [diff] [blame] | 317 | [Setup] Announce Message START TEST DeleteOLT |
| 318 | [Teardown] Run Keywords Collect Logs |
| 319 | ... AND Announce Message END TEST DeleteOLT |
Suchitra Vemuri | 937cd39 | 2020-01-12 17:10:42 -0800 | [diff] [blame] | 320 | Run Keyword If ${has_dataplane} Clean Up Linux |
| 321 | Run Keyword If ${has_dataplane} Delete Device and Verify |
| 322 | Run Keyword and Ignore Error Collect Logs |
| 323 | # Recreate the OLT |
| 324 | Run Keyword If ${has_dataplane} Setup |
| 325 | Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test |
Suchitra Vemuri | 937cd39 | 2020-01-12 17:10:42 -0800 | [diff] [blame] | 326 | |
Hema | 783279b | 2020-01-22 15:37:37 +0530 | [diff] [blame] | 327 | Test disable ONUs and OLT then delete ONUs and OLT |
| 328 | [Documentation] On deployed POD, disable the ONU, disable the OLT and then delete ONU and OLT. |
| 329 | ... This TC is to confirm that ONU removal is not impacting OLT |
| 330 | ... Devices will be removed during the execution of this TC |
| 331 | ... so calling setup at the end to add the devices back to avoid the confusion. |
Suchitra Vemuri | ba4f371 | 2020-01-24 16:18:26 -0800 | [diff] [blame] | 332 | [Tags] functional VOL-2354 DisableDeleteONUandOLT |
Andy Bavier | 4a8450e | 2020-02-04 08:58:37 -0700 | [diff] [blame] | 333 | [Setup] Announce Message START TEST DisableDeleteONUandOLT |
| 334 | [Teardown] Run Keywords Collect Logs |
| 335 | ... AND Announce Message END TEST DisableDeleteONUandOLT |
Suchitra Vemuri | ba4f371 | 2020-01-24 16:18:26 -0800 | [diff] [blame] | 336 | ${olt_device_id}= Get Device ID From SN ${olt_serial_number} |
Hema | 783279b | 2020-01-22 15:37:37 +0530 | [diff] [blame] | 337 | FOR ${I} IN RANGE 0 ${num_onus} |
| 338 | ${src}= Set Variable ${hosts.src[${I}]} |
| 339 | ${dst}= Set Variable ${hosts.dst[${I}]} |
| 340 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
| 341 | Wait Until Keyword Succeeds ${timeout} 5s Validate Device ENABLED ACTIVE |
| 342 | ... REACHABLE ${src['onu']} onu=True onu_reason=omci-flows-pushed |
| 343 | Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Device ENABLED ACTIVE |
| 344 | ... REACHABLE ${olt_serial_number} |
| 345 | ${rc} ${output}= Run and Return Rc and Output |
| 346 | ... ${VOLTCTL_CONFIG}; voltctl device disable ${onu_device_id} |
| 347 | Should Be Equal As Integers ${rc} 0 |
| 348 | Wait Until Keyword Succeeds ${timeout} 5s Validate Device DISABLED UNKNOWN |
| 349 | ... REACHABLE ${src['onu']} onu=false |
| 350 | Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Device ENABLED ACTIVE |
| 351 | ... REACHABLE ${olt_serial_number} |
| 352 | END |
| 353 | ${rc} ${output}= Run and Return Rc and Output ${VOLTCTL_CONFIG}; voltctl device disable ${olt_device_id} |
| 354 | Should Be Equal As Integers ${rc} 0 |
| 355 | Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Device DISABLED UNKNOWN REACHABLE |
| 356 | ... ${olt_serial_number} |
| 357 | FOR ${I} IN RANGE 0 ${num_onus} |
| 358 | ${src}= Set Variable ${hosts.src[${I}]} |
| 359 | ${dst}= Set Variable ${hosts.dst[${I}]} |
| 360 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
Suchitra Vemuri | ba4f371 | 2020-01-24 16:18:26 -0800 | [diff] [blame] | 361 | Wait Until Keyword Succeeds ${timeout} 5s Validate Device DISABLED UNKNOWN |
| 362 | ... REACHABLE ${src['onu']} onu=false |
Hema | 783279b | 2020-01-22 15:37:37 +0530 | [diff] [blame] | 363 | ${rc} ${output}= Run and Return Rc and Output ${VOLTCTL_CONFIG}; voltctl device delete ${onu_device_id} |
| 364 | Should Be Equal As Integers ${rc} 0 |
| 365 | Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Device DISABLED UNKNOWN |
| 366 | ... REACHABLE ${olt_serial_number} |
| 367 | END |
| 368 | ${rc} ${output}= Run and Return Rc and Output ${VOLTCTL_CONFIG}; voltctl device delete ${olt_device_id} |
| 369 | Should Be Equal As Integers ${rc} 0 |
| 370 | Wait Until Keyword Succeeds ${timeout} 5s Test Empty Device List |
| 371 | #Adding setup here to add the devices back since this TC removes the devices |
| 372 | Run Keyword If ${has_dataplane} sleep 180s |
| 373 | setup |
| 374 | |
David Bainbridge | f81cd64 | 2019-11-20 00:14:47 +0000 | [diff] [blame] | 375 | Sanity E2E Test for OLT/ONU on POD With Core Fail and Restart |
| 376 | [Documentation] Deploys an device instance and waits for it to authenticate. After |
| 377 | ... authentication is successful the rw-core deployment is scaled to 0 instances to |
| 378 | ... simulate a POD crash. The test then scales the rw-core back to a single instance |
Zack Williams | a8fe75a | 2020-01-10 14:25:27 -0700 | [diff] [blame] | 379 | ... and configures ONOS for access. The test succeeds if the device is able to |
David Bainbridge | f81cd64 | 2019-11-20 00:14:47 +0000 | [diff] [blame] | 380 | ... complete the DHCP sequence. |
| 381 | [Tags] bbsim rwcore-restart |
Andy Bavier | 4a8450e | 2020-02-04 08:58:37 -0700 | [diff] [blame] | 382 | [Setup] Run Keywords Announce Message START TEST RwCoreFailAndRestart |
| 383 | ... AND Clear All Devices Then Create New Device |
| 384 | [Teardown] Run Keywords Collect Logs |
| 385 | ... AND Announce Message END TEST RwCoreFailAndRestart |
David Bainbridge | f81cd64 | 2019-11-20 00:14:47 +0000 | [diff] [blame] | 386 | ${of_id}= Wait Until Keyword Succeeds ${timeout} 15s Validate OLT Device in ONOS ${olt_serial_number} |
| 387 | Set Global Variable ${of_id} |
David Bainbridge | f81cd64 | 2019-11-20 00:14:47 +0000 | [diff] [blame] | 388 | FOR ${I} IN RANGE 0 ${num_onus} |
| 389 | ${src}= Set Variable ${hosts.src[${I}]} |
| 390 | ${dst}= Set Variable ${hosts.dst[${I}]} |
| 391 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
| 392 | ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']} |
| 393 | ... ${of_id} |
David Bainbridge | f81cd64 | 2019-11-20 00:14:47 +0000 | [diff] [blame] | 394 | # Bring up the device and verify it authenticates |
Zack Williams | a8fe75a | 2020-01-10 14:25:27 -0700 | [diff] [blame] | 395 | Wait Until Keyword Succeeds ${timeout} 5s Validate Device ENABLED ACTIVE REACHABLE |
David Bainbridge | f81cd64 | 2019-11-20 00:14:47 +0000 | [diff] [blame] | 396 | ... ${onu_device_id} onu=True onu_reason=omci-flows-pushed |
| 397 | Wait Until Keyword Succeeds ${timeout} 2s Verify Eapol Flows Added For ONU ${k8s_node_ip} |
| 398 | ... ${ONOS_SSH_PORT} ${onu_port} |
| 399 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Validate Authentication True |
| 400 | ... ${src['dp_iface_name']} wpa_supplicant.conf ${src['ip']} ${src['user']} ${src['pass']} |
| 401 | ... ${src['container_type']} ${src['container_name']} |
| 402 | Wait Until Keyword Succeeds ${timeout} 2s Verify ONU in AAA-Users ${k8s_node_ip} |
David Bainbridge | 3d6d5d3 | 2019-12-17 19:05:35 +0000 | [diff] [blame] | 403 | ... ${ONOS_SSH_PORT} ${onu_port} |
| 404 | END |
| 405 | |
| 406 | # Scale down the rw-core deployment to 0 PODs and once confirmed, scale it back to 1 |
| 407 | Scale K8s Deployment voltha voltha-rw-core 0 |
| 408 | Wait Until Keyword Succeeds ${timeout} 2s Pod Does Not Exist voltha voltha-rw-core |
| 409 | # Ensure the ofagent POD goes "not-ready" as expected |
| 410 | Wait Until keyword Succeeds ${timeout} 2s |
| 411 | ... Check Expected Available Deployment Replicas voltha voltha-ofagent 0 |
| 412 | # Scale up the core deployment and make sure both it and the ofagent deployment are back |
| 413 | Scale K8s Deployment voltha voltha-rw-core 1 |
| 414 | Wait Until Keyword Succeeds ${timeout} 2s |
| 415 | ... Check Expected Available Deployment Replicas voltha voltha-rw-core 1 |
| 416 | Wait Until Keyword Succeeds ${timeout} 2s |
| 417 | ... Check Expected Available Deployment Replicas voltha voltha-ofagent 1 |
| 418 | # For some reason scaling down and up the POD behind a service causes the port forward to stop working, |
| 419 | # so restart the port forwarding for the API service |
| 420 | Restart VOLTHA Port Foward voltha-api-minimal |
| 421 | # Ensure that the ofagent pod is up and ready and the device is available in ONOS, this |
| 422 | # represents system connectivity being restored |
| 423 | Wait Until Keyword Succeeds ${timeout} 2s Device Is Available In ONOS |
| 424 | ... http://karaf:karaf@${k8s_node_ip}:${ONOS_REST_PORT} ${of_id} |
| 425 | |
| 426 | FOR ${I} IN RANGE 0 ${num_onus} |
| 427 | # Add subscriber access and verify that DHCP completes to ensure system is still functioning properly |
| 428 | Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command ${k8s_node_ip} |
| 429 | ... ${ONOS_SSH_PORT} volt-add-subscriber-access ${of_id} ${onu_port} |
| 430 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Validate DHCP and Ping True |
| 431 | ... True ${src['dp_iface_name']} ${src['s_tag']} ${src['c_tag']} ${dst['dp_iface_ip_qinq']} |
| 432 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 433 | ... ${dst['dp_iface_name']} ${dst['ip']} ${dst['user']} ${dst['pass']} ${dst['container_type']} |
| 434 | ... ${dst['container_name']} |
| 435 | Wait Until Keyword Succeeds ${timeout} 2s Run Keyword And Continue On Failure |
| 436 | ... Validate Subscriber DHCP Allocation ${k8s_node_ip} ${ONOS_SSH_PORT} ${onu_port} |
| 437 | END |
| 438 | |
| 439 | Sanity E2E Test for OLT/ONU on POD With OLT Adapters Fail and Restart |
| 440 | [Documentation] Deploys an device instance and waits for it to authenticate. After |
| 441 | ... authentication is successful the rw-core deployment is scaled to 0 instances to |
| 442 | ... simulate a POD crash. The test then scales the rw-core back to a single instance |
| 443 | ... and configures ONOS for access. The test succeeds if the device is able to |
| 444 | ... complete the DHCP sequence. |
| 445 | [Tags] bbsim olt-adapter-restart |
| 446 | [Setup] Clear All Devices Then Create New Device |
| 447 | ${of_id}= Wait Until Keyword Succeeds ${timeout} 15s Validate OLT Device in ONOS ${olt_serial_number} |
| 448 | Set Global Variable ${of_id} |
| 449 | |
| 450 | FOR ${I} IN RANGE 0 ${num_onus} |
| 451 | ${src}= Set Variable ${hosts.src[${I}]} |
| 452 | ${dst}= Set Variable ${hosts.dst[${I}]} |
| 453 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
| 454 | ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']} |
| 455 | ... ${of_id} |
| 456 | |
| 457 | # Bring up the device and verify it authenticates |
| 458 | Wait Until Keyword Succeeds ${timeout} 5s Validate Device ENABLED ACTIVE REACHABLE |
| 459 | ... ${onu_device_id} onu=True onu_reason=omci-flows-pushed |
| 460 | Wait Until Keyword Succeeds ${timeout} 2s Verify Eapol Flows Added For ONU ${k8s_node_ip} |
Zack Williams | a8fe75a | 2020-01-10 14:25:27 -0700 | [diff] [blame] | 461 | ... ${ONOS_SSH_PORT} ${onu_port} |
David Bainbridge | 3d6d5d3 | 2019-12-17 19:05:35 +0000 | [diff] [blame] | 462 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Validate Authentication True |
| 463 | ... ${src['dp_iface_name']} wpa_supplicant.conf ${src['ip']} ${src['user']} ${src['pass']} |
| 464 | ... ${src['container_type']} ${src['container_name']} |
| 465 | Wait Until Keyword Succeeds ${timeout} 2s Verify ONU in AAA-Users ${k8s_node_ip} |
| 466 | ... ${ONOS_SSH_PORT} ${onu_port} |
| 467 | END |
| 468 | |
| 469 | # Scale down the open OLT adapter deployment to 0 PODs and once confirmed, scale it back to 1 |
| 470 | Scale K8s Deployment voltha adapter-open-olt 0 |
| 471 | Wait Until Keyword Succeeds ${timeout} 2s Pod Does Not Exist voltha adapter-open-olt |
| 472 | # Scale up the open OLT adapter deployment and make sure both it and the ofagent deployment are back |
| 473 | Scale K8s Deployment voltha adapter-open-olt 1 |
| 474 | Wait Until Keyword Succeeds ${timeout} 2s |
| 475 | ... Check Expected Available Deployment Replicas voltha adapter-open-olt 1 |
| 476 | |
| 477 | # Ensure the device is available in ONOS, this represents system connectivity being restored |
| 478 | Wait Until Keyword Succeeds ${timeout} 2s Device Is Available In ONOS |
| 479 | ... http://karaf:karaf@${k8s_node_ip}:${ONOS_REST_PORT} ${of_id} |
| 480 | |
| 481 | FOR ${I} IN RANGE 0 ${num_onus} |
David Bainbridge | f81cd64 | 2019-11-20 00:14:47 +0000 | [diff] [blame] | 482 | # Add subscriber access and verify that DHCP completes to ensure system is still functioning properly |
| 483 | Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command ${k8s_node_ip} |
| 484 | ... ${ONOS_SSH_PORT} volt-add-subscriber-access ${of_id} ${onu_port} |
| 485 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Validate DHCP and Ping True |
| 486 | ... True ${src['dp_iface_name']} ${src['s_tag']} ${src['c_tag']} ${dst['dp_iface_ip_qinq']} |
| 487 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 488 | ... ${dst['dp_iface_name']} ${dst['ip']} ${dst['user']} ${dst['pass']} ${dst['container_type']} |
| 489 | ... ${dst['container_name']} |
| 490 | Wait Until Keyword Succeeds ${timeout} 2s Run Keyword And Continue On Failure |
| 491 | ... Validate Subscriber DHCP Allocation ${k8s_node_ip} ${ONOS_SSH_PORT} ${onu_port} |
| 492 | END |
| 493 | |
Suchitra Vemuri | 65cd65f | 2019-08-30 14:39:22 -0700 | [diff] [blame] | 494 | *** Keywords *** |
| 495 | Setup Suite |
Andy Bavier | 88cd9f6 | 2019-11-26 16:22:33 -0700 | [diff] [blame] | 496 | [Documentation] Set up the test suite |
| 497 | Common Test Suite Setup |
Suchitra Vemuri | 65cd65f | 2019-08-30 14:39:22 -0700 | [diff] [blame] | 498 | |
David Bainbridge | f81cd64 | 2019-11-20 00:14:47 +0000 | [diff] [blame] | 499 | Clear All Devices Then Create New Device |
| 500 | [Documentation] Remove any devices from VOLTHA and ONOS |
David Bainbridge | f81cd64 | 2019-11-20 00:14:47 +0000 | [diff] [blame] | 501 | # Remove all devices from voltha and nos |
| 502 | Delete All Devices and Verify |
David Bainbridge | f81cd64 | 2019-11-20 00:14:47 +0000 | [diff] [blame] | 503 | # Execute normal test Setup Keyword |
| 504 | Setup |
| 505 | |