blob: c4a572d16097e55458f1d591ed2419b27d1d9410 [file] [log] [blame]
Kailash Khalasi6dab16e2018-09-17 20:24:08 -07001# 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
Suchitra Vemuriff825322018-09-07 14:00:04 -070015*** Settings ***
You Wang59ded6c2018-10-05 17:43:44 -070016Documentation Test various end-to-end scenarios with ATT workflow
You Wang9f7eb392018-10-09 17:49:34 -070017Suite Setup Setup Suite
18Suite Teardown Teardown Suite
19Test Setup Setup Test
20Test Teardown Teardown Test
Suchitra Vemuriff825322018-09-07 14:00:04 -070021Library Collections
22Library String
23Library OperatingSystem
24Library XML
25Library RequestsLibrary
Suchitra Vemuri32fc2f22018-09-10 12:06:01 -070026Library ../../Framework/utils/utils.py
Kailash Khalasi6dab16e2018-09-17 20:24:08 -070027Resource ../../Framework/utils/utils.robot
Suchitra Vemuri32fc2f22018-09-10 12:06:01 -070028Library ../../Framework/restApi.py
Kailash Khalasi6dab16e2018-09-17 20:24:08 -070029Resource ../../Framework/Subscriber.robot
30Resource ../../Framework/ATTWorkFlowDriver.robot
You Wang0c2b3662018-10-01 16:56:17 -070031Resource ../../Framework/Kubernetes.robot
Kailash Khalasi6dab16e2018-09-17 20:24:08 -070032Resource ../../Framework/ONU.robot
You Wang0c2b3662018-10-01 16:56:17 -070033Resource ../../Framework/OLT.robot
Kailash Khalasi6dab16e2018-09-17 20:24:08 -070034Resource ../../Framework/DHCP.robot
35Variables ../../Properties/RestApiProperties.py
Suchitra Vemuriff825322018-09-07 14:00:04 -070036
37*** Variables ***
You Wang59ded6c2018-10-05 17:43:44 -070038${POD_NAME} flex-pod1-olt
39${KUBERNETES_CONFIGS_DIR} ~/pod-configs/kubernetes-configs
40${HELM_CHARTS_DIR} ~/helm-charts
41${WHITELIST_PATHFILE} ${CURDIR}/data/${POD_NAME}/ATTWhiteList.json
42${SUBSCRIBER_PATHFILE} ${CURDIR}/data/${POD_NAME}/ATTSubscriber.json
43${VOLT_DEVICE_PATHFILE} ${CURDIR}/data/${POD_NAME}/RealOLTDevice.json
44${KUBERNETES_CONF} ${KUBERNETES_CONFIGS_DIR}/${POD_NAME}.conf
45${KUBERNETES_YAML} ${KUBERNETES_CONFIGS_DIR}/${POD_NAME}.yml
46${VOLTHA_POD_NUM} 8
Suchitra Vemuriff825322018-09-07 14:00:04 -070047
Kailash Khalasia0810ce2018-09-10 13:03:27 -070048*** Test Cases ***
You Wang9f7eb392018-10-09 17:49:34 -070049ONU in Correct Location
Kailash Khalasif3e0a9f2018-09-18 13:43:42 -070050 [Documentation] Validates E2E Ping Connectivity and object states for the given scenario:
You Wang9f7eb392018-10-09 17:49:34 -070051 ... Configure whitelist with correct ONU location
52 ... Validate successful authentication/DHCP/E2E ping
Kailash Khalasif3e0a9f2018-09-18 13:43:42 -070053 [Setup] None
You Wang5be816a2018-10-11 16:45:31 -070054 Wait Until Keyword Succeeds 300s 15s Validate ONU States ACTIVE ENABLED ${onu_device}
55 Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI ENABLED AWAITING ${onu_device}
56 Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status awaiting-auth ${onu_device}
57 Validate Authentication True ${src_iface} wpa_supplicant.conf ${src_ip} ${src_user} ${src_pass} ${src_container_type} ${src_container_name}
58 Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI ENABLED APPROVED ${onu_device}
59 Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status enabled ${onu_device}
60 Validate DHCP and Ping True True ${src_iface} ${s_tag} ${c_tag} ${dst_dp_ip} ${src_ip} ${src_user} ${src_pass} ${src_container_type} ${src_container_name} ${dst_dp_iface} ${dst_ip} ${dst_user} ${dst_pass} ${dst_container_type} ${dst_container_name}
You Wang0c2b3662018-10-01 16:56:17 -070061
You Wang9f7eb392018-10-09 17:49:34 -070062ONU in Correct Location -> Remove ONU from Whitelist -> Add ONU to Whitelist
You Wang0c2b3662018-10-01 16:56:17 -070063 [Documentation] Validates E2E Ping Connectivity and object states for the given scenario:
You Wang9f7eb392018-10-09 17:49:34 -070064 ... Configure whitelist with correct ONU location
65 ... Validate successful authentication/DHCP/E2E ping
66 ... Remove ONU from whitelist
67 ... Validate failed authentication/DHCP/E2E ping
68 ... Add ONU to whitelist
69 ... Validate successful authentication/DHCP/E2E ping
You Wang5be816a2018-10-11 16:45:31 -070070 Wait Until Keyword Succeeds 300s 15s Validate ONU States ACTIVE ENABLED ${onu_device}
71 Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI ENABLED AWAITING ${onu_device}
72 Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status awaiting-auth ${onu_device}
73 Validate Authentication True ${src_iface} wpa_supplicant.conf ${src_ip} ${src_user} ${src_pass} ${src_container_type} ${src_container_name}
74 Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI ENABLED APPROVED ${onu_device}
75 Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status enabled ${onu_device}
76 Validate DHCP and Ping True True ${src_iface} ${s_tag} ${c_tag} ${dst_dp_ip} ${src_ip} ${src_user} ${src_pass} ${src_container_type} ${src_container_name} ${dst_dp_iface} ${dst_ip} ${dst_user} ${dst_pass} ${dst_container_type} ${dst_container_name}
You Wang9f7eb392018-10-09 17:49:34 -070077 Clean Up Linux
78 Remove Whitelist
You Wang5be816a2018-10-11 16:45:31 -070079 Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI DISABLED AWAITING ${onu_device}
80 Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status awaiting-auth ${onu_device}
81 Validate Authentication False ${src_iface} wpa_supplicant.conf ${src_ip} ${src_user} ${src_pass} ${src_container_type} ${src_container_name}
82 Validate DHCP and Ping False False ${src_iface} ${s_tag} ${c_tag} ${dst_dp_ip} ${src_ip} ${src_user} ${src_pass} ${src_container_type} ${src_container_name} ${dst_dp_iface} ${dst_ip} ${dst_user} ${dst_pass} ${dst_container_type} ${dst_container_name}
You Wang9f7eb392018-10-09 17:49:34 -070083 Clean Up Linux
84 Create Whitelist
You Wang5be816a2018-10-11 16:45:31 -070085 Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI ENABLED AWAITING ${onu_device}
86 Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status awaiting-auth ${onu_device}
87 Validate Authentication True ${src_iface} wpa_supplicant.conf ${src_ip} ${src_user} ${src_pass} ${src_container_type} ${src_container_name}
88 Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI ENABLED APPROVED ${onu_device}
89 Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status enabled ${onu_device}
90 Validate DHCP and Ping True True ${src_iface} ${s_tag} ${c_tag} ${dst_dp_ip} ${src_ip} ${src_user} ${src_pass} ${src_container_type} ${src_container_name} ${dst_dp_iface} ${dst_ip} ${dst_user} ${dst_pass} ${dst_container_type} ${dst_container_name}
You Wang9f7eb392018-10-09 17:49:34 -070091
92ONU in Correct Location -> ONU in Wrong Location -> ONU in Correct Location
93 [Documentation] Validates E2E Ping Connectivity and object states for the given scenario:
94 ... Configure whitelist with correct ONU location
95 ... Validate successful authentication/DHCP/E2E ping
96 ... Update whitelist with wrong ONU location
97 ... Validate failed authentication/DHCP/E2E ping
98 ... Update whitelist with correct ONU location
99 ... Validate successful authentication/DHCP/E2E ping
You Wang5be816a2018-10-11 16:45:31 -0700100 Wait Until Keyword Succeeds 300s 15s Validate ONU States ACTIVE ENABLED ${onu_device}
101 Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI ENABLED AWAITING ${onu_device}
102 Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status awaiting-auth ${onu_device}
103 Validate Authentication True ${src_iface} wpa_supplicant.conf ${src_ip} ${src_user} ${src_pass} ${src_container_type} ${src_container_name}
104 Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI ENABLED APPROVED ${onu_device}
105 Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status enabled ${onu_device}
106 Validate DHCP and Ping True True ${src_iface} ${s_tag} ${c_tag} ${dst_dp_ip} ${src_ip} ${src_user} ${src_pass} ${src_container_type} ${src_container_name} ${dst_dp_iface} ${dst_ip} ${dst_user} ${dst_pass} ${dst_container_type} ${dst_container_name}
You Wang9f7eb392018-10-09 17:49:34 -0700107 Clean Up Linux
108 Update Whitelist with Wrong Location
You Wang5be816a2018-10-11 16:45:31 -0700109 Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI DISABLED AWAITING ${onu_device}
110 Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status awaiting-auth ${onu_device}
111 Validate Authentication False ${src_iface} wpa_supplicant.conf ${src_ip} ${src_user} ${src_pass} ${src_container_type} ${src_container_name}
112 Validate DHCP and Ping False False ${src_iface} ${s_tag} ${c_tag} ${dst_dp_ip} ${src_ip} ${src_user} ${src_pass} ${src_container_type} ${src_container_name} ${dst_dp_iface} ${dst_ip} ${dst_user} ${dst_pass} ${dst_container_type} ${dst_container_name}
You Wang9f7eb392018-10-09 17:49:34 -0700113 Clean Up Linux
114 Update Whitelist with Correct Location
You Wang5be816a2018-10-11 16:45:31 -0700115 Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI ENABLED AWAITING ${onu_device}
116 Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status awaiting-auth ${onu_device}
117 Validate Authentication True ${src_iface} wpa_supplicant.conf ${src_ip} ${src_user} ${src_pass} ${src_container_type} ${src_container_name}
118 Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI ENABLED APPROVED ${onu_device}
119 Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status enabled ${onu_device}
120 Validate DHCP and Ping True True ${src_iface} ${s_tag} ${c_tag} ${dst_dp_ip} ${src_ip} ${src_user} ${src_pass} ${src_container_type} ${src_container_name} ${dst_dp_iface} ${dst_ip} ${dst_user} ${dst_pass} ${dst_container_type} ${dst_container_name}
You Wang9f7eb392018-10-09 17:49:34 -0700121
122ONU in Correct Location -> Remove Subscriber -> Create Subscriber
123 [Documentation] Validates E2E Ping Connectivity and object states for the given scenario:
124 ... Configure whitelist with correct ONU location
125 ... Validate successful authentication/DHCP/E2E ping
126 ... Remove subscriber model
127 ... Validate failed authentication/DHCP/E2E ping
128 ... Recreate subscriber model
129 ... Validate successful authentication/DHCP/E2E ping
You Wang5be816a2018-10-11 16:45:31 -0700130 Wait Until Keyword Succeeds 300s 15s Validate ONU States ACTIVE ENABLED ${onu_device}
131 Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI ENABLED AWAITING ${onu_device}
132 Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status awaiting-auth ${onu_device}
133 Validate Authentication True ${src_iface} wpa_supplicant.conf ${src_ip} ${src_user} ${src_pass} ${src_container_type} ${src_container_name}
134 Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI ENABLED APPROVED ${onu_device}
135 Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status enabled ${onu_device}
136 Validate DHCP and Ping True True ${src_iface} ${s_tag} ${c_tag} ${dst_dp_ip} ${src_ip} ${src_user} ${src_pass} ${src_container_type} ${src_container_name} ${dst_dp_iface} ${dst_ip} ${dst_user} ${dst_pass} ${dst_container_type} ${dst_container_name}
You Wang9f7eb392018-10-09 17:49:34 -0700137 Clean Up Linux
138 Remove Subscriber
You Wang5be816a2018-10-11 16:45:31 -0700139 Validate Authentication False ${src_iface} wpa_supplicant.conf ${src_ip} ${src_user} ${src_pass} ${src_container_type} ${src_container_name}
140 Validate DHCP and Ping False False ${src_iface} ${s_tag} ${c_tag} ${dst_dp_ip} ${src_ip} ${src_user} ${src_pass} ${src_container_type} ${src_container_name} ${dst_dp_iface} ${dst_ip} ${dst_user} ${dst_pass} ${dst_container_type} ${dst_container_name}
You Wang9f7eb392018-10-09 17:49:34 -0700141 Clean Up Linux
142 Create Subscriber
You Wang5be816a2018-10-11 16:45:31 -0700143 Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status awaiting-auth ${onu_device}
144 Validate Authentication True ${src_iface} wpa_supplicant.conf ${src_ip} ${src_user} ${src_pass} ${src_container_type} ${src_container_name}
145 Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI ENABLED APPROVED ${onu_device}
146 Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status enabled ${onu_device}
147 Validate DHCP and Ping True True ${src_iface} ${s_tag} ${c_tag} ${dst_dp_ip} ${src_ip} ${src_user} ${src_pass} ${src_container_type} ${src_container_name} ${dst_dp_iface} ${dst_ip} ${dst_user} ${dst_pass} ${dst_container_type} ${dst_container_name}
You Wang9f7eb392018-10-09 17:49:34 -0700148
149ONU in Correct Location (Skip Subscriber Provisioning) -> Provision Subscriber
150 [Documentation] Validates E2E Ping Connectivity and object states for the given scenario:
151 ... Configure whitelist with correct ONU location and skip provisioning subscriber
You Wang5be816a2018-10-11 16:45:31 -0700152 ... Validate successful authentication (expected with the ONF pod setup) but failed DHCP/E2E ping
You Wang9f7eb392018-10-09 17:49:34 -0700153 ... Provision subscriber
154 ... Validate successful authentication/DHCP/E2E ping
155 [Setup] None
156 Create Whitelist
157 Create VOLT
You Wang5be816a2018-10-11 16:45:31 -0700158 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 ${src_iface} wpa_supplicant.conf ${src_ip} ${src_user} ${src_pass} ${src_container_type} ${src_container_name}
161 Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI ENABLED AWAITING ${onu_device}
162 Validate DHCP and Ping False False ${src_iface} ${s_tag} ${c_tag} ${dst_dp_ip} ${src_ip} ${src_user} ${src_pass} ${src_container_type} ${src_container_name} ${dst_dp_iface} ${dst_ip} ${dst_user} ${dst_pass} ${dst_container_type} ${dst_container_name}
You Wang9f7eb392018-10-09 17:49:34 -0700163 Clean Up Linux
164 Create Subscriber
You Wang5be816a2018-10-11 16:45:31 -0700165 Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status awaiting-auth ${onu_device}
166 Validate Authentication True ${src_iface} wpa_supplicant.conf ${src_ip} ${src_user} ${src_pass} ${src_container_type} ${src_container_name}
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 ${src_iface} ${s_tag} ${c_tag} ${dst_dp_ip} ${src_ip} ${src_user} ${src_pass} ${src_container_type} ${src_container_name} ${dst_dp_iface} ${dst_ip} ${dst_user} ${dst_pass} ${dst_container_type} ${dst_container_name}
You Wang9f7eb392018-10-09 17:49:34 -0700170
171ONU 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
You Wang5be816a2018-10-11 16:45:31 -0700175 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 ${src_iface} ${s_tag} ${c_tag} ${dst_dp_ip} ${src_ip} ${src_user} ${src_pass} ${src_container_type} ${src_container_name} ${dst_dp_iface} ${dst_ip} ${dst_user} ${dst_pass} ${dst_container_type} ${dst_container_name}
You Wang0c2b3662018-10-01 16:56:17 -0700179
You Wang9f7eb392018-10-09 17:49:34 -0700180ONU not in Whitelist
You Wang0c2b3662018-10-01 16:56:17 -0700181 [Documentation] Validates E2E Ping Connectivity and object states for the given scenario:
You Wang9f7eb392018-10-09 17:49:34 -0700182 ... Skip whitelist configuration for ONU
183 ... Validate failed authentication/DHCP/E2E ping
You Wang0c2b3662018-10-01 16:56:17 -0700184 [Setup] None
You Wang9f7eb392018-10-09 17:49:34 -0700185 Create Subscriber
186 Create VOLT
You Wang5be816a2018-10-11 16:45:31 -0700187 Wait Until Keyword Succeeds 300s 15s Validate ONU States UNKNOWN DISABLED ${onu_device}
188 Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI DISABLED AWAITING ${onu_device}
189 Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status awaiting-auth ${onu_device}
190 Validate Authentication False ${src_iface} wpa_supplicant.conf ${src_ip} ${src_user} ${src_pass} ${src_container_type} ${src_container_name}
191 Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI DISABLED AWAITING ${onu_device}
192 Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status awaiting-auth ${onu_device}
193 Validate DHCP and Ping False False ${src_iface} ${s_tag} ${c_tag} ${dst_dp_ip} ${src_ip} ${src_user} ${src_pass} ${src_container_type} ${src_container_name} ${dst_dp_iface} ${dst_ip} ${dst_user} ${dst_pass} ${dst_container_type} ${dst_container_name}
Suchitra Vemuriff825322018-09-07 14:00:04 -0700194
You Wang9f7eb392018-10-09 17:49:34 -0700195ONU not in Whitelist (Skip Subscriber Provisioning) -> Add ONU to Whitelist -> Provision Subscriber
196 [Documentation] Validates E2E Ping Connectivity and object states for the given scenario:
197 ... Skip whitelist configuration for ONU and subscriber provisioning
You Wang5be816a2018-10-11 16:45:31 -0700198 ... Validate successful authentication but failed DHCP/E2E ping
You Wang9f7eb392018-10-09 17:49:34 -0700199 ... Configure whitelist with correct ONU location
You Wang5be816a2018-10-11 16:45:31 -0700200 ... Validate successful authentication (expected with the ONF pod setup) but failed DHCP/E2E ping
You Wang9f7eb392018-10-09 17:49:34 -0700201 ... Provision subscriber
202 ... Validate successful authentication/DHCP/E2E ping
203 [Setup] None
204 Create VOLT
You Wang5be816a2018-10-11 16:45:31 -0700205 Wait Until Keyword Succeeds 300s 15s Validate ONU States UNKNOWN DISABLED ${onu_device}
206 Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI DISABLED AWAITING ${onu_device}
207 Validate Authentication False ${src_iface} wpa_supplicant.conf ${src_ip} ${src_user} ${src_pass} ${src_container_type} ${src_container_name}
208 Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI DISABLED AWAITING ${onu_device}
209 Validate DHCP and Ping False False ${src_iface} ${s_tag} ${c_tag} ${dst_dp_ip} ${src_ip} ${src_user} ${src_pass} ${src_container_type} ${src_container_name} ${dst_dp_iface} ${dst_ip} ${dst_user} ${dst_pass} ${dst_container_type} ${dst_container_name}
You Wang9f7eb392018-10-09 17:49:34 -0700210 Clean Up Linux
211 Create Whitelist
You Wang5be816a2018-10-11 16:45:31 -0700212 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}
214 Validate Authentication True ${src_iface} wpa_supplicant.conf ${src_ip} ${src_user} ${src_pass} ${src_container_type} ${src_container_name}
215 Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI ENABLED AWAITING ${onu_device}
216 Validate DHCP and Ping False False ${src_iface} ${s_tag} ${c_tag} ${dst_dp_ip} ${src_ip} ${src_user} ${src_pass} ${src_container_type} ${src_container_name} ${dst_dp_iface} ${dst_ip} ${dst_user} ${dst_pass} ${dst_container_type} ${dst_container_name}
You Wang9f7eb392018-10-09 17:49:34 -0700217 Clean Up Linux
218 Create Subscriber
You Wang5be816a2018-10-11 16:45:31 -0700219 Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status awaiting-auth ${onu_device}
220 Validate Authentication True ${src_iface} wpa_supplicant.conf ${src_ip} ${src_user} ${src_pass} ${src_container_type} ${src_container_name}
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}
223 Validate DHCP and Ping True True ${src_iface} ${s_tag} ${c_tag} ${dst_dp_ip} ${src_ip} ${src_user} ${src_pass} ${src_container_type} ${src_container_name} ${dst_dp_iface} ${dst_ip} ${dst_user} ${dst_pass} ${dst_container_type} ${dst_container_name}
You Wang9f7eb392018-10-09 17:49:34 -0700224
225ONU 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
You Wang5be816a2018-10-11 16:45:31 -0700230 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}
233 Validate Authentication False ${src_iface} wpa_supplicant.conf ${src_ip} ${src_user} ${src_pass} ${src_container_type} ${src_container_name}
234 Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI DISABLED AWAITING ${onu_device}
235 Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status awaiting-auth ${onu_device}
236 Validate DHCP and Ping False False ${src_iface} ${s_tag} ${c_tag} ${dst_dp_ip} ${src_ip} ${src_user} ${src_pass} ${src_container_type} ${src_container_name} ${dst_dp_iface} ${dst_ip} ${dst_user} ${dst_pass} ${dst_container_type} ${dst_container_name}
You Wang9f7eb392018-10-09 17:49:34 -0700237
You Wang5be816a2018-10-11 16:45:31 -0700238ONU in Wrong Location (Skip Subscriber Provisioning) -> ONU in Correct Location -> Provision Subscriber
You Wang9f7eb392018-10-09 17:49:34 -0700239 [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
You Wang5be816a2018-10-11 16:45:31 -0700243 ... Validate successful authentication (expected with the ONF pod setup) but failed DHCP/E2E ping
You Wang9f7eb392018-10-09 17:49:34 -0700244 ... Provision subscriber
245 ... Validate successful authentication/DHCP/E2E ping
246 [Setup] None
You Wang9f7eb392018-10-09 17:49:34 -0700247 Create VOLT
248 Create Whitelist
249 Update Whitelist with Wrong Location
You Wang5be816a2018-10-11 16:45:31 -0700250 Wait Until Keyword Succeeds 300s 15s Validate ONU States UNKNOWN DISABLED ${onu_device}
251 Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI DISABLED AWAITING ${onu_device}
252 Validate Authentication False ${src_iface} wpa_supplicant.conf ${src_ip} ${src_user} ${src_pass} ${src_container_type} ${src_container_name}
253 Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI DISABLED AWAITING ${onu_device}
254 Validate DHCP and Ping False False ${src_iface} ${s_tag} ${c_tag} ${dst_dp_ip} ${src_ip} ${src_user} ${src_pass} ${src_container_type} ${src_container_name} ${dst_dp_iface} ${dst_ip} ${dst_user} ${dst_pass} ${dst_container_type} ${dst_container_name}
You Wang9f7eb392018-10-09 17:49:34 -0700255 Clean Up Linux
256 Update Whitelist with Correct Location
You Wang5be816a2018-10-11 16:45:31 -0700257 Wait Until Keyword Succeeds 300s 15s Validate ONU States ACTIVE ENABLED ${onu_device}
258 Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI ENABLED AWAITING ${onu_device}
259 Validate Authentication True ${src_iface} wpa_supplicant.conf ${src_ip} ${src_user} ${src_pass} ${src_container_type} ${src_container_name}
260 Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI ENABLED AWAITING ${onu_device}
261 Validate DHCP and Ping False False ${src_iface} ${s_tag} ${c_tag} ${dst_dp_ip} ${src_ip} ${src_user} ${src_pass} ${src_container_type} ${src_container_name} ${dst_dp_iface} ${dst_ip} ${dst_user} ${dst_pass} ${dst_container_type} ${dst_container_name}
You Wang9f7eb392018-10-09 17:49:34 -0700262 Clean Up Linux
263 Create Subscriber
You Wang5be816a2018-10-11 16:45:31 -0700264 Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status awaiting-auth ${onu_device}
265 Validate Authentication True ${src_iface} wpa_supplicant.conf ${src_ip} ${src_user} ${src_pass} ${src_container_type} ${src_container_name}
266 Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI ENABLED APPROVED ${onu_device}
267 Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status enabled ${onu_device}
268 Validate DHCP and Ping True True ${src_iface} ${s_tag} ${c_tag} ${dst_dp_ip} ${src_ip} ${src_user} ${src_pass} ${src_container_type} ${src_container_name} ${dst_dp_iface} ${dst_ip} ${dst_user} ${dst_pass} ${dst_container_type} ${dst_container_name}
You Wang9f7eb392018-10-09 17:49:34 -0700269
Suchitra Vemuriff825322018-09-07 14:00:04 -0700270*** Keywords ***
You Wang9f7eb392018-10-09 17:49:34 -0700271Setup Suite
Kailash Khalasif3e0a9f2018-09-18 13:43:42 -0700272 ${auth} = Create List ${XOS_USER} ${XOS_PASSWD}
273 ${HEADERS} Create Dictionary Content-Type=application/json
274 Create Session ${server_ip} http://${server_ip}:${server_port} auth=${AUTH} headers=${HEADERS}
275 ${att_workflow_service_id}= Get Service Owner Id ${ATT_SERVICE}
276 ${volt_service_id}= Get Service Owner Id ${VOLT_SERVICE}
Kailash Khalasi30a6a392018-09-10 14:32:39 -0700277 ${AttWhiteListList}= utils.jsonToList ${WHITELIST_PATHFILE} AttWhiteListInfo
You Wang9f7eb392018-10-09 17:49:34 -0700278 Set Suite Variable ${AttWhiteListList}
Suchitra Vemuriff825322018-09-07 14:00:04 -0700279 ${AttWhiteListDict}= utils.listToDict ${AttWhiteListList} 0
Kailash Khalasif3e0a9f2018-09-18 13:43:42 -0700280 ${AttWhiteListDict}= utils.setFieldValueInDict ${AttWhiteListDict} owner_id ${att_workflow_service_id}
Suchitra Vemuriff825322018-09-07 14:00:04 -0700281 ${onu_device}= Get From Dictionary ${AttWhiteListDict} serial_number
Suchitra Vemuriff825322018-09-07 14:00:04 -0700282 Set Global Variable ${onu_device}
You Wang9f7eb392018-10-09 17:49:34 -0700283 ${onu_location}= Get From Dictionary ${AttWhiteListDict} pon_port_id
284 Set Global Variable ${onu_location}
Kailash Khalasi30a6a392018-09-10 14:32:39 -0700285 ${SubscriberList}= utils.jsonToList ${SUBSCRIBER_PATHFILE} SubscriberInfo
You Wang9f7eb392018-10-09 17:49:34 -0700286 Set Global Variable ${SubscriberList}
Kailash Khalasi6dab16e2018-09-17 20:24:08 -0700287 ${SubscriberDict}= utils.listToDict ${SubscriberList} 0
288 ${s_tag}= utils.getFieldValueFromDict ${SubscriberDict} s_tag
289 ${c_tag}= utils.getFieldValueFromDict ${SubscriberDict} c_tag
Kailash Khalasif3e0a9f2018-09-18 13:43:42 -0700290 ${VoltDeviceList}= utils.jsonToList ${VOLT_DEVICE_PATHFILE} VOLTDeviceInfo
You Wang9f7eb392018-10-09 17:49:34 -0700291 Set Global Variable ${VoltDeviceList}
Kailash Khalasi6dab16e2018-09-17 20:24:08 -0700292 Set Suite Variable ${s_tag}
293 Set Suite Variable ${c_tag}
You Wang59ded6c2018-10-05 17:43:44 -0700294 Set Global Variable ${export_kubeconfig} export KUBECONFIG=${KUBERNETES_CONF}
295 # Read variables from yaml file
296 ${src_ip}= Evaluate ${hosts}.get("src").get("ip")
297 ${src_user}= Evaluate ${hosts}.get("src").get("user")
298 ${src_pass}= Evaluate ${hosts}.get("src").get("pass")
You Wang5be816a2018-10-11 16:45:31 -0700299 ${src_container_type}= Evaluate ${hosts}.get("src").get("container_type")
You Wang59ded6c2018-10-05 17:43:44 -0700300 ${src_container_name}= Evaluate ${hosts}.get("src").get("container_name")
301 ${src_iface}= Evaluate ${hosts}.get("src").get("dp_iface_name")
302 ${dst_ip}= Evaluate ${hosts}.get("dst").get("ip")
303 ${dst_user} = Evaluate ${hosts}.get("dst").get("user")
304 ${dst_pass}= Evaluate ${hosts}.get("dst").get("pass")
You Wang5be816a2018-10-11 16:45:31 -0700305 ${dst_container_type}= Evaluate ${hosts}.get("dst").get("container_type")
You Wang59ded6c2018-10-05 17:43:44 -0700306 ${dst_container_name}= Evaluate ${hosts}.get("dst").get("container_name")
307 ${dst_dp_iface}= Evaluate ${hosts}.get("dst").get("dp_iface_name")
308 ${dst_dp_ip}= Evaluate ${hosts}.get("dst").get("dp_iface_ip_qinq")
309 ${olt_ip}= Evaluate ${olts}[0].get("ip")
310 ${olt_user}= Evaluate ${olts}[0].get("user")
311 ${olt_pass}= Evaluate ${olts}[0].get("pass")
312 Set Suite Variable ${src_ip}
313 Set Suite Variable ${src_user}
314 Set Suite Variable ${src_pass}
You Wang5be816a2018-10-11 16:45:31 -0700315 Set Suite Variable ${src_container_type}
You Wang59ded6c2018-10-05 17:43:44 -0700316 Set Suite Variable ${src_container_name}
317 Set Suite Variable ${src_iface}
318 Set Suite Variable ${dst_ip}
319 Set Suite Variable ${dst_user}
320 Set Suite Variable ${dst_pass}
You Wang5be816a2018-10-11 16:45:31 -0700321 Set Suite Variable ${dst_container_type}
You Wang59ded6c2018-10-05 17:43:44 -0700322 Set Suite Variable ${dst_container_name}
323 Set Suite Variable ${dst_dp_iface}
324 Set Suite Variable ${dst_dp_ip}
325 Set Suite Variable ${olt_ip}
326 Set Suite Variable ${olt_user}
327 Set Suite Variable ${olt_pass}
Suchitra Vemuriff825322018-09-07 14:00:04 -0700328
You Wang9f7eb392018-10-09 17:49:34 -0700329Teardown Suite
Kailash Khalasif3e0a9f2018-09-18 13:43:42 -0700330 [Documentation] Performs any additional cleanup required
331 Log Suite Teardown cleanup
332 Delete All Sessions
333
You Wang9f7eb392018-10-09 17:49:34 -0700334Setup Test
Kailash Khalasif3e0a9f2018-09-18 13:43:42 -0700335 [Documentation] Re-create Subscriber, whitelist, and olt-device models to test
336 Log Re-creating objects
You Wang9f7eb392018-10-09 17:49:34 -0700337 Create Whitelist
338 Create Subscriber
339 Create VOLT
340
You Wang9f7eb392018-10-09 17:49:34 -0700341Teardown Test
Kailash Khalasif3e0a9f2018-09-18 13:43:42 -0700342 [Documentation] Delete xos objects, kills processes and cleans up interfaces on src+dst servers
You Wang9f7eb392018-10-09 17:49:34 -0700343 Clean Up Linux
344 Clean Up XOS
345
346Clean Up Linux
347 [Documentation] Kill processes and clean up interfaces on src+dst servers
You Wang5be816a2018-10-11 16:45:31 -0700348 Run Keyword And Ignore Error Kill Linux Process [w]pa_supplicant ${src_ip} ${src_user} ${src_pass} ${src_container_type} ${src_container_name}
349 Run Keyword And Ignore Error Kill Linux Process [d]hclient ${src_ip} ${src_user} ${src_pass} ${src_container_type} ${src_container_name}
350 Run Keyword If '${dst_ip}' != '${None}' Run Keyword And Ignore Error Kill Linux Process [d]hcpd ${dst_ip} ${dst_user} ${dst_pass} ${dst_container_type} ${dst_container_name}
351 Delete IP Addresses from Interface on Remote Host ${src_iface} ${src_ip} ${src_user} ${src_pass} ${src_container_type} ${src_container_name}
352 Run Keyword If '${dst_ip}' != '${None}' Delete Interface on Remote Host ${dst_dp_iface}.${s_tag} ${dst_ip} ${dst_user} ${dst_pass} ${dst_container_type} ${dst_container_name}
You Wang9f7eb392018-10-09 17:49:34 -0700353
354Clean Up XOS
355 [Documentation] Clean up all XOS objects and reinstall voltha after OLT reboots
You Wang88e1d852018-10-05 11:44:19 -0700356 Wait Until Keyword Succeeds 60s 2s Clean Up Objects ${VOLT_SUBSCRIBER}
357 Wait Until Keyword Succeeds 60s 2s Clean Up Objects ${VOLT_DEVICE}
358 Wait Until Keyword Succeeds 60s 2s Clean Up Objects ${ATT_WHITELIST}
You Wang0c2b3662018-10-01 16:56:17 -0700359 Wait Until Keyword Succeeds 120s 10s Check Remote System Reachability False ${olt_ip}
360 Wait Until Keyword Succeeds 120s 10s Check Remote System Reachability True ${olt_ip}
361 Wait Until Keyword Succeeds 120s 10s Openolt is Up ${olt_ip} ${olt_user} ${olt_pass}
362 Wait Until Keyword Succeeds 300s 10s Reinstall Voltha
Kailash Khalasia0810ce2018-09-10 13:03:27 -0700363
You Wang5be816a2018-10-11 16:45:31 -0700364Create Whitelist
365 ${AttWhiteListDict}= utils.listToDict ${AttWhiteListList} 0
366 CORD Post ${ATT_WHITELIST} ${AttWhiteListDict}
367
You Wang9f7eb392018-10-09 17:49:34 -0700368Remove Whitelist
369 ${whitelist_id}= Retrieve Whitelist Entry ${onu_device}
370 CORD Delete ${ATT_WHITELIST} ${whitelist_id}
371
372Update Whitelist with Wrong Location
373 ${whitelist_id}= Retrieve Whitelist Entry ${onu_device}
374 CORD Put ${ATT_WHITELIST} {"pon_port_id": 55 } ${whitelist_id}
375
376Update Whitelist with Correct Location
377 ${whitelist_id}= Retrieve Whitelist Entry ${onu_device}
378 CORD Put ${ATT_WHITELIST} {"pon_port_id": ${onu_location} } ${whitelist_id}
379
You Wang5be816a2018-10-11 16:45:31 -0700380Create Subscriber
381 ${SubscriberDict}= utils.listToDict ${SubscriberList} 0
382 Wait Until Keyword Succeeds 120s 15s CORD Post ${VOLT_SUBSCRIBER} ${SubscriberDict}
Kailash Khalasia0810ce2018-09-10 13:03:27 -0700383
You Wang5be816a2018-10-11 16:45:31 -0700384Create VOLT
385 ${VoltDeviceDict}= utils.listToDict ${VoltDeviceList} 0
386 CORD Post ${VOLT_DEVICE} ${VoltDeviceDict}