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 | f56a4fb | 2018-10-23 12:38:16 -0700 | [diff] [blame] | 18 | Suite Teardown Teardown |
Kailash Khalasi | bf1478b | 2018-10-17 11:58:58 -0700 | [diff] [blame] | 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 |
Andy Bavier | b6f5754 | 2019-03-11 14:41:03 -0700 | [diff] [blame] | 26 | Library ${VOLTHA_DIR}/tests/atests/common/testCaseUtils.py |
Kailash Khalasi | 16d95c1 | 2018-09-21 14:17:28 -0700 | [diff] [blame] | 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 |
Kailash Khalasi | bf1478b | 2018-10-17 11:58:58 -0700 | [diff] [blame] | 32 | Resource ../../Framework/Kubernetes.robot |
Kailash Khalasi | 16d95c1 | 2018-09-21 14:17:28 -0700 | [diff] [blame] | 33 | Resource ../../Framework/ONU.robot |
Kailash | aca803e | 2019-03-05 15:04:31 -0800 | [diff] [blame] | 34 | Resource ../../Framework/OLT.robot |
Kailash Khalasi | 16d95c1 | 2018-09-21 14:17:28 -0700 | [diff] [blame] | 35 | Resource ../../Framework/DHCP.robot |
| 36 | Variables ../../Properties/RestApiProperties.py |
| 37 | |
| 38 | *** Variables *** |
Andy Bavier | b6f5754 | 2019-03-11 14:41:03 -0700 | [diff] [blame] | 39 | ${VOLTHA_DIR} ~/cord/incubator/voltha |
Andy Bavier | 74d2e76 | 2019-04-29 15:29:03 -0700 | [diff] [blame] | 40 | ${WHITELIST_FILENAME} SIABWhitelist |
Kailash | 665f0c1 | 2019-04-29 14:20:56 -0700 | [diff] [blame] | 41 | ${SUBSCRIBER_FILENAME} SIABSubscriber |
| 42 | ${OLT_DEVICE_FILENAME} SIABOLTDevice |
| 43 | ${WHITELIST_PATHFILE} ${CURDIR}/data/${WHITELIST_FILENAME}.json |
| 44 | ${SUBSCRIBER_PATHFILE} ${CURDIR}/data/${SUBSCRIBER_FILENAME}.json |
| 45 | ${VOLT_DEVICE_PATHFILE} ${CURDIR}/data/${OLT_DEVICE_FILENAME}.json |
Andy Bavier | 224ac98 | 2019-05-03 14:41:43 -0700 | [diff] [blame] | 46 | ${export_kube_config} export KUBECONFIG=%{HOME}/.kube/config |
Kailash Khalasi | bf1478b | 2018-10-17 11:58:58 -0700 | [diff] [blame] | 47 | ${kube_node_ip} localhost |
| 48 | ${dst_host_ip} 172.18.0.10 |
Kailash Khalasi | cf006cb | 2018-10-19 08:36:51 -0700 | [diff] [blame] | 49 | ${local_user} %{USER} |
Kailash | abb029d | 2019-02-15 17:17:11 -0800 | [diff] [blame] | 50 | ${local_pass} ${None} |
Kailash Khalasi | 16d95c1 | 2018-09-21 14:17:28 -0700 | [diff] [blame] | 51 | |
| 52 | *** Test Cases *** |
Kailash Khalasi | bf1478b | 2018-10-17 11:58:58 -0700 | [diff] [blame] | 53 | ONU in Correct Location |
| 54 | [Documentation] Validates E2E Ping Connectivity and object states for the given scenario: |
| 55 | ... Configure whitelist with correct ONU location |
| 56 | ... Validate successful authentication/DHCP/E2E ping |
Kailash Khalasi | f56a4fb | 2018-10-23 12:38:16 -0700 | [diff] [blame] | 57 | [Setup] None |
Kailash Khalasi | 92061c1 | 2018-10-29 11:52:39 -0700 | [diff] [blame] | 58 | [Tags] stable latest test1 |
Andy Bavier | df70bba | 2019-01-24 07:06:38 -0700 | [diff] [blame] | 59 | Subscriber Ready to Authenticate |
Kailash Khalasi | cf006cb | 2018-10-19 08:36:51 -0700 | [diff] [blame] | 60 | Validate Authentication True eth0 wpa_supplicant.conf ${kube_node_ip} ${local_user} ${local_pass} K8S ${RG_CONTAINER} |
Andy Bavier | df70bba | 2019-01-24 07:06:38 -0700 | [diff] [blame] | 61 | Subscriber Service Chain Created |
Kailash Khalasi | cf006cb | 2018-10-19 08:36:51 -0700 | [diff] [blame] | 62 | 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] | 63 | ${subscriber_id}= Retrieve Subscriber ${c_tag} |
| 64 | CORD Put ${VOLT_SUBSCRIBER} {"status":"disabled"} ${subscriber_id} |
Andy Bavier | 3075b9b | 2019-01-31 13:45:35 -0700 | [diff] [blame] | 65 | No Subscriber Service Chain |
Andy Bavier | 81de8b7 | 2018-11-20 10:15:06 -0700 | [diff] [blame] | 66 | 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] | 67 | Restart RG Pod |
Andy Bavier | df70bba | 2019-01-24 07:06:38 -0700 | [diff] [blame] | 68 | CORD Put ${VOLT_SUBSCRIBER} {"status":"awaiting-auth"} ${subscriber_id} |
| 69 | # ATTWD SI auth_state is already "APPROVED" here from previous auth... not sure if this matters |
Kailash Khalasi | cf006cb | 2018-10-19 08:36:51 -0700 | [diff] [blame] | 70 | Validate Authentication True eth0 wpa_supplicant.conf ${kube_node_ip} ${local_user} ${local_pass} K8S ${RG_CONTAINER} |
Andy Bavier | df70bba | 2019-01-24 07:06:38 -0700 | [diff] [blame] | 71 | Subscriber Service Chain Created |
Kailash Khalasi | cf006cb | 2018-10-19 08:36:51 -0700 | [diff] [blame] | 72 | 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] | 73 | |
Kailash Khalasi | bf1478b | 2018-10-17 11:58:58 -0700 | [diff] [blame] | 74 | ONU in Correct Location -> Remove ONU from Whitelist -> Add ONU to Whitelist |
| 75 | [Documentation] Validates E2E Ping Connectivity and object states for the given scenario: |
| 76 | ... Configure whitelist with correct ONU location |
| 77 | ... Validate successful authentication/DHCP/E2E ping |
| 78 | ... Remove ONU from whitelist |
| 79 | ... Validate failed authentication/DHCP/E2E ping |
| 80 | ... Add ONU to whitelist |
| 81 | ... Validate successful authentication/DHCP/E2E ping |
Kailash | b49e845 | 2018-12-18 08:29:11 -0800 | [diff] [blame] | 82 | [Tags] stable latest test2 |
Andy Bavier | 3075b9b | 2019-01-31 13:45:35 -0700 | [diff] [blame] | 83 | Subscriber Ready to Authenticate |
Kailash Khalasi | cf006cb | 2018-10-19 08:36:51 -0700 | [diff] [blame] | 84 | Validate Authentication True eth0 wpa_supplicant.conf ${kube_node_ip} ${local_user} ${local_pass} K8S ${RG_CONTAINER} |
Andy Bavier | 3075b9b | 2019-01-31 13:45:35 -0700 | [diff] [blame] | 85 | Subscriber Service Chain Created |
Kailash Khalasi | cf006cb | 2018-10-19 08:36:51 -0700 | [diff] [blame] | 86 | 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 | 821de7a | 2018-11-02 11:32:49 -0700 | [diff] [blame] | 87 | Reset SIAB Environment |
Kailash Khalasi | bf1478b | 2018-10-17 11:58:58 -0700 | [diff] [blame] | 88 | Remove Whitelist |
Kailash | b49e845 | 2018-12-18 08:29:11 -0800 | [diff] [blame] | 89 | Wait Until Keyword Succeeds 120s 2s Validate ONU States UNKNOWN DISABLED ${onu_device} |
Andy Bavier | 3075b9b | 2019-01-31 13:45:35 -0700 | [diff] [blame] | 90 | Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI DISABLED AWAITING ${onu_device} ONU not found in whitelist |
Kailash Khalasi | bf1478b | 2018-10-17 11:58:58 -0700 | [diff] [blame] | 91 | Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status awaiting-auth ${onu_device} |
Kailash | a02472b | 2018-12-18 09:18:20 -0800 | [diff] [blame] | 92 | Validate Authentication False eth0 wpa_supplicant.conf ${kube_node_ip} ${local_user} ${local_pass} K8S ${RG_CONTAINER} |
Andy Bavier | 3075b9b | 2019-01-31 13:45:35 -0700 | [diff] [blame] | 93 | No Subscriber Service Chain |
Kailash | a02472b | 2018-12-18 09:18:20 -0800 | [diff] [blame] | 94 | 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 | 821de7a | 2018-11-02 11:32:49 -0700 | [diff] [blame] | 95 | Reset SIAB Environment |
Andy Bavier | 3075b9b | 2019-01-31 13:45:35 -0700 | [diff] [blame] | 96 | Subscriber Ready to Authenticate |
Kailash Khalasi | cf006cb | 2018-10-19 08:36:51 -0700 | [diff] [blame] | 97 | Validate Authentication True eth0 wpa_supplicant.conf ${kube_node_ip} ${local_user} ${local_pass} K8S ${RG_CONTAINER} |
Andy Bavier | 3075b9b | 2019-01-31 13:45:35 -0700 | [diff] [blame] | 98 | Subscriber Service Chain Created |
Kailash Khalasi | cf006cb | 2018-10-19 08:36:51 -0700 | [diff] [blame] | 99 | 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] | 100 | |
Kailash Khalasi | bf1478b | 2018-10-17 11:58:58 -0700 | [diff] [blame] | 101 | ONU in Correct Location -> ONU in Wrong Location -> ONU in Correct Location |
| 102 | [Documentation] Validates E2E Ping Connectivity and object states for the given scenario: |
| 103 | ... Configure whitelist with correct ONU location |
| 104 | ... Validate successful authentication/DHCP/E2E ping |
| 105 | ... Update whitelist with wrong ONU location |
| 106 | ... Validate failed authentication/DHCP/E2E ping |
| 107 | ... Update whitelist with correct ONU location |
| 108 | ... Validate successful authentication/DHCP/E2E ping |
Kailash | b49e845 | 2018-12-18 08:29:11 -0800 | [diff] [blame] | 109 | [Tags] stable latest test3 |
Andy Bavier | 3075b9b | 2019-01-31 13:45:35 -0700 | [diff] [blame] | 110 | Subscriber Ready to Authenticate |
Kailash Khalasi | cf006cb | 2018-10-19 08:36:51 -0700 | [diff] [blame] | 111 | Validate Authentication True eth0 wpa_supplicant.conf ${kube_node_ip} ${local_user} ${local_pass} K8S ${RG_CONTAINER} |
Andy Bavier | 3075b9b | 2019-01-31 13:45:35 -0700 | [diff] [blame] | 112 | Subscriber Service Chain Created |
Kailash Khalasi | cf006cb | 2018-10-19 08:36:51 -0700 | [diff] [blame] | 113 | 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] | 114 | Restart RG Pod |
| 115 | Update Whitelist with Wrong Location |
Andy Bavier | 3075b9b | 2019-01-31 13:45:35 -0700 | [diff] [blame] | 116 | Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI DISABLED AWAITING ${onu_device} ONU activated in wrong location |
Kailash Khalasi | bf1478b | 2018-10-17 11:58:58 -0700 | [diff] [blame] | 117 | Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status awaiting-auth ${onu_device} |
Andy Bavier | 3075b9b | 2019-01-31 13:45:35 -0700 | [diff] [blame] | 118 | No Subscriber Service Chain |
Kailash Khalasi | cf006cb | 2018-10-19 08:36:51 -0700 | [diff] [blame] | 119 | Validate Authentication False eth0 wpa_supplicant.conf ${kube_node_ip} ${local_user} ${local_pass} K8S ${RG_CONTAINER} |
| 120 | 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] | 121 | Restart RG Pod |
| 122 | Update Whitelist with Correct Location |
Andy Bavier | 3075b9b | 2019-01-31 13:45:35 -0700 | [diff] [blame] | 123 | Subscriber Ready to Authenticate |
Kailash Khalasi | cf006cb | 2018-10-19 08:36:51 -0700 | [diff] [blame] | 124 | Validate Authentication True eth0 wpa_supplicant.conf ${kube_node_ip} ${local_user} ${local_pass} K8S ${RG_CONTAINER} |
Andy Bavier | 3075b9b | 2019-01-31 13:45:35 -0700 | [diff] [blame] | 125 | Subscriber Service Chain Created |
Kailash Khalasi | cf006cb | 2018-10-19 08:36:51 -0700 | [diff] [blame] | 126 | 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] | 127 | |
| 128 | ONU in Correct Location -> Remove Subscriber -> Create Subscriber |
| 129 | [Documentation] Validates E2E Ping Connectivity and object states for the given scenario: |
| 130 | ... Configure whitelist with correct ONU location |
| 131 | ... Validate successful authentication/DHCP/E2E ping |
| 132 | ... Remove subscriber model |
| 133 | ... Validate failed authentication/DHCP/E2E ping |
| 134 | ... Recreate subscriber model |
| 135 | ... Validate successful authentication/DHCP/E2E ping |
Kailash | b49e845 | 2018-12-18 08:29:11 -0800 | [diff] [blame] | 136 | [Tags] stable latest test4 |
Andy Bavier | 3075b9b | 2019-01-31 13:45:35 -0700 | [diff] [blame] | 137 | Subscriber Ready to Authenticate |
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} |
Andy Bavier | 3075b9b | 2019-01-31 13:45:35 -0700 | [diff] [blame] | 139 | Subscriber Service Chain Created |
Kailash Khalasi | cf006cb | 2018-10-19 08:36:51 -0700 | [diff] [blame] | 140 | 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] | 141 | Restart RG Pod |
| 142 | Remove Subscriber |
Andy Bavier | 3075b9b | 2019-01-31 13:45:35 -0700 | [diff] [blame] | 143 | No Subscriber Service Chain |
Andy Bavier | 3d6ac1a | 2018-11-20 15:23:40 -0700 | [diff] [blame] | 144 | Validate Authentication True eth0 wpa_supplicant.conf ${kube_node_ip} ${local_user} ${local_pass} K8S ${RG_CONTAINER} |
Kailash Khalasi | cf006cb | 2018-10-19 08:36:51 -0700 | [diff] [blame] | 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 | f76cad9 | 2018-10-19 12:33:21 -0700 | [diff] [blame] | 148 | Wait Until Keyword Succeeds 60s 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} |
Andy Bavier | 3075b9b | 2019-01-31 13:45:35 -0700 | [diff] [blame] | 150 | Subscriber Service Chain Created |
Kailash Khalasi | cf006cb | 2018-10-19 08:36:51 -0700 | [diff] [blame] | 151 | 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] | 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 |
Kailash | b49e845 | 2018-12-18 08:29:11 -0800 | [diff] [blame] | 159 | [Tags] stable latest test5 |
Kailash Khalasi | bf1478b | 2018-10-17 11:58:58 -0700 | [diff] [blame] | 160 | Remove Subscriber |
Kailash Khalasi | a2e6aa8 | 2018-10-23 14:56:02 -0700 | [diff] [blame] | 161 | Wait Until Keyword Succeeds 60s 15s Validate ONU States ACTIVE ENABLED ${onu_device} |
Kailash Khalasi | bf1478b | 2018-10-17 11:58:58 -0700 | [diff] [blame] | 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 | f76cad9 | 2018-10-19 12:33:21 -0700 | [diff] [blame] | 168 | Wait Until Keyword Succeeds 60s 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} |
Andy Bavier | 3075b9b | 2019-01-31 13:45:35 -0700 | [diff] [blame] | 170 | Subscriber Service Chain Created |
Kailash Khalasi | cf006cb | 2018-10-19 08:36:51 -0700 | [diff] [blame] | 171 | 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] | 172 | |
| 173 | ONU in Correct Location (Skip Authentication) |
| 174 | [Documentation] Validates E2E Ping Connectivity and object states for the given scenario: |
| 175 | ... Configure whitelist with correct ONU location and skip RG authentication |
| 176 | ... Validate failed authentication/DHCP/E2E ping |
Kailash Khalasi | 92061c1 | 2018-10-29 11:52:39 -0700 | [diff] [blame] | 177 | [Tags] stable latest test6 |
Andy Bavier | 3075b9b | 2019-01-31 13:45:35 -0700 | [diff] [blame] | 178 | Subscriber Ready to Authenticate |
| 179 | No Subscriber Service Chain |
Kailash Khalasi | a2e6aa8 | 2018-10-23 14:56:02 -0700 | [diff] [blame] | 180 | 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] | 181 | |
| 182 | ONU not in Whitelist |
| 183 | [Documentation] Validates E2E Ping Connectivity and object states for the given scenario: |
| 184 | ... Skip whitelist configuration for ONU |
| 185 | ... Validate failed authentication/DHCP/E2E ping |
Kailash Khalasi | 92061c1 | 2018-10-29 11:52:39 -0700 | [diff] [blame] | 186 | [Tags] stable latest test7 |
Kailash Khalasi | a2e6aa8 | 2018-10-23 14:56:02 -0700 | [diff] [blame] | 187 | [Setup] Simple Setup |
Kailash Khalasi | 8b3523c | 2018-11-08 15:31:49 -0800 | [diff] [blame] | 188 | Wait Until Keyword Succeeds 60s 15s Validate ONU States UNKNOWN DISABLED ${onu_device} |
Kailash Khalasi | a2e6aa8 | 2018-10-23 14:56:02 -0700 | [diff] [blame] | 189 | Wait Until Keyword Succeeds 60s 2s Create Subscriber |
Kailash Khalasi | a2e6aa8 | 2018-10-23 14:56:02 -0700 | [diff] [blame] | 190 | Wait Until Keyword Succeeds 60s 15s Validate ONU States UNKNOWN DISABLED ${onu_device} |
Kailash Khalasi | bf1478b | 2018-10-17 11:58:58 -0700 | [diff] [blame] | 191 | Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI DISABLED AWAITING ${onu_device} |
Kailash Khalasi | 8b3523c | 2018-11-08 15:31:49 -0800 | [diff] [blame] | 192 | Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status awaiting-auth ${onu_device} pre-provisioned |
Kailash Khalasi | cf006cb | 2018-10-19 08:36:51 -0700 | [diff] [blame] | 193 | Validate Authentication False eth0 wpa_supplicant.conf ${kube_node_ip} ${local_user} ${local_pass} K8S ${RG_CONTAINER} |
Andy Bavier | 3075b9b | 2019-01-31 13:45:35 -0700 | [diff] [blame] | 194 | Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI DISABLED AWAITING ${onu_device} ONU not found in whitelist |
Kailash Khalasi | 8b3523c | 2018-11-08 15:31:49 -0800 | [diff] [blame] | 195 | Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status awaiting-auth ${onu_device} pre-provisioned |
Andy Bavier | 3075b9b | 2019-01-31 13:45:35 -0700 | [diff] [blame] | 196 | No Subscriber Service Chain |
Kailash Khalasi | cf006cb | 2018-10-19 08:36:51 -0700 | [diff] [blame] | 197 | 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] | 198 | |
| 199 | ONU not in Whitelist (Skip Subscriber Provisioning) -> Add ONU to Whitelist -> Provision Subscriber |
| 200 | [Documentation] Validates E2E Ping Connectivity and object states for the given scenario: |
| 201 | ... Skip whitelist configuration for ONU and subscriber provisioning |
| 202 | ... Validate successful authentication but failed DHCP/E2E ping |
| 203 | ... Configure whitelist with correct ONU location |
| 204 | ... Validate successful authentication (expected with the ONF pod setup) but failed DHCP/E2E ping |
| 205 | ... Provision subscriber |
| 206 | ... Validate successful authentication/DHCP/E2E ping |
Kailash Khalasi | c747751 | 2018-11-08 07:55:01 -0800 | [diff] [blame] | 207 | [Tags] latest test8 stable |
Kailash Khalasi | a2e6aa8 | 2018-10-23 14:56:02 -0700 | [diff] [blame] | 208 | [Setup] Simple Setup |
Kailash Khalasi | a2e6aa8 | 2018-10-23 14:56:02 -0700 | [diff] [blame] | 209 | Wait Until Keyword Succeeds 60s 15s Validate ONU States UNKNOWN DISABLED ${onu_device} |
Andy Bavier | 3075b9b | 2019-01-31 13:45:35 -0700 | [diff] [blame] | 210 | Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI DISABLED AWAITING ${onu_device} ONU not found in whitelist |
Kailash Khalasi | cf006cb | 2018-10-19 08:36:51 -0700 | [diff] [blame] | 211 | Validate Authentication False eth0 wpa_supplicant.conf ${kube_node_ip} ${local_user} ${local_pass} K8S ${RG_CONTAINER} |
| 212 | 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] | 213 | Restart RG Pod |
| 214 | Create Whitelist |
Kailash Khalasi | a2e6aa8 | 2018-10-23 14:56:02 -0700 | [diff] [blame] | 215 | Wait Until Keyword Succeeds 60s 15s Validate ONU States ACTIVE ENABLED ${onu_device} |
Kailash Khalasi | bf1478b | 2018-10-17 11:58:58 -0700 | [diff] [blame] | 216 | 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] | 217 | 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] | 218 | 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] | 219 | 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] | 220 | Restart RG Pod |
| 221 | Create Subscriber |
Kailash Khalasi | f76cad9 | 2018-10-19 12:33:21 -0700 | [diff] [blame] | 222 | Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status pre-provisioned ${onu_device} |
Kailash Khalasi | cf006cb | 2018-10-19 08:36:51 -0700 | [diff] [blame] | 223 | Validate Authentication True eth0 wpa_supplicant.conf ${kube_node_ip} ${local_user} ${local_pass} K8S ${RG_CONTAINER} |
Andy Bavier | 3075b9b | 2019-01-31 13:45:35 -0700 | [diff] [blame] | 224 | Subscriber Service Chain Created |
Kailash Khalasi | cf006cb | 2018-10-19 08:36:51 -0700 | [diff] [blame] | 225 | 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] | 226 | |
| 227 | ONU in Wrong Location |
| 228 | [Documentation] Validates E2E Ping Connectivity and object states for the given scenario: |
| 229 | ... Configure whitelist with wrong ONU location |
| 230 | ... Validate failed authentication/DHCP/E2E ping |
Kailash Khalasi | c747751 | 2018-11-08 07:55:01 -0800 | [diff] [blame] | 231 | [Tags] latest test9 stable |
Kailash Khalasi | bf1478b | 2018-10-17 11:58:58 -0700 | [diff] [blame] | 232 | Update Whitelist with Wrong Location |
Kailash Khalasi | a2e6aa8 | 2018-10-23 14:56:02 -0700 | [diff] [blame] | 233 | Wait Until Keyword Succeeds 60s 15s Validate ONU States UNKNOWN DISABLED ${onu_device} |
Andy Bavier | 3075b9b | 2019-01-31 13:45:35 -0700 | [diff] [blame] | 234 | Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI DISABLED AWAITING ${onu_device} ONU activated in wrong location |
Kailash Khalasi | bf1478b | 2018-10-17 11:58:58 -0700 | [diff] [blame] | 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 Authentication False eth0 wpa_supplicant.conf ${kube_node_ip} ${local_user} ${local_pass} K8S ${RG_CONTAINER} |
Andy Bavier | 3075b9b | 2019-01-31 13:45:35 -0700 | [diff] [blame] | 237 | Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI DISABLED AWAITING ${onu_device} ONU activated in wrong location |
Kailash Khalasi | bf1478b | 2018-10-17 11:58:58 -0700 | [diff] [blame] | 238 | Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status awaiting-auth ${onu_device} |
Andy Bavier | 3075b9b | 2019-01-31 13:45:35 -0700 | [diff] [blame] | 239 | No Subscriber Service Chain |
Kailash Khalasi | cf006cb | 2018-10-19 08:36:51 -0700 | [diff] [blame] | 240 | 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] | 241 | |
| 242 | ONU in Wrong Location (Skip Subscriber Provisioning) -> ONU in Correct Location -> Provision Subscriber |
| 243 | [Documentation] Validates E2E Ping Connectivity and object states for the given scenario: |
| 244 | ... Configure whitelist with wrong ONU location and skip subscriber provisioning |
| 245 | ... Validate failed authentication/DHCP/E2E ping |
| 246 | ... Configure whitelist with correct ONU location |
| 247 | ... Validate successful authentication (expected with the ONF pod setup) but failed DHCP/E2E ping |
| 248 | ... Provision subscriber |
| 249 | ... Validate successful authentication/DHCP/E2E ping |
Kailash | b49e845 | 2018-12-18 08:29:11 -0800 | [diff] [blame] | 250 | [Tags] stable latest test10 |
Kailash Khalasi | a2e6aa8 | 2018-10-23 14:56:02 -0700 | [diff] [blame] | 251 | [Setup] Simple Setup |
Kailash Khalasi | a2e6aa8 | 2018-10-23 14:56:02 -0700 | [diff] [blame] | 252 | Wait Until Keyword Succeeds 60s 2s Create Whitelist |
Kailash Khalasi | bf1478b | 2018-10-17 11:58:58 -0700 | [diff] [blame] | 253 | Update Whitelist with Wrong Location |
Kailash Khalasi | a2e6aa8 | 2018-10-23 14:56:02 -0700 | [diff] [blame] | 254 | Wait Until Keyword Succeeds 60s 15s Validate ONU States UNKNOWN DISABLED ${onu_device} |
Andy Bavier | 3075b9b | 2019-01-31 13:45:35 -0700 | [diff] [blame] | 255 | Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI DISABLED AWAITING ${onu_device} ONU activated in wrong location |
Kailash Khalasi | cf006cb | 2018-10-19 08:36:51 -0700 | [diff] [blame] | 256 | 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] | 257 | 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] | 258 | 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] | 259 | Restart RG Pod |
| 260 | Update Whitelist with Correct Location |
Kailash Khalasi | a2e6aa8 | 2018-10-23 14:56:02 -0700 | [diff] [blame] | 261 | Wait Until Keyword Succeeds 60s 15s Validate ONU States ACTIVE ENABLED ${onu_device} |
Kailash Khalasi | bf1478b | 2018-10-17 11:58:58 -0700 | [diff] [blame] | 262 | 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] | 263 | Validate Authentication True eth0 wpa_supplicant.conf ${kube_node_ip} ${local_user} ${local_pass} K8S ${RG_CONTAINER} |
Kailash | 4b39ecf | 2018-12-18 08:35:34 -0800 | [diff] [blame] | 264 | Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI ENABLED APPROVED ${onu_device} |
Kailash | a02472b | 2018-12-18 09:18:20 -0800 | [diff] [blame] | 265 | 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] | 266 | Restart RG Pod |
| 267 | Create Subscriber |
Andy Bavier | df70bba | 2019-01-24 07:06:38 -0700 | [diff] [blame] | 268 | Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status awaiting-auth ${onu_device} pre-provisioned |
Kailash Khalasi | cf006cb | 2018-10-19 08:36:51 -0700 | [diff] [blame] | 269 | Validate Authentication True eth0 wpa_supplicant.conf ${kube_node_ip} ${local_user} ${local_pass} K8S ${RG_CONTAINER} |
Andy Bavier | 3075b9b | 2019-01-31 13:45:35 -0700 | [diff] [blame] | 270 | Subscriber Service Chain Created |
Kailash Khalasi | cf006cb | 2018-10-19 08:36:51 -0700 | [diff] [blame] | 271 | 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] | 272 | |
| 273 | *** Keywords *** |
| 274 | Setup |
| 275 | ${auth} = Create List ${XOS_USER} ${XOS_PASSWD} |
| 276 | ${HEADERS} Create Dictionary Content-Type=application/json |
| 277 | Create Session ${server_ip} http://${server_ip}:${server_port} auth=${AUTH} headers=${HEADERS} |
| 278 | ${att_workflow_service_id}= Get Service Owner Id ${ATT_SERVICE} |
| 279 | ${volt_service_id}= Get Service Owner Id ${VOLT_SERVICE} |
| 280 | ${AttWhiteListList}= utils.jsonToList ${WHITELIST_PATHFILE} AttWhiteListInfo |
Kailash Khalasi | bf1478b | 2018-10-17 11:58:58 -0700 | [diff] [blame] | 281 | Set Suite Variable ${AttWhiteListList} |
Kailash Khalasi | 16d95c1 | 2018-09-21 14:17:28 -0700 | [diff] [blame] | 282 | ${AttWhiteListDict}= utils.listToDict ${AttWhiteListList} 0 |
| 283 | ${AttWhiteListDict}= utils.setFieldValueInDict ${AttWhiteListDict} owner_id ${att_workflow_service_id} |
Kailash Khalasi | bf1478b | 2018-10-17 11:58:58 -0700 | [diff] [blame] | 284 | ${onu_device}= Get From Dictionary ${AttWhiteListDict} serial_number |
| 285 | Log ${onu_device} |
| 286 | Set Global Variable ${onu_device} |
| 287 | ${onu_location}= Get From Dictionary ${AttWhiteListDict} pon_port_id |
| 288 | Set Global Variable ${onu_location} |
Kailash Khalasi | 16d95c1 | 2018-09-21 14:17:28 -0700 | [diff] [blame] | 289 | ${SubscriberList}= utils.jsonToList ${SUBSCRIBER_PATHFILE} SubscriberInfo |
Kailash Khalasi | bf1478b | 2018-10-17 11:58:58 -0700 | [diff] [blame] | 290 | Set Global Variable ${SubscriberList} |
Kailash Khalasi | 16d95c1 | 2018-09-21 14:17:28 -0700 | [diff] [blame] | 291 | ${SubscriberDict}= utils.listToDict ${SubscriberList} 0 |
| 292 | ${s_tag}= utils.getFieldValueFromDict ${SubscriberDict} s_tag |
| 293 | ${c_tag}= utils.getFieldValueFromDict ${SubscriberDict} c_tag |
| 294 | ${VoltDeviceList}= utils.jsonToList ${VOLT_DEVICE_PATHFILE} VOLTDeviceInfo |
Kailash Khalasi | 4e1ce76 | 2018-12-18 20:29:29 -0800 | [diff] [blame] | 295 | ${VoltDeviceDict}= utils.setFieldValueInDict ${VoltDeviceList[0]} volt_service_id ${volt_service_id} |
Kailash Khalasi | bf1478b | 2018-10-17 11:58:58 -0700 | [diff] [blame] | 296 | Set Global Variable ${VoltDeviceList} |
Kailash Khalasi | 4e1ce76 | 2018-12-18 20:29:29 -0800 | [diff] [blame] | 297 | Set Global Variable ${VoltDeviceDict} |
Kailash Khalasi | 16d95c1 | 2018-09-21 14:17:28 -0700 | [diff] [blame] | 298 | Set Suite Variable ${s_tag} |
| 299 | Set Suite Variable ${c_tag} |
Kailash Khalasi | bf1478b | 2018-10-17 11:58:58 -0700 | [diff] [blame] | 300 | ${whitelist_id}= Retrieve Whitelist Entry ${onu_device} |
Kailash Khalasi | 0e515fe | 2018-10-02 12:13:47 -0700 | [diff] [blame] | 301 | Set Suite Variable ${whitelist_id} |
Kailash Khalasi | bf1478b | 2018-10-17 11:58:58 -0700 | [diff] [blame] | 302 | ${att_si_id}= Retrieve ATT Service Instance ID ${onu_device} |
Kailash Khalasi | 0e515fe | 2018-10-02 12:13:47 -0700 | [diff] [blame] | 303 | Set Suite Variable ${att_si_id} |
Kailash Khalasi | 16d95c1 | 2018-09-21 14:17:28 -0700 | [diff] [blame] | 304 | ${RG_CONTAINER}= Run kubectl -n voltha get pod|grep "^rg-"|cut -d' ' -f1 |
| 305 | Set Suite Variable ${RG_CONTAINER} |
Kailash Khalasi | b5975cf | 2018-10-01 12:57:44 -0700 | [diff] [blame] | 306 | ## Validate ATT Workflow SI |
Kailash Khalasi | f76cad9 | 2018-10-19 12:33:21 -0700 | [diff] [blame] | 307 | Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI ENABLED AWAITING ${onu_device} |
Kailash Khalasi | bf1478b | 2018-10-17 11:58:58 -0700 | [diff] [blame] | 308 | @{container_list}= Create List |
Kailash Khalasi | dd9136a | 2018-10-18 11:16:18 -0700 | [diff] [blame] | 309 | Append To List ${container_list} att-workflow-att-workflow-driver |
Kailash Khalasi | e59ba70 | 2018-12-18 19:36:03 -0800 | [diff] [blame] | 310 | Append To List ${container_list} seba-services-fabric-crossconnect |
| 311 | Append To List ${container_list} seba-services-rcord |
| 312 | Append To List ${container_list} seba-services-volt |
Kailash Khalasi | 3070402 | 2018-10-18 09:13:26 -0700 | [diff] [blame] | 313 | Append To List ${container_list} xos-core |
| 314 | Append To List ${container_list} vcore |
Kailash Khalasi | bf1478b | 2018-10-17 11:58:58 -0700 | [diff] [blame] | 315 | Set Suite Variable ${container_list} |
Kailash | abb029d | 2019-02-15 17:17:11 -0800 | [diff] [blame] | 316 | Setup SSH Keys to Localhost |
Kailash Khalasi | cf006cb | 2018-10-19 08:36:51 -0700 | [diff] [blame] | 317 | ${datetime}= Get Current Datetime On Kubernetes Node localhost ${local_user} ${local_pass} |
Kailash Khalasi | bf1478b | 2018-10-17 11:58:58 -0700 | [diff] [blame] | 318 | Set Suite Variable ${datetime} |
Kailash Khalasi | 16d95c1 | 2018-09-21 14:17:28 -0700 | [diff] [blame] | 319 | |
Kailash Khalasi | f56a4fb | 2018-10-23 12:38:16 -0700 | [diff] [blame] | 320 | Teardown |
| 321 | Setup Test |
| 322 | Delete All Sessions |
| 323 | |
Kailash Khalasi | bf1478b | 2018-10-17 11:58:58 -0700 | [diff] [blame] | 324 | Setup Test |
Kailash | 6e02a07 | 2019-04-04 09:33:43 -0700 | [diff] [blame] | 325 | ${datetime}= Run date +"%Y-%m-%dT%H:%M:%S.%NZ" |
Kailash Khalasi | bf1478b | 2018-10-17 11:58:58 -0700 | [diff] [blame] | 326 | Set Suite Variable ${datetime} |
Kailash Khalasi | f56a4fb | 2018-10-23 12:38:16 -0700 | [diff] [blame] | 327 | Wait Until Keyword Succeeds 60s 2s Create Subscriber |
Andy Bavier | df70bba | 2019-01-24 07:06:38 -0700 | [diff] [blame] | 328 | Wait Until Keyword Succeeds 60s 2s Create Whitelist |
| 329 | Subscriber Ready to Authenticate |
| 330 | |
| 331 | Subscriber Ready to Authenticate |
| 332 | Wait Until Keyword Succeeds 60s 15s Validate ONU States ACTIVE ENABLED ${onu_device} |
Andy Bavier | 3075b9b | 2019-01-31 13:45:35 -0700 | [diff] [blame] | 333 | Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI ENABLED AWAITING ${onu_device} ONU has been validated - Awaiting Authentication |
Kailash Khalasi | f56a4fb | 2018-10-23 12:38:16 -0700 | [diff] [blame] | 334 | Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status awaiting-auth ${onu_device} |
Andy Bavier | df70bba | 2019-01-24 07:06:38 -0700 | [diff] [blame] | 335 | |
| 336 | Subscriber Service Chain Created |
Andy Bavier | 3075b9b | 2019-01-31 13:45:35 -0700 | [diff] [blame] | 337 | Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI ENABLED APPROVED ${onu_device} ONU has been validated - Authentication succeeded |
Andy Bavier | df70bba | 2019-01-24 07:06:38 -0700 | [diff] [blame] | 338 | Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status enabled ${onu_device} |
| 339 | Wait Until Keyword Succeeds 60s 2s Validate Subscriber Service Chain ${onu_device} True |
| 340 | Wait Until Keyword Succeeds 60s 2s Validate Fabric CrossConnect SI ${s_tag} True |
Kailash | 66b9a8d | 2019-02-07 10:18:55 -0800 | [diff] [blame] | 341 | Wait Until Keyword Succeeds 60s 2s Validate XConnect in ONOS True |
Kailash Khalasi | bf1478b | 2018-10-17 11:58:58 -0700 | [diff] [blame] | 342 | |
Andy Bavier | 3075b9b | 2019-01-31 13:45:35 -0700 | [diff] [blame] | 343 | No Subscriber Service Chain |
| 344 | Wait Until Keyword Succeeds 60s 2s Validate Subscriber Service Chain ${onu_device} False |
| 345 | Wait Until Keyword Succeeds 60s 2s Validate Fabric CrossConnect SI ${s_tag} False |
Kailash | 66b9a8d | 2019-02-07 10:18:55 -0800 | [diff] [blame] | 346 | Wait Until Keyword Succeeds 60s 2s Validate XConnect in ONOS False |
Andy Bavier | 3075b9b | 2019-01-31 13:45:35 -0700 | [diff] [blame] | 347 | |
Kailash Khalasi | a2e6aa8 | 2018-10-23 14:56:02 -0700 | [diff] [blame] | 348 | Simple Setup |
Kailash | 6e02a07 | 2019-04-04 09:33:43 -0700 | [diff] [blame] | 349 | ${datetime}= Run date +"%Y-%m-%dT%H:%M:%S.%NZ" |
Kailash Khalasi | a2e6aa8 | 2018-10-23 14:56:02 -0700 | [diff] [blame] | 350 | Set Suite Variable ${datetime} |
| 351 | ${RG_CONTAINER}= Run kubectl -n voltha get pod|grep "^rg-"|cut -d' ' -f1 |
| 352 | Set Suite Variable ${RG_CONTAINER} |
| 353 | |
Kailash Khalasi | bf1478b | 2018-10-17 11:58:58 -0700 | [diff] [blame] | 354 | Test Cleanup |
| 355 | [Documentation] Restore back to initial state per each test |
Kailash | aca803e | 2019-03-05 15:04:31 -0800 | [diff] [blame] | 356 | Get VOLTHA Status |
| 357 | Get ONOS Status |
Kailash Khalasi | bf1478b | 2018-10-17 11:58:58 -0700 | [diff] [blame] | 358 | Log Kubernetes Containers Logs Since Time ${datetime} ${container_list} |
Kailash Khalasi | f56a4fb | 2018-10-23 12:38:16 -0700 | [diff] [blame] | 359 | Wait Until Keyword Succeeds 60s 2s Clean Up Objects ${ATT_WHITELIST} |
Andy Bavier | df70bba | 2019-01-24 07:06:38 -0700 | [diff] [blame] | 360 | Wait Until Keyword Succeeds 30s 2s Validate ONU States UNKNOWN DISABLED ${onu_device} |
| 361 | Wait Until Keyword Succeeds 30s 2s Validate ATT Workflow Driver SI DISABLED AWAITING ${onu_device} |
Andy Bavier | 3075b9b | 2019-01-31 13:45:35 -0700 | [diff] [blame] | 362 | Wait Until Keyword Succeeds 60s 2s Clean Up Objects ${VOLT_SUBSCRIBER} |
| 363 | Wait Until Keyword Succeeds 60s 2s Validate Subscriber Service Chain ${onu_device} False |
| 364 | Wait Until Keyword Succeeds 60s 2s Validate Fabric CrossConnect SI ${s_tag} False |
Kailash Khalasi | bf1478b | 2018-10-17 11:58:58 -0700 | [diff] [blame] | 365 | Restart RG Pod |
Kailash Khalasi | 16d95c1 | 2018-09-21 14:17:28 -0700 | [diff] [blame] | 366 | |
Kailash Khalasi | 0e515fe | 2018-10-02 12:13:47 -0700 | [diff] [blame] | 367 | Restart RG Pod |
| 368 | Run kubectl -n voltha delete pod ${RG_CONTAINER} |
| 369 | ${RG_CONTAINER}= Wait Until Keyword Succeeds 60s 1s Run kubectl -n voltha get pod|grep "^rg-"|cut -d' ' -f1 |
| 370 | Set Suite Variable ${RG_CONTAINER} |
| 371 | 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] | 372 | |
Kailash Khalasi | bf1478b | 2018-10-17 11:58:58 -0700 | [diff] [blame] | 373 | Create Whitelist |
| 374 | ${AttWhiteListDict}= utils.listToDict ${AttWhiteListList} 0 |
| 375 | ${resp}= CORD Post ${ATT_WHITELIST} ${AttWhiteListDict} |
| 376 | ${whitelist_id}= Get Json Value ${resp.content} /id |
| 377 | Set Global Variable ${whitelist_id} |
Kailash Khalasi | 16d95c1 | 2018-09-21 14:17:28 -0700 | [diff] [blame] | 378 | |
Kailash Khalasi | bf1478b | 2018-10-17 11:58:58 -0700 | [diff] [blame] | 379 | Remove Whitelist |
| 380 | ${whitelist_id}= Retrieve Whitelist Entry ${onu_device} |
| 381 | CORD Delete ${ATT_WHITELIST} ${whitelist_id} |
Kailash Khalasi | 16d95c1 | 2018-09-21 14:17:28 -0700 | [diff] [blame] | 382 | |
Kailash Khalasi | bf1478b | 2018-10-17 11:58:58 -0700 | [diff] [blame] | 383 | Create Subscriber |
| 384 | ${SubscriberDict}= utils.listToDict ${SubscriberList} 0 |
| 385 | CORD Post ${VOLT_SUBSCRIBER} ${SubscriberDict} |
Kailash Khalasi | 16d95c1 | 2018-09-21 14:17:28 -0700 | [diff] [blame] | 386 | |
Kailash Khalasi | bf1478b | 2018-10-17 11:58:58 -0700 | [diff] [blame] | 387 | Remove Subscriber |
| 388 | ${subscriber_id}= Retrieve Subscriber ${c_tag} |
| 389 | CORD Delete ${VOLT_SUBSCRIBER} ${subscriber_id} |
Kailash Khalasi | b5975cf | 2018-10-01 12:57:44 -0700 | [diff] [blame] | 390 | |
Kailash Khalasi | bf1478b | 2018-10-17 11:58:58 -0700 | [diff] [blame] | 391 | Create VOLT |
Kailash Khalasi | bf1478b | 2018-10-17 11:58:58 -0700 | [diff] [blame] | 392 | CORD Post ${VOLT_DEVICE} ${VoltDeviceDict} |
Kailash Khalasi | b5975cf | 2018-10-01 12:57:44 -0700 | [diff] [blame] | 393 | |
Kailash Khalasi | bf1478b | 2018-10-17 11:58:58 -0700 | [diff] [blame] | 394 | Update Whitelist with Wrong Location |
| 395 | ${whitelist_id}= Retrieve Whitelist Entry ${onu_device} |
| 396 | CORD Put ${ATT_WHITELIST} {"pon_port_id": 55 } ${whitelist_id} |
| 397 | |
| 398 | Update Whitelist with Correct Location |
| 399 | ${whitelist_id}= Retrieve Whitelist Entry ${onu_device} |
Kailash Khalasi | 92061c1 | 2018-10-29 11:52:39 -0700 | [diff] [blame] | 400 | CORD Put ${ATT_WHITELIST} {"pon_port_id": ${onu_location} } ${whitelist_id} |
Kailash | 821de7a | 2018-11-02 11:32:49 -0700 | [diff] [blame] | 401 | |
| 402 | Reset SIAB Environment |
| 403 | Wait Until Keyword Succeeds 60s 2s Clean Up Objects ${VOLT_SUBSCRIBER} |
| 404 | Wait Until Keyword Succeeds 60s 2s Clean Up Objects ${ATT_WHITELIST} |
Andy Bavier | df70bba | 2019-01-24 07:06:38 -0700 | [diff] [blame] | 405 | Wait Until Keyword Succeeds 30s 2s Validate ONU States UNKNOWN DISABLED ${onu_device} |
| 406 | Wait Until Keyword Succeeds 30s 2s Validate ATT Workflow Driver SI DISABLED AWAITING ${onu_device} |
Kailash | 821de7a | 2018-11-02 11:32:49 -0700 | [diff] [blame] | 407 | Restart RG Pod |
Kailash | 821de7a | 2018-11-02 11:32:49 -0700 | [diff] [blame] | 408 | Wait Until Keyword Succeeds 60s 2s Create Subscriber |
Andy Bavier | df70bba | 2019-01-24 07:06:38 -0700 | [diff] [blame] | 409 | Wait Until Keyword Succeeds 60s 2s Create Whitelist |
Andy Bavier | 3075b9b | 2019-01-31 13:45:35 -0700 | [diff] [blame] | 410 | Subscriber Ready to Authenticate |
Kailash | 821de7a | 2018-11-02 11:32:49 -0700 | [diff] [blame] | 411 | ${RG_CONTAINER}= Run kubectl -n voltha get pod|grep "^rg-"|cut -d' ' -f1 |
| 412 | Set Suite Variable ${RG_CONTAINER} |
Kailash | fe18d61 | 2019-02-04 17:04:42 -0800 | [diff] [blame] | 413 | |
Kailash | 66b9a8d | 2019-02-07 10:18:55 -0800 | [diff] [blame] | 414 | Validate XConnect in ONOS |
| 415 | [Arguments] ${exists}=True |
| 416 | ${rc}= Run And Return RC http -a karaf:karaf GET http://127.0.0.1:30120/onos/segmentrouting/xconnect|jq -r '.xconnects[].vlanId'|grep 222 |
| 417 | Run Keyword If '${exists}' == 'True' Should Be Equal As Integers ${rc} 0 |
Kailash | abb029d | 2019-02-15 17:17:11 -0800 | [diff] [blame] | 418 | ... ELSE Should Be Equal As Integers ${rc} 1 |
| 419 | |
| 420 | Setup SSH Keys to Localhost |
| 421 | Run yes y 2>/dev/null | ssh-keygen -t rsa -N "" -f ~/.ssh/id_rsa |
| 422 | Run cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys |
| 423 | Run chmod og-wx ~/.ssh/authorized_keys |