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