Kailash | 9276492 | 2019-07-25 08:21:39 -0700 | [diff] [blame] | 1 | # Copyright 2017-present Open Networking Foundation |
| 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. |
Kailash | 9276492 | 2019-07-25 08:21:39 -0700 | [diff] [blame] | 14 | # robot test functions |
| 15 | |
| 16 | *** Settings *** |
| 17 | Documentation Library for various utilities |
| 18 | Library SSHLibrary |
Kailash | 9276492 | 2019-07-25 08:21:39 -0700 | [diff] [blame] | 19 | Library String |
| 20 | Library DateTime |
| 21 | Library Process |
| 22 | Library Collections |
| 23 | Library RequestsLibrary |
| 24 | Library OperatingSystem |
Andy Bavier | 63460da | 2020-02-20 14:35:12 -0700 | [diff] [blame] | 25 | Library CORDRobot |
| 26 | Library ImportResource resources=CORDRobot |
Kailash | 9276492 | 2019-07-25 08:21:39 -0700 | [diff] [blame] | 27 | |
| 28 | *** Keywords *** |
Kailash | 528f7c0 | 2019-07-31 10:55:49 -0700 | [diff] [blame] | 29 | Check CLI Tools Configured |
| 30 | [Documentation] Tests that use 'voltctl' and 'kubectl' should execute this keyword in suite setup |
| 31 | # check voltctl and kubectl configured |
Zack Williams | a8fe75a | 2020-01-10 14:25:27 -0700 | [diff] [blame] | 32 | ${voltctl_rc}= Run And Return RC voltctl device list |
| 33 | ${kubectl_rc}= Run And Return RC kubectl get pods |
Gilles Depatie | 675a206 | 2019-10-22 12:44:42 -0400 | [diff] [blame] | 34 | Run Keyword If ${voltctl_rc} != 0 or ${kubectl_rc} != 0 FATAL ERROR |
| 35 | ... VOLTCTL and KUBECTL not configured. Please configure before executing tests. |
Gilles Depatie | b5682f8 | 2019-10-31 10:39:45 -0400 | [diff] [blame] | 36 | |
| 37 | Send File To Onos |
Zack Williams | a8fe75a | 2020-01-10 14:25:27 -0700 | [diff] [blame] | 38 | [Documentation] Send the content of the file to Onos to selected section of configuration |
| 39 | ... using Post Request |
| 40 | [Arguments] ${CONFIG_FILE} ${section} |
| 41 | ${Headers}= Create Dictionary Content-Type application/json |
| 42 | ${File_Data}= OperatingSystem.Get File ${CONFIG_FILE} |
| 43 | Log ${Headers} |
| 44 | Log ${File_Data} |
| 45 | ${resp}= Post Request ONOS |
| 46 | ... /onos/v1/network/configuration/${section} headers=${Headers} data=${File_Data} |
| 47 | Should Be Equal As Strings ${resp.status_code} 200 |
Andy Bavier | 88cd9f6 | 2019-11-26 16:22:33 -0700 | [diff] [blame] | 48 | |
| 49 | Common Test Suite Setup |
| 50 | [Documentation] Setup the test suite |
Andy Bavier | 88cd9f6 | 2019-11-26 16:22:33 -0700 | [diff] [blame] | 51 | Set Global Variable ${KUBECTL_CONFIG} export KUBECONFIG=%{KUBECONFIG} |
Matteo Scandolo | 5899be1 | 2020-11-11 15:38:07 -0800 | [diff] [blame] | 52 | Set Global Variable ${VOLTCTL_CONFIG} %{VOLTCONFIG} |
Andy Bavier | 88cd9f6 | 2019-11-26 16:22:33 -0700 | [diff] [blame] | 53 | ${k8s_node_ip}= Evaluate ${nodes}[0].get("ip") |
ubuntu | 6b6e7d4 | 2020-03-02 12:35:42 -0800 | [diff] [blame] | 54 | ${ONOS_REST_IP}= Get Environment Variable ONOS_REST_IP ${k8s_node_ip} |
| 55 | ${ONOS_SSH_IP}= Get Environment Variable ONOS_SSH_IP ${k8s_node_ip} |
| 56 | Set Global Variable ${ONOS_REST_IP} |
| 57 | Set Global Variable ${ONOS_SSH_IP} |
Andy Bavier | 88cd9f6 | 2019-11-26 16:22:33 -0700 | [diff] [blame] | 58 | ${k8s_node_user}= Evaluate ${nodes}[0].get("user") |
| 59 | ${k8s_node_pass}= Evaluate ${nodes}[0].get("pass") |
| 60 | Check CLI Tools Configured |
| 61 | ${onos_auth}= Create List karaf karaf |
| 62 | ${HEADERS} Create Dictionary Content-Type=application/json |
ubuntu | 6b6e7d4 | 2020-03-02 12:35:42 -0800 | [diff] [blame] | 63 | Create Session ONOS http://${ONOS_REST_IP}:${ONOS_REST_PORT} auth=${ONOS_AUTH} |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 64 | #${olt_ip}= Evaluate ${olts}[0].get("ip") |
| 65 | #${olt_ssh_ip}= Evaluate ${olts}[0].get("sship") |
| 66 | #${olt_user}= Evaluate ${olts}[0].get("user") |
| 67 | #${olt_pass}= Evaluate ${olts}[0].get("pass") |
| 68 | #${olt_serial_number}= Evaluate ${olts}[0].get("serial") |
| 69 | ${num_olts} Get Length ${olts} |
| 70 | ${list_olts} Create List |
| 71 | FOR ${I} IN RANGE 0 ${num_olts} |
| 72 | ${ip} Evaluate ${olts}[${I}].get("ip") |
| 73 | ${user} Evaluate ${olts}[${I}].get("user") |
| 74 | ${pass} Evaluate ${olts}[${I}].get("pass") |
| 75 | ${serial_number} Evaluate ${olts}[${I}].get("serial") |
| 76 | ${olt_ssh_ip} Evaluate ${olts}[${I}].get("sship") |
| 77 | ${onu_count}= Get ONU Count For OLT ${hosts.src} ${serial_number} |
| 78 | ${olt} Create Dictionary ip ${ip} user ${user} pass |
| 79 | ... ${pass} sn ${serial_number} onucount ${onu_count} |
| 80 | ... sship ${olt_ssh_ip} |
| 81 | Append To List ${list_olts} ${olt} |
| 82 | END |
| 83 | ${num_all_onus}= Get Length ${hosts.src} |
| 84 | ${num_all_onus}= Convert to String ${num_all_onus} |
Andy Bavier | 88cd9f6 | 2019-11-26 16:22:33 -0700 | [diff] [blame] | 85 | #send sadis file to onos |
Andy Bavier | a269175 | 2019-11-27 12:18:38 -0700 | [diff] [blame] | 86 | ${sadis_file}= Get Variable Value ${sadis.file} |
Zack Williams | a8fe75a | 2020-01-10 14:25:27 -0700 | [diff] [blame] | 87 | Log To Console \nSadis File:${sadis_file} |
Andy Bavier | 88cd9f6 | 2019-11-26 16:22:33 -0700 | [diff] [blame] | 88 | Run Keyword Unless '${sadis_file}' is '${None}' Send File To Onos ${sadis_file} apps/ |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 89 | Set Suite Variable ${num_all_onus} |
| 90 | Set Suite Variable ${num_olts} |
| 91 | Set Suite Variable ${list_olts} |
| 92 | ${olt_count}= Get Length ${list_olts} |
| 93 | Set Suite Variable ${olt_count} |
| 94 | #Set Suite Variable ${olt_serial_number} |
| 95 | #Set Suite Variable ${olt_ip} |
| 96 | #Set Suite Variable ${olt_ssh_ip} |
| 97 | #Set Suite Variable ${olt_user} |
| 98 | #Set Suite Variable ${olt_pass} |
Andy Bavier | 88cd9f6 | 2019-11-26 16:22:33 -0700 | [diff] [blame] | 99 | @{container_list}= Create List adapter-open-olt adapter-open-onu voltha-api-server |
| 100 | ... voltha-ro-core voltha-rw-core-11 voltha-rw-core-12 voltha-ofagent |
| 101 | Set Suite Variable ${container_list} |
| 102 | ${datetime}= Get Current Date |
suraj gour | 7f6d5fe | 2019-11-29 10:56:35 +0000 | [diff] [blame] | 103 | Set Suite Variable ${datetime} |
| 104 | |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 105 | Get ONU Count For OLT |
| 106 | [Arguments] ${src} ${serial_number} |
| 107 | [Documentation] Gets ONU Count for the specified OLT |
| 108 | ${src_length}= Get Length ${src} |
| 109 | ${count}= Set Variable 0 |
| 110 | FOR ${I} IN RANGE 0 ${src_length} |
| 111 | ${sn} Evaluate ${src}[${I}].get("olt") |
Andrea Campanella | 155c2aa | 2020-11-12 18:41:34 +0100 | [diff] [blame] | 112 | ${count}= Run Keyword If '${serial_number}' == '${sn}' Evaluate ${count} + 1 ELSE Set Variable ${count} |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 113 | END |
| 114 | [Return] ${count} |
| 115 | |
suraj gour | 7f6d5fe | 2019-11-29 10:56:35 +0000 | [diff] [blame] | 116 | WPA Reassociate |
suraj gour | 7f6d5fe | 2019-11-29 10:56:35 +0000 | [diff] [blame] | 117 | [Documentation] Executes a particular wpa_cli reassociate, which performs force reassociation |
Zack Williams | a8fe75a | 2020-01-10 14:25:27 -0700 | [diff] [blame] | 118 | [Arguments] ${iface} ${ip} ${user} ${pass}=${None} |
| 119 | ... ${container_type}=${None} ${container_name}=${None} |
suraj gour | 7f6d5fe | 2019-11-29 10:56:35 +0000 | [diff] [blame] | 120 | #Below for loops are used instead of sleep time, to execute reassociate command and check status |
Zack Williams | a8fe75a | 2020-01-10 14:25:27 -0700 | [diff] [blame] | 121 | FOR ${i} IN RANGE 70 |
| 122 | ${output}= Login And Run Command On Remote System |
| 123 | ... wpa_cli -i ${iface} reassociate ${ip} ${user} |
| 124 | ... ${pass} ${container_type} ${container_name} |
| 125 | ${passed}= Run Keyword And Return Status Should Contain ${output} OK |
Andy Bavier | b63f6d2 | 2020-03-12 15:34:37 -0700 | [diff] [blame] | 126 | Exit For Loop If ${passed} |
Zack Williams | a8fe75a | 2020-01-10 14:25:27 -0700 | [diff] [blame] | 127 | END |
Andy Bavier | b63f6d2 | 2020-03-12 15:34:37 -0700 | [diff] [blame] | 128 | Should Be True ${passed} Status does not contain 'SUCCESS' |
Zack Williams | a8fe75a | 2020-01-10 14:25:27 -0700 | [diff] [blame] | 129 | FOR ${i} IN RANGE 70 |
| 130 | ${output}= Login And Run Command On Remote System |
Andy Bavier | ae4a17e | 2020-02-25 14:54:36 -0700 | [diff] [blame] | 131 | ... wpa_cli -i ${iface} status | grep SUCCESS ${ip} ${user} |
Zack Williams | a8fe75a | 2020-01-10 14:25:27 -0700 | [diff] [blame] | 132 | ... ${pass} ${container_type} ${container_name} |
| 133 | ${passed}= Run Keyword And Return Status Should Contain ${output} SUCCESS |
Andy Bavier | b63f6d2 | 2020-03-12 15:34:37 -0700 | [diff] [blame] | 134 | Exit For Loop If ${passed} |
Zack Williams | a8fe75a | 2020-01-10 14:25:27 -0700 | [diff] [blame] | 135 | END |
Andy Bavier | b63f6d2 | 2020-03-12 15:34:37 -0700 | [diff] [blame] | 136 | Should Be True ${passed} Status does not contain 'SUCCESS' |
Zack Williams | a8fe75a | 2020-01-10 14:25:27 -0700 | [diff] [blame] | 137 | |
suraj gour | 7f6d5fe | 2019-11-29 10:56:35 +0000 | [diff] [blame] | 138 | Validate Authentication After Reassociate |
Zack Williams | a8fe75a | 2020-01-10 14:25:27 -0700 | [diff] [blame] | 139 | [Arguments] ${auth_pass} ${iface} ${ip} ${user} ${pass}=${None} |
| 140 | ... ${container_type}=${None} ${container_name}=${None} |
| 141 | [Documentation] |
| 142 | ... Executes a particular reassociate request on the RG using wpa_cli. |
| 143 | ... auth_pass determines if authentication should pass |
Andy Bavier | 84834d4 | 2020-02-25 13:49:50 -0700 | [diff] [blame] | 144 | ${wpa_log}= Catenate SEPARATOR=. /tmp/wpa ${iface} log |
| 145 | ${output}= Login And Run Command On Remote System truncate -s 0 ${wpa_log}; cat ${wpa_log} |
| 146 | ... ${ip} ${user} ${pass} ${container_type} ${container_name} |
| 147 | Log ${output} |
| 148 | Should Not Contain ${output} authentication completed successfully |
suraj gour | 7f6d5fe | 2019-11-29 10:56:35 +0000 | [diff] [blame] | 149 | WPA Reassociate ${iface} ${ip} ${user} ${pass} ${container_type} ${container_name} |
Zack Williams | a8fe75a | 2020-01-10 14:25:27 -0700 | [diff] [blame] | 150 | Run Keyword If '${auth_pass}' == 'True' Wait Until Keyword Succeeds ${timeout} 2s |
Andy Bavier | 84834d4 | 2020-02-25 13:49:50 -0700 | [diff] [blame] | 151 | ... Check Remote File Contents True ${wpa_log} ${iface}.*authentication completed successfully |
Zack Williams | a8fe75a | 2020-01-10 14:25:27 -0700 | [diff] [blame] | 152 | ... ${ip} ${user} ${pass} ${container_type} ${container_name} |
suraj gour | 7f6d5fe | 2019-11-29 10:56:35 +0000 | [diff] [blame] | 153 | Run Keyword If '${auth_pass}' == 'False' Sleep 20s |
Suchitra Vemuri | 3cb29f8 | 2020-02-25 13:59:58 -0800 | [diff] [blame] | 154 | Run Keyword If '${auth_pass}' == 'False' Check Remote File Contents False /tmp/wpa.log |
Andy Bavier | 84834d4 | 2020-02-25 13:49:50 -0700 | [diff] [blame] | 155 | ... ${iface}.*authentication completed successfully ${ip} ${user} ${pass} |
Zack Williams | a8fe75a | 2020-01-10 14:25:27 -0700 | [diff] [blame] | 156 | ... ${container_type} ${container_name} |
suraj gour | d5cfdbb | 2019-12-13 12:44:55 +0000 | [diff] [blame] | 157 | |
| 158 | Send Dhclient Request To Release Assigned IP |
Zack Williams | a8fe75a | 2020-01-10 14:25:27 -0700 | [diff] [blame] | 159 | [Arguments] ${iface} ${ip} ${user} ${path_dhcpleasefile} ${pass}=${None} |
| 160 | ... ${container_type}=${None} ${container_name}=${None} |
suraj gour | d5cfdbb | 2019-12-13 12:44:55 +0000 | [diff] [blame] | 161 | [Documentation] Executes a dhclient with option to release ip against a particular interface on the RG (src) |
Zack Williams | a8fe75a | 2020-01-10 14:25:27 -0700 | [diff] [blame] | 162 | ${result}= Login And Run Command On Remote System |
| 163 | ... dhclient -nw -r ${iface} && rm ${path_dhcpleasefile}/dhclient.* ${ip} ${user} |
suraj gour | d5cfdbb | 2019-12-13 12:44:55 +0000 | [diff] [blame] | 164 | ... ${pass} ${container_type} ${container_name} |
| 165 | Log ${result} |
| 166 | #Should Contain ${result} DHCPRELEASE |
| 167 | [Return] ${result} |
suraj gour | 1ecfae9 | 2019-12-20 15:11:40 +0000 | [diff] [blame] | 168 | |
| 169 | Check Remote File Contents For WPA Logs |
Zack Williams | a8fe75a | 2020-01-10 14:25:27 -0700 | [diff] [blame] | 170 | [Arguments] ${file_should_exist} ${file} ${pattern} ${ip} ${user} ${pass}=${None} |
| 171 | ... ${container_type}=${None} ${container_name}=${None} ${prompt}=~$ |
suraj gour | 1ecfae9 | 2019-12-20 15:11:40 +0000 | [diff] [blame] | 172 | [Documentation] Checks for particular pattern count in a file |
Zack Williams | a8fe75a | 2020-01-10 14:25:27 -0700 | [diff] [blame] | 173 | ${result}= Login And Run Command On Remote System |
| 174 | ... cat ${file} | grep '${pattern}' | wc -l ${ip} ${user} ${pass} |
suraj gour | 1ecfae9 | 2019-12-20 15:11:40 +0000 | [diff] [blame] | 175 | ... ${container_type} ${container_name} ${prompt} |
| 176 | [Return] ${result} |
Gayathri.Selvan | ee4a91b | 2020-01-17 06:49:53 +0000 | [diff] [blame] | 177 | |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 178 | |
Gayathri.Selvan | ee4a91b | 2020-01-17 06:49:53 +0000 | [diff] [blame] | 179 | Perform Sanity Test |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 180 | [Documentation] This keyword iterate all OLTs and performs Sanity Test Procedure |
| 181 | ... for all the ONUs connected to each OLT - ATT workflow |
| 182 | FOR ${J} IN RANGE 0 ${num_olts} |
| 183 | ${olt_serial_number}= Set Variable ${list_olts}[${J}][sn] |
| 184 | ${onu_count}= Set Variable ${list_olts}[${J}][onucount] |
| 185 | ${of_id}= Wait Until Keyword Succeeds ${timeout} 15s Validate OLT Device in ONOS |
| 186 | ... ${olt_serial_number} |
| 187 | Set Global Variable ${of_id} |
| 188 | ${nni_port}= Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
| 189 | ... Get NNI Port in ONOS ${of_id} |
| 190 | Set Global Variable ${nni_port} |
| 191 | # Verify Default Meter in ONOS (valid only for ATT) |
| 192 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 193 | ... Verify Default Meter Present in ONOS ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id} |
| 194 | Perform Sanity Test Per OLT ${of_id} ${nni_port} ${olt_serial_number} ${onu_count} |
| 195 | END |
| 196 | |
| 197 | Perform Sanity Test Per OLT |
| 198 | [Arguments] ${of_id} ${nni_port} ${olt_serial_number} ${num_onus} |
Gayathri.Selvan | ee4a91b | 2020-01-17 06:49:53 +0000 | [diff] [blame] | 199 | [Documentation] This keyword performs Sanity Test Procedure |
| 200 | ... Sanity test performs authentication, dhcp and pings for all the ONUs given for the POD |
| 201 | ... This keyword can be used to call in any other tests where sanity check is required |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 202 | ... and avoids duplication of code. - ATT workflow |
| 203 | #${of_id}= Wait Until Keyword Succeeds ${timeout} 15s Validate OLT Device in ONOS ${olt_serial_number} |
| 204 | #Set Global Variable ${of_id} |
| 205 | #${nni_port}= Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
| 206 | #... Get NNI Port in ONOS ${of_id} |
| 207 | #Set Global Variable ${nni_port} |
Hardik Windlass | 2a9b159 | 2020-07-23 18:28:13 +0530 | [diff] [blame] | 208 | # Verify Default Meter in ONOS (valid only for ATT) |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 209 | #Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 210 | #... Verify Default Meter Present in ONOS ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id} |
| 211 | FOR ${I} IN RANGE 0 ${num_all_onus} |
Gayathri.Selvan | ee4a91b | 2020-01-17 06:49:53 +0000 | [diff] [blame] | 212 | ${src}= Set Variable ${hosts.src[${I}]} |
| 213 | ${dst}= Set Variable ${hosts.dst[${I}]} |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 214 | Continue For Loop If "${olt_serial_number}"!="${src['olt']}" |
Suchitra Vemuri | 0300591 | 2020-02-20 18:59:46 -0800 | [diff] [blame] | 215 | Run Keyword and Ignore Error Collect Logs |
Gayathri.Selvan | ee4a91b | 2020-01-17 06:49:53 +0000 | [diff] [blame] | 216 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
| 217 | ${onu_port}= Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
| 218 | ... Get ONU Port in ONOS ${src['onu']} ${of_id} |
Suchitra Vemuri | 8078b97 | 2020-02-06 19:07:41 -0800 | [diff] [blame] | 219 | # Check ONU port is Enabled in ONOS |
| 220 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds 120s 2s |
Suchitra Vemuri | 760bdd3 | 2020-06-17 12:34:48 -0700 | [diff] [blame] | 221 | ... Verify ONU Port Is Enabled ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${src['onu']} |
Suchitra Vemuri | 8078b97 | 2020-02-06 19:07:41 -0800 | [diff] [blame] | 222 | # Verify EAPOL flows are added for the ONU port |
Gayathri.Selvan | ee4a91b | 2020-01-17 06:49:53 +0000 | [diff] [blame] | 223 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
ubuntu | 6b6e7d4 | 2020-03-02 12:35:42 -0800 | [diff] [blame] | 224 | ... Verify Eapol Flows Added For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port} |
Suchitra Vemuri | 8078b97 | 2020-02-06 19:07:41 -0800 | [diff] [blame] | 225 | # Verify ONU state in voltha |
| 226 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s Validate Device |
| 227 | ... ENABLED ACTIVE REACHABLE |
| 228 | ... ${src['onu']} onu=True onu_reason=omci-flows-pushed |
| 229 | # Perform Authentication |
Andy Bavier | 84834d4 | 2020-02-25 13:49:50 -0700 | [diff] [blame] | 230 | ${wpa_log}= Run Keyword If ${has_dataplane} Catenate SEPARATOR=. |
| 231 | ... /tmp/wpa ${src['dp_iface_name']} log |
Gayathri.Selvan | ee4a91b | 2020-01-17 06:49:53 +0000 | [diff] [blame] | 232 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Validate Authentication True |
| 233 | ... ${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] | 234 | ... ${src['container_type']} ${src['container_name']} ${wpa_log} |
Gayathri.Selvan | ee4a91b | 2020-01-17 06:49:53 +0000 | [diff] [blame] | 235 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2 |
ubuntu | 6b6e7d4 | 2020-03-02 12:35:42 -0800 | [diff] [blame] | 236 | ... Verify ONU in AAA-Users ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port} |
Gayathri.Selvan | ee4a91b | 2020-01-17 06:49:53 +0000 | [diff] [blame] | 237 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2 |
ubuntu | 6b6e7d4 | 2020-03-02 12:35:42 -0800 | [diff] [blame] | 238 | ... Execute ONOS CLI Command ${ONOS_SSH_IP} ${ONOS_SSH_PORT} |
Gayathri.Selvan | ee4a91b | 2020-01-17 06:49:53 +0000 | [diff] [blame] | 239 | ... volt-add-subscriber-access ${of_id} ${onu_port} |
Suchitra Vemuri | 9da4430 | 2020-03-04 14:24:49 -0800 | [diff] [blame] | 240 | # Verify that no pending flows exist for the ONU port |
| 241 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
| 242 | ... 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] | 243 | # Verify subscriber access flows are added for the ONU port |
| 244 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 245 | ... Verify Subscriber Access Flows Added For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id} |
| 246 | ... ${onu_port} ${nni_port} ${src['c_tag']} ${src['s_tag']} |
Hardik Windlass | 2a9b159 | 2020-07-23 18:28:13 +0530 | [diff] [blame] | 247 | # Verify Meters in ONOS |
| 248 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 249 | ... Verify Meters in ONOS ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id} ${onu_port} |
Gayathri.Selvan | ee4a91b | 2020-01-17 06:49:53 +0000 | [diff] [blame] | 250 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Validate DHCP and Ping True |
| 251 | ... True ${src['dp_iface_name']} ${src['s_tag']} ${src['c_tag']} ${dst['dp_iface_ip_qinq']} |
| 252 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 253 | ... ${dst['dp_iface_name']} ${dst['ip']} ${dst['user']} ${dst['pass']} ${dst['container_type']} |
| 254 | ... ${dst['container_name']} |
| 255 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
ubuntu | 6b6e7d4 | 2020-03-02 12:35:42 -0800 | [diff] [blame] | 256 | ... Validate Subscriber DHCP Allocation ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port} |
Gayathri.Selvan | ee4a91b | 2020-01-17 06:49:53 +0000 | [diff] [blame] | 257 | Run Keyword and Ignore Error Get Device Output from Voltha ${onu_device_id} |
| 258 | Run Keyword and Ignore Error Collect Logs |
| 259 | END |
| 260 | |
Hardik Windlass | a3d04b9 | 2020-02-17 15:06:05 +0000 | [diff] [blame] | 261 | Perform Sanity Test DT |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 262 | [Documentation] This keyword iterate all OLTs and performs Sanity Test Procedure for DT workflow |
| 263 | FOR ${J} IN RANGE 0 ${num_olts} |
| 264 | ${olt_serial_number}= Set Variable ${list_olts}[${J}][sn] |
| 265 | ${num_onus}= Set Variable ${list_olts}[${J}][onucount] |
| 266 | ${olt_device_id}= Get OLTDeviceID From OLT List ${olt_serial_number} |
Suchitra Vemuri | 4b8f4f5 | 2020-11-17 19:12:50 -0800 | [diff] [blame] | 267 | Run Keyword and Ignore Error Collect Logs |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 268 | ${of_id}= Wait Until Keyword Succeeds ${timeout} 15s Validate OLT Device in ONOS |
| 269 | ... ${olt_serial_number} |
| 270 | Set Global Variable ${of_id} |
| 271 | ${nni_port}= Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
| 272 | ... Get NNI Port in ONOS ${of_id} |
| 273 | Set Global Variable ${nni_port} |
| 274 | Perform Sanity Test DT Per OLT ${of_id} ${nni_port} ${olt_serial_number} ${num_onus} |
| 275 | # Verify ONOS Flows |
| 276 | # Number of Access Flows on ONOS equals 4 * the Number of Active ONUs (2 for each downstream and upstream) |
| 277 | ${onos_flows_count}= Evaluate 4 * ${num_onus} |
| 278 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 279 | ... Verify Subscriber Access Flows Added Count DT ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id} |
| 280 | ... ${onos_flows_count} |
| 281 | # Verify VOLTHA Flows |
| 282 | # Number of per OLT Flows equals Twice the Number of Active ONUs (each for downstream and upstream) + 1 for LLDP |
| 283 | ${olt_flows}= Evaluate 2 * ${num_onus} + 1 |
| 284 | # Number of per ONU Flows equals 2 (one each for downstream and upstream) |
| 285 | ${onu_flows}= Set Variable 2 |
| 286 | Run Keyword Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Flows ${olt_flows} |
| 287 | ... ${olt_device_id} |
| 288 | ${List_ONU_Serial} Create List |
| 289 | Set Suite Variable ${List_ONU_Serial} |
Suchitra Vemuri | 21a47fd | 2020-11-16 18:39:09 -0800 | [diff] [blame] | 290 | Build ONU SN List ${List_ONU_Serial} ${olt_serial_number} |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 291 | Log ${List_ONU_Serial} |
| 292 | Run Keyword Wait Until Keyword Succeeds ${timeout} 5s Validate ONU Flows |
| 293 | ... ${List_ONU_Serial} ${onu_flows} |
| 294 | END |
| 295 | |
| 296 | |
| 297 | Perform Sanity Test DT Per OLT |
| 298 | [Arguments] ${of_id} ${nni_port} ${olt_serial_number} ${num_onus} |
Hardik Windlass | a3d04b9 | 2020-02-17 15:06:05 +0000 | [diff] [blame] | 299 | [Documentation] This keyword performs Sanity Test Procedure for DT Workflow |
| 300 | ... Sanity test performs dhcp and pings (without EAPOL and DHCP flows) for all the ONUs given for the POD |
| 301 | ... This keyword can be used to call in any other tests where sanity check is required |
| 302 | ... and avoids duplication of code. |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 303 | #${of_id}= Wait Until Keyword Succeeds 360s 15s Validate OLT Device in ONOS ${olt_serial_number} |
| 304 | #Set Global Variable ${of_id} |
| 305 | #${nni_port}= Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
| 306 | #... Get NNI Port in ONOS ${of_id} |
| 307 | #Set Global Variable ${nni_port} |
| 308 | FOR ${I} IN RANGE 0 ${num_all_onus} |
Hardik Windlass | a3d04b9 | 2020-02-17 15:06:05 +0000 | [diff] [blame] | 309 | ${src}= Set Variable ${hosts.src[${I}]} |
| 310 | ${dst}= Set Variable ${hosts.dst[${I}]} |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 311 | Continue For Loop If "${olt_serial_number}"!="${src['olt']}" |
Suchitra Vemuri | 4b8f4f5 | 2020-11-17 19:12:50 -0800 | [diff] [blame] | 312 | Run Keyword and Ignore Error Collect Logs |
Hardik Windlass | a3d04b9 | 2020-02-17 15:06:05 +0000 | [diff] [blame] | 313 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
| 314 | ${onu_port}= Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
| 315 | ... Get ONU Port in ONOS ${src['onu']} ${of_id} |
| 316 | # Check ONU port is Enabled in ONOS |
| 317 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds 120s 2s |
Suchitra Vemuri | 760bdd3 | 2020-06-17 12:34:48 -0700 | [diff] [blame] | 318 | ... Verify ONU Port Is Enabled ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${src['onu']} |
Hardik Windlass | a3d04b9 | 2020-02-17 15:06:05 +0000 | [diff] [blame] | 319 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2 |
ubuntu | 6b6e7d4 | 2020-03-02 12:35:42 -0800 | [diff] [blame] | 320 | ... Execute ONOS CLI Command ${ONOS_SSH_IP} ${ONOS_SSH_PORT} |
Hardik Windlass | a3d04b9 | 2020-02-17 15:06:05 +0000 | [diff] [blame] | 321 | ... volt-add-subscriber-access ${of_id} ${onu_port} |
Hardik Windlass | fb5eace | 2020-03-26 14:49:01 +0530 | [diff] [blame] | 322 | # Verify subscriber access flows are added for the ONU port |
| 323 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
Hardik Windlass | 25e1170 | 2020-03-30 20:05:19 +0530 | [diff] [blame] | 324 | ... Verify Subscriber Access Flows Added For ONU DT ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id} |
| 325 | ... ${onu_port} ${nni_port} ${src['s_tag']} |
Hardik Windlass | a3d04b9 | 2020-02-17 15:06:05 +0000 | [diff] [blame] | 326 | # Verify ONU state in voltha |
| 327 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s Validate Device |
| 328 | ... ENABLED ACTIVE REACHABLE |
| 329 | ... ${src['onu']} onu=True onu_reason=omci-flows-pushed |
Hardik Windlass | 2a9b159 | 2020-07-23 18:28:13 +0530 | [diff] [blame] | 330 | # Verify Meters in ONOS |
| 331 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 332 | ... Verify Meters in ONOS ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id} ${onu_port} |
Hardik Windlass | fb5eace | 2020-03-26 14:49:01 +0530 | [diff] [blame] | 333 | # TODO: Yet to Verify on the GPON based Physical POD (VOL-2652) |
Hardik Windlass | a3d04b9 | 2020-02-17 15:06:05 +0000 | [diff] [blame] | 334 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Validate DHCP and Ping True |
| 335 | ... True ${src['dp_iface_name']} ${src['s_tag']} ${src['c_tag']} ${dst['dp_iface_ip_qinq']} |
| 336 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 337 | ... ${dst['dp_iface_name']} ${dst['ip']} ${dst['user']} ${dst['pass']} ${dst['container_type']} |
| 338 | ... ${dst['container_name']} |
| 339 | Run Keyword and Ignore Error Get Device Output from Voltha ${onu_device_id} |
| 340 | Run Keyword and Ignore Error Collect Logs |
| 341 | END |
Hardik Windlass | fb5eace | 2020-03-26 14:49:01 +0530 | [diff] [blame] | 342 | # Verify ONOS Flows |
| 343 | # Number of Access Flows on ONOS equals 4 * the Number of Active ONUs (2 for each downstream and upstream) |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 344 | #${onos_flows_count}= Evaluate 4 * ${num_onus} |
| 345 | #Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 346 | #... Verify Subscriber Access Flows Added Count DT ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id} |
| 347 | #... ${onos_flows_count} |
Hardik Windlass | fb5eace | 2020-03-26 14:49:01 +0530 | [diff] [blame] | 348 | # Verify VOLTHA Flows |
Hardik Windlass | a3d04b9 | 2020-02-17 15:06:05 +0000 | [diff] [blame] | 349 | # Number of per OLT Flows equals Twice the Number of Active ONUs (each for downstream and upstream) + 1 for LLDP |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 350 | #${olt_flows}= Evaluate 2 * ${num_onus} + 1 |
Hardik Windlass | a3d04b9 | 2020-02-17 15:06:05 +0000 | [diff] [blame] | 351 | # Number of per ONU Flows equals 2 (one each for downstream and upstream) |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 352 | #${onu_flows}= Set Variable 2 |
| 353 | #Run Keyword Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Flows ${olt_flows} |
| 354 | #${List_ONU_Serial} Create List |
| 355 | #Set Suite Variable ${List_ONU_Serial} |
Andrea Campanella | 6391f84 | 2020-11-16 10:01:18 +0100 | [diff] [blame] | 356 | #Build ONU SN List ${List_ONU_Serial} ${olt_serial_number} |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 357 | #Log ${List_ONU_Serial} |
| 358 | #Run Keyword Wait Until Keyword Succeeds ${timeout} 5s Validate ONU Flows |
| 359 | #... ${List_ONU_Serial} ${onu_flows} |
| 360 | |
| 361 | Validate All OLT Flows |
| 362 | [Documentation] This keyword iterate all OLTs and performs Sanity Test Procedure for DT workflow |
| 363 | FOR ${J} IN RANGE 0 ${num_olts} |
| 364 | ${olt_serial_number}= Set Variable ${list_olts}[${J}][sn] |
| 365 | ${num_onus}= Set Variable ${list_olts}[${J}][onucount] |
| 366 | ${olt_device_id}= Get OLTDeviceID From OLT List ${olt_serial_number} |
| 367 | ${of_id}= Wait Until Keyword Succeeds ${timeout} 15s Validate OLT Device in ONOS |
| 368 | ... ${olt_serial_number} |
| 369 | Set Global Variable ${of_id} |
| 370 | # Verify ONOS Flows |
| 371 | # Number of Access Flows on ONOS equals 4 * the Number of Active ONUs (2 for each downstream and upstream) |
| 372 | ${onos_flows_count}= Evaluate 4 * ${num_onus} |
| 373 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 374 | ... Verify Subscriber Access Flows Added Count DT ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id} |
| 375 | ... ${onos_flows_count} |
| 376 | # Verify VOLTHA Flows |
| 377 | # Number of per OLT Flows equals Twice the Number of Active ONUs (each for downstream and upstream) + 1 for LLDP |
| 378 | ${olt_flows}= Evaluate 2 * ${num_onus} + 1 |
| 379 | # Number of per ONU Flows equals 2 (one each for downstream and upstream) |
| 380 | ${onu_flows}= Set Variable 2 |
| 381 | Run Keyword Wait Until Keyword Succeeds ${timeout} 5s Validate OLT Flows ${olt_flows} |
| 382 | ... ${olt_device_id} |
| 383 | ${List_ONU_Serial} Create List |
| 384 | Set Suite Variable ${List_ONU_Serial} |
Andrea Campanella | 6391f84 | 2020-11-16 10:01:18 +0100 | [diff] [blame] | 385 | Build ONU SN List ${List_ONU_Serial} ${olt_serial_number} |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 386 | Log ${List_ONU_Serial} |
| 387 | Run Keyword Wait Until Keyword Succeeds ${timeout} 5s Validate ONU Flows |
| 388 | ... ${List_ONU_Serial} ${onu_flows} |
| 389 | END |
Hardik Windlass | a3d04b9 | 2020-02-17 15:06:05 +0000 | [diff] [blame] | 390 | |
Suchitra Vemuri | 2f1e07d | 2020-06-26 19:18:01 -0700 | [diff] [blame] | 391 | Perform Sanity Test TT |
| 392 | [Documentation] This keyword performs Sanity Test Procedure for TT Workflow |
| 393 | ... Sanity test performs dhcp and pings (without EAPOL and DHCP flows) for all the ONUs given for the POD |
| 394 | ... This keyword can be used to call in any other tests where sanity check is required |
| 395 | ... and avoids duplication of code. |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 396 | FOR ${I} IN RANGE 0 ${num_all_onus} |
Suchitra Vemuri | 85cb7d6 | 2020-07-16 23:46:16 -0700 | [diff] [blame] | 397 | ${src}= Set Variable ${hosts.src[${I}]} |
| 398 | ${dst}= Set Variable ${hosts.dst[${I}]} |
| 399 | ${service_type}= Get Variable Value ${src['service_type']} "null" |
| 400 | Run Keyword IF '${service_type}' != 'mcast' Sanity Test TT one ONU ${src} ${dst} |
| 401 | Run Keyword and Ignore Error Collect Logs |
| 402 | END |
| 403 | Run Keyword and Ignore Error Collect Logs |
| 404 | |
| 405 | Sanity Test TT one ONU |
| 406 | [Documentation] This keyword performs sanity test for a single ONU for TT workflow |
| 407 | ... Tests for one ONU |
| 408 | ... Assertions apply to HSIA, VoD, VoIP services |
| 409 | [Arguments] ${src} ${dst} |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 410 | ${of_id}= Wait Until Keyword Succeeds ${timeout} 15s Validate OLT Device in ONOS ${src['olt']} |
Suchitra Vemuri | 2f1e07d | 2020-06-26 19:18:01 -0700 | [diff] [blame] | 411 | Set Global Variable ${of_id} |
| 412 | ${nni_port}= Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
| 413 | ... Get NNI Port in ONOS ${of_id} |
| 414 | Set Global Variable ${nni_port} |
Suchitra Vemuri | 85cb7d6 | 2020-07-16 23:46:16 -0700 | [diff] [blame] | 415 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
| 416 | ${onu_port}= Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
| 417 | ... Get ONU Port in ONOS ${src['onu']} ${of_id} |
| 418 | # Check ONU port is Enabled in ONOS |
| 419 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds 120s 2s |
| 420 | ... Verify ONU Port Is Enabled ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${src['onu']} |
| 421 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2 |
| 422 | ... Execute ONOS CLI Command ${ONOS_SSH_IP} ${ONOS_SSH_PORT} |
| 423 | ... volt-add-subscriber-access ${of_id} ${onu_port} |
| 424 | Sleep 30s |
| 425 | # Verify ONU state in voltha |
| 426 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s Validate Device |
| 427 | ... ENABLED ACTIVE REACHABLE |
| 428 | ... ${src['onu']} onu=True onu_reason=omci-flows-pushed |
| 429 | # TODO: Yet to Verify on the GPON based Physical POD (VOL-2652) |
| 430 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure Validate DHCP and Ping True |
| 431 | ... True ${src['dp_iface_name']} ${src['s_tag']} ${src['c_tag']} ${dst['dp_iface_ip_qinq']} |
| 432 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 433 | ... ${dst['dp_iface_name']} ${dst['ip']} ${dst['user']} ${dst['pass']} ${dst['container_type']} |
| 434 | ... ${dst['container_name']} |
Suchitra Vemuri | 16644bd | 2020-10-03 14:06:12 -0700 | [diff] [blame] | 435 | Run Keyword IF ${has_dataplane} |
Suchitra Vemuri | b4d9e8d | 2020-10-05 20:49:21 -0700 | [diff] [blame] | 436 | ... Run Keyword IF '${src['service_type']}'!='hsia' |
Suchitra Vemuri | 4281941 | 2020-10-01 17:45:43 -0700 | [diff] [blame] | 437 | ... Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
Suchitra Vemuri | 8d3b003 | 2020-09-11 17:49:08 -0700 | [diff] [blame] | 438 | ... Validate Subscriber DHCP Allocation ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port} |
Suchitra Vemuri | 4281941 | 2020-10-01 17:45:43 -0700 | [diff] [blame] | 439 | ... ${src['c_tag']} |
Suchitra Vemuri | 85cb7d6 | 2020-07-16 23:46:16 -0700 | [diff] [blame] | 440 | Run Keyword and Ignore Error Get Device Output from Voltha ${onu_device_id} |
| 441 | Run Keyword and Ignore Error Collect Logs |
| 442 | |
| 443 | Perform Sanity Test TT MCAST |
| 444 | [Documentation] This keyword performs Sanity Test Procedure for TT Workflow |
| 445 | ... Adds subscribers |
| 446 | ... Validates for MCAST |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 447 | FOR ${I} IN RANGE 0 ${num_all_onus} |
Suchitra Vemuri | 2f1e07d | 2020-06-26 19:18:01 -0700 | [diff] [blame] | 448 | ${src}= Set Variable ${hosts.src[${I}]} |
| 449 | ${dst}= Set Variable ${hosts.dst[${I}]} |
Suchitra Vemuri | 85cb7d6 | 2020-07-16 23:46:16 -0700 | [diff] [blame] | 450 | ${service_type}= Get Variable Value ${src['service_type']} "null" |
| 451 | Run Keyword IF '${service_type}' == 'mcast' Sanity Test TT MCAST one ONU ${src} |
| 452 | ... ${dst} |
Suchitra Vemuri | 2f1e07d | 2020-06-26 19:18:01 -0700 | [diff] [blame] | 453 | Run Keyword and Ignore Error Collect Logs |
| 454 | END |
Suchitra Vemuri | 85cb7d6 | 2020-07-16 23:46:16 -0700 | [diff] [blame] | 455 | Run Keyword and Ignore Error Collect Logs |
| 456 | |
| 457 | Sanity Test TT MCAST one ONU |
| 458 | [Documentation] This keyword performs sanity test for a single ONU for TT workflow |
| 459 | ... Tests for one ONU |
| 460 | ... Assertions apply to MCAST services |
| 461 | [Arguments] ${src} ${dst} |
| 462 | # Check for iperf and jq tools |
| 463 | ${stdout} ${stderr} ${rc}= Execute Remote Command which iperf jq |
| 464 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} |
| 465 | ... ${src['container_name']} |
| 466 | Pass Execution If ${rc} != 0 Skipping test: iperf / jq not found on the RG |
| 467 | |
| 468 | #Reset the IP on the interface |
| 469 | ${output}= Login And Run Command On Remote System sudo ifconfig ${src['dp_iface_name']} 0 |
| 470 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 471 | # Kill iperf on BNG |
| 472 | ${rg_output}= Run Keyword and Continue On Failure Login And Run Command On Remote System |
| 473 | ... sudo kill -9 `pidof iperf` |
| 474 | ... ${dst['bng_ip']} ${dst['bng_user']} ${dst['bng_pass']} ${dst['container_type']} |
| 475 | ... ${dst['container_name']} |
| 476 | |
| 477 | # Setup RG for Multi-cast test |
| 478 | ${output}= Login And Run Command On Remote System |
| 479 | ... sudo ifconfig ${src['dp_iface_name']} ${src['mcast_rg']} up ; sudo kill -9 `pidof iperf` |
| 480 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 481 | ${output}= Login And Run Command On Remote System |
| 482 | ... sudo ip route add ${src['mcast_grp_subnet_mask']} dev ${src['dp_iface_name']} scope link |
| 483 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 484 | |
| 485 | # Perform operations for adding subscriber |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 486 | ${of_id}= Wait Until Keyword Succeeds ${timeout} 15s Validate OLT Device in ONOS ${src['olt']} |
Suchitra Vemuri | 85cb7d6 | 2020-07-16 23:46:16 -0700 | [diff] [blame] | 487 | Set Global Variable ${of_id} |
| 488 | ${nni_port}= Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
| 489 | ... Get NNI Port in ONOS ${of_id} |
| 490 | Set Global Variable ${nni_port} |
| 491 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
| 492 | ${onu_port}= Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
| 493 | ... Get ONU Port in ONOS ${src['onu']} ${of_id} |
| 494 | # Check ONU port is Enabled in ONOS |
| 495 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds 120s 2s |
| 496 | ... Verify ONU Port Is Enabled ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${src['onu']} |
| 497 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2 |
| 498 | ... Execute ONOS CLI Command ${ONOS_SSH_IP} ${ONOS_SSH_PORT} |
| 499 | ... volt-add-subscriber-access ${of_id} ${onu_port} |
| 500 | Sleep 30s |
| 501 | # Verify ONU state in voltha |
| 502 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s Validate Device |
| 503 | ... ENABLED ACTIVE REACHABLE |
| 504 | ... ${src['onu']} onu=True onu_reason=omci-flows-pushed |
| 505 | |
| 506 | # Setup iperf on the BNG |
| 507 | ${server_output}= Login And Run Command On Remote System |
| 508 | ... sudo iperf -c ${dst['dp_iface_ip_qinq']} -u -T 32 -t 60 -i 1 & |
| 509 | ... ${dst['bng_ip']} ${dst['bng_user']} ${dst['bng_pass']} ${dst['container_type']} |
| 510 | ... ${dst['container_name']} |
| 511 | |
| 512 | # Setup iperf on the RG |
| 513 | ${rg_output}= Run Keyword and Continue On Failure Wait Until Keyword Succeeds 90s 5s |
| 514 | ... Login And Run Command On Remote System |
| 515 | ... rm -rf /tmp/rg_output ; sudo iperf -s -u -B ${dst['dp_iface_ip_qinq']} -i 1 -D >> /tmp/rg_output |
| 516 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 517 | Log ${rg_output} |
| 518 | Sleep 60s |
| 519 | ${output}= Run Keyword and Continue On Failure Wait Until Keyword Succeeds 90s 5s |
| 520 | ... Login And Run Command On Remote System |
| 521 | ... cat /tmp/rg_output | grep KBytes |
| 522 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 523 | Log ${output} |
| 524 | Should Contain ${output} KBytes |
| 525 | |
| 526 | # Kill iperf on BNG |
| 527 | ${rg_output}= Run Keyword and Continue On Failure Login And Run Command On Remote System |
| 528 | ... sudo kill -9 `pidof iperf` |
| 529 | ... ${dst['bng_ip']} ${dst['bng_user']} ${dst['bng_pass']} ${dst['container_type']} |
| 530 | ... ${dst['container_name']} |
| 531 | |
| 532 | # Kill iperf on the RG |
| 533 | ${output}= Run Keyword and Continue On Failure Login And Run Command On Remote System |
| 534 | ... sudo kill -9 `pidof iperf` |
| 535 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 536 | |
Suchitra Vemuri | 2f1e07d | 2020-06-26 19:18:01 -0700 | [diff] [blame] | 537 | |
Gayathri.Selvan | ee4a91b | 2020-01-17 06:49:53 +0000 | [diff] [blame] | 538 | Setup |
| 539 | [Documentation] Pre-test Setup |
| 540 | #test for empty device list |
| 541 | Test Empty Device List |
Suchitra Vemuri | 3158f3c | 2020-05-28 17:58:26 -0700 | [diff] [blame] | 542 | #Run Keyword If ${has_dataplane} Wait Until Keyword Succeeds 120s 10s Openolt is Up |
| 543 | #... ${olt_ip} ${olt_user} ${olt_pass} |
Suchitra Vemuri | 1d8e817 | 2020-06-17 17:43:56 -0700 | [diff] [blame] | 544 | Run Keyword If ${has_dataplane} Sleep 230s |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 545 | # Create a list of olt ids (logical and device_id) |
| 546 | ${olt_ids} Create List |
| 547 | FOR ${I} IN RANGE 0 ${num_olts} |
| 548 | #create/preprovision device |
| 549 | ${olt_device_id}= Create Device ${list_olts}[${I}][ip] ${OLT_PORT} |
| 550 | ${olt_serial_number}= Set Variable ${list_olts}[${I}][sn] |
| 551 | #Set Suite Variable ${olt_device_id} |
| 552 | #validate olt states |
| 553 | Wait Until Keyword Succeeds ${timeout} 5s |
| 554 | ... Validate OLT Device PREPROVISIONED UNKNOWN UNKNOWN ${olt_device_id} |
| 555 | Sleep 5s |
| 556 | Enable Device ${olt_device_id} |
| 557 | Wait Until Keyword Succeeds 380s 5s |
| 558 | ... Validate OLT Device ENABLED ACTIVE REACHABLE ${olt_serial_number} |
| 559 | ${logical_id}= Get Logical Device ID From SN ${olt_serial_number} |
| 560 | # Set Suite Variable ${logical_id} |
| 561 | ${of_id}= Wait Until Keyword Succeeds ${timeout} 15s Validate OLT Device in ONOS |
| 562 | ... ${olt_serial_number} |
| 563 | ${olt} Create Dictionary device_id ${olt_device_id} logical_id ${logical_id} |
| 564 | ... of_id ${of_id} sn ${olt_serial_number} |
| 565 | Append To List ${olt_ids} ${olt} |
| 566 | END |
| 567 | Set Global Variable ${olt_ids} |
| 568 | |
| 569 | Get ofID From OLT List |
| 570 | [Documentation] Retrieves the corresponding of_id for the OLT serial number specified |
| 571 | [Arguments] ${serial_number} |
| 572 | FOR ${I} IN RANGE 0 ${olt_count} |
| 573 | ${sn}= Get From Dictionary ${olt_ids}[${I}] sn |
Andrea Campanella | 317a94c | 2020-11-13 10:38:19 +0100 | [diff] [blame] | 574 | ${of_id}= Run Keyword IF "${serial_number}"=="${sn}" |
| 575 | ... Get From Dictionary ${olt_ids}[${I}] of_id ELSE Set Variable ${of_id} |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 576 | END |
| 577 | [Return] ${of_id} |
| 578 | |
| 579 | Get OLTDeviceID From OLT List |
| 580 | [Documentation] Retrieves the corresponding olt_device_id for the OLT serial number specified |
| 581 | [Arguments] ${serial_number} |
Suchitra Vemuri | 4b8f4f5 | 2020-11-17 19:12:50 -0800 | [diff] [blame] | 582 | ${olt_device_id}= Set Variable 0 |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 583 | FOR ${I} IN RANGE 0 ${olt_count} |
| 584 | ${sn}= Get From Dictionary ${olt_ids}[${I}] sn |
Andrea Campanella | 317a94c | 2020-11-13 10:38:19 +0100 | [diff] [blame] | 585 | ${olt_device_id}= Run Keyword IF "${serial_number}"=="${sn}" |
| 586 | ... Get From Dictionary ${olt_ids}[${I}] device_id ELSE Set Variable ${olt_device_id} |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 587 | END |
| 588 | [Return] ${olt_device_id} |
Gayathri.Selvan | ee4a91b | 2020-01-17 06:49:53 +0000 | [diff] [blame] | 589 | |
Hardik Windlass | aaea340 | 2020-03-10 19:45:45 +0530 | [diff] [blame] | 590 | Validate ONUs After OLT Disable |
| 591 | [Documentation] Validates the ONUs state in Voltha, ONUs port state in ONOS |
| 592 | ... and that pings do not succeed After corresponding OLT is Disabled |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 593 | [Arguments] ${num_onus} |
Hardik Windlass | aaea340 | 2020-03-10 19:45:45 +0530 | [diff] [blame] | 594 | FOR ${I} IN RANGE 0 ${num_onus} |
| 595 | ${src}= Set Variable ${hosts.src[${I}]} |
| 596 | ${dst}= Set Variable ${hosts.dst[${I}]} |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 597 | ${of_id}= Get ofID From OLT List ${src['olt']} |
Hardik Windlass | aaea340 | 2020-03-10 19:45:45 +0530 | [diff] [blame] | 598 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
| 599 | ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']} |
| 600 | ... ${of_id} |
| 601 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 602 | ... Validate Device ENABLED DISCOVERED |
| 603 | ... UNREACHABLE ${src['onu']} onu=True onu_reason=stopping-openomci |
| 604 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
Suchitra Vemuri | 760bdd3 | 2020-06-17 12:34:48 -0700 | [diff] [blame] | 605 | ... Verify ONU Port Is Disabled ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${src['onu']} |
Hardik Windlass | aaea340 | 2020-03-10 19:45:45 +0530 | [diff] [blame] | 606 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure |
| 607 | ... Wait Until Keyword Succeeds 60s 2s |
| 608 | ... Check Ping False ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']} |
| 609 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 610 | Run Keyword and Ignore Error Get Device Output from Voltha ${onu_device_id} |
| 611 | Run Keyword and Ignore Error Collect Logs |
| 612 | END |
| 613 | |
Gayathri.Selvan | ee4a91b | 2020-01-17 06:49:53 +0000 | [diff] [blame] | 614 | Delete All Devices and Verify |
| 615 | [Documentation] Remove any devices from VOLTHA and ONOS |
| 616 | # Clear devices from VOLTHA |
| 617 | Disable Devices In Voltha Root=true |
Suchitra Vemuri | 970747f | 2020-03-30 17:31:34 -0700 | [diff] [blame] | 618 | Sleep 5s |
Gayathri.Selvan | ee4a91b | 2020-01-17 06:49:53 +0000 | [diff] [blame] | 619 | Wait Until Keyword Succeeds ${timeout} 2s Test Devices Disabled In Voltha Root=true |
| 620 | Delete Devices In Voltha Root=true |
Matteo Scandolo | f6cea38 | 2020-04-20 14:32:00 -0700 | [diff] [blame] | 621 | Run Keyword If ${has_dataplane} Sleep 30s |
Gayathri.Selvan | ee4a91b | 2020-01-17 06:49:53 +0000 | [diff] [blame] | 622 | Wait Until Keyword Succeeds ${timeout} 2s Test Empty Device List |
| 623 | # Clear devices from ONOS |
Suchitra Vemuri | f7a033c | 2020-02-26 17:22:41 -0800 | [diff] [blame] | 624 | #Remove All Devices From ONOS |
ubuntu | 6b6e7d4 | 2020-03-02 12:35:42 -0800 | [diff] [blame] | 625 | #... http://karaf:karaf@${ONOS_REST_IP}:${ONOS_REST_PORT} |
Gayathri.Selvan | ee4a91b | 2020-01-17 06:49:53 +0000 | [diff] [blame] | 626 | |
| 627 | Teardown |
| 628 | [Documentation] kills processes and cleans up interfaces on src+dst servers |
| 629 | Run Keyword If ${has_dataplane} Clean Up Linux |
Gayathri.Selvan | ee4a91b | 2020-01-17 06:49:53 +0000 | [diff] [blame] | 630 | |
| 631 | Teardown Suite |
| 632 | [Documentation] Clean up device if desired |
| 633 | Run Keyword If ${teardown_device} Delete All Devices and Verify |
| 634 | |
| 635 | Delete Device and Verify |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 636 | [Arguments] ${olt_serial_number} |
Gayathri.Selvan | ee4a91b | 2020-01-17 06:49:53 +0000 | [diff] [blame] | 637 | [Documentation] Disable -> Delete devices via voltctl and verify its removed |
Suchitra Vemuri | 2fa9bba | 2020-01-22 17:38:48 -0800 | [diff] [blame] | 638 | ${olt_device_id}= Get Device ID From SN ${olt_serial_number} |
Gayathri.Selvan | ee4a91b | 2020-01-17 06:49:53 +0000 | [diff] [blame] | 639 | ${rc} ${output}= Run and Return Rc and Output |
Matteo Scandolo | 5899be1 | 2020-11-11 15:38:07 -0800 | [diff] [blame] | 640 | ... voltctl -c ${VOLTCTL_CONFIG} device disable ${olt_device_id} |
Gayathri.Selvan | ee4a91b | 2020-01-17 06:49:53 +0000 | [diff] [blame] | 641 | Should Be Equal As Integers ${rc} 0 |
| 642 | Sleep 5s |
| 643 | Wait Until Keyword Succeeds ${timeout} 5s |
| 644 | ... Validate OLT Device DISABLED UNKNOWN REACHABLE ${olt_serial_number} |
| 645 | ${rc} ${output}= Run and Return Rc and Output |
Matteo Scandolo | 5899be1 | 2020-11-11 15:38:07 -0800 | [diff] [blame] | 646 | ... voltctl -c ${VOLTCTL_CONFIG} device delete ${olt_device_id} |
Matteo Scandolo | f6cea38 | 2020-04-20 14:32:00 -0700 | [diff] [blame] | 647 | Run Keyword If ${has_dataplane} Sleep 50s |
Gayathri.Selvan | ee4a91b | 2020-01-17 06:49:53 +0000 | [diff] [blame] | 648 | Should Be Equal As Integers ${rc} 0 |
| 649 | Wait Until Keyword Succeeds ${timeout} 5s Validate Device Removed ${olt_device_id} |
| 650 | |
Gayathri.Selvan | 283a63c | 2020-01-23 04:09:18 +0000 | [diff] [blame] | 651 | Repeat Sanity Test |
| 652 | [Documentation] This keyword performs Sanity Test Procedure |
| 653 | ... Sanity test performs authentication, dhcp and pings for all the ONUs given for the POD |
| 654 | ... This keyword can be used to call in any other tests where sanity check is required |
| 655 | ... with wpa reassociation |
| 656 | ${of_id}= Wait Until Keyword Succeeds ${timeout} 15s Validate OLT Device in ONOS ${olt_serial_number} |
| 657 | Set Global Variable ${of_id} |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 658 | FOR ${I} IN RANGE 0 ${num_all_onus} |
Suchitra Vemuri | 0300591 | 2020-02-20 18:59:46 -0800 | [diff] [blame] | 659 | Run Keyword and Ignore Error Collect Logs |
Gayathri.Selvan | 283a63c | 2020-01-23 04:09:18 +0000 | [diff] [blame] | 660 | ${src}= Set Variable ${hosts.src[${I}]} |
| 661 | ${dst}= Set Variable ${hosts.dst[${I}]} |
Suchitra Vemuri | 8078b97 | 2020-02-06 19:07:41 -0800 | [diff] [blame] | 662 | ${onu_port}= Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
| 663 | ... Get ONU Port in ONOS ${src['onu']} ${of_id} |
| 664 | # Check ONU port is Enabled in ONOD |
| 665 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds 120s 2s |
Suchitra Vemuri | 760bdd3 | 2020-06-17 12:34:48 -0700 | [diff] [blame] | 666 | ... Verify ONU Port Is Enabled ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${src['onu']} |
Suchitra Vemuri | 8078b97 | 2020-02-06 19:07:41 -0800 | [diff] [blame] | 667 | # Verify EAPOL flows are added for the ONU port |
| 668 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
David K. Bainbridge | c0617c9 | 2020-03-05 21:17:19 -0800 | [diff] [blame] | 669 | ... Verify Eapol Flows Added For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port} |
Suchitra Vemuri | 8078b97 | 2020-02-06 19:07:41 -0800 | [diff] [blame] | 670 | # Verify ONU state in voltha |
Suchitra Vemuri | d1e27fb | 2020-02-01 16:34:37 -0800 | [diff] [blame] | 671 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s Validate Device |
Suchitra Vemuri | 81e4f02 | 2020-02-01 13:16:02 -0800 | [diff] [blame] | 672 | ... ENABLED ACTIVE REACHABLE |
| 673 | ... ${src['onu']} onu=True onu_reason=omci-flows-pushed |
Suchitra Vemuri | 8078b97 | 2020-02-06 19:07:41 -0800 | [diff] [blame] | 674 | # Perform Authentication |
Gayathri.Selvan | 283a63c | 2020-01-23 04:09:18 +0000 | [diff] [blame] | 675 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure |
| 676 | ... Validate Authentication After Reassociate |
| 677 | ... True ${src['dp_iface_name']} ${src['ip']} ${src['user']} ${src['pass']} |
| 678 | ... ${src['container_type']} ${src['container_name']} |
| 679 | Wait Until Keyword Succeeds ${timeout} 2s |
David K. Bainbridge | c0617c9 | 2020-03-05 21:17:19 -0800 | [diff] [blame] | 680 | ... Verify ONU in AAA-Users ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port} |
Gayathri.Selvan | 283a63c | 2020-01-23 04:09:18 +0000 | [diff] [blame] | 681 | Wait Until Keyword Succeeds ${timeout} 2s |
David K. Bainbridge | c0617c9 | 2020-03-05 21:17:19 -0800 | [diff] [blame] | 682 | ... Execute ONOS CLI Command ${ONOS_SSH_IP} ${ONOS_SSH_PORT} |
Gayathri.Selvan | 283a63c | 2020-01-23 04:09:18 +0000 | [diff] [blame] | 683 | ... volt-add-subscriber-access ${of_id} ${onu_port} |
| 684 | Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure |
| 685 | ... Validate DHCP and Ping True True |
| 686 | ... ${src['dp_iface_name']} ${src['s_tag']} ${src['c_tag']} ${dst['dp_iface_ip_qinq']} |
| 687 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 688 | ... ${dst['dp_iface_name']} ${dst['ip']} ${dst['user']} ${dst['pass']} ${dst['container_type']} |
| 689 | ... ${dst['container_name']} |
| 690 | Wait Until Keyword Succeeds ${timeout} 2s Run Keyword And Continue On Failure |
David K. Bainbridge | c0617c9 | 2020-03-05 21:17:19 -0800 | [diff] [blame] | 691 | ... Validate Subscriber DHCP Allocation ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port} |
Gayathri.Selvan | 283a63c | 2020-01-23 04:09:18 +0000 | [diff] [blame] | 692 | Run Keyword and Ignore Error Get Device Output from Voltha ${onu_device_id} |
| 693 | Run Keyword and Ignore Error Collect Logs |
| 694 | END |
Gayathri.Selvan | b6a2b54 | 2020-01-24 07:24:23 +0000 | [diff] [blame] | 695 | |
Hardik Windlass | 16cdf96 | 2020-04-29 15:26:50 +0530 | [diff] [blame] | 696 | Validate ONUs for PON OLT Disable |
| 697 | [Arguments] ${olt_peer_list} |
| 698 | [Documentation] This keyword validates that Ping fails for ONUs connected to Disabled OLT PON port |
| 699 | ... And Pings succeed for other Active OLT PON port ONUs |
| 700 | ... Also it removes subscriber for Disabled OLT PON port ONUs to replicate ATT workflow |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 701 | FOR ${I} IN RANGE 0 ${num_all_nus} |
Hardik Windlass | 16cdf96 | 2020-04-29 15:26:50 +0530 | [diff] [blame] | 702 | ${src}= Set Variable ${hosts.src[${I}]} |
| 703 | ${dst}= Set Variable ${hosts.dst[${I}]} |
| 704 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
| 705 | ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']} |
| 706 | ... ${of_id} |
| 707 | ${matched}= Match ONU in PON OLT Peer List ${olt_peer_list} ${onu_device_id} |
| 708 | Run Keyword If ${matched} |
| 709 | ... Run Keywords |
| 710 | ... Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 711 | ... Validate Device ENABLED DISCOVERED |
| 712 | ... UNREACHABLE ${src['onu']} onu=True onu_reason=stopping-openomci |
| 713 | ... AND Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
| 714 | ... Verify ONU Port Is Disabled ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${src['onu']} |
| 715 | ... AND Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure |
| 716 | ... Wait Until Keyword Succeeds 60s 2s |
| 717 | ... Check Ping False ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']} |
| 718 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} |
| 719 | ... ${src['container_name']} |
| 720 | # Remove Subscriber Access (To replicate ATT workflow) |
| 721 | ... AND Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command ${ONOS_SSH_IP} |
| 722 | ... ${ONOS_SSH_PORT} volt-remove-subscriber-access ${of_id} ${onu_port} |
| 723 | ... ELSE |
| 724 | ... Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure |
| 725 | ... Wait Until Keyword Succeeds 60s 2s |
| 726 | ... Check Ping True ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']} |
| 727 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} |
| 728 | ... ${src['container_name']} |
| 729 | Run Keyword and Ignore Error Collect Logs |
| 730 | END |
| 731 | |
| 732 | Validate ONUs for PON OLT Enable |
| 733 | [Arguments] ${olt_peer_list} |
| 734 | [Documentation] This keyword validates Ping succeeds for all Enabled/Acitve OLT PON ports |
| 735 | ... Also performs Auth/subscriberAdd/DHCP/Ping for the ONUs on Re-Enabled OLT PON port |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 736 | FOR ${I} IN RANGE 0 ${num_all_onus} |
Hardik Windlass | 16cdf96 | 2020-04-29 15:26:50 +0530 | [diff] [blame] | 737 | ${src}= Set Variable ${hosts.src[${I}]} |
| 738 | ${dst}= Set Variable ${hosts.dst[${I}]} |
| 739 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
| 740 | ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']} |
| 741 | ... ${of_id} |
| 742 | ${matched}= Match ONU in PON OLT Peer List ${olt_peer_list} ${onu_device_id} |
| 743 | ${wpa_log}= Run Keyword If ${has_dataplane} and ${matched} Catenate SEPARATOR=. |
| 744 | ... /tmp/wpa ${src['dp_iface_name']} log |
| 745 | Run Keyword If ${matched} |
| 746 | ... Run Keywords |
| 747 | # Perform Cleanup |
| 748 | ... Run Keyword If ${has_dataplane} Clean Up Linux ${onu_device_id} |
| 749 | # Verify ONU port status |
| 750 | ... AND Run Keyword And Continue On Failure Wait Until Keyword Succeeds 120s 2s |
| 751 | ... Verify ONU Port Is Enabled ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${src['onu']} |
| 752 | # Verify EAPOL flows are added for the ONU port |
| 753 | ... AND Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
| 754 | ... Verify Eapol Flows Added For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port} |
| 755 | # Verify ONU state in voltha |
| 756 | ... AND Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 757 | ... Validate Device ENABLED ACTIVE REACHABLE |
| 758 | ... ${src['onu']} onu=True onu_reason=omci-flows-pushed |
| 759 | # Perform Authentication |
| 760 | ... AND Run Keyword If ${has_dataplane} |
| 761 | ... Run Keyword And Continue On Failure Validate Authentication True |
| 762 | ... ${src['dp_iface_name']} wpa_supplicant.conf ${src['ip']} ${src['user']} ${src['pass']} |
| 763 | ... ${src['container_type']} ${src['container_name']} ${wpa_log} |
| 764 | ... AND Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2 |
| 765 | ... Verify ONU in AAA-Users ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port} |
| 766 | ... AND Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2 |
| 767 | ... Execute ONOS CLI Command ${ONOS_SSH_IP} ${ONOS_SSH_PORT} |
| 768 | ... volt-add-subscriber-access ${of_id} ${onu_port} |
| 769 | # Verify that no pending flows exist for the ONU port |
| 770 | ... AND Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
| 771 | ... Verify No Pending Flows For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port} |
| 772 | # Verify subscriber access flows are added for the ONU port |
| 773 | ... AND Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 774 | ... Verify Subscriber Access Flows Added For ONU ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id} |
| 775 | ... ${onu_port} ${nni_port} ${src['c_tag']} ${src['s_tag']} |
| 776 | ... AND Run Keyword If ${has_dataplane} |
| 777 | ... Run Keyword And Continue On Failure Validate DHCP and Ping True |
| 778 | ... True ${src['dp_iface_name']} ${src['s_tag']} ${src['c_tag']} ${dst['dp_iface_ip_qinq']} |
| 779 | ... ${src['ip']} ${src['user']} ${src['pass']} |
| 780 | ... ${src['container_type']} ${src['container_name']} |
| 781 | ... ${dst['dp_iface_name']} ${dst['ip']} ${dst['user']} ${dst['pass']} |
| 782 | ... ${dst['container_type']} ${dst['container_name']} |
| 783 | ... AND Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
| 784 | ... Validate Subscriber DHCP Allocation ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${onu_port} |
| 785 | ... AND Run Keyword and Ignore Error Get Device Output from Voltha ${onu_device_id} |
| 786 | ... ELSE |
| 787 | ... Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure |
| 788 | ... Wait Until Keyword Succeeds 60s 2s |
| 789 | ... Check Ping True ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']} |
| 790 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} |
| 791 | ... ${src['container_name']} |
| 792 | Run Keyword and Ignore Error Collect Logs |
| 793 | END |
| 794 | |
| 795 | Validate ONUs for PON OLT Disable DT |
| 796 | [Arguments] ${olt_peer_list} |
| 797 | [Documentation] This keyword validates that Ping fails for ONUs connected to Disabled OLT PON port |
| 798 | ... And Pings succeed for other Active OLT PON port ONUs |
| 799 | ... Also it removes subscriber and deletes ONUs for Disabled OLT PON port to replicate DT workflow |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 800 | FOR ${I} IN RANGE 0 ${num_all_onus} |
Hardik Windlass | 16cdf96 | 2020-04-29 15:26:50 +0530 | [diff] [blame] | 801 | ${src}= Set Variable ${hosts.src[${I}]} |
| 802 | ${dst}= Set Variable ${hosts.dst[${I}]} |
| 803 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
| 804 | ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']} |
| 805 | ... ${of_id} |
| 806 | ${matched}= Match ONU in PON OLT Peer List ${olt_peer_list} ${onu_device_id} |
| 807 | Run Keyword If ${matched} |
| 808 | ... Run Keywords |
| 809 | ... Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 810 | ... Validate Device ENABLED DISCOVERED |
| 811 | ... UNREACHABLE ${src['onu']} onu=True onu_reason=stopping-openomci |
| 812 | ... AND Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2s |
| 813 | ... Verify ONU Port Is Disabled ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${src['onu']} |
| 814 | ... AND Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure |
| 815 | ... Wait Until Keyword Succeeds 60s 2s |
| 816 | ... Check Ping False ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']} |
| 817 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} |
| 818 | ... ${src['container_name']} |
| 819 | # Remove Subscriber Access (To replicate DT workflow) |
| 820 | ... AND Wait Until Keyword Succeeds ${timeout} 2s Execute ONOS CLI Command ${ONOS_SSH_IP} |
| 821 | ... ${ONOS_SSH_PORT} volt-remove-subscriber-access ${of_id} ${onu_port} |
| 822 | ... AND Sleep 10s |
| 823 | # Delete ONU Device (To replicate DT workflow) |
| 824 | ... AND Delete Device ${onu_device_id} |
| 825 | ... AND Sleep 5s |
| 826 | ... ELSE |
| 827 | ... Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure |
| 828 | ... Wait Until Keyword Succeeds 60s 2s |
| 829 | ... Check Ping True ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']} |
| 830 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} |
| 831 | ... ${src['container_name']} |
| 832 | Run Keyword and Ignore Error Collect Logs |
| 833 | END |
| 834 | |
| 835 | Validate ONUs for PON OLT Enable DT |
| 836 | [Arguments] ${olt_peer_list} |
| 837 | [Documentation] This keyword validates Ping succeeds for all Enabled/Acitve OLT PON ports |
| 838 | ... Also performs subscriberAdd/DHCP/Ping for the ONUs on Re-Enabled OLT PON port |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 839 | FOR ${I} IN RANGE 0 ${num_all_onus} |
Hardik Windlass | 16cdf96 | 2020-04-29 15:26:50 +0530 | [diff] [blame] | 840 | ${src}= Set Variable ${hosts.src[${I}]} |
| 841 | ${dst}= Set Variable ${hosts.dst[${I}]} |
| 842 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
| 843 | ${onu_port}= Wait Until Keyword Succeeds ${timeout} 2s Get ONU Port in ONOS ${src['onu']} |
| 844 | ... ${of_id} |
| 845 | ${matched}= Match ONU in PON OLT Peer List ${olt_peer_list} ${onu_device_id} |
| 846 | Run Keyword If ${matched} |
| 847 | ... Run Keywords |
| 848 | # Perform Cleanup |
| 849 | ... Run Keyword If ${has_dataplane} Clean Up Linux ${onu_device_id} |
| 850 | # Verify ONU port status |
| 851 | ... AND Run Keyword And Continue On Failure Wait Until Keyword Succeeds 120s 2s |
| 852 | ... Verify ONU Port Is Enabled ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${src['onu']} |
| 853 | ... AND Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 2 |
| 854 | ... Execute ONOS CLI Command ${ONOS_SSH_IP} ${ONOS_SSH_PORT} |
| 855 | ... volt-add-subscriber-access ${of_id} ${onu_port} |
| 856 | # Verify ONU state in voltha |
| 857 | ... AND Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 858 | ... Validate Device ENABLED ACTIVE REACHABLE |
| 859 | ... ${src['onu']} onu=True onu_reason=omci-flows-pushed |
| 860 | # Verify subscriber access flows are added for the ONU port |
| 861 | ... AND Run Keyword And Continue On Failure Wait Until Keyword Succeeds ${timeout} 5s |
| 862 | ... Verify Subscriber Access Flows Added For ONU DT ${ONOS_SSH_IP} ${ONOS_SSH_PORT} ${of_id} |
| 863 | ... ${onu_port} ${nni_port} ${src['s_tag']} |
| 864 | ... AND Run Keyword If ${has_dataplane} |
| 865 | ... Run Keyword And Continue On Failure Validate DHCP and Ping True |
| 866 | ... True ${src['dp_iface_name']} ${src['s_tag']} ${src['c_tag']} ${dst['dp_iface_ip_qinq']} |
| 867 | ... ${src['ip']} ${src['user']} ${src['pass']} |
| 868 | ... ${src['container_type']} ${src['container_name']} |
| 869 | ... ${dst['dp_iface_name']} ${dst['ip']} ${dst['user']} ${dst['pass']} |
| 870 | ... ${dst['container_type']} ${dst['container_name']} |
| 871 | ... ELSE |
| 872 | ... Run Keyword If ${has_dataplane} Run Keyword And Continue On Failure |
| 873 | ... Wait Until Keyword Succeeds 60s 2s |
| 874 | ... Check Ping True ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']} |
| 875 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} |
| 876 | ... ${src['container_name']} |
| 877 | Run Keyword and Ignore Error Collect Logs |
| 878 | END |
| 879 | |
| 880 | Match ONU in PON OLT Peer List |
| 881 | [Arguments] ${olt_peer_list} ${onu_device_id} |
| 882 | [Documentation] This keyword matches if ONU device is present in OLT PON port peer list |
| 883 | ${matched}= Set Variable False |
| 884 | FOR ${olt_peer} IN @{olt_peer_list} |
| 885 | ${matched}= Set Variable If '${onu_device_id}' == '${olt_peer}' True False |
| 886 | Exit For Loop If ${matched} |
| 887 | END |
| 888 | [Return] ${matched} |
| 889 | |
Gayathri.Selvan | b6a2b54 | 2020-01-24 07:24:23 +0000 | [diff] [blame] | 890 | Collect Logs |
| 891 | [Documentation] Collect Logs from voltha and onos cli for various commands |
| 892 | Run Keyword and Ignore Error Get Device List from Voltha |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 893 | FOR ${I} IN RANGE 0 ${num_olts} |
| 894 | Run Keyword and Ignore Error Get Logical Device Output from Voltha ${logical_id} |
| 895 | Run Keyword and Ignore Error Get Device Output from Voltha ${olt_ids}[${I}][device_id] |
| 896 | Run Keyword and Ignore Error Get Logical Device Output from Voltha ${olt_ids}[${I}][logical_id] |
| 897 | END |
| 898 | #Run Keyword and Ignore Error Get Device Output from Voltha ${olt_device_id} |
| 899 | #Run Keyword and Ignore Error Get Logical Device Output from Voltha ${logical_id} |
ubuntu | 6b6e7d4 | 2020-03-02 12:35:42 -0800 | [diff] [blame] | 900 | Get ONOS Status ${ONOS_SSH_IP} ${ONOS_SSH_PORT} |
Gayathri.Selvan | f68ea4b | 2020-02-03 07:36:39 +0000 | [diff] [blame] | 901 | |
| 902 | Verify ping is succesful except for given device |
| 903 | [Arguments] ${num_onus} ${exceptional_onu_id} |
| 904 | [Documentation] Checks that ping for all the devices are successful except the given ONU. |
| 905 | ${pingStatus} Set Variable True |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 906 | FOR ${I} IN RANGE 0 ${num_all_onus} |
Gayathri.Selvan | f68ea4b | 2020-02-03 07:36:39 +0000 | [diff] [blame] | 907 | ${src}= Set Variable ${hosts.src[${I}]} |
| 908 | ${dst}= Set Variable ${hosts.dst[${I}]} |
| 909 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
| 910 | ${pingStatus} Run Keyword If '${onu_device_id}' == '${exceptional_onu_id}' Set Variable False |
| 911 | Run Keyword And Continue On Failure Wait Until Keyword Succeeds 60s 2s |
| 912 | ... Check Ping ${pingStatus} ${dst['dp_iface_ip_qinq']} ${src['dp_iface_name']} |
| 913 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 914 | END |
Andy Bavier | 4a8450e | 2020-02-04 08:58:37 -0700 | [diff] [blame] | 915 | |
Andy Bavier | 1923ecc | 2020-06-18 14:06:40 -0700 | [diff] [blame] | 916 | Echo Message to OLT Logs |
| 917 | [Arguments] ${message} |
| 918 | [Documentation] Echoes ${message} into the OLT logs |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 919 | FOR ${I} IN RANGE 0 ${num_olts} |
| 920 | ${olt_user} Evaluate ${olts}[${I}].get("user") |
| 921 | ${olt_pass} Evaluate ${olts}[${I}].get("pass") |
| 922 | ${olt_ssh_ip} Evaluate ${olts}[${I}].get("sship") |
| 923 | Wait Until Keyword Succeeds 180s 10s Execute Remote Command |
| 924 | ... printf '%s\n' '' '' '${message}' '' >> /var/log/openolt.log |
| 925 | ... ${olt_ssh_ip} ${olt_user} ${olt_pass} |
| 926 | Wait Until Keyword Succeeds 180s 10s Execute Remote Command |
| 927 | ... printf '%s\n' '' '' '${message}' '' >> /var/log/dev_mgmt_daemon.log |
| 928 | ... ${olt_ssh_ip} ${olt_user} ${olt_pass} |
| 929 | Wait Until Keyword Succeeds 180s 10s Execute Remote Command |
| 930 | ... printf '%s\n' '' '' '${message}' '' >> /var/log/openolt_process_watchdog.log |
| 931 | ... ${olt_ssh_ip} ${olt_user} ${olt_pass} |
| 932 | END |
Andy Bavier | 1923ecc | 2020-06-18 14:06:40 -0700 | [diff] [blame] | 933 | |
Andy Bavier | abeba26 | 2020-02-07 16:22:16 -0700 | [diff] [blame] | 934 | Start Logging |
| 935 | [Arguments] ${label} |
| 936 | [Documentation] Start logging for test ${label} |
| 937 | ${kail_process}= Run Keyword If "${container_log_dir}" != "${None}" Start Process kail -n default |
| 938 | ... -n voltha cwd=${container_log_dir} stdout=${label}-combined.log |
| 939 | Set Test Variable ${kail_process} |
Andy Bavier | 1923ecc | 2020-06-18 14:06:40 -0700 | [diff] [blame] | 940 | Run Keyword If ${has_dataplane} Echo Message to OLT Logs START ${label} |
Andy Bavier | abeba26 | 2020-02-07 16:22:16 -0700 | [diff] [blame] | 941 | |
| 942 | Stop Logging |
| 943 | [Arguments] ${label} |
| 944 | [Documentation] End logging for test; remove logfile if test passed |
| 945 | Run sync |
| 946 | Run Keyword If ${kail_process} Terminate Process ${kail_process} |
| 947 | ${test_logfile}= Run Keyword If "${container_log_dir}" != "${None}" |
| 948 | ... Join Path ${container_log_dir} ${label}-combined.log |
| 949 | Run Keyword If Test Passed Run Keyword If "${test_logfile}" != "${None}" Remove File ${test_logfile} |
Andy Bavier | 1923ecc | 2020-06-18 14:06:40 -0700 | [diff] [blame] | 950 | Run Keyword If ${has_dataplane} Echo Message to OLT Logs END ${label} |
Andy Bavier | abeba26 | 2020-02-07 16:22:16 -0700 | [diff] [blame] | 951 | |
Suchitra Vemuri | a5fa3dd | 2020-02-04 14:38:49 -0800 | [diff] [blame] | 952 | Clean Up Linux |
| 953 | [Documentation] Kill processes and clean up interfaces on src+dst servers |
Hardik Windlass | 16cdf96 | 2020-04-29 15:26:50 +0530 | [diff] [blame] | 954 | [Arguments] ${onu_id}=${EMPTY} |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 955 | FOR ${I} IN RANGE 0 ${num_all_onus} |
Suchitra Vemuri | a5fa3dd | 2020-02-04 14:38:49 -0800 | [diff] [blame] | 956 | ${src}= Set Variable ${hosts.src[${I}]} |
| 957 | ${dst}= Set Variable ${hosts.dst[${I}]} |
Hardik Windlass | 16cdf96 | 2020-04-29 15:26:50 +0530 | [diff] [blame] | 958 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
| 959 | Continue For Loop If '${onu_id}' != '${EMPTY}' and '${onu_id}' != '${onu_device_id}' |
Andy Bavier | 84b8328 | 2020-06-30 05:47:49 -0700 | [diff] [blame] | 960 | Execute Remote Command sudo pkill wpa_supplicant ${src['ip']} |
Suchitra Vemuri | a5fa3dd | 2020-02-04 14:38:49 -0800 | [diff] [blame] | 961 | ... ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
Andy Bavier | 84b8328 | 2020-06-30 05:47:49 -0700 | [diff] [blame] | 962 | Execute Remote Command sudo pkill dhclient ${src['ip']} |
Suchitra Vemuri | a5fa3dd | 2020-02-04 14:38:49 -0800 | [diff] [blame] | 963 | ... ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
Andy Bavier | eff938d | 2020-06-29 18:27:49 -0700 | [diff] [blame] | 964 | Execute Remote Command sudo pkill mausezahn ${src['ip']} |
| 965 | ... ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 966 | Run Keyword If '${dst['ip']}' != '${None}' Execute Remote Command pkill dhcpd |
| 967 | ... ${dst['ip']} ${dst['user']} ${dst['pass']} ${dst['container_type']} ${dst['container_name']} |
Suchitra Vemuri | a5fa3dd | 2020-02-04 14:38:49 -0800 | [diff] [blame] | 968 | Delete IP Addresses from Interface on Remote Host ${src['dp_iface_name']} ${src['ip']} |
| 969 | ... ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 970 | Run Keyword If '${dst['ip']}' != '${None}' Delete Interface on Remote Host |
| 971 | ... ${dst['dp_iface_name']}.${src['s_tag']} ${dst['ip']} ${dst['user']} ${dst['pass']} |
| 972 | ... ${dst['container_type']} ${dst['container_name']} |
Andy Bavier | 84b8328 | 2020-06-30 05:47:49 -0700 | [diff] [blame] | 973 | ${bng_ip}= Get Variable Value ${dst['noroot_ip']} |
| 974 | ${bng_user}= Get Variable Value ${dst['noroot_user']} |
| 975 | ${bng_pass}= Get Variable Value ${dst['noroot_pass']} |
Andy Bavier | f4b7d1d | 2020-06-30 11:14:04 -0700 | [diff] [blame] | 976 | Run Keyword If "${bng_ip}" != "${NONE}" and "${bng_user}" != "${NONE}" and "${bng_pass}" != "${NONE}" |
| 977 | ... Execute Remote Command sudo pkill mausezahn ${bng_ip} ${bng_user} ${bng_pass} |
Andy Bavier | eff938d | 2020-06-29 18:27:49 -0700 | [diff] [blame] | 978 | ... ${dst['container_type']} ${dst['container_name']} |
Suchitra Vemuri | a5fa3dd | 2020-02-04 14:38:49 -0800 | [diff] [blame] | 979 | END |
Scott Baker | 60e570d | 2020-02-02 22:10:13 -0800 | [diff] [blame] | 980 | |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 981 | Clean Up Linux Per OLT |
| 982 | [Documentation] Kill processes and clean up interfaces on src+dst servers |
| 983 | [Arguments] ${olt_serial_number} |
| 984 | FOR ${I} IN RANGE 0 ${num_all_onus} |
| 985 | ${src}= Set Variable ${hosts.src[${I}]} |
| 986 | ${dst}= Set Variable ${hosts.dst[${I}]} |
| 987 | ${onu_device_id}= Get Device ID From SN ${src['onu']} |
| 988 | ${sn}= Get Device ID From SN ${src['olt']} |
| 989 | #Continue For Loop If '${onu_id}' != '${EMPTY}' and '${onu_id}' != '${onu_device_id}' |
| 990 | Continue For Loop If '${olt_serial_number}' == '${sn}' |
| 991 | Execute Remote Command sudo pkill wpa_supplicant ${src['ip']} |
| 992 | ... ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 993 | Execute Remote Command sudo pkill dhclient ${src['ip']} |
| 994 | ... ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 995 | Execute Remote Command sudo pkill mausezahn ${src['ip']} |
| 996 | ... ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 997 | Run Keyword If '${dst['ip']}' != '${None}' Execute Remote Command pkill dhcpd |
| 998 | ... ${dst['ip']} ${dst['user']} ${dst['pass']} ${dst['container_type']} ${dst['container_name']} |
| 999 | Delete IP Addresses from Interface on Remote Host ${src['dp_iface_name']} ${src['ip']} |
| 1000 | ... ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 1001 | Run Keyword If '${dst['ip']}' != '${None}' Delete Interface on Remote Host |
| 1002 | ... ${dst['dp_iface_name']}.${src['s_tag']} ${dst['ip']} ${dst['user']} ${dst['pass']} |
| 1003 | ... ${dst['container_type']} ${dst['container_name']} |
| 1004 | ${bng_ip}= Get Variable Value ${dst['noroot_ip']} |
| 1005 | ${bng_user}= Get Variable Value ${dst['noroot_user']} |
| 1006 | ${bng_pass}= Get Variable Value ${dst['noroot_pass']} |
| 1007 | Run Keyword If "${bng_ip}" != "${NONE}" and "${bng_user}" != "${NONE}" and "${bng_pass}" != "${NONE}" |
| 1008 | ... Execute Remote Command sudo pkill mausezahn ${bng_ip} ${bng_user} ${bng_pass} |
| 1009 | ... ${dst['container_type']} ${dst['container_name']} |
| 1010 | END |
| 1011 | |
Suchitra Vemuri | 8d3b003 | 2020-09-11 17:49:08 -0700 | [diff] [blame] | 1012 | Clean dhclient |
| 1013 | [Documentation] Kills dhclient processes only for all RGs |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 1014 | FOR ${I} IN RANGE 0 ${num_all_nus} |
Suchitra Vemuri | 8d3b003 | 2020-09-11 17:49:08 -0700 | [diff] [blame] | 1015 | ${src}= Set Variable ${hosts.src[${I}]} |
| 1016 | ${dst}= Set Variable ${hosts.dst[${I}]} |
| 1017 | Execute Remote Command sudo pkill dhclient ${src['ip']} |
| 1018 | ... ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 1019 | END |
| 1020 | |
Suchitra Vemuri | f7a033c | 2020-02-26 17:22:41 -0800 | [diff] [blame] | 1021 | Clean WPA Process |
| 1022 | [Documentation] Kills wpa_supplicant processes only for all RGs |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 1023 | FOR ${I} IN RANGE 0 ${num_all_onus} |
Suchitra Vemuri | f7a033c | 2020-02-26 17:22:41 -0800 | [diff] [blame] | 1024 | ${src}= Set Variable ${hosts.src[${I}]} |
| 1025 | ${dst}= Set Variable ${hosts.dst[${I}]} |
| 1026 | Run Keyword And Ignore Error Kill Linux Process [w]pa_supplicant ${src['ip']} |
| 1027 | ... ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 1028 | END |
| 1029 | |
Scott Baker | 60e570d | 2020-02-02 22:10:13 -0800 | [diff] [blame] | 1030 | Should Be Larger Than |
| 1031 | [Documentation] Verify that value_1 is > value_2 |
| 1032 | [Arguments] ${value_1} ${value_2} |
| 1033 | Run Keyword If ${value_1} <= ${value_2} |
| 1034 | ... Fail The value ${value_1} is not larger than ${value_2} |
| 1035 | |
Scott Baker | ee67555 | 2020-02-11 10:43:34 -0800 | [diff] [blame] | 1036 | Should Be Larger Than Or Equal To |
| 1037 | [Documentation] Verify that value_1 is >= value_2 |
| 1038 | [Arguments] ${value_1} ${value_2} |
| 1039 | Run Keyword If ${value_1} < ${value_2} |
| 1040 | ... Fail The value ${value_1} is not larger than or equal to ${value_2} |
| 1041 | |
Scott Baker | 60e570d | 2020-02-02 22:10:13 -0800 | [diff] [blame] | 1042 | Should Be Float |
| 1043 | [Documentation] Verify that value is a floating point number type |
| 1044 | [Arguments] ${value} |
| 1045 | ${type} Evaluate type(${value}).__name__ |
| 1046 | Should Be Equal ${type} float |
| 1047 | |
Scott Baker | ee67555 | 2020-02-11 10:43:34 -0800 | [diff] [blame] | 1048 | Should Be Newer Than Or Equal To |
| 1049 | [Documentation] Compare two RFC3339 dates |
| 1050 | [Arguments] ${value_1} ${value_2} |
| 1051 | ${unix_v1} Parse RFC3339 ${value_1} |
| 1052 | ${unix_v2} Parse RFC3339 ${value_2} |
| 1053 | Run Keyword If ${unix_v1} < ${unix_v2} |
| 1054 | ... Fail The value ${value_1} is not newer than or equal to ${value_2} |
| 1055 | |
Scott Baker | 60e570d | 2020-02-02 22:10:13 -0800 | [diff] [blame] | 1056 | Get Current Time |
| 1057 | [Documentation] Return the current time in RFC3339 format |
| 1058 | ${output}= Run date -u +"%FT%T%:z" |
| 1059 | [return] ${output} |
Scott Baker | ee67555 | 2020-02-11 10:43:34 -0800 | [diff] [blame] | 1060 | |
| 1061 | Parse RFC3339 |
| 1062 | [Documentation] Parse an RFC3339 timestamp |
| 1063 | [Arguments] ${dateStr} |
| 1064 | ${rc} ${output}= Run and Return Rc and Output date --date="${dateStr}" "+%s" |
| 1065 | Should Be Equal As Numbers ${rc} 0 |
| 1066 | [return] ${output} |
Matteo Scandolo | 142e627 | 2020-04-29 17:36:59 -0700 | [diff] [blame] | 1067 | |
Gayathri.Selvan | 92d1686 | 2020-03-19 14:47:58 +0000 | [diff] [blame] | 1068 | Get Bandwidth Profile Name For Given Subscriber |
| 1069 | [Arguments] ${subscriber_id} ${stream_type}=upstreamBandwidthProfile |
| 1070 | [Documentation] Keyword to get the bandwidth details of the given subscriber |
| 1071 | ${bandwidth_profile_output}= Execute ONOS CLI Command ${ONOS_SSH_IP} ${ONOS_SSH_PORT} |
| 1072 | ... volt-programmed-subscribers | grep ${subscriber_id} |
| 1073 | @{bandwidth_profile_array}= Split String ${bandwidth_profile_output} , |
| 1074 | Log ${bandwidth_profile_array} |
| 1075 | FOR ${value} IN @{bandwidth_profile_array} |
| 1076 | @{row_value}= Split String ${value} = |
| 1077 | ${bandwidth_profile_name}= Set Variable If '${row_value[0]}' == ' ${stream_type}' |
| 1078 | ... ${row_value[1]} |
| 1079 | ${bandwidth_profile_name}= Convert To String ${bandwidth_profile_name} |
| 1080 | Run Keyword If "${bandwidth_profile_name}" != "None" Exit For Loop |
| 1081 | END |
| 1082 | Log ${bandwidth_profile_name} |
| 1083 | [Return] ${bandwidth_profile_name} |
| 1084 | |
| 1085 | Execute Remote Command |
| 1086 | [Documentation] SSH into a remote host and execute a command on the bare host or in a container. |
| 1087 | ... This replaces and simplifies the Login And Run Command On Remote System keyword in CORDRobot. |
| 1088 | [Arguments] ${cmd} ${ip} ${user} ${pass}=${None} |
Andy Bavier | eff938d | 2020-06-29 18:27:49 -0700 | [diff] [blame] | 1089 | ... ${container_type}=${None} ${container_name}=${None} ${timeout}=${None} |
Gayathri.Selvan | 92d1686 | 2020-03-19 14:47:58 +0000 | [diff] [blame] | 1090 | ${conn_id}= SSHLibrary.Open Connection ${ip} |
| 1091 | Run Keyword If '${pass}' != '${None}' |
| 1092 | ... SSHLibrary.Login ${user} ${pass} |
| 1093 | ... ELSE |
| 1094 | ... SSHLibrary.Login With Public Key ${user} %{HOME}/.ssh/id_rsa |
| 1095 | ${namespace}= Run Keyword If '${container_type}' == 'K8S' SSHLibrary.Execute Command |
| 1096 | ... kubectl get pods --all-namespaces | grep ${container_name} | awk '{print $1}' |
Andy Bavier | f6ab19c | 2020-05-14 10:34:47 -0700 | [diff] [blame] | 1097 | ${stdout} ${stderr} ${rc}= Run Keyword If '${container_type}' == 'LXC' |
| 1098 | ... SSHLibrary.Execute Command lxc exec ${container_name} -- ${cmd} |
Andy Bavier | eff938d | 2020-06-29 18:27:49 -0700 | [diff] [blame] | 1099 | ... return_stderr=True return_rc=True timeout=${timeout} |
Gayathri.Selvan | 92d1686 | 2020-03-19 14:47:58 +0000 | [diff] [blame] | 1100 | ... ELSE IF '${container_type}' == 'K8S' |
Andy Bavier | f6ab19c | 2020-05-14 10:34:47 -0700 | [diff] [blame] | 1101 | ... SSHLibrary.Execute Command kubectl -n ${namespace} exec ${container_name} -- ${cmd} |
Andy Bavier | eff938d | 2020-06-29 18:27:49 -0700 | [diff] [blame] | 1102 | ... return_stderr=True return_rc=True timeout=${timeout} |
Gayathri.Selvan | 92d1686 | 2020-03-19 14:47:58 +0000 | [diff] [blame] | 1103 | ... ELSE |
Andy Bavier | eff938d | 2020-06-29 18:27:49 -0700 | [diff] [blame] | 1104 | ... SSHLibrary.Execute Command ${cmd} return_stderr=True return_rc=True timeout=${timeout} |
Andy Bavier | f6ab19c | 2020-05-14 10:34:47 -0700 | [diff] [blame] | 1105 | |
| 1106 | Log ${stdout} |
| 1107 | Log ${stderr} |
| 1108 | Log ${rc} |
Gayathri.Selvan | 92d1686 | 2020-03-19 14:47:58 +0000 | [diff] [blame] | 1109 | SSHLibrary.Close Connection |
Andy Bavier | f6ab19c | 2020-05-14 10:34:47 -0700 | [diff] [blame] | 1110 | [Return] ${stdout} ${stderr} ${rc} |
Gayathri.Selvan | 92d1686 | 2020-03-19 14:47:58 +0000 | [diff] [blame] | 1111 | |
Suraj Gour | 3365127 | 2020-05-04 10:10:16 +0530 | [diff] [blame] | 1112 | Start Remote Command |
| 1113 | [Documentation] SSH into a remote host and execute a command on the bare host or in a container. |
| 1114 | ... This replaces and simplifies the Login And Run Command On Remote System keyword in CORDRobot. |
| 1115 | [Arguments] ${cmd} ${ip} ${user} ${pass}=${None} |
| 1116 | ... ${container_type}=${None} ${container_name}=${None} |
| 1117 | ${conn_id}= SSHLibrary.Open Connection ${ip} |
| 1118 | Run Keyword If '${pass}' != '${None}' |
| 1119 | ... SSHLibrary.Login ${user} ${pass} |
| 1120 | ... ELSE |
| 1121 | ... SSHLibrary.Login With Public Key ${user} %{HOME}/.ssh/id_rsa |
| 1122 | ${namespace}= Run Keyword If '${container_type}' == 'K8S' SSHLibrary.Execute Command |
| 1123 | ... kubectl get pods --all-namespaces | grep ${container_name} | awk '{print $1}' |
| 1124 | Run Keyword If '${container_type}' == 'LXC' |
| 1125 | ... SSHLibrary.Start Command lxc exec ${container_name} -- ${cmd} |
| 1126 | ... ELSE IF '${container_type}' == 'K8S' |
| 1127 | ... SSHLibrary.Start Command kubectl -n ${namespace} exec ${container_name} -- ${cmd} |
| 1128 | ... ELSE |
| 1129 | ... SSHLibrary.Start Command ${cmd} |
Andy Bavier | 9fb2323 | 2020-06-30 15:12:20 -0700 | [diff] [blame] | 1130 | # It seems that closing the connection immediately will sometimes kill the command |
| 1131 | Sleep 1s |
Suraj Gour | 3365127 | 2020-05-04 10:10:16 +0530 | [diff] [blame] | 1132 | SSHLibrary.Close Connection |
| 1133 | |
Gayathri.Selvan | 92d1686 | 2020-03-19 14:47:58 +0000 | [diff] [blame] | 1134 | Run Iperf3 Test Client |
| 1135 | [Arguments] ${src} ${server} ${args} |
| 1136 | [Documentation] Login to ${src} and run the iperf3 client against ${server} using ${args}. |
| 1137 | ... Return a Dictionary containing the results of the test. |
Andy Bavier | f6ab19c | 2020-05-14 10:34:47 -0700 | [diff] [blame] | 1138 | ${output} ${stderr} ${rc}= Execute Remote Command iperf3 -J -c ${server} ${args} | jq -M -c '.' |
Gayathri.Selvan | 92d1686 | 2020-03-19 14:47:58 +0000 | [diff] [blame] | 1139 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
Andy Bavier | f6ab19c | 2020-05-14 10:34:47 -0700 | [diff] [blame] | 1140 | Should Be Equal As Integers ${rc} 0 |
Gayathri.Selvan | 92d1686 | 2020-03-19 14:47:58 +0000 | [diff] [blame] | 1141 | ${object}= Evaluate json.loads(r'''${output}''') json |
| 1142 | [Return] ${object} |
Hung-Wei Chiu | e0bec7c | 2020-05-29 22:16:56 +0000 | [diff] [blame] | 1143 | |
Suchitra Vemuri | 85cb7d6 | 2020-07-16 23:46:16 -0700 | [diff] [blame] | 1144 | Run Iperf Test Client for MCAST |
| 1145 | [Arguments] ${src} ${server} ${args} |
| 1146 | [Documentation] Login to ${src} and run the iperf client against ${server} using ${args}. |
| 1147 | ... Return a Dictionary containing the results of the test. |
| 1148 | ${output} ${stderr} ${rc}= Execute Remote Command sudo iperf -c ${server} ${args} | jq -M -c '.' |
| 1149 | ... ${src['ip']} ${src['user']} ${src['pass']} ${src['container_type']} ${src['container_name']} |
| 1150 | Should Be Equal As Integers ${rc} 0 |
| 1151 | ${object}= Evaluate json.loads(r'''${output}''') json |
| 1152 | [Return] ${object} |
| 1153 | |
Hung-Wei Chiu | e0bec7c | 2020-05-29 22:16:56 +0000 | [diff] [blame] | 1154 | RestoreONUs |
| 1155 | [Documentation] Restore all connected ONUs |
Suchitra Vemuri | a6879aa | 2020-11-03 11:03:11 -0800 | [diff] [blame] | 1156 | [Arguments] ${num_all_onus} |
| 1157 | FOR ${I} IN RANGE 0 ${num_all_onus} |
Hung-Wei Chiu | e0bec7c | 2020-05-29 22:16:56 +0000 | [diff] [blame] | 1158 | ${src}= Set Variable ${hosts.src[${I}]} |
Hung-Wei Chiu | cc6e655 | 2020-06-04 12:57:38 -0700 | [diff] [blame] | 1159 | ${container_type}= Get Variable Value ${src['container_type']} "null" |
| 1160 | ${container_name}= Get Variable Value ${src['container_name']} "null" |
Hung-Wei Chiu | e0bec7c | 2020-05-29 22:16:56 +0000 | [diff] [blame] | 1161 | ${onu_type}= Get Variable Value ${src['onu_type']} "null" |
Hung-Wei Chiu | cc6e655 | 2020-06-04 12:57:38 -0700 | [diff] [blame] | 1162 | #Get ens6f0 from ens6f0.22 |
| 1163 | ${if_name}= Replace String Using Regexp ${src['dp_iface_name']} \\..* \ |
Hung-Wei Chiu | e0bec7c | 2020-05-29 22:16:56 +0000 | [diff] [blame] | 1164 | Run Keyword IF '${onu_type}' == 'alpha' AlphaONURestoreDefault ${src['ip']} ${src['user']} |
Hung-Wei Chiu | cc6e655 | 2020-06-04 12:57:38 -0700 | [diff] [blame] | 1165 | ... ${src['pass']} ${if_name} admin admin ${container_type} ${container_name} |
Hung-Wei Chiu | e0bec7c | 2020-05-29 22:16:56 +0000 | [diff] [blame] | 1166 | END |
| 1167 | |
| 1168 | AlphaONURestoreDefault |
| 1169 | [Documentation] Restore the Alpha ONU to factory setting |
| 1170 | [Arguments] ${rg_ip} ${rg_user} ${rg_pass} ${onu_ifname} |
Hung-Wei Chiu | cc6e655 | 2020-06-04 12:57:38 -0700 | [diff] [blame] | 1171 | ... ${onu_user} ${onu_pass} ${container_type}=${None} ${container_name}=${None} |
Hung-Wei Chiu | e0bec7c | 2020-05-29 22:16:56 +0000 | [diff] [blame] | 1172 | ${output}= Login And Run Command On Remote System sudo ifconfig ${onu_ifname} 192.168.1.3/24 |
Hung-Wei Chiu | cc6e655 | 2020-06-04 12:57:38 -0700 | [diff] [blame] | 1173 | ... ${rg_ip} ${rg_user} ${rg_pass} ${container_type} ${container_name} |
Hung-Wei Chiu | e0bec7c | 2020-05-29 22:16:56 +0000 | [diff] [blame] | 1174 | ${cmd} Catenate |
| 1175 | ... (echo open "192.168.1.1"; sleep 1; |
| 1176 | ... echo "${onu_user}"; sleep 1; |
| 1177 | ... echo "${onu_pass}"; sleep 1; |
| 1178 | ... echo "restoredefault"; sleep 1) | telnet |
| 1179 | ${output}= Login And Run Command On Remote System ${cmd} |
Hung-Wei Chiu | cc6e655 | 2020-06-04 12:57:38 -0700 | [diff] [blame] | 1180 | ... ${rg_ip} ${rg_user} ${rg_pass} ${container_type} ${container_name} |
Hung-Wei Chiu | e0bec7c | 2020-05-29 22:16:56 +0000 | [diff] [blame] | 1181 | Log To Console ${output} |
| 1182 | ${output}= Login And Run Command On Remote System sudo ifconfig ${onu_ifname} 0 |
Hung-Wei Chiu | cc6e655 | 2020-06-04 12:57:38 -0700 | [diff] [blame] | 1183 | ... ${rg_ip} ${rg_user} ${rg_pass} ${container_type} ${container_name} |
Suraj Gour | 3365127 | 2020-05-04 10:10:16 +0530 | [diff] [blame] | 1184 | |
| 1185 | Create traffic with each pbit and capture at other end |
| 1186 | [Documentation] Generates upstream traffic using Mausezahn tool |
| 1187 | ... with each pbit and validates reception at other end using tcpdump |
| 1188 | [Arguments] ${target_ip} ${target_iface} ${src_iface} |
| 1189 | ... ${packet_count} ${packet_type} ${target_port} ${vlan} ${tcpdump_filter} |
| 1190 | ... ${dst_ip} ${dst_user} ${dst_pass} ${dst_container_type} ${dst_container_name} |
| 1191 | ... ${src_ip} ${src_user} ${src_pass} ${src_container_type} ${src_container_name} |
| 1192 | FOR ${pbit} IN RANGE 8 |
Andy Bavier | eff938d | 2020-06-29 18:27:49 -0700 | [diff] [blame] | 1193 | Execute Remote Command sudo pkill mausezahn |
Suraj Gour | 3365127 | 2020-05-04 10:10:16 +0530 | [diff] [blame] | 1194 | ... ${src_ip} ${src_user} ${src_pass} ${src_container_type} ${src_container_name} |
Andy Bavier | eff938d | 2020-06-29 18:27:49 -0700 | [diff] [blame] | 1195 | ${var1}= Set Variable sudo mausezahn ${src_iface} -B ${target_ip} -c ${packet_count} -d 100m |
Suraj Gour | 3365127 | 2020-05-04 10:10:16 +0530 | [diff] [blame] | 1196 | ${var2}= Set Variable -t ${packet_type} "dp=${target_port}" -p 1472 -Q ${pbit}:${vlan} |
| 1197 | ${cmd}= Set Variable ${var1} ${var2} |
| 1198 | Start Remote Command ${cmd} ${src_ip} ${src_user} ${src_pass} |
| 1199 | ... ${src_container_type} ${src_container_name} |
| 1200 | ${output} ${stderr} ${rc}= Execute Remote Command |
Andy Bavier | eff938d | 2020-06-29 18:27:49 -0700 | [diff] [blame] | 1201 | ... sudo tcpdump -l -U -c 30 -i ${target_iface} -e ${tcpdump_filter} |
Suraj Gour | 3365127 | 2020-05-04 10:10:16 +0530 | [diff] [blame] | 1202 | ... ${dst_ip} ${dst_user} ${dst_pass} ${dst_container_type} ${dst_container_name} |
Andy Bavier | eff938d | 2020-06-29 18:27:49 -0700 | [diff] [blame] | 1203 | ... timeout=30 seconds |
| 1204 | Execute Remote Command sudo pkill mausezahn |
Suraj Gour | 3365127 | 2020-05-04 10:10:16 +0530 | [diff] [blame] | 1205 | ... ${src_ip} ${src_user} ${src_pass} ${src_container_type} ${src_container_name} |
| 1206 | # VOL-3262: I'm seeing untagged downstream traffic at RG for pbit 0. According to Girish this is |
| 1207 | # incorrect behavior. Simplify the following check when VOL-3262 is resolved. |
| 1208 | Run Keyword If ${pbit}==0 and "${tcpdump_filter}"=="udp" |
| 1209 | ... Should Match Regexp ${output} \\.${target_port}: UDP, |
| 1210 | ... ELSE Should Match Regexp ${output} , p ${pbit},.*\\.${target_port}: UDP, |
| 1211 | END |