Kailash Khalasi | 16d95c1 | 2018-09-21 14:17:28 -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 E2E conditions for seba-in-a-box |
| 17 | Suite Setup Setup |
Kailash Khalasi | bf1478b | 2018-10-17 11:58:58 -0700 | [diff] [blame] | 18 | Suite Teardown Delete All Sessions |
| 19 | Test Setup Setup Test |
| 20 | Test Teardown Test Cleanup |
Kailash Khalasi | 16d95c1 | 2018-09-21 14:17:28 -0700 | [diff] [blame] | 21 | Library Collections |
| 22 | Library String |
| 23 | Library OperatingSystem |
| 24 | Library XML |
| 25 | Library RequestsLibrary |
| 26 | Library ../../Framework/utils/utils.py |
| 27 | Resource ../../Framework/utils/utils.robot |
| 28 | Library ../../Framework/restApi.py |
| 29 | Resource ../../Framework/Subscriber.robot |
| 30 | Resource ../../Framework/ATTWorkFlowDriver.robot |
Kailash Khalasi | bf1478b | 2018-10-17 11:58:58 -0700 | [diff] [blame] | 31 | Resource ../../Framework/Kubernetes.robot |
Kailash Khalasi | 16d95c1 | 2018-09-21 14:17:28 -0700 | [diff] [blame] | 32 | Resource ../../Framework/ONU.robot |
| 33 | Resource ../../Framework/DHCP.robot |
| 34 | Variables ../../Properties/RestApiProperties.py |
| 35 | |
| 36 | *** Variables *** |
Kailash Khalasi | bf1478b | 2018-10-17 11:58:58 -0700 | [diff] [blame] | 37 | ${WHITELIST_PATHFILE} ${CURDIR}/data/SIABWhitelist.json |
| 38 | ${SUBSCRIBER_PATHFILE} ${CURDIR}/data/SIABSubscriber.json |
Kailash Khalasi | 16d95c1 | 2018-09-21 14:17:28 -0700 | [diff] [blame] | 39 | ${VOLT_DEVICE_PATHFILE} ${CURDIR}/data/SIABOLTDevice.json |
Kailash Khalasi | bf1478b | 2018-10-17 11:58:58 -0700 | [diff] [blame] | 40 | ${export_kube_config} export KUBECONFIG=/home/cord/.kube/config |
| 41 | ${kube_node_ip} localhost |
| 42 | ${dst_host_ip} 172.18.0.10 |
Kailash Khalasi | 16d95c1 | 2018-09-21 14:17:28 -0700 | [diff] [blame] | 43 | |
| 44 | *** Test Cases *** |
Kailash Khalasi | bf1478b | 2018-10-17 11:58:58 -0700 | [diff] [blame] | 45 | ONU in Correct Location |
| 46 | [Documentation] Validates E2E Ping Connectivity and object states for the given scenario: |
| 47 | ... Configure whitelist with correct ONU location |
| 48 | ... Validate successful authentication/DHCP/E2E ping |
| 49 | Wait Until Keyword Succeeds 300s 15s Validate ONU States ACTIVE ENABLED ${onu_device} |
| 50 | Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI ENABLED AWAITING ${onu_device} |
| 51 | Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status awaiting-auth ${onu_device} |
| 52 | Validate Authentication True eth0 wpa_supplicant.conf ${kube_node_ip} cord cord K8S ${RG_CONTAINER} |
| 53 | Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI ENABLED APPROVED ${onu_device} |
| 54 | Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status enabled ${onu_device} |
| 55 | Validate DHCP and Ping True True eth0 ${s_tag} ${c_tag} ${dst_host_ip} ${kube_node_ip} cord cord K8S ${RG_CONTAINER} |
Kailash Khalasi | 16d95c1 | 2018-09-21 14:17:28 -0700 | [diff] [blame] | 56 | ${subscriber_id}= Retrieve Subscriber ${c_tag} |
| 57 | CORD Put ${VOLT_SUBSCRIBER} {"status":"disabled"} ${subscriber_id} |
Kailash Khalasi | bf1478b | 2018-10-17 11:58:58 -0700 | [diff] [blame] | 58 | Validate DHCP and Ping True False eth0 ${s_tag} ${c_tag} ${dst_host_ip} ${kube_node_ip} cord cord K8S ${RG_CONTAINER} |
| 59 | Restart RG Pod |
Kailash Khalasi | 16d95c1 | 2018-09-21 14:17:28 -0700 | [diff] [blame] | 60 | CORD Put ${VOLT_SUBSCRIBER} {"status":"enabled"} ${subscriber_id} |
Kailash Khalasi | bf1478b | 2018-10-17 11:58:58 -0700 | [diff] [blame] | 61 | Validate Authentication True eth0 wpa_supplicant.conf ${kube_node_ip} cord cord K8S ${RG_CONTAINER} |
| 62 | Validate DHCP and Ping True True eth0 ${s_tag} ${c_tag} ${dst_host_ip} ${kube_node_ip} cord cord K8S ${RG_CONTAINER} |
Kailash Khalasi | 16d95c1 | 2018-09-21 14:17:28 -0700 | [diff] [blame] | 63 | |
Kailash Khalasi | bf1478b | 2018-10-17 11:58:58 -0700 | [diff] [blame] | 64 | ONU in Correct Location -> Remove ONU from Whitelist -> Add ONU to Whitelist |
| 65 | [Documentation] Validates E2E Ping Connectivity and object states for the given scenario: |
| 66 | ... Configure whitelist with correct ONU location |
| 67 | ... Validate successful authentication/DHCP/E2E ping |
| 68 | ... Remove ONU from whitelist |
| 69 | ... Validate failed authentication/DHCP/E2E ping |
| 70 | ... Add ONU to whitelist |
| 71 | ... Validate successful authentication/DHCP/E2E ping |
| 72 | Wait Until Keyword Succeeds 300s 15s Validate ONU States ACTIVE ENABLED ${onu_device} |
| 73 | Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI ENABLED AWAITING ${onu_device} |
| 74 | Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status awaiting-auth ${onu_device} |
| 75 | Validate Authentication True eth0 wpa_supplicant.conf ${kube_node_ip} cord cord K8S ${RG_CONTAINER} |
| 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 | Validate DHCP and Ping True True eth0 ${s_tag} ${c_tag} ${dst_host_ip} ${kube_node_ip} cord cord K8S ${RG_CONTAINER} |
| 79 | Restart RG Pod |
| 80 | Remove Whitelist |
| 81 | Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI DISABLED AWAITING ${onu_device} |
| 82 | Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status awaiting-auth ${onu_device} |
| 83 | Validate Authentication False eth0 wpa_supplicant.conf ${kube_node_ip} cord cord K8S ${RG_CONTAINER} |
| 84 | Validate DHCP and Ping False False eth0 ${s_tag} ${c_tag} ${dst_host_ip} ${kube_node_ip} cord cord K8S ${RG_CONTAINER} |
| 85 | Restart RG Pod |
| 86 | Create Whitelist |
| 87 | Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI ENABLED AWAITING ${onu_device} |
| 88 | Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status awaiting-auth ${onu_device} |
| 89 | Validate Authentication True eth0 wpa_supplicant.conf ${kube_node_ip} cord cord K8S ${RG_CONTAINER} |
| 90 | Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI ENABLED APPROVED ${onu_device} |
| 91 | Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status enabled ${onu_device} |
| 92 | Validate DHCP and Ping True True eth0 ${s_tag} ${c_tag} ${dst_host_ip} ${kube_node_ip} cord cord K8S ${RG_CONTAINER} |
Kailash Khalasi | 16d95c1 | 2018-09-21 14:17:28 -0700 | [diff] [blame] | 93 | |
Kailash Khalasi | bf1478b | 2018-10-17 11:58:58 -0700 | [diff] [blame] | 94 | ONU in Correct Location -> ONU in Wrong Location -> ONU in Correct Location |
| 95 | [Documentation] Validates E2E Ping Connectivity and object states for the given scenario: |
| 96 | ... Configure whitelist with correct ONU location |
| 97 | ... Validate successful authentication/DHCP/E2E ping |
| 98 | ... Update whitelist with wrong ONU location |
| 99 | ... Validate failed authentication/DHCP/E2E ping |
| 100 | ... Update whitelist with correct ONU location |
| 101 | ... Validate successful authentication/DHCP/E2E ping |
| 102 | Wait Until Keyword Succeeds 300s 15s Validate ONU States ACTIVE ENABLED ${onu_device} |
| 103 | Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI ENABLED AWAITING ${onu_device} |
| 104 | Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status awaiting-auth ${onu_device} |
| 105 | Validate Authentication True eth0 wpa_supplicant.conf ${kube_node_ip} cord cord K8S ${RG_CONTAINER} |
| 106 | Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI ENABLED APPROVED ${onu_device} |
| 107 | Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status enabled ${onu_device} |
| 108 | Validate DHCP and Ping True True eth0 ${s_tag} ${c_tag} ${dst_host_ip} ${kube_node_ip} cord cord K8S ${RG_CONTAINER} |
| 109 | Restart RG Pod |
| 110 | Update Whitelist with Wrong Location |
| 111 | Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI DISABLED AWAITING ${onu_device} |
| 112 | Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status awaiting-auth ${onu_device} |
| 113 | Validate Authentication False eth0 wpa_supplicant.conf ${kube_node_ip} cord cord K8S ${RG_CONTAINER} |
| 114 | Validate DHCP and Ping False False eth0 ${s_tag} ${c_tag} ${dst_host_ip} ${kube_node_ip} cord cord K8S ${RG_CONTAINER} |
| 115 | Restart RG Pod |
| 116 | Update Whitelist with Correct Location |
| 117 | Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI ENABLED AWAITING ${onu_device} |
| 118 | Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status awaiting-auth ${onu_device} |
| 119 | Validate Authentication True eth0 wpa_supplicant.conf ${kube_node_ip} cord cord K8S ${RG_CONTAINER} |
| 120 | Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI ENABLED APPROVED ${onu_device} |
| 121 | Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status enabled ${onu_device} |
| 122 | Validate DHCP and Ping True True eth0 ${s_tag} ${c_tag} ${dst_host_ip} ${kube_node_ip} cord cord K8S ${RG_CONTAINER} |
| 123 | |
| 124 | ONU in Correct Location -> Remove Subscriber -> Create Subscriber |
| 125 | [Documentation] Validates E2E Ping Connectivity and object states for the given scenario: |
| 126 | ... Configure whitelist with correct ONU location |
| 127 | ... Validate successful authentication/DHCP/E2E ping |
| 128 | ... Remove subscriber model |
| 129 | ... Validate failed authentication/DHCP/E2E ping |
| 130 | ... Recreate subscriber model |
| 131 | ... Validate successful authentication/DHCP/E2E ping |
| 132 | Wait Until Keyword Succeeds 300s 15s Validate ONU States ACTIVE ENABLED ${onu_device} |
| 133 | Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI ENABLED AWAITING ${onu_device} |
| 134 | Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status awaiting-auth ${onu_device} |
| 135 | Validate Authentication True eth0 wpa_supplicant.conf ${kube_node_ip} cord cord K8S ${RG_CONTAINER} |
| 136 | Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI ENABLED APPROVED ${onu_device} |
| 137 | Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status enabled ${onu_device} |
| 138 | Validate DHCP and Ping True True eth0 ${s_tag} ${c_tag} ${dst_host_ip} ${kube_node_ip} cord cord K8S ${RG_CONTAINER} |
| 139 | Restart RG Pod |
| 140 | Remove Subscriber |
| 141 | Validate Authentication False eth0 wpa_supplicant.conf ${kube_node_ip} cord cord K8S ${RG_CONTAINER} |
| 142 | Validate DHCP and Ping False False eth0 ${s_tag} ${c_tag} ${dst_host_ip} ${kube_node_ip} cord cord K8S ${RG_CONTAINER} |
| 143 | Restart RG Pod |
| 144 | Create Subscriber |
| 145 | Wait Until Keyword Succeeds 90s 2s Validate Subscriber Status awaiting-auth ${onu_device} |
| 146 | Validate Authentication True eth0 wpa_supplicant.conf ${kube_node_ip} cord cord K8S ${RG_CONTAINER} |
| 147 | Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI ENABLED APPROVED ${onu_device} |
| 148 | Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status enabled ${onu_device} |
| 149 | Validate DHCP and Ping True True eth0 ${s_tag} ${c_tag} ${dst_host_ip} ${kube_node_ip} cord cord K8S ${RG_CONTAINER} |
| 150 | |
| 151 | ONU in Correct Location (Skip Subscriber Provisioning) -> Provision Subscriber |
| 152 | [Documentation] Validates E2E Ping Connectivity and object states for the given scenario: |
| 153 | ... Configure whitelist with correct ONU location and skip provisioning subscriber |
| 154 | ... Validate successful authentication (expected with the ONF pod setup) but failed DHCP/E2E ping |
| 155 | ... Provision subscriber |
| 156 | ... Validate successful authentication/DHCP/E2E ping |
| 157 | Remove Subscriber |
| 158 | Wait Until Keyword Succeeds 300s 15s Validate ONU States ACTIVE ENABLED ${onu_device} |
| 159 | Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI ENABLED AWAITING ${onu_device} |
| 160 | Validate Authentication True eth0 wpa_supplicant.conf ${kube_node_ip} cord cord K8S ${RG_CONTAINER} |
| 161 | Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI ENABLED APPROVED ${onu_device} |
| 162 | Validate DHCP and Ping False False eth0 ${s_tag} ${c_tag} ${dst_host_ip} ${kube_node_ip} cord cord K8S ${RG_CONTAINER} |
| 163 | Restart RG Pod |
| 164 | Create Subscriber |
| 165 | Wait Until Keyword Succeeds 90s 2s Validate Subscriber Status awaiting-auth ${onu_device} |
| 166 | Validate Authentication True eth0 wpa_supplicant.conf ${kube_node_ip} cord cord K8S ${RG_CONTAINER} |
| 167 | Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI ENABLED APPROVED ${onu_device} |
| 168 | Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status enabled ${onu_device} |
| 169 | Validate DHCP and Ping True True eth0 ${s_tag} ${c_tag} ${dst_host_ip} ${kube_node_ip} cord cord K8S ${RG_CONTAINER} |
| 170 | |
| 171 | ONU in Correct Location (Skip Authentication) |
| 172 | [Documentation] Validates E2E Ping Connectivity and object states for the given scenario: |
| 173 | ... Configure whitelist with correct ONU location and skip RG authentication |
| 174 | ... Validate failed authentication/DHCP/E2E ping |
| 175 | Wait Until Keyword Succeeds 300s 15s Validate ONU States ACTIVE ENABLED ${onu_device} |
| 176 | Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI ENABLED AWAITING ${onu_device} |
| 177 | Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status awaiting-auth ${onu_device} |
| 178 | Validate DHCP and Ping False False eth0 ${s_tag} ${c_tag} ${dst_host_ip} ${kube_node_ip} cord cord K8S ${RG_CONTAINER} |
| 179 | |
| 180 | ONU not in Whitelist |
| 181 | [Documentation] Validates E2E Ping Connectivity and object states for the given scenario: |
| 182 | ... Skip whitelist configuration for ONU |
| 183 | ... Validate failed authentication/DHCP/E2E ping |
| 184 | Remove Whitelist |
| 185 | Wait Until Keyword Succeeds 300s 15s Validate ONU States UNKNOWN DISABLED ${onu_device} |
| 186 | Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI DISABLED AWAITING ${onu_device} |
| 187 | Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status awaiting-auth ${onu_device} |
| 188 | Validate Authentication False eth0 wpa_supplicant.conf ${kube_node_ip} cord cord K8S ${RG_CONTAINER} |
| 189 | Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI DISABLED AWAITING ${onu_device} |
| 190 | Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status awaiting-auth ${onu_device} |
| 191 | Validate DHCP and Ping False False eth0 ${s_tag} ${c_tag} ${dst_host_ip} ${kube_node_ip} cord cord K8S ${RG_CONTAINER} |
| 192 | |
| 193 | ONU not in Whitelist (Skip Subscriber Provisioning) -> Add ONU to Whitelist -> Provision Subscriber |
| 194 | [Documentation] Validates E2E Ping Connectivity and object states for the given scenario: |
| 195 | ... Skip whitelist configuration for ONU and subscriber provisioning |
| 196 | ... Validate successful authentication but failed DHCP/E2E ping |
| 197 | ... Configure whitelist with correct ONU location |
| 198 | ... Validate successful authentication (expected with the ONF pod setup) but failed DHCP/E2E ping |
| 199 | ... Provision subscriber |
| 200 | ... Validate successful authentication/DHCP/E2E ping |
| 201 | Remove Whitelist |
| 202 | Remove Subscriber |
| 203 | Wait Until Keyword Succeeds 300s 15s Validate ONU States UNKNOWN DISABLED ${onu_device} |
| 204 | Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI DISABLED AWAITING ${onu_device} |
| 205 | Validate Authentication False eth0 wpa_supplicant.conf ${kube_node_ip} cord cord K8S ${RG_CONTAINER} |
| 206 | Validate DHCP and Ping False False eth0 ${s_tag} ${c_tag} ${dst_host_ip} ${kube_node_ip} cord cord K8S ${RG_CONTAINER} |
| 207 | Restart RG Pod |
| 208 | Create Whitelist |
| 209 | Wait Until Keyword Succeeds 300s 15s Validate ONU States ACTIVE ENABLED ${onu_device} |
| 210 | Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI ENABLED AWAITING ${onu_device} |
| 211 | Validate Authentication True eth0 wpa_supplicant.conf ${kube_node_ip} cord cord K8S ${RG_CONTAINER} |
| 212 | Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI ENABLED APPROVED ${onu_device} |
| 213 | Validate DHCP and Ping False False eth0 ${s_tag} ${c_tag} ${dst_host_ip} ${kube_node_ip} cord cord K8S ${RG_CONTAINER} |
| 214 | Restart RG Pod |
| 215 | Create Subscriber |
| 216 | Wait Until Keyword Succeeds 90s 2s Validate Subscriber Status awaiting-auth ${onu_device} |
| 217 | Validate Authentication True eth0 wpa_supplicant.conf ${kube_node_ip} cord cord K8S ${RG_CONTAINER} |
| 218 | Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI ENABLED APPROVED ${onu_device} |
| 219 | Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status enabled ${onu_device} |
| 220 | Validate DHCP and Ping True True eth0 ${s_tag} ${c_tag} ${dst_host_ip} ${kube_node_ip} cord cord K8S ${RG_CONTAINER} |
| 221 | |
| 222 | ONU in Wrong Location |
| 223 | [Documentation] Validates E2E Ping Connectivity and object states for the given scenario: |
| 224 | ... Configure whitelist with wrong ONU location |
| 225 | ... Validate failed authentication/DHCP/E2E ping |
| 226 | Update Whitelist with Wrong Location |
| 227 | Wait Until Keyword Succeeds 300s 15s Validate ONU States UNKNOWN DISABLED ${onu_device} |
| 228 | Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI DISABLED AWAITING ${onu_device} |
| 229 | Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status awaiting-auth ${onu_device} |
| 230 | Validate Authentication False eth0 wpa_supplicant.conf ${kube_node_ip} cord cord K8S ${RG_CONTAINER} |
| 231 | Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI DISABLED AWAITING ${onu_device} |
| 232 | Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status awaiting-auth ${onu_device} |
| 233 | Validate DHCP and Ping False False eth0 ${s_tag} ${c_tag} ${dst_host_ip} ${kube_node_ip} cord cord K8S ${RG_CONTAINER} |
| 234 | |
| 235 | ONU in Wrong Location (Skip Subscriber Provisioning) -> ONU in Correct Location -> Provision Subscriber |
| 236 | [Documentation] Validates E2E Ping Connectivity and object states for the given scenario: |
| 237 | ... Configure whitelist with wrong ONU location and skip subscriber provisioning |
| 238 | ... Validate failed authentication/DHCP/E2E ping |
| 239 | ... Configure whitelist with correct ONU location |
| 240 | ... Validate successful authentication (expected with the ONF pod setup) but failed DHCP/E2E ping |
| 241 | ... Provision subscriber |
| 242 | ... Validate successful authentication/DHCP/E2E ping |
| 243 | Update Whitelist with Wrong Location |
| 244 | Remove Subscriber |
| 245 | Wait Until Keyword Succeeds 300s 15s Validate ONU States UNKNOWN DISABLED ${onu_device} |
| 246 | Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI DISABLED AWAITING ${onu_device} |
| 247 | Validate Authentication False eth0 wpa_supplicant.conf ${kube_node_ip} cord cord K8S ${RG_CONTAINER} |
| 248 | Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI DISABLED AWAITING ${onu_device} |
| 249 | Validate DHCP and Ping False False eth0 ${s_tag} ${c_tag} ${dst_host_ip} ${kube_node_ip} cord cord K8S ${RG_CONTAINER} |
| 250 | Restart RG Pod |
| 251 | Update Whitelist with Correct Location |
| 252 | Wait Until Keyword Succeeds 300s 15s Validate ONU States ACTIVE ENABLED ${onu_device} |
| 253 | Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI ENABLED AWAITING ${onu_device} |
| 254 | Validate Authentication True ${src_iface} wpa_supplicant.conf ${src_ip} ${src_user} ${src_pass} ${src_container_type} ${src_container_name} |
| 255 | Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI ENABLED AWAITING ${onu_device} |
| 256 | Validate DHCP and Ping False False eth0 ${s_tag} ${c_tag} ${dst_host_ip} ${kube_node_ip} cord cord K8S ${RG_CONTAINER} |
| 257 | Restart RG Pod |
| 258 | Create Subscriber |
| 259 | Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status awaiting-auth ${onu_device} |
| 260 | Validate Authentication True eth0 wpa_supplicant.conf ${kube_node_ip} cord cord K8S ${RG_CONTAINER} |
| 261 | Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI ENABLED APPROVED ${onu_device} |
| 262 | Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status enabled ${onu_device} |
| 263 | Validate DHCP and Ping True True eth0 ${s_tag} ${c_tag} ${dst_host_ip} ${kube_node_ip} cord cord K8S ${RG_CONTAINER} |
Kailash Khalasi | 16d95c1 | 2018-09-21 14:17:28 -0700 | [diff] [blame] | 264 | |
| 265 | *** Keywords *** |
| 266 | Setup |
| 267 | ${auth} = Create List ${XOS_USER} ${XOS_PASSWD} |
| 268 | ${HEADERS} Create Dictionary Content-Type=application/json |
| 269 | Create Session ${server_ip} http://${server_ip}:${server_port} auth=${AUTH} headers=${HEADERS} |
| 270 | ${att_workflow_service_id}= Get Service Owner Id ${ATT_SERVICE} |
| 271 | ${volt_service_id}= Get Service Owner Id ${VOLT_SERVICE} |
| 272 | ${AttWhiteListList}= utils.jsonToList ${WHITELIST_PATHFILE} AttWhiteListInfo |
Kailash Khalasi | bf1478b | 2018-10-17 11:58:58 -0700 | [diff] [blame] | 273 | Set Suite Variable ${AttWhiteListList} |
Kailash Khalasi | 16d95c1 | 2018-09-21 14:17:28 -0700 | [diff] [blame] | 274 | ${AttWhiteListDict}= utils.listToDict ${AttWhiteListList} 0 |
| 275 | ${AttWhiteListDict}= utils.setFieldValueInDict ${AttWhiteListDict} owner_id ${att_workflow_service_id} |
Kailash Khalasi | bf1478b | 2018-10-17 11:58:58 -0700 | [diff] [blame] | 276 | ${onu_device}= Get From Dictionary ${AttWhiteListDict} serial_number |
| 277 | Log ${onu_device} |
| 278 | Set Global Variable ${onu_device} |
| 279 | ${onu_location}= Get From Dictionary ${AttWhiteListDict} pon_port_id |
| 280 | Set Global Variable ${onu_location} |
Kailash Khalasi | 16d95c1 | 2018-09-21 14:17:28 -0700 | [diff] [blame] | 281 | ${SubscriberList}= utils.jsonToList ${SUBSCRIBER_PATHFILE} SubscriberInfo |
Kailash Khalasi | bf1478b | 2018-10-17 11:58:58 -0700 | [diff] [blame] | 282 | Set Global Variable ${SubscriberList} |
Kailash Khalasi | 16d95c1 | 2018-09-21 14:17:28 -0700 | [diff] [blame] | 283 | ${SubscriberDict}= utils.listToDict ${SubscriberList} 0 |
| 284 | ${s_tag}= utils.getFieldValueFromDict ${SubscriberDict} s_tag |
| 285 | ${c_tag}= utils.getFieldValueFromDict ${SubscriberDict} c_tag |
| 286 | ${VoltDeviceList}= utils.jsonToList ${VOLT_DEVICE_PATHFILE} VOLTDeviceInfo |
Kailash Khalasi | bf1478b | 2018-10-17 11:58:58 -0700 | [diff] [blame] | 287 | Set Global Variable ${VoltDeviceList} |
Kailash Khalasi | 16d95c1 | 2018-09-21 14:17:28 -0700 | [diff] [blame] | 288 | Set Suite Variable ${s_tag} |
| 289 | Set Suite Variable ${c_tag} |
Kailash Khalasi | bf1478b | 2018-10-17 11:58:58 -0700 | [diff] [blame] | 290 | ${whitelist_id}= Retrieve Whitelist Entry ${onu_device} |
Kailash Khalasi | 0e515fe | 2018-10-02 12:13:47 -0700 | [diff] [blame] | 291 | Set Suite Variable ${whitelist_id} |
Kailash Khalasi | bf1478b | 2018-10-17 11:58:58 -0700 | [diff] [blame] | 292 | ${att_si_id}= Retrieve ATT Service Instance ID ${onu_device} |
Kailash Khalasi | 0e515fe | 2018-10-02 12:13:47 -0700 | [diff] [blame] | 293 | Set Suite Variable ${att_si_id} |
Kailash Khalasi | 16d95c1 | 2018-09-21 14:17:28 -0700 | [diff] [blame] | 294 | ${RG_CONTAINER}= Run kubectl -n voltha get pod|grep "^rg-"|cut -d' ' -f1 |
| 295 | Set Suite Variable ${RG_CONTAINER} |
Kailash Khalasi | b5975cf | 2018-10-01 12:57:44 -0700 | [diff] [blame] | 296 | ## Validate ATT Workflow SI |
Kailash Khalasi | bf1478b | 2018-10-17 11:58:58 -0700 | [diff] [blame] | 297 | Wait Until Keyword Succeeds 90s 2s Validate ATT Workflow Driver SI ENABLED AWAITING ${onu_device} |
| 298 | @{container_list}= Create List |
Kailash Khalasi | 3070402 | 2018-10-18 09:13:26 -0700 | [diff] [blame^] | 299 | Append To List ${container_list} att-workflow-driver-att-workflow-driver |
| 300 | Append To List ${container_list} xos-core |
| 301 | Append To List ${container_list} vcore |
Kailash Khalasi | bf1478b | 2018-10-17 11:58:58 -0700 | [diff] [blame] | 302 | Set Suite Variable ${container_list} |
| 303 | ${datetime}= Get Current Datetime On Kubernetes Node localhost cord cord |
| 304 | Set Suite Variable ${datetime} |
Kailash Khalasi | 16d95c1 | 2018-09-21 14:17:28 -0700 | [diff] [blame] | 305 | |
Kailash Khalasi | bf1478b | 2018-10-17 11:58:58 -0700 | [diff] [blame] | 306 | Setup Test |
| 307 | ${datetime}= Get Current Datetime On Kubernetes Node ${kube_node_ip} cord cord |
| 308 | Set Suite Variable ${datetime} |
| 309 | ${RG_CONTAINER}= Run kubectl -n voltha get pod|grep "^rg-"|cut -d' ' -f1 |
| 310 | Set Suite Variable ${RG_CONTAINER} |
| 311 | |
| 312 | Test Cleanup |
| 313 | [Documentation] Restore back to initial state per each test |
| 314 | Log Kubernetes Containers Logs Since Time ${datetime} ${container_list} |
| 315 | Restart RG Pod |
| 316 | ${status} ${whitelist_id}= Run Keyword And Ignore Error Retrieve Whitelist Entry ${onu_device} |
| 317 | Run Keyword And Ignore Error CORD Put ${ATT_WHITELIST} {"pon_port_id": 1 } ${whitelist_id} |
| 318 | Run Keyword And Ignore Error CORD Put ${ATT_SERVICEINSTANCES} {"authentication_state": "AWAITING"} ${att_si_id} |
| 319 | Run Keyword And Ignore Error CORD Put ${ATT_SERVICEINSTANCES} {"onu_state": "ENABLED"} ${att_si_id} |
| 320 | Run Keyword And Ignore Error Create Whitelist |
| 321 | Run Keyword And Ignore Error Create Subscriber |
Kailash Khalasi | 16d95c1 | 2018-09-21 14:17:28 -0700 | [diff] [blame] | 322 | |
Kailash Khalasi | 0e515fe | 2018-10-02 12:13:47 -0700 | [diff] [blame] | 323 | Restart RG Pod |
| 324 | Run kubectl -n voltha delete pod ${RG_CONTAINER} |
| 325 | ${RG_CONTAINER}= Wait Until Keyword Succeeds 60s 1s Run kubectl -n voltha get pod|grep "^rg-"|cut -d' ' -f1 |
| 326 | Set Suite Variable ${RG_CONTAINER} |
| 327 | Run kubectl wait -n voltha pod/${RG_CONTAINER} --for condition=Ready --timeout=180s |
Kailash Khalasi | 16d95c1 | 2018-09-21 14:17:28 -0700 | [diff] [blame] | 328 | |
Kailash Khalasi | bf1478b | 2018-10-17 11:58:58 -0700 | [diff] [blame] | 329 | Create Whitelist |
| 330 | ${AttWhiteListDict}= utils.listToDict ${AttWhiteListList} 0 |
| 331 | ${resp}= CORD Post ${ATT_WHITELIST} ${AttWhiteListDict} |
| 332 | ${whitelist_id}= Get Json Value ${resp.content} /id |
| 333 | Set Global Variable ${whitelist_id} |
Kailash Khalasi | 16d95c1 | 2018-09-21 14:17:28 -0700 | [diff] [blame] | 334 | |
Kailash Khalasi | bf1478b | 2018-10-17 11:58:58 -0700 | [diff] [blame] | 335 | Remove Whitelist |
| 336 | ${whitelist_id}= Retrieve Whitelist Entry ${onu_device} |
| 337 | CORD Delete ${ATT_WHITELIST} ${whitelist_id} |
Kailash Khalasi | 16d95c1 | 2018-09-21 14:17:28 -0700 | [diff] [blame] | 338 | |
Kailash Khalasi | bf1478b | 2018-10-17 11:58:58 -0700 | [diff] [blame] | 339 | Create Subscriber |
| 340 | ${SubscriberDict}= utils.listToDict ${SubscriberList} 0 |
| 341 | CORD Post ${VOLT_SUBSCRIBER} ${SubscriberDict} |
Kailash Khalasi | 16d95c1 | 2018-09-21 14:17:28 -0700 | [diff] [blame] | 342 | |
Kailash Khalasi | bf1478b | 2018-10-17 11:58:58 -0700 | [diff] [blame] | 343 | Remove Subscriber |
| 344 | ${subscriber_id}= Retrieve Subscriber ${c_tag} |
| 345 | CORD Delete ${VOLT_SUBSCRIBER} ${subscriber_id} |
Kailash Khalasi | b5975cf | 2018-10-01 12:57:44 -0700 | [diff] [blame] | 346 | |
Kailash Khalasi | bf1478b | 2018-10-17 11:58:58 -0700 | [diff] [blame] | 347 | Create VOLT |
| 348 | ${VoltDeviceDict}= utils.listToDict ${VoltDeviceList} 0 |
| 349 | CORD Post ${VOLT_DEVICE} ${VoltDeviceDict} |
Kailash Khalasi | b5975cf | 2018-10-01 12:57:44 -0700 | [diff] [blame] | 350 | |
Kailash Khalasi | bf1478b | 2018-10-17 11:58:58 -0700 | [diff] [blame] | 351 | Update Whitelist with Wrong Location |
| 352 | ${whitelist_id}= Retrieve Whitelist Entry ${onu_device} |
| 353 | CORD Put ${ATT_WHITELIST} {"pon_port_id": 55 } ${whitelist_id} |
| 354 | |
| 355 | Update Whitelist with Correct Location |
| 356 | ${whitelist_id}= Retrieve Whitelist Entry ${onu_device} |
| 357 | CORD Put ${ATT_WHITELIST} {"pon_port_id": ${onu_location} } ${whitelist_id} |
| 358 | |