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