David Bainbridge | f81cd64 | 2019-11-20 00:14:47 +0000 | [diff] [blame] | 1 | # Copyright 2017 - present Open Networking Foundation |
Suchitra Vemuri | 65cd65f | 2019-08-30 14:39:22 -0700 | [diff] [blame] | 2 | # |
| 3 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | # you may not use this file except in compliance with the License. |
| 5 | # You may obtain a copy of the License at |
| 6 | # |
| 7 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | # |
| 9 | # Unless required by applicable law or agreed to in writing, software |
| 10 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | # See the License for the specific language governing permissions and |
| 13 | # limitations under the License. |
Matteo Scandolo | 1294aeb | 2019-09-24 16:20:32 -0700 | [diff] [blame] | 14 | # FIXME Can we use the same test against BBSim and Hardware? |
| 15 | |
Suchitra Vemuri | 65cd65f | 2019-08-30 14:39:22 -0700 | [diff] [blame] | 16 | *** Settings *** |
Zack Williams | ec53a1b | 2019-09-16 15:50:52 -0700 | [diff] [blame] | 17 | Documentation Test various end-to-end scenarios |
Suchitra Vemuri | 65cd65f | 2019-08-30 14:39:22 -0700 | [diff] [blame] | 18 | Suite Setup Setup Suite |
Suchitra Vemuri | 65cd65f | 2019-08-30 14:39:22 -0700 | [diff] [blame] | 19 | Test Setup Setup |
| 20 | Test Teardown Teardown |
Andy Bavier | ba9866b | 2019-10-11 07:11:53 -0700 | [diff] [blame] | 21 | Suite Teardown Teardown Suite |
Suchitra Vemuri | 65cd65f | 2019-08-30 14:39:22 -0700 | [diff] [blame] | 22 | Library Collections |
| 23 | Library String |
| 24 | Library OperatingSystem |
| 25 | Library XML |
| 26 | Library RequestsLibrary |
Andy Bavier | ba9866b | 2019-10-11 07:11:53 -0700 | [diff] [blame] | 27 | Library ../../libraries/DependencyLibrary.py |
Suchitra Vemuri | b8ed2d5 | 2019-09-30 13:22:51 -0700 | [diff] [blame] | 28 | Resource ../../libraries/onos.robot |
| 29 | Resource ../../libraries/voltctl.robot |
David Bainbridge | f81cd64 | 2019-11-20 00:14:47 +0000 | [diff] [blame] | 30 | Resource ../../libraries/voltha.robot |
Suchitra Vemuri | b8ed2d5 | 2019-09-30 13:22:51 -0700 | [diff] [blame] | 31 | Resource ../../libraries/utils.robot |
Andy Bavier | ba9866b | 2019-10-11 07:11:53 -0700 | [diff] [blame] | 32 | Resource ../../libraries/k8s.robot |
Suchitra Vemuri | b8ed2d5 | 2019-09-30 13:22:51 -0700 | [diff] [blame] | 33 | Resource ../../variables/variables.robot |
Suchitra Vemuri | 65cd65f | 2019-08-30 14:39:22 -0700 | [diff] [blame] | 34 | |
| 35 | *** Variables *** |
Zack Williams | ec53a1b | 2019-09-16 15:50:52 -0700 | [diff] [blame] | 36 | ${POD_NAME} flex-ocp-cord |
| 37 | ${KUBERNETES_CONF} ${KUBERNETES_CONFIGS_DIR}/${POD_NAME}.conf |
| 38 | ${KUBERNETES_CONFIGS_DIR} ~/pod-configs/kubernetes-configs |
| 39 | #${KUBERNETES_CONFIGS_DIR} ${KUBERNETES_CONFIGS_DIR}/${POD_NAME}.conf |
| 40 | ${KUBERNETES_YAML} ${KUBERNETES_CONFIGS_DIR}/${POD_NAME}.yml |
| 41 | ${HELM_CHARTS_DIR} ~/helm-charts |
| 42 | ${VOLTHA_POD_NUM} 8 |
Zack Williams | a8fe75a | 2020-01-10 14:25:27 -0700 | [diff] [blame] | 43 | ${NAMESPACE} voltha |
suraj gour | d64356b | 2019-11-07 13:26:20 +0000 | [diff] [blame] | 44 | # For below variable value, using deployment name as using grep for |
| 45 | # parsing radius pod name, we can also use full radius pod name |
Zack Williams | a8fe75a | 2020-01-10 14:25:27 -0700 | [diff] [blame] | 46 | ${RESTART_POD_NAME} radius |
Andy Bavier | ba9866b | 2019-10-11 07:11:53 -0700 | [diff] [blame] | 47 | ${timeout} 60s |
Zack Williams | ec53a1b | 2019-09-16 15:50:52 -0700 | [diff] [blame] | 48 | ${of_id} 0 |
| 49 | ${logical_id} 0 |
Andy Bavier | ba9866b | 2019-10-11 07:11:53 -0700 | [diff] [blame] | 50 | ${has_dataplane} True |
Andy Bavier | ba9866b | 2019-10-11 07:11:53 -0700 | [diff] [blame] | 51 | ${teardown_device} False |
Zack Williams | a8fe75a | 2020-01-10 14:25:27 -0700 | [diff] [blame] | 52 | ${scripts} ../../scripts |
Suchitra Vemuri | 65cd65f | 2019-08-30 14:39:22 -0700 | [diff] [blame] | 53 | |
Gayathri.Selvan | 92d1686 | 2020-03-19 14:47:58 +0000 | [diff] [blame] | 54 | # For dataplane bandwidth testing |
| 55 | ${upper_margin_pct} 105 # Allow 5% over the limit |
Andy Bavier | f6ab19c | 2020-05-14 10:34:47 -0700 | [diff] [blame] | 56 | ${lower_margin_pct} 92 # Allow 8% under the limit |
Gayathri.Selvan | 92d1686 | 2020-03-19 14:47:58 +0000 | [diff] [blame] | 57 | ${udp_rate_multiplier} 1.10 # Send UDP at bw profile limit * rate_multiplier |
| 58 | ${udp_packet_bytes} 1400 # UDP payload in bytes |
| 59 | |
Andy Bavier | abeba26 | 2020-02-07 16:22:16 -0700 | [diff] [blame] | 60 | # Per-test logging on failure is turned off by default; set this variable to enable |
| 61 | ${container_log_dir} ${None} |
| 62 | |
Suchitra Vemuri | 65cd65f | 2019-08-30 14:39:22 -0700 | [diff] [blame] | 63 | *** Test Cases *** |
| 64 | Sanity E2E Test for OLT/ONU on POD |
| 65 | [Documentation] Validates E2E Ping Connectivity and object states for the given scenario: |
| 66 | ... 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] | 67 | [Tags] sanity test1 |
Andy Bavier | e187eda | 2020-04-20 15:00:02 -0700 | [diff] [blame] | 68 | [Setup] Run Keywords Start Logging SanityTest |
Andy Bavier | 4a8450e | 2020-02-04 08:58:37 -0700 | [diff] [blame] | 69 | ... AND Setup |
| 70 | [Teardown] Run Keywords Collect Logs |
Andy Bavier | abeba26 | 2020-02-07 16:22:16 -0700 | [diff] [blame] | 71 | ... AND Stop Logging SanityTest |
Suchitra Vemuri | c5295a3 | 2019-12-15 20:32:04 -0800 | [diff] [blame] | 72 | Run Keyword If ${has_dataplane} Clean Up Linux |
Zack Williams | a8fe75a | 2020-01-10 14:25:27 -0700 | [diff] [blame] | 73 | Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test |
Suchitra Vemuri | 65cd65f | 2019-08-30 14:39:22 -0700 | [diff] [blame] | 74 | |
Hema | 93762cf | 2020-01-29 19:59:28 +0530 | [diff] [blame] | 75 | Test Disable and Enable OLT |
| 76 | [Documentation] Validates E2E Ping Connectivity and object states for the given scenario: |
| 77 | ... Assuming that test1 was executed where all the ONUs are authenticated/DHCP/pingable |
| 78 | ... Perform disable on the OLT and validate that the pings do not succeed |
| 79 | ... Perform enable on the OLT and validate that the pings are successful |
Suchitra Vemuri | 14c9a03 | 2020-05-27 14:01:08 -0700 | [diff] [blame] | 80 | [Tags] functional VOL-2410 DisableEnableOLT notready |
Andy Bavier | e187eda | 2020-04-20 15:00:02 -0700 | [diff] [blame] | 81 | [Setup] Start Logging DisableEnableOLT |
Andy Bavier | 4a8450e | 2020-02-04 08:58:37 -0700 | [diff] [blame] | 82 | [Teardown] Run Keywords Collect Logs |
Andy Bavier | abeba26 | 2020-02-07 16:22:16 -0700 | [diff] [blame] | 83 | ... AND Stop Logging DisableEnableOLT |
Hema | 93762cf | 2020-01-29 19:59:28 +0530 | [diff] [blame] | 84 | #Disable the OLT and verify the OLT/ONUs are disabled properly |
| 85 | ${rc} ${output}= Run and Return Rc and Output ${VOLTCTL_CONFIG}; voltctl device disable ${olt_device_id} |
| 86 | Should Be Equal As Integers ${rc} 0 |
| 87 | Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Device DISABLED UNKNOWN REACHABLE |
| 88 | ... ${olt_serial_number} |
| 89 | FOR ${I} IN RANGE 0 ${num_onus} |
| 90 | ${src}= Set Variable ${hosts.src[${I}]} |
| 91 | ${dst}= Set Variable ${hosts.dst[${I}]} |
| 92 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
Hardik Windlass | 7c801e6 | 2020-05-04 19:33:21 +0530 | [diff] [blame] | 93 | ${onu_port}= Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
| 94 | ... Get ONU Port in ONOS ${src['onu']} ${of_id} |
Hema | 93762cf | 2020-01-29 19:59:28 +0530 | [diff] [blame] | 95 | Wait Until Keyword Succeeds ${timeout} 5s Validate Device ENABLED DISCOVERED |
| 96 | ... UNREACHABLE ${src['onu']} onu=false |
| 97 | #Verify that ping fails |
TorstenThieme | 754fec7 | 2020-02-18 07:24:46 +0000 | [diff] [blame] | 98 | Run Keyword If ${has_dataplane} |
| 99 | ... Run Keyword And Continue On Failure Wait Until Keyword Succeeds 60s 2s |
Hema | 93762cf | 2020-01-29 19:59:28 +0530 | [diff] [blame] | 100 | ... Check Ping False ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']} |
Andrea Campanella | a6e1732 | 2020-05-04 14:31:44 +0200 | [diff] [blame] | 101 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
Hardik Windlass | 7c801e6 | 2020-05-04 19:33:21 +0530 | [diff] [blame] | 102 | # Remove Subscriber Access (To replicate ATT workflow) |
| 103 | Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command ${ONOS_SSH_IP} |
| 104 | ... ${ONOS_SSH_PORT} volt-remove-subscriber-access ${of_id} ${onu_port} |
Hema | 93762cf | 2020-01-29 19:59:28 +0530 | [diff] [blame] | 105 | END |
| 106 | #Enable the OLT back and check ONU, OLT status are back to "ACTIVE" |
| 107 | Enable Device ${olt_device_id} |
| 108 | Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Device ENABLED ACTIVE REACHABLE |
| 109 | ... ${olt_serial_number} |
Hema | f64d34c | 2020-03-25 00:40:17 +0530 | [diff] [blame] | 110 | Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Port Types |
| 111 | ... PON_OLT ETHERNET_NNI |
Hardik Windlass | 7c801e6 | 2020-05-04 19:33:21 +0530 | [diff] [blame] | 112 | Run Keyword If ${has_dataplane} Clean Up Linux |
| 113 | Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test |
Hema | 93762cf | 2020-01-29 19:59:28 +0530 | [diff] [blame] | 114 | |
Suchitra Vemuri | 6db8941 | 2019-11-14 14:52:54 -0800 | [diff] [blame] | 115 | Test Disable and Enable ONU |
| 116 | [Documentation] Validates E2E Ping Connectivity and object states for the given scenario: |
| 117 | ... Assuming that test1 was executed where all the ONUs are authenticated/DHCP/pingable |
| 118 | ... Perform disable on the ONUs and validate that the pings do not succeed |
| 119 | ... Perform enable on the ONUs and validate that the pings are successful |
Suchitra Vemuri | 04245f7 | 2020-01-08 16:43:24 -0800 | [diff] [blame] | 120 | [Tags] functional DisableEnableONU released |
Andy Bavier | e187eda | 2020-04-20 15:00:02 -0700 | [diff] [blame] | 121 | [Setup] Start Logging DisableEnableONU |
Andy Bavier | 4a8450e | 2020-02-04 08:58:37 -0700 | [diff] [blame] | 122 | [Teardown] Run Keywords Collect Logs |
Andy Bavier | abeba26 | 2020-02-07 16:22:16 -0700 | [diff] [blame] | 123 | ... AND Stop Logging DisableEnableONU |
Suchitra Vemuri | 6db8941 | 2019-11-14 14:52:54 -0800 | [diff] [blame] | 124 | FOR ${I} IN RANGE 0 ${num_onus} |
| 125 | ${src}= Set Variable ${hosts.src[${I}]} |
| 126 | ${dst}= Set Variable ${hosts.dst[${I}]} |
Suchitra Vemuri | 6db8941 | 2019-11-14 14:52:54 -0800 | [diff] [blame] | 127 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
| 128 | ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']} |
| 129 | ... ${of_id} |
| 130 | Disable Device ${onu_device_id} |
Andy Bavier | 46c8be3 | 2020-01-21 10:06:27 -0700 | [diff] [blame] | 131 | Wait Until Keyword Succeeds 20s 2s Test Devices Disabled in VOLTHA Id=${onu_device_id} |
Andy Bavier | 33e6dd3 | 2020-01-16 13:35:20 -0700 | [diff] [blame] | 132 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure |
| 133 | ... Wait Until Keyword Succeeds 60s 2s |
Zack Williams | a8fe75a | 2020-01-10 14:25:27 -0700 | [diff] [blame] | 134 | ... Check Ping False ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']} |
| 135 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
Suchitra Vemuri | 6db8941 | 2019-11-14 14:52:54 -0800 | [diff] [blame] | 136 | Enable Device ${onu_device_id} |
| 137 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
ubuntu | 6b6e7d4 | 2020-03-02 12:35:42 -0800 | [diff] [blame] | 138 | ... Validate Subscriber DHCP Allocation ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port} |
Hardik Windlass | 2180763 | 2020-04-14 16:24:55 +0530 | [diff] [blame] | 139 | # Verify subscriber access flows are added for the ONU port |
| 140 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 141 | ... Verify Subscriber Access Flows Added For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id} |
| 142 | ... ${onu_port} ${nni_port} ${src['c_tag']} ${src['s_tag']} |
Andy Bavier | 33e6dd3 | 2020-01-16 13:35:20 -0700 | [diff] [blame] | 143 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure |
| 144 | ... Wait Until Keyword Succeeds 60s 2s |
Zack Williams | a8fe75a | 2020-01-10 14:25:27 -0700 | [diff] [blame] | 145 | ... Check Ping True ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']} |
| 146 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 147 | Run Keyword and Ignore Error Get Device Output from Voltha ${onu_device_id} |
| 148 | Run Keyword and Ignore Error Collect Logs |
Suchitra Vemuri | 6db8941 | 2019-11-14 14:52:54 -0800 | [diff] [blame] | 149 | END |
| 150 | |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 151 | Test Subscriber Delete and Add |
| 152 | [Documentation] Validates E2E Ping Connectivity and object states for the given scenario: |
| 153 | ... Assuming that all the ONUs are authenticated/DHCP/pingable |
Zack Williams | a8fe75a | 2020-01-10 14:25:27 -0700 | [diff] [blame] | 154 | ... Delete a subscriber and validate that the pings do not succeed |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 155 | ... Re-add the subscriber and validate that the pings are successful |
Suchitra Vemuri | 04245f7 | 2020-01-08 16:43:24 -0800 | [diff] [blame] | 156 | [Tags] functional SubAddDelete released |
Andy Bavier | e187eda | 2020-04-20 15:00:02 -0700 | [diff] [blame] | 157 | [Setup] Start Logging SubAddDelete |
Andy Bavier | 4a8450e | 2020-02-04 08:58:37 -0700 | [diff] [blame] | 158 | [Teardown] Run Keywords Collect Logs |
Andy Bavier | abeba26 | 2020-02-07 16:22:16 -0700 | [diff] [blame] | 159 | ... AND Stop Logging SubAddDelete |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 160 | FOR ${I} IN RANGE 0 ${num_onus} |
| 161 | ${src}= Set Variable ${hosts.src[${I}]} |
| 162 | ${dst}= Set Variable ${hosts.dst[${I}]} |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 163 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
| 164 | ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']} |
| 165 | ... ${of_id} |
ubuntu | 6b6e7d4 | 2020-03-02 12:35:42 -0800 | [diff] [blame] | 166 | Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command ${ONOS_SSH_IP} |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 167 | ... ${ONOS_SSH_PORT} volt-remove-subscriber-access ${of_id} ${onu_port} |
| 168 | Sleep 10s |
Suchitra Vemuri | 9da4430 | 2020-03-04 14:24:49 -0800 | [diff] [blame] | 169 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
| 170 | ... Verify No Pending Flows For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port} |
Andy Bavier | 33e6dd3 | 2020-01-16 13:35:20 -0700 | [diff] [blame] | 171 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure |
| 172 | ... Wait Until Keyword Succeeds 60s 2s |
Zack Williams | a8fe75a | 2020-01-10 14:25:27 -0700 | [diff] [blame] | 173 | ... Check Ping False ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']} |
| 174 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
ubuntu | 6b6e7d4 | 2020-03-02 12:35:42 -0800 | [diff] [blame] | 175 | Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command ${ONOS_SSH_IP} |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 176 | ... ${ONOS_SSH_PORT} volt-add-subscriber-access ${of_id} ${onu_port} |
| 177 | Sleep 10s |
| 178 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
Suchitra Vemuri | 9da4430 | 2020-03-04 14:24:49 -0800 | [diff] [blame] | 179 | ... Verify No Pending Flows For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port} |
| 180 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
ubuntu | 6b6e7d4 | 2020-03-02 12:35:42 -0800 | [diff] [blame] | 181 | ... Validate Subscriber DHCP Allocation ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port} |
Hardik Windlass | 2180763 | 2020-04-14 16:24:55 +0530 | [diff] [blame] | 182 | # Verify subscriber access flows are added for the ONU port |
| 183 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 184 | ... Verify Subscriber Access Flows Added For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id} |
| 185 | ... ${onu_port} ${nni_port} ${src['c_tag']} ${src['s_tag']} |
Andy Bavier | 33e6dd3 | 2020-01-16 13:35:20 -0700 | [diff] [blame] | 186 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure |
| 187 | ... Wait Until Keyword Succeeds 60s 2s |
Zack Williams | a8fe75a | 2020-01-10 14:25:27 -0700 | [diff] [blame] | 188 | ... Check Ping True ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']} |
| 189 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 190 | Run Keyword and Ignore Error Get Device Output from Voltha ${onu_device_id} |
| 191 | Run Keyword and Ignore Error Collect Logs |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 192 | END |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 193 | |
suraj gour | d5cfdbb | 2019-12-13 12:44:55 +0000 | [diff] [blame] | 194 | Check DHCP attempt fails when subscriber is not added |
| 195 | [Documentation] Validates when removed subscriber access, DHCP attempt, ping fails and |
| 196 | ... when again added subscriber access, DHCP attempt, ping succeeds |
Zack Williams | a8fe75a | 2020-01-10 14:25:27 -0700 | [diff] [blame] | 197 | ... 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] | 198 | [Tags] functional SubsRemoveDHCP released |
Andy Bavier | e187eda | 2020-04-20 15:00:02 -0700 | [diff] [blame] | 199 | [Setup] Start Logging SubsRemoveDHCP |
Andy Bavier | 4a8450e | 2020-02-04 08:58:37 -0700 | [diff] [blame] | 200 | [Teardown] Run Keywords Collect Logs |
Andy Bavier | abeba26 | 2020-02-07 16:22:16 -0700 | [diff] [blame] | 201 | ... AND Stop Logging SubsRemoveDHCP |
suraj gour | d5cfdbb | 2019-12-13 12:44:55 +0000 | [diff] [blame] | 202 | FOR ${I} IN RANGE 0 ${num_onus} |
| 203 | ${src}= Set Variable ${hosts.src[${I}]} |
| 204 | ${dst}= Set Variable ${hosts.dst[${I}]} |
Zack Williams | a8fe75a | 2020-01-10 14:25:27 -0700 | [diff] [blame] | 205 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
suraj gour | d5cfdbb | 2019-12-13 12:44:55 +0000 | [diff] [blame] | 206 | ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']} |
| 207 | ... ${of_id} |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 208 | Run Keyword And Ignore Error Login And Run Command On Remote System killall dhclient ${src['ip']} |
| 209 | ... ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 210 | Run Keyword And Ignore Error Login And Run Command On Remote System ps -ef | grep dhclient ${src['ip']} |
| 211 | ... ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
ubuntu | 6b6e7d4 | 2020-03-02 12:35:42 -0800 | [diff] [blame] | 212 | Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command ${ONOS_SSH_IP} |
suraj gour | d5cfdbb | 2019-12-13 12:44:55 +0000 | [diff] [blame] | 213 | ... ${ONOS_SSH_PORT} volt-remove-subscriber-access ${of_id} ${onu_port} |
Suchitra Vemuri | 8f1d306 | 2020-02-28 11:57:37 -0800 | [diff] [blame] | 214 | Sleep 15s |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 215 | Run Keyword And Ignore Error Login And Run Command On Remote System ps -ef | grep dhclient ${src['ip']} |
| 216 | ... ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
Zack Williams | a8fe75a | 2020-01-10 14:25:27 -0700 | [diff] [blame] | 217 | Run Keyword If ${has_dataplane} Wait Until Keyword Succeeds ${timeout} 2s |
| 218 | ... Delete IP Addresses from Interface on Remote Host ${src['dp_iface_name']} ${src['ip']} |
| 219 | ... ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 220 | Run Keyword And Ignore Error Login And Run Command On Remote System |
| 221 | ... ifconfig | grep -A 10 ens ${src['ip']} |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 222 | ... ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
suraj gour | d5cfdbb | 2019-12-13 12:44:55 +0000 | [diff] [blame] | 223 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Validate DHCP and Ping False |
| 224 | ... False ${src['dp_iface_name']} ${src['s_tag']} ${src['c_tag']} ${dst['dp_iface_ip_qinq']} |
| 225 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 226 | ... ${dst['dp_iface_name']} ${dst['ip']} ${dst['user']} ${dst['pass']} ${dst['container_type']} |
| 227 | ... ${dst['container_name']} |
ubuntu | 6b6e7d4 | 2020-03-02 12:35:42 -0800 | [diff] [blame] | 228 | Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command ${ONOS_SSH_IP} |
suraj gour | d5cfdbb | 2019-12-13 12:44:55 +0000 | [diff] [blame] | 229 | ... ${ONOS_SSH_PORT} volt-add-subscriber-access ${of_id} ${onu_port} |
Suchitra Vemuri | 40fdf3c | 2020-05-28 23:41:03 -0700 | [diff] [blame] | 230 | Sleep 10s |
Suchitra Vemuri | 9da4430 | 2020-03-04 14:24:49 -0800 | [diff] [blame] | 231 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
| 232 | ... Verify No Pending Flows For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port} |
Hardik Windlass | 2180763 | 2020-04-14 16:24:55 +0530 | [diff] [blame] | 233 | # Verify subscriber access flows are added for the ONU port |
| 234 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 235 | ... Verify Subscriber Access Flows Added For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id} |
| 236 | ... ${onu_port} ${nni_port} ${src['c_tag']} ${src['s_tag']} |
suraj gour | d5cfdbb | 2019-12-13 12:44:55 +0000 | [diff] [blame] | 237 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Validate DHCP and Ping True |
| 238 | ... True ${src['dp_iface_name']} ${src['s_tag']} ${src['c_tag']} ${dst['dp_iface_ip_qinq']} |
| 239 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 240 | ... ${dst['dp_iface_name']} ${dst['ip']} ${dst['user']} ${dst['pass']} ${dst['container_type']} |
| 241 | ... ${dst['container_name']} |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 242 | Run Keyword and Ignore Error Collect Logs |
| 243 | END |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 244 | |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 245 | Test Disable and Enable ONU scenario for ATT workflow |
| 246 | [Documentation] Validates E2E Ping Connectivity and object states for the given scenario: |
| 247 | ... Assuming that test1 was executed where all the ONUs are authenticated/DHCP/pingable |
| 248 | ... 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] | 249 | ... Perform enable on the ONUs, authentication check, volt-add-subscriber-access and |
| 250 | ... validate that the pings are successful |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 251 | ... VOL-2284 |
Suchitra Vemuri | a7dae32 | 2020-02-19 22:38:18 -0800 | [diff] [blame] | 252 | [Tags] functional ATT_DisableEnableONU released |
Andy Bavier | e187eda | 2020-04-20 15:00:02 -0700 | [diff] [blame] | 253 | [Setup] Start Logging ATT_DisableEnableONU |
Andy Bavier | 4a8450e | 2020-02-04 08:58:37 -0700 | [diff] [blame] | 254 | [Teardown] Run Keywords Collect Logs |
Andy Bavier | abeba26 | 2020-02-07 16:22:16 -0700 | [diff] [blame] | 255 | ... AND Stop Logging ATT_DisableEnableONU |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 256 | FOR ${I} IN RANGE 0 ${num_onus} |
| 257 | ${src}= Set Variable ${hosts.src[${I}]} |
| 258 | ${dst}= Set Variable ${hosts.dst[${I}]} |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 259 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
| 260 | ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']} |
| 261 | ... ${of_id} |
Suchitra Vemuri | 014b603 | 2020-02-14 18:13:13 -0800 | [diff] [blame] | 262 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds 120s 2s |
ubuntu | 6b6e7d4 | 2020-03-02 12:35:42 -0800 | [diff] [blame] | 263 | ... Verify ONU Port Is Enabled ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port} |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 264 | Disable Device ${onu_device_id} |
Suchitra Vemuri | 3158f3c | 2020-05-28 17:58:26 -0700 | [diff] [blame] | 265 | Sleep 10s |
ubuntu | 6b6e7d4 | 2020-03-02 12:35:42 -0800 | [diff] [blame] | 266 | Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command ${ONOS_SSH_IP} |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 267 | ... ${ONOS_SSH_PORT} volt-remove-subscriber-access ${of_id} ${onu_port} |
Zack Williams | a8fe75a | 2020-01-10 14:25:27 -0700 | [diff] [blame] | 268 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure |
| 269 | ... Wait Until Keyword Succeeds 60s 2s Check Ping |
| 270 | ... False ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']} |
| 271 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 272 | ... ELSE sleep 60s |
| 273 | Enable Device ${onu_device_id} |
ubuntu | 6b6e7d4 | 2020-03-02 12:35:42 -0800 | [diff] [blame] | 274 | Wait Until Keyword Succeeds ${timeout} 2s Verify Eapol Flows Added For ONU ${ONOS_SSH_IP} |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 275 | ... ${ONOS_SSH_PORT} ${onu_port} |
Zack Williams | a8fe75a | 2020-01-10 14:25:27 -0700 | [diff] [blame] | 276 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure |
| 277 | ... Validate Authentication After Reassociate True |
| 278 | ... ${src['dp_iface_name']} ${src['ip']} ${src['user']} ${src['pass']} |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 279 | ... ${src['container_type']} ${src['container_name']} |
ubuntu | 6b6e7d4 | 2020-03-02 12:35:42 -0800 | [diff] [blame] | 280 | Wait Until Keyword Succeeds ${timeout} 2s Verify ONU in AAA-Users ${ONOS_SSH_IP} |
Zack Williams | a8fe75a | 2020-01-10 14:25:27 -0700 | [diff] [blame] | 281 | ... ${ONOS_SSH_PORT} ${onu_port} |
ubuntu | 6b6e7d4 | 2020-03-02 12:35:42 -0800 | [diff] [blame] | 282 | Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command ${ONOS_SSH_IP} |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 283 | ... ${ONOS_SSH_PORT} volt-add-subscriber-access ${of_id} ${onu_port} |
Suchitra Vemuri | 3158f3c | 2020-05-28 17:58:26 -0700 | [diff] [blame] | 284 | Sleep 10s |
Hardik Windlass | 2180763 | 2020-04-14 16:24:55 +0530 | [diff] [blame] | 285 | # Verify subscriber access flows are added for the ONU port |
| 286 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 287 | ... Verify Subscriber Access Flows Added For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id} |
| 288 | ... ${onu_port} ${nni_port} ${src['c_tag']} ${src['s_tag']} |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 289 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Validate DHCP and Ping True |
Andy Bavier | 08ae585 | 2019-12-19 09:12:42 -0700 | [diff] [blame] | 290 | ... True ${src['dp_iface_name']} ${src['s_tag']} ${src['c_tag']} ${dst['dp_iface_ip_qinq']} |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 291 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 292 | ... ${dst['dp_iface_name']} ${dst['ip']} ${dst['user']} ${dst['pass']} ${dst['container_type']} |
| 293 | ... ${dst['container_name']} |
| 294 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
ubuntu | 6b6e7d4 | 2020-03-02 12:35:42 -0800 | [diff] [blame] | 295 | ... Validate Subscriber DHCP Allocation ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port} |
Suchitra Vemuri | 5994cd1 | 2019-12-17 22:20:55 -0800 | [diff] [blame] | 296 | Run Keyword and Ignore Error Collect Logs |
suraj gour | d5cfdbb | 2019-12-13 12:44:55 +0000 | [diff] [blame] | 297 | END |
suraj gour | d5cfdbb | 2019-12-13 12:44:55 +0000 | [diff] [blame] | 298 | |
Suchitra Vemuri | 937cd39 | 2020-01-12 17:10:42 -0800 | [diff] [blame] | 299 | Delete OLT, ReAdd OLT and Perform Sanity Test |
| 300 | [Documentation] Validates E2E Ping Connectivity and object states for the given scenario: |
| 301 | ... Disable and Delete the OLT |
| 302 | ... Create/Enable the same OLT again |
| 303 | ... Validate authentication/DHCP/E2E pings succeed for all the ONUs connected to the OLT |
Suchitra Vemuri | a7dae32 | 2020-02-19 22:38:18 -0800 | [diff] [blame] | 304 | [Tags] functional DeleteOLT released |
Andy Bavier | e187eda | 2020-04-20 15:00:02 -0700 | [diff] [blame] | 305 | [Setup] Start Logging DeleteOLT |
Andy Bavier | 4a8450e | 2020-02-04 08:58:37 -0700 | [diff] [blame] | 306 | [Teardown] Run Keywords Collect Logs |
Andy Bavier | abeba26 | 2020-02-07 16:22:16 -0700 | [diff] [blame] | 307 | ... AND Stop Logging DeleteOLT |
Suchitra Vemuri | 937cd39 | 2020-01-12 17:10:42 -0800 | [diff] [blame] | 308 | Run Keyword If ${has_dataplane} Clean Up Linux |
Hardik Windlass | 480f3e2 | 2020-04-02 20:14:14 +0530 | [diff] [blame] | 309 | Delete Device and Verify |
| 310 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 311 | ... Verify Device Flows Removed ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id} |
Suchitra Vemuri | 937cd39 | 2020-01-12 17:10:42 -0800 | [diff] [blame] | 312 | Run Keyword and Ignore Error Collect Logs |
| 313 | # Recreate the OLT |
Hardik Windlass | 480f3e2 | 2020-04-02 20:14:14 +0530 | [diff] [blame] | 314 | Setup |
Suchitra Vemuri | 937cd39 | 2020-01-12 17:10:42 -0800 | [diff] [blame] | 315 | Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test |
Suchitra Vemuri | 937cd39 | 2020-01-12 17:10:42 -0800 | [diff] [blame] | 316 | |
Hema | 567f301 | 2020-03-25 00:51:53 +0530 | [diff] [blame] | 317 | Check Mib State on OLT recreation after ONU, OLT deletion |
| 318 | [Documentation] Assuming that test1 was executed where all the ONUs are authenticated/DHCP/pingable, |
| 319 | ... Disable and Delete the ONU, Disable and Delete the OLT |
| 320 | ... Create/Enable the OLT again and Check for the Mib State of the ONUs |
| 321 | [Tags] functional CheckMibState notready |
Andy Bavier | e187eda | 2020-04-20 15:00:02 -0700 | [diff] [blame] | 322 | [Setup] Start Logging CheckMibState |
Hema | 567f301 | 2020-03-25 00:51:53 +0530 | [diff] [blame] | 323 | [Teardown] Run Keywords Collect Logs |
| 324 | ... AND Stop Logging CheckMibState |
Hema | 567f301 | 2020-03-25 00:51:53 +0530 | [diff] [blame] | 325 | #Disable and Delete the ONU |
| 326 | FOR ${I} IN RANGE 0 ${num_onus} |
| 327 | ${src}= Set Variable ${hosts.src[${I}]} |
| 328 | ${dst}= Set Variable ${hosts.dst[${I}]} |
| 329 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
| 330 | ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']} |
| 331 | ... ${of_id} |
| 332 | Disable Device ${onu_device_id} |
| 333 | Wait Until Keyword Succeeds 20s 2s Test Devices Disabled in VOLTHA Id=${onu_device_id} |
| 334 | Delete Device ${onu_device_id} |
| 335 | END |
| 336 | #Disable and Delete the OLT |
Hardik Windlass | 480f3e2 | 2020-04-02 20:14:14 +0530 | [diff] [blame] | 337 | Delete Device and Verify |
| 338 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 339 | ... Verify Device Flows Removed ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id} |
| 340 | # Recreate the OLT |
Hema | 567f301 | 2020-03-25 00:51:53 +0530 | [diff] [blame] | 341 | Run Keyword If ${has_dataplane} Sleep 180s |
| 342 | ${olt_device_id}= Create Device ${olt_ip} ${OLT_PORT} |
| 343 | Set Suite Variable ${olt_device_id} |
| 344 | Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Device PREPROVISIONED |
| 345 | ... UNKNOWN UNKNOWN ${olt_device_id} |
| 346 | Enable Device ${olt_device_id} |
| 347 | Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Device ENABLED ACTIVE REACHABLE |
| 348 | ... ${olt_serial_number} |
| 349 | #Check for the ONU status and ONU Mib State should be "omci-flows-pushed" |
| 350 | FOR ${I} IN RANGE 0 ${num_onus} |
| 351 | ${src}= Set Variable ${hosts.src[${I}]} |
| 352 | ${dst}= Set Variable ${hosts.dst[${I}]} |
| 353 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
| 354 | ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']} |
| 355 | ... ${of_id} |
| 356 | Wait Until Keyword Succeeds ${timeout} 5s Validate Device ENABLED ACTIVE |
| 357 | ... REACHABLE ${src['onu']} onu=True onu_reason=omci-flows-pushed |
| 358 | END |
| 359 | |
Hema | 783279b | 2020-01-22 15:37:37 +0530 | [diff] [blame] | 360 | Test disable ONUs and OLT then delete ONUs and OLT |
| 361 | [Documentation] On deployed POD, disable the ONU, disable the OLT and then delete ONU and OLT. |
| 362 | ... This TC is to confirm that ONU removal is not impacting OLT |
| 363 | ... Devices will be removed during the execution of this TC |
| 364 | ... so calling setup at the end to add the devices back to avoid the confusion. |
Suchitra Vemuri | a7dae32 | 2020-02-19 22:38:18 -0800 | [diff] [blame] | 365 | [Tags] functional VOL-2354 DisableDeleteONUandOLT released |
Andy Bavier | e187eda | 2020-04-20 15:00:02 -0700 | [diff] [blame] | 366 | [Setup] Start Logging DisableDeleteONUandOLT |
Andy Bavier | 4a8450e | 2020-02-04 08:58:37 -0700 | [diff] [blame] | 367 | [Teardown] Run Keywords Collect Logs |
Andy Bavier | abeba26 | 2020-02-07 16:22:16 -0700 | [diff] [blame] | 368 | ... AND Stop Logging DisableDeleteONUandOLT |
Suchitra Vemuri | ba4f371 | 2020-01-24 16:18:26 -0800 | [diff] [blame] | 369 | ${olt_device_id}= Get Device ID From SN ${olt_serial_number} |
Hema | 783279b | 2020-01-22 15:37:37 +0530 | [diff] [blame] | 370 | FOR ${I} IN RANGE 0 ${num_onus} |
| 371 | ${src}= Set Variable ${hosts.src[${I}]} |
| 372 | ${dst}= Set Variable ${hosts.dst[${I}]} |
| 373 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
Suchitra Vemuri | 014b603 | 2020-02-14 18:13:13 -0800 | [diff] [blame] | 374 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 375 | ... Validate Device ENABLED ACTIVE |
Hema | 783279b | 2020-01-22 15:37:37 +0530 | [diff] [blame] | 376 | ... REACHABLE ${src['onu']} onu=True onu_reason=omci-flows-pushed |
Suchitra Vemuri | 014b603 | 2020-02-14 18:13:13 -0800 | [diff] [blame] | 377 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 378 | ... Validate OLT Device ENABLED ACTIVE |
Hema | 783279b | 2020-01-22 15:37:37 +0530 | [diff] [blame] | 379 | ... REACHABLE ${olt_serial_number} |
| 380 | ${rc} ${output}= Run and Return Rc and Output |
| 381 | ... ${VOLTCTL_CONFIG}; voltctl device disable ${onu_device_id} |
| 382 | Should Be Equal As Integers ${rc} 0 |
Suchitra Vemuri | 014b603 | 2020-02-14 18:13:13 -0800 | [diff] [blame] | 383 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 384 | ... Validate Device DISABLED UNKNOWN |
Hema | 783279b | 2020-01-22 15:37:37 +0530 | [diff] [blame] | 385 | ... REACHABLE ${src['onu']} onu=false |
Suchitra Vemuri | 014b603 | 2020-02-14 18:13:13 -0800 | [diff] [blame] | 386 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 387 | ... Validate OLT Device ENABLED ACTIVE |
Hema | 783279b | 2020-01-22 15:37:37 +0530 | [diff] [blame] | 388 | ... REACHABLE ${olt_serial_number} |
| 389 | END |
| 390 | ${rc} ${output}= Run and Return Rc and Output ${VOLTCTL_CONFIG}; voltctl device disable ${olt_device_id} |
| 391 | Should Be Equal As Integers ${rc} 0 |
Suchitra Vemuri | 014b603 | 2020-02-14 18:13:13 -0800 | [diff] [blame] | 392 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 393 | ... Validate OLT Device DISABLED UNKNOWN REACHABLE |
Hema | 783279b | 2020-01-22 15:37:37 +0530 | [diff] [blame] | 394 | ... ${olt_serial_number} |
| 395 | FOR ${I} IN RANGE 0 ${num_onus} |
| 396 | ${src}= Set Variable ${hosts.src[${I}]} |
| 397 | ${dst}= Set Variable ${hosts.dst[${I}]} |
| 398 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
Suchitra Vemuri | 014b603 | 2020-02-14 18:13:13 -0800 | [diff] [blame] | 399 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 400 | ... Validate Device DISABLED DISCOVERED |
| 401 | ... UNREACHABLE ${src['onu']} onu=false |
Hardik Windlass | 7da42ca | 2020-03-13 14:25:44 +0530 | [diff] [blame] | 402 | Delete Device ${onu_device_id} |
Suchitra Vemuri | 014b603 | 2020-02-14 18:13:13 -0800 | [diff] [blame] | 403 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 404 | ... Validate OLT Device DISABLED UNKNOWN |
Hema | 783279b | 2020-01-22 15:37:37 +0530 | [diff] [blame] | 405 | ... REACHABLE ${olt_serial_number} |
| 406 | END |
Hardik Windlass | 7da42ca | 2020-03-13 14:25:44 +0530 | [diff] [blame] | 407 | Delete Device ${olt_device_id} |
Suchitra Vemuri | 014b603 | 2020-02-14 18:13:13 -0800 | [diff] [blame] | 408 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s Test Empty Device List |
Hardik Windlass | 480f3e2 | 2020-04-02 20:14:14 +0530 | [diff] [blame] | 409 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 410 | ... Verify Device Flows Removed ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id} |
David Bainbridge | f81cd64 | 2019-11-20 00:14:47 +0000 | [diff] [blame] | 411 | |
Suchitra Vemuri | 9a6dd6d | 2020-02-28 17:46:26 -0800 | [diff] [blame] | 412 | Validate authentication on a disabled ONU |
suraj gour | 472da1c | 2020-02-25 05:44:51 +0000 | [diff] [blame] | 413 | [Documentation] Assuming that test1 was executed where all the ONUs are authenticated/DHCP/pingable |
| 414 | ... Perform disable on the ONUs and validate that the authentication do not succeed |
| 415 | ... Perform enable on the ONUs and validate that authentication successful |
Suchitra Vemuri | f7a033c | 2020-02-26 17:22:41 -0800 | [diff] [blame] | 416 | [Tags] functional DisableONU_AuthCheck |
| 417 | # Creates Devices in the Setup |
Andy Bavier | e187eda | 2020-04-20 15:00:02 -0700 | [diff] [blame] | 418 | [Setup] Run Keywords Start Logging DisableONU_AuthCheck |
Suchitra Vemuri | f7a033c | 2020-02-26 17:22:41 -0800 | [diff] [blame] | 419 | ... AND Setup |
| 420 | [Teardown] Run Keywords Collect Logs |
| 421 | ... AND Stop Logging DisableONU_AuthCheck |
Suchitra Vemuri | f7a033c | 2020-02-26 17:22:41 -0800 | [diff] [blame] | 422 | ... AND Delete Device and Verify |
| 423 | Run Keyword and Ignore Error Collect Logs |
| 424 | Run Keyword If ${has_dataplane} Clean Up Linux |
| 425 | Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test |
| 426 | Clean WPA Process |
suraj gour | 472da1c | 2020-02-25 05:44:51 +0000 | [diff] [blame] | 427 | FOR ${I} IN RANGE 0 ${num_onus} |
| 428 | ${src}= Set Variable ${hosts.src[${I}]} |
| 429 | ${dst}= Set Variable ${hosts.dst[${I}]} |
Suchitra Vemuri | f7a033c | 2020-02-26 17:22:41 -0800 | [diff] [blame] | 430 | Run Keyword and Ignore Error Collect Logs |
suraj gour | 472da1c | 2020-02-25 05:44:51 +0000 | [diff] [blame] | 431 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
| 432 | ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']} |
| 433 | ... ${of_id} |
| 434 | Disable Device ${onu_device_id} |
| 435 | Wait Until Keyword Succeeds ${timeout} 5s Validate Device DISABLED UNKNOWN |
| 436 | ... REACHABLE ${src['onu']} onu=false |
Andy Bavier | 84834d4 | 2020-02-25 13:49:50 -0700 | [diff] [blame] | 437 | ${wpa_log}= Run Keyword If ${has_dataplane} Catenate SEPARATOR=. |
| 438 | ... /tmp/wpa ${src['dp_iface_name']} log |
Suchitra Vemuri | f7a033c | 2020-02-26 17:22:41 -0800 | [diff] [blame] | 439 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Validate Authentication False |
| 440 | ... ${src['dp_iface_name']} wpa_supplicant.conf ${src['ip']} ${src['user']} ${src['pass']} |
Andy Bavier | 84834d4 | 2020-02-25 13:49:50 -0700 | [diff] [blame] | 441 | ... ${src['container_type']} ${src['container_name']} ${wpa_log} |
Suchitra Vemuri | f7a033c | 2020-02-26 17:22:41 -0800 | [diff] [blame] | 442 | Enable Device ${onu_device_id} |
| 443 | Run Keyword And Ignore Error Kill Linux Process [w]pa_supplicant ${src['ip']} |
| 444 | ... ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 445 | Run Keyword and Ignore Error Collect Logs |
| 446 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s Validate Device |
| 447 | ... ENABLED ACTIVE REACHABLE ${src['onu']} onu=True onu_reason=omci-flows-pushed |
| 448 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Validate Authentication True |
| 449 | ... ${src['dp_iface_name']} wpa_supplicant.conf ${src['ip']} ${src['user']} ${src['pass']} |
Andy Bavier | 84834d4 | 2020-02-25 13:49:50 -0700 | [diff] [blame] | 450 | ... ${src['container_type']} ${src['container_name']} ${wpa_log} |
suraj gour | 472da1c | 2020-02-25 05:44:51 +0000 | [diff] [blame] | 451 | Run Keyword and Ignore Error Get Device Output from Voltha ${onu_device_id} |
| 452 | END |
| 453 | Run Keyword and Ignore Error Collect Logs |
| 454 | |
Gayathri.Selvan | 92d1686 | 2020-03-19 14:47:58 +0000 | [diff] [blame] | 455 | Data plane verification using TCP |
| 456 | [Documentation] Test bandwidth profile is met and not exceeded for each subscriber. |
| 457 | ... Assumes iperf3 and jq installed on client and iperf -s running on DHCP server |
Andy Bavier | 1b144eb | 2020-05-28 11:22:11 -0700 | [diff] [blame] | 458 | [Tags] dataplane BandwidthProfileTCP VOL-2052 notready |
Andy Bavier | dfbcaef | 2020-05-27 15:34:18 -0700 | [diff] [blame] | 459 | [Setup] Start Logging BandwidthProfileTCP |
| 460 | [Teardown] Run Keywords Collect Logs |
| 461 | ... AND Stop Logging BandwidthProfileTCP |
Gayathri.Selvan | 92d1686 | 2020-03-19 14:47:58 +0000 | [diff] [blame] | 462 | Pass Execution If '${has_dataplane}'=='False' Bandwidth profile validation can be done only in |
| 463 | ... physical pod. Skipping this test in BBSIM. |
Andy Bavier | d74f33c | 2020-05-12 12:45:36 -0700 | [diff] [blame] | 464 | ${of_id}= Wait Until Keyword Succeeds ${timeout} 15s Validate OLT Device in ONOS ${olt_serial_number} |
Gayathri.Selvan | 92d1686 | 2020-03-19 14:47:58 +0000 | [diff] [blame] | 465 | FOR ${I} IN RANGE 0 ${num_onus} |
| 466 | ${src}= Set Variable ${hosts.src[${I}]} |
| 467 | ${dst}= Set Variable ${hosts.dst[${I}]} |
Andy Bavier | f6ab19c | 2020-05-14 10:34:47 -0700 | [diff] [blame] | 468 | |
| 469 | # Check for iperf3 and jq tools |
| 470 | ${stdout} ${stderr} ${rc}= Execute Remote Command which iperf3 jq |
| 471 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 472 | Pass Execution If ${rc} != 0 Skipping test: iperf3 / jq not found on the RG |
| 473 | |
Gayathri.Selvan | 92d1686 | 2020-03-19 14:47:58 +0000 | [diff] [blame] | 474 | ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']} |
| 475 | ... ${of_id} |
| 476 | ${subscriber_id}= Set Variable ${of_id}/${onu_port} |
| 477 | ${bandwidth_profile_name} Get Bandwidth Profile Name For Given Subscriber ${subscriber_id} |
| 478 | ... upstreamBandwidthProfile |
| 479 | ${limiting_bw_value_upstream} Get Bandwidth Details ${bandwidth_profile_name} |
| 480 | ${bandwidth_profile_name} Get Bandwidth Profile Name For Given Subscriber ${subscriber_id} |
| 481 | ... downstreamBandwidthProfile |
| 482 | ${limiting_bw_value_dnstream} Get Bandwidth Details ${bandwidth_profile_name} |
| 483 | |
| 484 | # Stream TCP packets from RG to server |
| 485 | ${updict}= Run Iperf3 Test Client ${src} server=${dst['dp_iface_ip_qinq']} |
| 486 | ... args=-t 30 |
| 487 | ${actual_upstream_bw_used}= Evaluate ${updict['end']['sum_received']['bits_per_second']}/1000 |
| 488 | |
| 489 | # Stream TCP packets from server to RG |
| 490 | ${dndict}= Run Iperf3 Test Client ${src} server=${dst['dp_iface_ip_qinq']} |
| 491 | ... args=-R -t 30 |
| 492 | ${actual_dnstream_bw_used}= Evaluate ${dndict['end']['sum_received']['bits_per_second']}/1000 |
| 493 | |
| 494 | ${pct_limit_up}= Evaluate 100*${actual_upstream_bw_used}/${limiting_bw_value_upstream} |
| 495 | ${pct_limit_dn}= Evaluate 100*${actual_dnstream_bw_used}/${limiting_bw_value_dnstream} |
| 496 | Log Up: bwprof ${limiting_bw_value_upstream}Kbps, got ${actual_upstream_bw_used}Kbps (${pct_limit_up}%) |
| 497 | Log Down: bwprof ${limiting_bw_value_dnstream}Kbps, got ${actual_dnstream_bw_used}Kbps (${pct_limit_dn}%) |
| 498 | |
| 499 | Should Be True ${pct_limit_up} <= ${upper_margin_pct} |
| 500 | ... The upstream bandwidth exceeded the limit (${pct_limit_up}% of limit) |
| 501 | Should Be True ${pct_limit_dn} <= ${upper_margin_pct} |
| 502 | ... The downstream bandwidth exceeded the limit (${pct_limit_dn}% of limit) |
| 503 | Should Be True ${pct_limit_up} >= ${lower_margin_pct} |
| 504 | ... The upstream bandwidth guarantee was not met (${pct_limit_up}% of resv) |
| 505 | Should Be True ${pct_limit_dn} >= ${lower_margin_pct} |
| 506 | ... The downstream bandwidth guarantee was not met (${pct_limit_dn}% of resv) |
| 507 | END |
| 508 | |
| 509 | Data plane verification using UDP |
| 510 | [Documentation] Test bandwidth profile is met and not exceeded for each subscriber. |
| 511 | ... Assumes iperf3 and jq installed on client and iperf -s running on DHCP server |
Andy Bavier | dfbcaef | 2020-05-27 15:34:18 -0700 | [diff] [blame] | 512 | [Tags] dataplane BandwidthProfileUDP VOL-2052 notready |
| 513 | [Setup] Start Logging BandwidthProfileUDP |
| 514 | [Teardown] Run Keywords Collect Logs |
| 515 | ... AND Stop Logging BandwidthProfileUDP |
Gayathri.Selvan | 92d1686 | 2020-03-19 14:47:58 +0000 | [diff] [blame] | 516 | Pass Execution If '${has_dataplane}'=='False' Bandwidth profile validation can be done only in |
| 517 | ... physical pod. Skipping this test in BBSIM. |
Andy Bavier | d74f33c | 2020-05-12 12:45:36 -0700 | [diff] [blame] | 518 | ${of_id}= Wait Until Keyword Succeeds ${timeout} 15s Validate OLT Device in ONOS ${olt_serial_number} |
Gayathri.Selvan | 92d1686 | 2020-03-19 14:47:58 +0000 | [diff] [blame] | 519 | FOR ${I} IN RANGE 0 ${num_onus} |
| 520 | ${src}= Set Variable ${hosts.src[${I}]} |
| 521 | ${dst}= Set Variable ${hosts.dst[${I}]} |
| 522 | ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']} |
| 523 | ... ${of_id} |
| 524 | ${subscriber_id}= Set Variable ${of_id}/${onu_port} |
| 525 | ${bandwidth_profile_name} Get Bandwidth Profile Name For Given Subscriber ${subscriber_id} |
| 526 | ... upstreamBandwidthProfile |
| 527 | ${limiting_bw_value_upstream} Get Bandwidth Details ${bandwidth_profile_name} |
| 528 | ${bandwidth_profile_name} Get Bandwidth Profile Name For Given Subscriber ${subscriber_id} |
| 529 | ... downstreamBandwidthProfile |
| 530 | ${limiting_bw_value_dnstream} Get Bandwidth Details ${bandwidth_profile_name} |
| 531 | |
| 532 | # Stream UDP packets from RG to server |
| 533 | ${uprate}= Evaluate ${limiting_bw_value_upstream}*${udp_rate_multiplier} |
| 534 | ${updict}= Run Iperf3 Test Client ${src} server=${dst['dp_iface_ip_qinq']} |
| 535 | ... args=-u -b ${uprate}K -t 30 -l ${udp_packet_bytes} |
| 536 | # With UDP test, bits per second is the sending rate. Multiply by the loss rate to get the throughput. |
| 537 | ${actual_upstream_bw_used}= Evaluate |
| 538 | ... (100 - ${updict['end']['sum']['lost_percent']})*${updict['end']['sum']['bits_per_second']}/100000 |
| 539 | |
| 540 | # Stream UDP packets from server to RG |
| 541 | ${dnrate}= Evaluate ${limiting_bw_value_dnstream}*${udp_rate_multiplier} |
| 542 | ${dndict}= Run Iperf3 Test Client ${src} server=${dst['dp_iface_ip_qinq']} |
| 543 | ... args=-u -b ${dnrate}K -R -t 30 -l ${udp_packet_bytes} |
| 544 | # With UDP test, bits per second is the sending rate. Multiply by the loss rate to get the throughput. |
| 545 | ${actual_dnstream_bw_used}= Evaluate |
| 546 | ... (100 - ${dndict['end']['sum']['lost_percent']})*${dndict['end']['sum']['bits_per_second']}/100000 |
| 547 | |
| 548 | ${pct_limit_up}= Evaluate 100*${actual_upstream_bw_used}/${limiting_bw_value_upstream} |
| 549 | ${pct_limit_dn}= Evaluate 100*${actual_dnstream_bw_used}/${limiting_bw_value_dnstream} |
| 550 | Log Up: bwprof ${limiting_bw_value_upstream}Kbps, got ${actual_upstream_bw_used}Kbps (${pct_limit_up}%) |
| 551 | Log Down: bwprof ${limiting_bw_value_dnstream}Kbps, got ${actual_dnstream_bw_used}Kbps (${pct_limit_dn}%) |
| 552 | |
| 553 | Should Be True ${pct_limit_up} <= ${upper_margin_pct} |
| 554 | ... The upstream bandwidth exceeded the limit (${pct_limit_up}% of limit) |
| 555 | Should Be True ${pct_limit_dn} <= ${upper_margin_pct} |
| 556 | ... The downstream bandwidth exceeded the limit (${pct_limit_dn}% of limit) |
| 557 | Should Be True ${pct_limit_up} >= ${lower_margin_pct} |
| 558 | ... The upstream bandwidth guarantee was not met (${pct_limit_up}% of resv) |
| 559 | Should Be True ${pct_limit_dn} >= ${lower_margin_pct} |
| 560 | ... The downstream bandwidth guarantee was not met (${pct_limit_dn}% of resv) |
| 561 | END |
Suchitra Vemuri | f7a033c | 2020-02-26 17:22:41 -0800 | [diff] [blame] | 562 | |
Suchitra Vemuri | 65cd65f | 2019-08-30 14:39:22 -0700 | [diff] [blame] | 563 | *** Keywords *** |
| 564 | Setup Suite |
Andy Bavier | 88cd9f6 | 2019-11-26 16:22:33 -0700 | [diff] [blame] | 565 | [Documentation] Set up the test suite |
| 566 | Common Test Suite Setup |
Suchitra Vemuri | 65cd65f | 2019-08-30 14:39:22 -0700 | [diff] [blame] | 567 | |
David Bainbridge | f81cd64 | 2019-11-20 00:14:47 +0000 | [diff] [blame] | 568 | Clear All Devices Then Create New Device |
| 569 | [Documentation] Remove any devices from VOLTHA and ONOS |
David Bainbridge | f81cd64 | 2019-11-20 00:14:47 +0000 | [diff] [blame] | 570 | # Remove all devices from voltha and nos |
| 571 | Delete All Devices and Verify |
David Bainbridge | f81cd64 | 2019-11-20 00:14:47 +0000 | [diff] [blame] | 572 | # Execute normal test Setup Keyword |
| 573 | Setup |
| 574 | |