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