Suchitra Vemuri | d91ca6a | 2019-03-19 15:23:55 -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. |
| 14 | |
| 15 | *** Settings *** |
| 16 | Documentation Test various end-to-end scenarios with ATT workflow |
| 17 | Suite Setup Setup Suite |
| 18 | Suite Teardown Teardown Suite |
| 19 | Test Setup Setup Test |
| 20 | Test Teardown Teardown Test |
| 21 | Library Collections |
| 22 | Library String |
| 23 | Library OperatingSystem |
| 24 | Library XML |
| 25 | Library RequestsLibrary |
| 26 | Library /home/cord/voltha/tests/atests/common/testCaseUtils.py |
| 27 | Library ../../Framework/utils/utils.py |
| 28 | Resource ../../Framework/utils/utils.robot |
| 29 | Library ../../Framework/restApi.py |
| 30 | Resource ../../Framework/Subscriber.robot |
| 31 | Resource ../../Framework/ATTWorkFlowDriver.robot |
| 32 | Resource ../../Framework/Kubernetes.robot |
| 33 | Resource ../../Framework/ONU.robot |
| 34 | Resource ../../Framework/OLT.robot |
| 35 | Resource ../../Framework/DHCP.robot |
| 36 | Variables ../../Properties/RestApiProperties.py |
| 37 | |
| 38 | *** Variables *** |
| 39 | ${POD_NAME} flex-pod1-olt |
| 40 | ${KUBERNETES_CONFIGS_DIR} ~/pod-configs/kubernetes-configs |
| 41 | ${HELM_CHARTS_DIR} ~/helm-charts |
| 42 | ${WHITELIST_PATHFILE} ${CURDIR}/data/${POD_NAME}/ATTWhiteList.json |
| 43 | ${SUBSCRIBER_PATHFILE} ${CURDIR}/data/${POD_NAME}/ATTSubscriber.json |
| 44 | ${VOLT_DEVICE_PATHFILE} ${CURDIR}/data/${POD_NAME}/RealOLTDevice.json |
| 45 | ${KUBERNETES_CONF} ${KUBERNETES_CONFIGS_DIR}/${POD_NAME}.conf |
| 46 | ${KUBERNETES_YAML} ${KUBERNETES_CONFIGS_DIR}/${POD_NAME}.yml |
| 47 | ${VOLTHA_POD_NUM} 8 |
| 48 | |
| 49 | *** Test Cases *** |
| 50 | ONU in Correct Location |
| 51 | [Documentation] Validates E2E Ping Connectivity and object states for the given scenario: |
| 52 | ... Configure whitelist with correct ONU location |
| 53 | ... Validate successful authentication/DHCP/E2E ping |
| 54 | [Setup] None |
| 55 | [Teardown] None |
| 56 | [Tags] test1 |
| 57 | Wait Until Keyword Succeeds 300s 15s Validate ONU States ACTIVE ENABLED ${onu_device} |
| 58 | Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI ENABLED AWAITING ${onu_device} |
| 59 | Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status awaiting-auth ${onu_device} |
| 60 | Validate Authentication True ${src_iface} wpa_supplicant.conf ${src_ip} ${src_user} ${src_pass} ${src_container_type} ${src_container_name} |
| 61 | Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI ENABLED APPROVED ${onu_device} |
| 62 | Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status enabled ${onu_device} |
| 63 | Validate DHCP and Ping True True ${src_iface} ${s_tag} ${c_tag} ${dst_dp_ip} ${src_ip} ${src_user} ${src_pass} ${src_container_type} ${src_container_name} ${dst_dp_iface} ${dst_ip} ${dst_user} ${dst_pass} ${dst_container_type} ${dst_container_name} |
| 64 | |
| 65 | ONU in Correct Location -> Remove ONU from Whitelist -> Add ONU to Whitelist |
| 66 | [Documentation] Validates E2E Ping Connectivity and object states for the given scenario: |
| 67 | ... Configure whitelist with correct ONU location |
| 68 | ... Validate successful authentication/DHCP/E2E ping |
| 69 | ... Remove ONU from whitelist |
| 70 | ... Validate failed authentication/DHCP/E2E ping |
| 71 | ... Add ONU to whitelist |
| 72 | ... Validate successful authentication/DHCP/E2E ping |
| 73 | [Tags] test2 |
| 74 | [Setup] None |
| 75 | [Teardown] None |
| 76 | Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI ENABLED APPROVED ${onu_device} |
| 77 | Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status enabled ${onu_device} |
| 78 | # Disable ONU |
| 79 | Clean Up Linux |
| 80 | Remove Whitelist |
| 81 | Wait Until Keyword Succeeds 60s 2s Validate ONU States UNKNOWN DISABLED ${onu_device} |
| 82 | Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI DISABLED AWAITING ${onu_device} |
| 83 | Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status awaiting-auth ${onu_device} |
| 84 | Validate Authentication False ${src_iface} wpa_supplicant.conf ${src_ip} ${src_user} ${src_pass} ${src_container_type} ${src_container_name} |
| 85 | Validate DHCP and Ping False False ${src_iface} ${s_tag} ${c_tag} ${dst_dp_ip} ${src_ip} ${src_user} ${src_pass} ${src_container_type} ${src_container_name} ${dst_dp_iface} ${dst_ip} ${dst_user} ${dst_pass} ${dst_container_type} ${dst_container_name} |
| 86 | Clean Up Linux |
| 87 | Create Whitelist |
| 88 | Wait Until Keyword Succeeds 120s 5s Validate ONU States ACTIVE ENABLED ${onu_device} |
| 89 | Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI ENABLED AWAITING ${onu_device} |
| 90 | Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status awaiting-auth ${onu_device} |
| 91 | Validate Authentication True ${src_iface} wpa_supplicant.conf ${src_ip} ${src_user} ${src_pass} ${src_container_type} ${src_container_name} |
| 92 | Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI ENABLED APPROVED ${onu_device} |
| 93 | Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status enabled ${onu_device} |
| 94 | Validate DHCP and Ping True True ${src_iface} ${s_tag} ${c_tag} ${dst_dp_ip} ${src_ip} ${src_user} ${src_pass} ${src_container_type} ${src_container_name} ${dst_dp_iface} ${dst_ip} ${dst_user} ${dst_pass} ${dst_container_type} ${dst_container_name} |
| 95 | |
| 96 | ONU in Correct Location -> ONU in Wrong Location -> ONU in Correct Location |
| 97 | [Documentation] Validates E2E Ping Connectivity and object states for the given scenario: |
| 98 | ... Configure whitelist with correct ONU location |
| 99 | ... Validate successful authentication/DHCP/E2E ping |
| 100 | ... Update whitelist with wrong ONU location |
| 101 | ... Validate failed authentication/DHCP/E2E ping |
| 102 | ... Update whitelist with correct ONU location |
| 103 | ... Validate successful authentication/DHCP/E2E ping |
| 104 | [Tags] test3 |
| 105 | [Setup] None |
| 106 | [Teardown] None |
| 107 | Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI ENABLED APPROVED ${onu_device} |
| 108 | Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status enabled ${onu_device} |
| 109 | Clean Up Linux |
| 110 | Update Whitelist with Wrong Location |
| 111 | Wait Until Keyword Succeeds 60s 2s Validate ONU States UNKNOWN DISABLED ${onu_device} |
| 112 | Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI DISABLED AWAITING ${onu_device} |
| 113 | Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status awaiting-auth ${onu_device} |
| 114 | Validate Authentication False ${src_iface} wpa_supplicant.conf ${src_ip} ${src_user} ${src_pass} ${src_container_type} ${src_container_name} |
| 115 | Validate DHCP and Ping False False ${src_iface} ${s_tag} ${c_tag} ${dst_dp_ip} ${src_ip} ${src_user} ${src_pass} ${src_container_type} ${src_container_name} ${dst_dp_iface} ${dst_ip} ${dst_user} ${dst_pass} ${dst_container_type} ${dst_container_name} |
| 116 | Clean Up Linux |
| 117 | Update Whitelist with Correct Location |
| 118 | Wait Until Keyword Succeeds 120s 5s Validate ONU States ACTIVE ENABLED ${onu_device} |
| 119 | Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI ENABLED AWAITING ${onu_device} |
| 120 | Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status awaiting-auth ${onu_device} |
| 121 | Validate Authentication True ${src_iface} wpa_supplicant.conf ${src_ip} ${src_user} ${src_pass} ${src_container_type} ${src_container_name} |
| 122 | Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI ENABLED APPROVED ${onu_device} |
| 123 | Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status enabled ${onu_device} |
| 124 | Validate DHCP and Ping True True ${src_iface} ${s_tag} ${c_tag} ${dst_dp_ip} ${src_ip} ${src_user} ${src_pass} ${src_container_type} ${src_container_name} ${dst_dp_iface} ${dst_ip} ${dst_user} ${dst_pass} ${dst_container_type} ${dst_container_name} |
| 125 | |
| 126 | ONU in Correct Location -> Remove Subscriber -> Create Subscriber |
| 127 | [Documentation] Validates E2E Ping Connectivity and object states for the given scenario: |
| 128 | ... Configure whitelist with correct ONU location |
| 129 | ... Validate successful authentication/DHCP/E2E ping |
| 130 | ... Remove subscriber model |
| 131 | ... Validate successful authentication (expected with the ONF pod setup) but failed DHCP/E2E ping |
| 132 | ... Recreate subscriber model |
| 133 | ... Validate successful authentication/DHCP/E2E ping |
| 134 | [Tags] test4 |
| 135 | [Setup] None |
| 136 | [Teardown] None |
| 137 | Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI ENABLED APPROVED ${onu_device} |
| 138 | Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status enabled ${onu_device} |
| 139 | Clean Up Linux |
| 140 | Remove Subscriber |
| 141 | Sleep 10s |
| 142 | Validate Authentication True ${src_iface} wpa_supplicant.conf ${src_ip} ${src_user} ${src_pass} ${src_container_type} ${src_container_name} |
| 143 | Validate DHCP and Ping False False ${src_iface} ${s_tag} ${c_tag} ${dst_dp_ip} ${src_ip} ${src_user} ${src_pass} ${src_container_type} ${src_container_name} ${dst_dp_iface} ${dst_ip} ${dst_user} ${dst_pass} ${dst_container_type} ${dst_container_name} |
| 144 | Clean Up Linux |
| 145 | Create Subscriber |
| 146 | Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status pre-provisioned ${onu_device} |
| 147 | Validate Authentication True ${src_iface} wpa_supplicant.conf ${src_ip} ${src_user} ${src_pass} ${src_container_type} ${src_container_name} |
| 148 | Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI ENABLED APPROVED ${onu_device} |
| 149 | Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status enabled ${onu_device} |
| 150 | Validate DHCP and Ping True True ${src_iface} ${s_tag} ${c_tag} ${dst_dp_ip} ${src_ip} ${src_user} ${src_pass} ${src_container_type} ${src_container_name} ${dst_dp_iface} ${dst_ip} ${dst_user} ${dst_pass} ${dst_container_type} ${dst_container_name} |
| 151 | |
| 152 | |
| 153 | ONU in Correct Location (Skip Subscriber Provisioning) -> Provision Subscriber |
| 154 | [Documentation] Validates E2E Ping Connectivity and object states for the given scenario: |
| 155 | ... Configure whitelist with correct ONU location and skip provisioning subscriber |
| 156 | ... Validate successful authentication (expected with the ONF pod setup) but failed DHCP/E2E ping |
| 157 | ... Provision subscriber |
| 158 | ... Validate successful authentication/DHCP/E2E ping |
| 159 | [Setup] None |
| 160 | [Tags] test5 |
| 161 | Create Whitelist |
| 162 | Create VOLT |
| 163 | Wait Until Keyword Succeeds 300s 15s Validate ONU States ACTIVE ENABLED ${onu_device} |
| 164 | Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI ENABLED AWAITING ${onu_device} |
| 165 | Validate Authentication True ${src_iface} wpa_supplicant.conf ${src_ip} ${src_user} ${src_pass} ${src_container_type} ${src_container_name} |
| 166 | Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI ENABLED APPROVED ${onu_device} |
| 167 | Validate DHCP and Ping False False ${src_iface} ${s_tag} ${c_tag} ${dst_dp_ip} ${src_ip} ${src_user} ${src_pass} ${src_container_type} ${src_container_name} ${dst_dp_iface} ${dst_ip} ${dst_user} ${dst_pass} ${dst_container_type} ${dst_container_name} |
| 168 | Clean Up Linux |
| 169 | Create Subscriber |
| 170 | Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status pre-provisioned ${onu_device} |
| 171 | Validate Authentication True ${src_iface} wpa_supplicant.conf ${src_ip} ${src_user} ${src_pass} ${src_container_type} ${src_container_name} |
| 172 | Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI ENABLED APPROVED ${onu_device} |
| 173 | Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status enabled ${onu_device} |
| 174 | Validate DHCP and Ping True True ${src_iface} ${s_tag} ${c_tag} ${dst_dp_ip} ${src_ip} ${src_user} ${src_pass} ${src_container_type} ${src_container_name} ${dst_dp_iface} ${dst_ip} ${dst_user} ${dst_pass} ${dst_container_type} ${dst_container_name} |
| 175 | |
| 176 | ONU in Wrong Location |
| 177 | [Documentation] Validates E2E Ping Connectivity and object states for the given scenario: |
| 178 | ... Configure whitelist with wrong ONU location |
| 179 | ... Validate failed authentication/DHCP/E2E ping |
| 180 | [Tags] test9 |
| 181 | [Setup] None |
| 182 | Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI ENABLED APPROVED ${onu_device} |
| 183 | Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status enabled ${onu_device} |
| 184 | Clean Up Linux |
| 185 | Update Whitelist with Wrong Location |
| 186 | Wait Until Keyword Succeeds 300s 15s Validate ONU States UNKNOWN DISABLED ${onu_device} |
| 187 | Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI DISABLED AWAITING ${onu_device} |
| 188 | Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status awaiting-auth ${onu_device} |
| 189 | Validate Authentication False ${src_iface} wpa_supplicant.conf ${src_ip} ${src_user} ${src_pass} ${src_container_type} ${src_container_name} |
| 190 | Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI DISABLED AWAITING ${onu_device} |
| 191 | Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status awaiting-auth ${onu_device} |
| 192 | Validate DHCP and Ping False False ${src_iface} ${s_tag} ${c_tag} ${dst_dp_ip} ${src_ip} ${src_user} ${src_pass} ${src_container_type} ${src_container_name} ${dst_dp_iface} ${dst_ip} ${dst_user} ${dst_pass} ${dst_container_type} ${dst_container_name} |
| 193 | |
| 194 | ONU in Correct Location (Skip Authentication) |
| 195 | [Documentation] Validates E2E Ping Connectivity and object states for the given scenario: |
| 196 | ... Configure whitelist with correct ONU location and skip RG authentication |
| 197 | ... Validate failed authentication/DHCP/E2E ping |
| 198 | [Tags] test6 |
| 199 | Wait Until Keyword Succeeds 300s 15s Validate ONU States ACTIVE ENABLED ${onu_device} |
| 200 | Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI ENABLED AWAITING ${onu_device} |
| 201 | Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status awaiting-auth ${onu_device} |
| 202 | Validate DHCP and Ping False False ${src_iface} ${s_tag} ${c_tag} ${dst_dp_ip} ${src_ip} ${src_user} ${src_pass} ${src_container_type} ${src_container_name} ${dst_dp_iface} ${dst_ip} ${dst_user} ${dst_pass} ${dst_container_type} ${dst_container_name} |
| 203 | |
| 204 | ONU not in Whitelist |
| 205 | [Documentation] Validates E2E Ping Connectivity and object states for the given scenario: |
| 206 | ... Skip whitelist configuration for ONU |
| 207 | ... Validate failed authentication/DHCP/E2E ping |
| 208 | [Setup] None |
| 209 | [Tags] test7 |
| 210 | Create Subscriber |
| 211 | Create VOLT |
| 212 | Wait Until Keyword Succeeds 300s 15s Validate ONU States UNKNOWN DISABLED ${onu_device} |
| 213 | Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI DISABLED AWAITING ${onu_device} |
| 214 | Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status awaiting-auth ${onu_device} |
| 215 | Validate Authentication False ${src_iface} wpa_supplicant.conf ${src_ip} ${src_user} ${src_pass} ${src_container_type} ${src_container_name} |
| 216 | Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI DISABLED AWAITING ${onu_device} |
| 217 | Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status awaiting-auth ${onu_device} |
| 218 | Validate DHCP and Ping False False ${src_iface} ${s_tag} ${c_tag} ${dst_dp_ip} ${src_ip} ${src_user} ${src_pass} ${src_container_type} ${src_container_name} ${dst_dp_iface} ${dst_ip} ${dst_user} ${dst_pass} ${dst_container_type} ${dst_container_name} |
| 219 | |
| 220 | ONU not in Whitelist (Skip Subscriber Provisioning) -> Add ONU to Whitelist -> Provision Subscriber |
| 221 | [Documentation] Validates E2E Ping Connectivity and object states for the given scenario: |
| 222 | ... Skip whitelist configuration for ONU and subscriber provisioning |
| 223 | ... Validate successful authentication but failed DHCP/E2E ping |
| 224 | ... Configure whitelist with correct ONU location |
| 225 | ... Validate successful authentication (expected with the ONF pod setup) but failed DHCP/E2E ping |
| 226 | ... Provision subscriber |
| 227 | ... Validate successful authentication/DHCP/E2E ping |
| 228 | [Setup] None |
| 229 | [Tags] test8 |
| 230 | Create VOLT |
| 231 | Wait Until Keyword Succeeds 300s 15s Validate ONU States UNKNOWN DISABLED ${onu_device} |
| 232 | Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI DISABLED AWAITING ${onu_device} |
| 233 | Validate Authentication False ${src_iface} wpa_supplicant.conf ${src_ip} ${src_user} ${src_pass} ${src_container_type} ${src_container_name} |
| 234 | Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI DISABLED AWAITING ${onu_device} |
| 235 | Validate DHCP and Ping False False ${src_iface} ${s_tag} ${c_tag} ${dst_dp_ip} ${src_ip} ${src_user} ${src_pass} ${src_container_type} ${src_container_name} ${dst_dp_iface} ${dst_ip} ${dst_user} ${dst_pass} ${dst_container_type} ${dst_container_name} |
| 236 | Clean Up Linux |
| 237 | Create Whitelist |
| 238 | Wait Until Keyword Succeeds 60s 2s Validate ONU States ACTIVE ENABLED ${onu_device} |
| 239 | Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI ENABLED AWAITING ${onu_device} |
| 240 | Validate Authentication True ${src_iface} wpa_supplicant.conf ${src_ip} ${src_user} ${src_pass} ${src_container_type} ${src_container_name} |
| 241 | Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI ENABLED APPROVED ${onu_device} |
| 242 | Validate DHCP and Ping False False ${src_iface} ${s_tag} ${c_tag} ${dst_dp_ip} ${src_ip} ${src_user} ${src_pass} ${src_container_type} ${src_container_name} ${dst_dp_iface} ${dst_ip} ${dst_user} ${dst_pass} ${dst_container_type} ${dst_container_name} |
| 243 | Clean Up Linux |
| 244 | Create Subscriber |
| 245 | Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status pre-provisioned ${onu_device} |
| 246 | Validate Authentication True ${src_iface} wpa_supplicant.conf ${src_ip} ${src_user} ${src_pass} ${src_container_type} ${src_container_name} |
| 247 | Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI ENABLED APPROVED ${onu_device} |
| 248 | Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status enabled ${onu_device} |
| 249 | Validate DHCP and Ping True True ${src_iface} ${s_tag} ${c_tag} ${dst_dp_ip} ${src_ip} ${src_user} ${src_pass} ${src_container_type} ${src_container_name} ${dst_dp_iface} ${dst_ip} ${dst_user} ${dst_pass} ${dst_container_type} ${dst_container_name} |
| 250 | |
| 251 | ONU in Wrong Location (Skip Subscriber Provisioning) -> ONU in Correct Location -> Provision Subscriber |
| 252 | [Documentation] Validates E2E Ping Connectivity and object states for the given scenario: |
| 253 | ... Configure whitelist with wrong ONU location and skip subscriber provisioning |
| 254 | ... Validate failed authentication/DHCP/E2E ping |
| 255 | ... Configure whitelist with correct ONU location |
| 256 | ... Validate successful authentication (expected with the ONF pod setup) but failed DHCP/E2E ping |
| 257 | ... Provision subscriber |
| 258 | ... Validate successful authentication/DHCP/E2E ping |
| 259 | [Setup] None |
| 260 | [Tags] test10 |
| 261 | Create VOLT |
| 262 | Create Whitelist |
| 263 | Update Whitelist with Wrong Location |
| 264 | Wait Until Keyword Succeeds 300s 15s Validate ONU States UNKNOWN DISABLED ${onu_device} |
| 265 | Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI DISABLED AWAITING ${onu_device} |
| 266 | Validate Authentication False ${src_iface} wpa_supplicant.conf ${src_ip} ${src_user} ${src_pass} ${src_container_type} ${src_container_name} |
| 267 | Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI DISABLED AWAITING ${onu_device} |
| 268 | Validate DHCP and Ping False False ${src_iface} ${s_tag} ${c_tag} ${dst_dp_ip} ${src_ip} ${src_user} ${src_pass} ${src_container_type} ${src_container_name} ${dst_dp_iface} ${dst_ip} ${dst_user} ${dst_pass} ${dst_container_type} ${dst_container_name} |
| 269 | Clean Up Linux |
| 270 | Update Whitelist with Correct Location |
| 271 | Wait Until Keyword Succeeds 60s 2s Validate ONU States ACTIVE ENABLED ${onu_device} |
| 272 | Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI ENABLED AWAITING ${onu_device} |
| 273 | Validate Authentication True ${src_iface} wpa_supplicant.conf ${src_ip} ${src_user} ${src_pass} ${src_container_type} ${src_container_name} |
| 274 | Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI ENABLED APPROVED ${onu_device} |
| 275 | Validate DHCP and Ping False False ${src_iface} ${s_tag} ${c_tag} ${dst_dp_ip} ${src_ip} ${src_user} ${src_pass} ${src_container_type} ${src_container_name} ${dst_dp_iface} ${dst_ip} ${dst_user} ${dst_pass} ${dst_container_type} ${dst_container_name} |
| 276 | Clean Up Linux |
| 277 | Create Subscriber |
| 278 | Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status pre-provisioned ${onu_device} |
| 279 | Validate Authentication True ${src_iface} wpa_supplicant.conf ${src_ip} ${src_user} ${src_pass} ${src_container_type} ${src_container_name} |
| 280 | Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI ENABLED APPROVED ${onu_device} |
| 281 | Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status enabled ${onu_device} |
| 282 | Validate DHCP and Ping True True ${src_iface} ${s_tag} ${c_tag} ${dst_dp_ip} ${src_ip} ${src_user} ${src_pass} ${src_container_type} ${src_container_name} ${dst_dp_iface} ${dst_ip} ${dst_user} ${dst_pass} ${dst_container_type} ${dst_container_name} |
| 283 | |
| 284 | *** Keywords *** |
| 285 | Setup Suite |
| 286 | ${auth} = Create List ${XOS_USER} ${XOS_PASSWD} |
| 287 | ${HEADERS} Create Dictionary Content-Type=application/json |
| 288 | Create Session ${server_ip} http://${server_ip}:${server_port} auth=${AUTH} headers=${HEADERS} |
| 289 | ${att_workflow_service_id}= Get Service Owner Id ${ATT_SERVICE} |
| 290 | ${volt_service_id}= Get Service Owner Id ${VOLT_SERVICE} |
| 291 | ${AttWhiteListList}= utils.jsonToList ${WHITELIST_PATHFILE} AttWhiteListInfo |
| 292 | Set Suite Variable ${AttWhiteListList} |
| 293 | ${AttWhiteListDict}= utils.listToDict ${AttWhiteListList} 0 |
| 294 | ${AttWhiteListDict}= utils.setFieldValueInDict ${AttWhiteListDict} owner_id ${att_workflow_service_id} |
| 295 | ${onu_device}= Get From Dictionary ${AttWhiteListDict} serial_number |
| 296 | Set Global Variable ${onu_device} |
| 297 | ${onu_location}= Get From Dictionary ${AttWhiteListDict} pon_port_id |
| 298 | Set Global Variable ${onu_location} |
| 299 | ${SubscriberList}= utils.jsonToList ${SUBSCRIBER_PATHFILE} SubscriberInfo |
| 300 | Set Global Variable ${SubscriberList} |
| 301 | ${SubscriberDict}= utils.listToDict ${SubscriberList} 0 |
| 302 | ${s_tag}= utils.getFieldValueFromDict ${SubscriberDict} s_tag |
| 303 | ${c_tag}= utils.getFieldValueFromDict ${SubscriberDict} c_tag |
| 304 | ${VoltDeviceList}= utils.jsonToList ${VOLT_DEVICE_PATHFILE} VOLTDeviceInfo |
| 305 | ${VoltDeviceDict}= utils.setFieldValueInDict ${VoltDeviceList[0]} volt_service_id ${volt_service_id} |
| 306 | Set Global Variable ${VoltDeviceList} |
| 307 | Set Global Variable ${VoltDeviceDict} |
| 308 | Set Suite Variable ${s_tag} |
| 309 | Set Suite Variable ${c_tag} |
| 310 | Set Global Variable ${export_kubeconfig} export KUBECONFIG=${KUBERNETES_CONF} |
| 311 | # Read variables from yaml file |
| 312 | ${src_ip}= Evaluate ${hosts}.get("src").get("ip") |
| 313 | ${src_user}= Evaluate ${hosts}.get("src").get("user") |
| 314 | ${src_pass}= Evaluate ${hosts}.get("src").get("pass") |
| 315 | ${src_container_type}= Evaluate ${hosts}.get("src").get("container_type") |
| 316 | ${src_container_name}= Evaluate ${hosts}.get("src").get("container_name") |
| 317 | ${src_iface}= Evaluate ${hosts}.get("src").get("dp_iface_name") |
| 318 | ${dst_ip}= Evaluate ${hosts}.get("dst").get("ip") |
| 319 | ${dst_user} = Evaluate ${hosts}.get("dst").get("user") |
| 320 | ${dst_pass}= Evaluate ${hosts}.get("dst").get("pass") |
| 321 | ${dst_container_type}= Evaluate ${hosts}.get("dst").get("container_type") |
| 322 | ${dst_container_name}= Evaluate ${hosts}.get("dst").get("container_name") |
| 323 | ${dst_dp_iface}= Evaluate ${hosts}.get("dst").get("dp_iface_name") |
| 324 | ${dst_dp_ip}= Evaluate ${hosts}.get("dst").get("dp_iface_ip_qinq") |
| 325 | ${olt_ip}= Evaluate ${olts}[0].get("ip") |
| 326 | ${olt_user}= Evaluate ${olts}[0].get("user") |
| 327 | ${olt_pass}= Evaluate ${olts}[0].get("pass") |
| 328 | ${k8s_node_ip}= Evaluate ${nodes}[0].get("ip") |
| 329 | ${k8s_node_user}= Evaluate ${nodes}[0].get("user") |
| 330 | ${k8s_node_pass}= Evaluate ${nodes}[0].get("pass") |
| 331 | Set Suite Variable ${src_ip} |
| 332 | Set Suite Variable ${src_user} |
| 333 | Set Suite Variable ${src_pass} |
| 334 | Set Suite Variable ${src_container_type} |
| 335 | Set Suite Variable ${src_container_name} |
| 336 | Set Suite Variable ${src_iface} |
| 337 | Set Suite Variable ${dst_ip} |
| 338 | Set Suite Variable ${dst_user} |
| 339 | Set Suite Variable ${dst_pass} |
| 340 | Set Suite Variable ${dst_container_type} |
| 341 | Set Suite Variable ${dst_container_name} |
| 342 | Set Suite Variable ${dst_dp_iface} |
| 343 | Set Suite Variable ${dst_dp_ip} |
| 344 | Set Suite Variable ${olt_ip} |
| 345 | Set Suite Variable ${olt_user} |
| 346 | Set Suite Variable ${olt_pass} |
| 347 | Set Suite Variable ${k8s_node_ip} |
| 348 | Set Suite Variable ${k8s_node_user} |
| 349 | Set Suite Variable ${k8s_node_pass} |
| 350 | @{container_list}= Create List |
| 351 | Append To List ${container_list} att-workflow-att-workflow-driver |
| 352 | Append To List ${container_list} seba-services-volt |
| 353 | Append To List ${container_list} seba-services-rcord |
| 354 | Append To List ${container_list} onos |
| 355 | Append To List ${container_list} seba-services-fabric-crossconnect |
| 356 | Append To List ${container_list} xos-core |
| 357 | Append To List ${container_list} vcore |
| 358 | Set Suite Variable ${container_list} |
| 359 | ${datetime}= Get Current Datetime On Kubernetes Node ${k8s_node_ip} ${k8s_node_user} ${k8s_node_pass} |
| 360 | Set Suite Variable ${datetime} |
| 361 | |
| 362 | Teardown Suite |
| 363 | [Documentation] Performs any additional cleanup required |
| 364 | Log Suite Teardown cleanup |
| 365 | Delete All Sessions |
| 366 | |
| 367 | Setup Test |
| 368 | [Documentation] Re-create Subscriber, whitelist, and olt-device models to test |
| 369 | Log Re-creating objects |
| 370 | ${datetime}= Get Current Datetime On Kubernetes Node ${k8s_node_ip} ${k8s_node_user} ${k8s_node_pass} |
| 371 | Set Suite Variable ${datetime} |
| 372 | Create Whitelist |
| 373 | Create Subscriber |
| 374 | Create VOLT |
| 375 | Wait Until Keyword Succeeds 200s 15s Validate OLT States ACTIVE ENABLED ${olt_ip} |
| 376 | |
| 377 | Teardown Test |
| 378 | [Documentation] Delete xos objects, kills processes and cleans up interfaces on src+dst servers |
| 379 | Get VOLTHA Status |
| 380 | Get ONOS Status |
| 381 | Clean Up Linux |
| 382 | Clean Up XOS |
| 383 | Log Kubernetes Containers Logs Since Time ${datetime} ${container_list} |
| 384 | |
| 385 | Clean Up Linux |
| 386 | [Documentation] Kill processes and clean up interfaces on src+dst servers |
| 387 | Run Keyword And Ignore Error Kill Linux Process [w]pa_supplicant ${src_ip} ${src_user} ${src_pass} ${src_container_type} ${src_container_name} |
| 388 | Run Keyword And Ignore Error Kill Linux Process [d]hclient ${src_ip} ${src_user} ${src_pass} ${src_container_type} ${src_container_name} |
| 389 | Run Keyword If '${dst_ip}' != '${None}' Run Keyword And Ignore Error Kill Linux Process [d]hcpd ${dst_ip} ${dst_user} ${dst_pass} ${dst_container_type} ${dst_container_name} |
| 390 | Delete IP Addresses from Interface on Remote Host ${src_iface} ${src_ip} ${src_user} ${src_pass} ${src_container_type} ${src_container_name} |
| 391 | Run Keyword If '${dst_ip}' != '${None}' Delete Interface on Remote Host ${dst_dp_iface}.${s_tag} ${dst_ip} ${dst_user} ${dst_pass} ${dst_container_type} ${dst_container_name} |
| 392 | |
| 393 | Clean Up XOS |
| 394 | [Documentation] Clean up all XOS objects and reinstall voltha after OLT reboots |
| 395 | Wait Until Keyword Succeeds 60s 2s Clean Up Objects ${VOLT_SUBSCRIBER} |
| 396 | Wait Until Keyword Succeeds 60s 2s Clean Up Objects ${ATT_WHITELIST} |
| 397 | Sleep 20s |
| 398 | Wait Until Keyword Succeeds 30s 2s Validate Subscriber Count 0 |
| 399 | Wait Until Keyword Succeeds 60s 2s Clean Up Objects ${VOLT_DEVICE} |
| 400 | Wait Until Keyword Succeeds 60s 2s Clean Up Objects ${ATT_SERVICEINSTANCES} |
| 401 | Wait Until Keyword Succeeds 120s 10s Check Remote System Reachability False ${olt_ip} |
| 402 | Wait Until Keyword Succeeds 120s 10s Check Remote System Reachability True ${olt_ip} |
| 403 | Wait Until Keyword Succeeds 120s 10s Openolt is Up ${olt_ip} ${olt_user} ${olt_pass} |
| 404 | |
| 405 | Create Whitelist |
| 406 | ${AttWhiteListDict}= utils.listToDict ${AttWhiteListList} 0 |
| 407 | CORD Post ${ATT_WHITELIST} ${AttWhiteListDict} |
| 408 | |
| 409 | Remove Whitelist |
| 410 | ${whitelist_id}= Retrieve Whitelist Entry ${onu_device} |
| 411 | CORD Delete ${ATT_WHITELIST} ${whitelist_id} |
| 412 | |
| 413 | Update Whitelist with Wrong Location |
| 414 | ${whitelist_id}= Retrieve Whitelist Entry ${onu_device} |
| 415 | CORD Put ${ATT_WHITELIST} {"pon_port_id": 55 } ${whitelist_id} |
| 416 | |
| 417 | Update Whitelist with Correct Location |
| 418 | ${whitelist_id}= Retrieve Whitelist Entry ${onu_device} |
| 419 | CORD Put ${ATT_WHITELIST} {"pon_port_id": ${onu_location} } ${whitelist_id} |
| 420 | |
| 421 | Create Subscriber |
| 422 | ${SubscriberDict}= utils.listToDict ${SubscriberList} 0 |
| 423 | Wait Until Keyword Succeeds 120s 15s CORD Post ${VOLT_SUBSCRIBER} ${SubscriberDict} |
| 424 | |
| 425 | Remove Subscriber |
| 426 | ${subscriber_id}= Retrieve Subscriber ${c_tag} |
| 427 | CORD Delete ${VOLT_SUBSCRIBER} ${subscriber_id} |
| 428 | |
| 429 | Create VOLT |
| 430 | CORD Post ${VOLT_DEVICE} ${VoltDeviceDict} |