blob: dab64866f8e9a90b8cf9dc917ccb486e7e6b56d8 [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
Kailash266cc172019-03-05 14:32:10 -080026Library /home/cord/voltha/tests/atests/common/testCaseUtils.py
Suchitra Vemuri32fc2f22018-09-10 12:06:01 -070027Library ../../Framework/utils/utils.py
Kailash Khalasi6dab16e2018-09-17 20:24:08 -070028Resource ../../Framework/utils/utils.robot
Suchitra Vemuri32fc2f22018-09-10 12:06:01 -070029Library ../../Framework/restApi.py
Kailash Khalasi6dab16e2018-09-17 20:24:08 -070030Resource ../../Framework/Subscriber.robot
31Resource ../../Framework/ATTWorkFlowDriver.robot
You Wang0c2b3662018-10-01 16:56:17 -070032Resource ../../Framework/Kubernetes.robot
Kailash Khalasi6dab16e2018-09-17 20:24:08 -070033Resource ../../Framework/ONU.robot
You Wang0c2b3662018-10-01 16:56:17 -070034Resource ../../Framework/OLT.robot
Kailash Khalasi6dab16e2018-09-17 20:24:08 -070035Resource ../../Framework/DHCP.robot
36Variables ../../Properties/RestApiProperties.py
Suchitra Vemuriff825322018-09-07 14:00:04 -070037
38*** Variables ***
You Wang59ded6c2018-10-05 17:43:44 -070039${POD_NAME} flex-pod1-olt
40${KUBERNETES_CONFIGS_DIR} ~/pod-configs/kubernetes-configs
41${HELM_CHARTS_DIR} ~/helm-charts
42${WHITELIST_PATHFILE} ${CURDIR}/data/${POD_NAME}/ATTWhiteList.json
43${SUBSCRIBER_PATHFILE} ${CURDIR}/data/${POD_NAME}/ATTSubscriber.json
44${VOLT_DEVICE_PATHFILE} ${CURDIR}/data/${POD_NAME}/RealOLTDevice.json
45${KUBERNETES_CONF} ${KUBERNETES_CONFIGS_DIR}/${POD_NAME}.conf
46${KUBERNETES_YAML} ${KUBERNETES_CONFIGS_DIR}/${POD_NAME}.yml
47${VOLTHA_POD_NUM} 8
Suchitra Vemuriff825322018-09-07 14:00:04 -070048
Kailash Khalasia0810ce2018-09-10 13:03:27 -070049*** Test Cases ***
You Wang9f7eb392018-10-09 17:49:34 -070050ONU in Correct Location
Kailash Khalasif3e0a9f2018-09-18 13:43:42 -070051 [Documentation] Validates E2E Ping Connectivity and object states for the given scenario:
You Wang9f7eb392018-10-09 17:49:34 -070052 ... Configure whitelist with correct ONU location
53 ... Validate successful authentication/DHCP/E2E ping
Kailash Khalasif3e0a9f2018-09-18 13:43:42 -070054 [Setup] None
Kailash Khalasi92061c12018-10-29 11:52:39 -070055 [Tags] test1
You Wang5be816a2018-10-11 16:45:31 -070056 Wait Until Keyword Succeeds 300s 15s Validate ONU States ACTIVE ENABLED ${onu_device}
57 Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI ENABLED AWAITING ${onu_device}
58 Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status awaiting-auth ${onu_device}
59 Validate Authentication True ${src_iface} wpa_supplicant.conf ${src_ip} ${src_user} ${src_pass} ${src_container_type} ${src_container_name}
60 Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI ENABLED APPROVED ${onu_device}
61 Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status enabled ${onu_device}
62 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 -070063
You Wang9f7eb392018-10-09 17:49:34 -070064ONU in Correct Location -> Remove ONU from Whitelist -> Add ONU to Whitelist
You Wang0c2b3662018-10-01 16:56:17 -070065 [Documentation] Validates E2E Ping Connectivity and object states for the given scenario:
You Wang9f7eb392018-10-09 17:49:34 -070066 ... Configure whitelist with correct ONU location
67 ... Validate successful authentication/DHCP/E2E ping
68 ... Remove ONU from whitelist
69 ... Validate failed authentication/DHCP/E2E ping
70 ... Add ONU to whitelist
71 ... Validate successful authentication/DHCP/E2E ping
Kailash Khalasi92061c12018-10-29 11:52:39 -070072 [Tags] test2
You Wang5be816a2018-10-11 16:45:31 -070073 Wait Until Keyword Succeeds 300s 15s Validate ONU States ACTIVE ENABLED ${onu_device}
74 Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI ENABLED AWAITING ${onu_device}
75 Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status awaiting-auth ${onu_device}
76 Validate Authentication True ${src_iface} wpa_supplicant.conf ${src_ip} ${src_user} ${src_pass} ${src_container_type} ${src_container_name}
77 Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI ENABLED APPROVED ${onu_device}
78 Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status enabled ${onu_device}
79 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 -070080 Clean Up Linux
81 Remove Whitelist
You Wanga4524992018-10-17 16:38:33 -070082 Wait Until Keyword Succeeds 60s 2s Validate ONU States UNKNOWN DISABLED ${onu_device}
You Wang5be816a2018-10-11 16:45:31 -070083 Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI DISABLED AWAITING ${onu_device}
84 Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status awaiting-auth ${onu_device}
85 Validate Authentication False ${src_iface} wpa_supplicant.conf ${src_ip} ${src_user} ${src_pass} ${src_container_type} ${src_container_name}
86 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 -070087 Clean Up Linux
88 Create Whitelist
You Wang5fa194b2018-11-07 17:21:23 -080089 Wait Until Keyword Succeeds 120s 5s Validate ONU States ACTIVE ENABLED ${onu_device}
You Wang5be816a2018-10-11 16:45:31 -070090 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}
92 Validate Authentication True ${src_iface} wpa_supplicant.conf ${src_ip} ${src_user} ${src_pass} ${src_container_type} ${src_container_name}
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}
95 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 -070096
97ONU 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
Kailash Khalasi92061c12018-10-29 11:52:39 -0700105 [Tags] test3
You Wang5be816a2018-10-11 16:45:31 -0700106 Wait Until Keyword Succeeds 300s 15s Validate ONU States ACTIVE ENABLED ${onu_device}
107 Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI ENABLED AWAITING ${onu_device}
108 Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status awaiting-auth ${onu_device}
109 Validate Authentication True ${src_iface} wpa_supplicant.conf ${src_ip} ${src_user} ${src_pass} ${src_container_type} ${src_container_name}
110 Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI ENABLED APPROVED ${onu_device}
111 Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status enabled ${onu_device}
112 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 -0700113 Clean Up Linux
114 Update Whitelist with Wrong Location
You Wanga4524992018-10-17 16:38:33 -0700115 Wait Until Keyword Succeeds 60s 2s Validate ONU States UNKNOWN DISABLED ${onu_device}
You Wang5be816a2018-10-11 16:45:31 -0700116 Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI DISABLED AWAITING ${onu_device}
117 Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status awaiting-auth ${onu_device}
118 Validate Authentication False ${src_iface} wpa_supplicant.conf ${src_ip} ${src_user} ${src_pass} ${src_container_type} ${src_container_name}
119 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 -0700120 Clean Up Linux
121 Update Whitelist with Correct Location
You Wang5fa194b2018-11-07 17:21:23 -0800122 Wait Until Keyword Succeeds 120s 5s Validate ONU States ACTIVE ENABLED ${onu_device}
You Wang5be816a2018-10-11 16:45:31 -0700123 Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI ENABLED AWAITING ${onu_device}
124 Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status awaiting-auth ${onu_device}
125 Validate Authentication True ${src_iface} wpa_supplicant.conf ${src_ip} ${src_user} ${src_pass} ${src_container_type} ${src_container_name}
126 Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI ENABLED APPROVED ${onu_device}
127 Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status enabled ${onu_device}
128 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 -0700129
130ONU in Correct Location -> Remove Subscriber -> Create Subscriber
131 [Documentation] Validates E2E Ping Connectivity and object states for the given scenario:
132 ... Configure whitelist with correct ONU location
133 ... Validate successful authentication/DHCP/E2E ping
134 ... Remove subscriber model
You Wang070302c2018-10-17 15:42:24 -0700135 ... Validate successful authentication (expected with the ONF pod setup) but failed DHCP/E2E ping
You Wang9f7eb392018-10-09 17:49:34 -0700136 ... Recreate subscriber model
137 ... Validate successful authentication/DHCP/E2E ping
Kailash Khalasi92061c12018-10-29 11:52:39 -0700138 [Tags] test4
You Wang5be816a2018-10-11 16:45:31 -0700139 Wait Until Keyword Succeeds 300s 15s Validate ONU States ACTIVE ENABLED ${onu_device}
140 Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI ENABLED AWAITING ${onu_device}
141 Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status awaiting-auth ${onu_device}
142 Validate Authentication True ${src_iface} wpa_supplicant.conf ${src_ip} ${src_user} ${src_pass} ${src_container_type} ${src_container_name}
143 Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI ENABLED APPROVED ${onu_device}
144 Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status enabled ${onu_device}
145 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 -0700146 Clean Up Linux
147 Remove Subscriber
You Wang070302c2018-10-17 15:42:24 -0700148 Sleep 10s
149 Validate Authentication True ${src_iface} wpa_supplicant.conf ${src_ip} ${src_user} ${src_pass} ${src_container_type} ${src_container_name}
You Wang5be816a2018-10-11 16:45:31 -0700150 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 -0700151 Clean Up Linux
152 Create Subscriber
You Wang070302c2018-10-17 15:42:24 -0700153 Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status pre-provisioned ${onu_device}
You Wang5be816a2018-10-11 16:45:31 -0700154 Validate Authentication True ${src_iface} wpa_supplicant.conf ${src_ip} ${src_user} ${src_pass} ${src_container_type} ${src_container_name}
155 Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI ENABLED APPROVED ${onu_device}
156 Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status enabled ${onu_device}
157 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 -0700158
159ONU in Correct Location (Skip Subscriber Provisioning) -> Provision Subscriber
160 [Documentation] Validates E2E Ping Connectivity and object states for the given scenario:
161 ... Configure whitelist with correct ONU location and skip provisioning subscriber
You Wang5be816a2018-10-11 16:45:31 -0700162 ... Validate successful authentication (expected with the ONF pod setup) but failed DHCP/E2E ping
You Wang9f7eb392018-10-09 17:49:34 -0700163 ... Provision subscriber
164 ... Validate successful authentication/DHCP/E2E ping
165 [Setup] None
Kailash Khalasi92061c12018-10-29 11:52:39 -0700166 [Tags] test5
You Wang9f7eb392018-10-09 17:49:34 -0700167 Create Whitelist
168 Create VOLT
You Wang5be816a2018-10-11 16:45:31 -0700169 Wait Until Keyword Succeeds 300s 15s Validate ONU States ACTIVE ENABLED ${onu_device}
170 Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI ENABLED AWAITING ${onu_device}
171 Validate Authentication True ${src_iface} wpa_supplicant.conf ${src_ip} ${src_user} ${src_pass} ${src_container_type} ${src_container_name}
You Wang8fff6a02018-10-15 16:26:54 -0700172 Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI ENABLED APPROVED ${onu_device}
You Wang5be816a2018-10-11 16:45:31 -0700173 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 -0700174 Clean Up Linux
175 Create Subscriber
You Wanga4524992018-10-17 16:38:33 -0700176 Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status pre-provisioned ${onu_device}
You Wang5be816a2018-10-11 16:45:31 -0700177 Validate Authentication True ${src_iface} wpa_supplicant.conf ${src_ip} ${src_user} ${src_pass} ${src_container_type} ${src_container_name}
178 Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI ENABLED APPROVED ${onu_device}
179 Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status enabled ${onu_device}
180 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 -0700181
182ONU in Correct Location (Skip Authentication)
183 [Documentation] Validates E2E Ping Connectivity and object states for the given scenario:
184 ... Configure whitelist with correct ONU location and skip RG authentication
185 ... Validate failed authentication/DHCP/E2E ping
Kailash Khalasi92061c12018-10-29 11:52:39 -0700186 [Tags] test6
You Wang5be816a2018-10-11 16:45:31 -0700187 Wait Until Keyword Succeeds 300s 15s Validate ONU States ACTIVE ENABLED ${onu_device}
188 Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI ENABLED AWAITING ${onu_device}
189 Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status awaiting-auth ${onu_device}
190 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 -0700191
You Wang9f7eb392018-10-09 17:49:34 -0700192ONU not in Whitelist
You Wang0c2b3662018-10-01 16:56:17 -0700193 [Documentation] Validates E2E Ping Connectivity and object states for the given scenario:
You Wang9f7eb392018-10-09 17:49:34 -0700194 ... Skip whitelist configuration for ONU
195 ... Validate failed authentication/DHCP/E2E ping
You Wang0c2b3662018-10-01 16:56:17 -0700196 [Setup] None
Kailash Khalasi92061c12018-10-29 11:52:39 -0700197 [Tags] test7
You Wang9f7eb392018-10-09 17:49:34 -0700198 Create Subscriber
199 Create VOLT
You Wang5be816a2018-10-11 16:45:31 -0700200 Wait Until Keyword Succeeds 300s 15s Validate ONU States UNKNOWN DISABLED ${onu_device}
201 Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI DISABLED AWAITING ${onu_device}
202 Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status awaiting-auth ${onu_device}
203 Validate Authentication False ${src_iface} wpa_supplicant.conf ${src_ip} ${src_user} ${src_pass} ${src_container_type} ${src_container_name}
204 Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI DISABLED AWAITING ${onu_device}
205 Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status awaiting-auth ${onu_device}
206 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 -0700207
You Wang9f7eb392018-10-09 17:49:34 -0700208ONU not in Whitelist (Skip Subscriber Provisioning) -> Add ONU to Whitelist -> Provision Subscriber
209 [Documentation] Validates E2E Ping Connectivity and object states for the given scenario:
210 ... Skip whitelist configuration for ONU and subscriber provisioning
You Wang5be816a2018-10-11 16:45:31 -0700211 ... Validate successful authentication but failed DHCP/E2E ping
You Wang9f7eb392018-10-09 17:49:34 -0700212 ... Configure whitelist with correct ONU location
You Wang5be816a2018-10-11 16:45:31 -0700213 ... Validate successful authentication (expected with the ONF pod setup) but failed DHCP/E2E ping
You Wang9f7eb392018-10-09 17:49:34 -0700214 ... Provision subscriber
215 ... Validate successful authentication/DHCP/E2E ping
216 [Setup] None
Kailash Khalasi92061c12018-10-29 11:52:39 -0700217 [Tags] test8
You Wang9f7eb392018-10-09 17:49:34 -0700218 Create VOLT
You Wang5be816a2018-10-11 16:45:31 -0700219 Wait Until Keyword Succeeds 300s 15s Validate ONU States UNKNOWN DISABLED ${onu_device}
220 Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI DISABLED AWAITING ${onu_device}
221 Validate Authentication False ${src_iface} wpa_supplicant.conf ${src_ip} ${src_user} ${src_pass} ${src_container_type} ${src_container_name}
222 Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI DISABLED AWAITING ${onu_device}
223 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 -0700224 Clean Up Linux
225 Create Whitelist
You Wanga4524992018-10-17 16:38:33 -0700226 Wait Until Keyword Succeeds 60s 2s Validate ONU States ACTIVE ENABLED ${onu_device}
You Wang5be816a2018-10-11 16:45:31 -0700227 Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI ENABLED AWAITING ${onu_device}
228 Validate Authentication True ${src_iface} wpa_supplicant.conf ${src_ip} ${src_user} ${src_pass} ${src_container_type} ${src_container_name}
You Wang8fff6a02018-10-15 16:26:54 -0700229 Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI ENABLED APPROVED ${onu_device}
You Wang5be816a2018-10-11 16:45:31 -0700230 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 -0700231 Clean Up Linux
232 Create Subscriber
You Wanga4524992018-10-17 16:38:33 -0700233 Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status pre-provisioned ${onu_device}
You Wang5be816a2018-10-11 16:45:31 -0700234 Validate Authentication True ${src_iface} wpa_supplicant.conf ${src_ip} ${src_user} ${src_pass} ${src_container_type} ${src_container_name}
235 Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI ENABLED APPROVED ${onu_device}
236 Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status enabled ${onu_device}
237 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 -0700238
239ONU in Wrong Location
240 [Documentation] Validates E2E Ping Connectivity and object states for the given scenario:
241 ... Configure whitelist with wrong ONU location
242 ... Validate failed authentication/DHCP/E2E ping
Kailash Khalasi92061c12018-10-29 11:52:39 -0700243 [Tags] test9
You Wang9f7eb392018-10-09 17:49:34 -0700244 Update Whitelist with Wrong Location
You Wang5be816a2018-10-11 16:45:31 -0700245 Wait Until Keyword Succeeds 300s 15s Validate ONU States UNKNOWN DISABLED ${onu_device}
246 Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI DISABLED AWAITING ${onu_device}
247 Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status awaiting-auth ${onu_device}
248 Validate Authentication False ${src_iface} wpa_supplicant.conf ${src_ip} ${src_user} ${src_pass} ${src_container_type} ${src_container_name}
249 Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI DISABLED AWAITING ${onu_device}
250 Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status awaiting-auth ${onu_device}
251 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 -0700252
You Wang5be816a2018-10-11 16:45:31 -0700253ONU in Wrong Location (Skip Subscriber Provisioning) -> ONU in Correct Location -> Provision Subscriber
You Wang9f7eb392018-10-09 17:49:34 -0700254 [Documentation] Validates E2E Ping Connectivity and object states for the given scenario:
255 ... Configure whitelist with wrong ONU location and skip subscriber provisioning
256 ... Validate failed authentication/DHCP/E2E ping
257 ... Configure whitelist with correct ONU location
You Wang5be816a2018-10-11 16:45:31 -0700258 ... Validate successful authentication (expected with the ONF pod setup) but failed DHCP/E2E ping
You Wang9f7eb392018-10-09 17:49:34 -0700259 ... Provision subscriber
260 ... Validate successful authentication/DHCP/E2E ping
261 [Setup] None
Kailash Khalasi92061c12018-10-29 11:52:39 -0700262 [Tags] test10
You Wang9f7eb392018-10-09 17:49:34 -0700263 Create VOLT
264 Create Whitelist
265 Update Whitelist with Wrong Location
You Wang5be816a2018-10-11 16:45:31 -0700266 Wait Until Keyword Succeeds 300s 15s Validate ONU States UNKNOWN DISABLED ${onu_device}
267 Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI DISABLED AWAITING ${onu_device}
268 Validate Authentication False ${src_iface} wpa_supplicant.conf ${src_ip} ${src_user} ${src_pass} ${src_container_type} ${src_container_name}
269 Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI DISABLED AWAITING ${onu_device}
270 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 -0700271 Clean Up Linux
272 Update Whitelist with Correct Location
You Wanga4524992018-10-17 16:38:33 -0700273 Wait Until Keyword Succeeds 60s 2s Validate ONU States ACTIVE ENABLED ${onu_device}
You Wang5be816a2018-10-11 16:45:31 -0700274 Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI ENABLED AWAITING ${onu_device}
275 Validate Authentication True ${src_iface} wpa_supplicant.conf ${src_ip} ${src_user} ${src_pass} ${src_container_type} ${src_container_name}
You Wang8fff6a02018-10-15 16:26:54 -0700276 Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI ENABLED APPROVED ${onu_device}
You Wang5be816a2018-10-11 16:45:31 -0700277 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 -0700278 Clean Up Linux
279 Create Subscriber
You Wanga4524992018-10-17 16:38:33 -0700280 Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status pre-provisioned ${onu_device}
You Wang5be816a2018-10-11 16:45:31 -0700281 Validate Authentication True ${src_iface} wpa_supplicant.conf ${src_ip} ${src_user} ${src_pass} ${src_container_type} ${src_container_name}
282 Wait Until Keyword Succeeds 60s 2s Validate ATT Workflow Driver SI ENABLED APPROVED ${onu_device}
283 Wait Until Keyword Succeeds 60s 2s Validate Subscriber Status enabled ${onu_device}
284 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 -0700285
Suchitra Vemuriff825322018-09-07 14:00:04 -0700286*** Keywords ***
You Wang9f7eb392018-10-09 17:49:34 -0700287Setup Suite
Kailash Khalasif3e0a9f2018-09-18 13:43:42 -0700288 ${auth} = Create List ${XOS_USER} ${XOS_PASSWD}
289 ${HEADERS} Create Dictionary Content-Type=application/json
290 Create Session ${server_ip} http://${server_ip}:${server_port} auth=${AUTH} headers=${HEADERS}
291 ${att_workflow_service_id}= Get Service Owner Id ${ATT_SERVICE}
292 ${volt_service_id}= Get Service Owner Id ${VOLT_SERVICE}
Kailash Khalasi30a6a392018-09-10 14:32:39 -0700293 ${AttWhiteListList}= utils.jsonToList ${WHITELIST_PATHFILE} AttWhiteListInfo
You Wang9f7eb392018-10-09 17:49:34 -0700294 Set Suite Variable ${AttWhiteListList}
Suchitra Vemuriff825322018-09-07 14:00:04 -0700295 ${AttWhiteListDict}= utils.listToDict ${AttWhiteListList} 0
Kailash Khalasif3e0a9f2018-09-18 13:43:42 -0700296 ${AttWhiteListDict}= utils.setFieldValueInDict ${AttWhiteListDict} owner_id ${att_workflow_service_id}
Suchitra Vemuriff825322018-09-07 14:00:04 -0700297 ${onu_device}= Get From Dictionary ${AttWhiteListDict} serial_number
Suchitra Vemuriff825322018-09-07 14:00:04 -0700298 Set Global Variable ${onu_device}
You Wang9f7eb392018-10-09 17:49:34 -0700299 ${onu_location}= Get From Dictionary ${AttWhiteListDict} pon_port_id
300 Set Global Variable ${onu_location}
Kailash Khalasi30a6a392018-09-10 14:32:39 -0700301 ${SubscriberList}= utils.jsonToList ${SUBSCRIBER_PATHFILE} SubscriberInfo
You Wang9f7eb392018-10-09 17:49:34 -0700302 Set Global Variable ${SubscriberList}
Kailash Khalasi6dab16e2018-09-17 20:24:08 -0700303 ${SubscriberDict}= utils.listToDict ${SubscriberList} 0
304 ${s_tag}= utils.getFieldValueFromDict ${SubscriberDict} s_tag
305 ${c_tag}= utils.getFieldValueFromDict ${SubscriberDict} c_tag
Kailash Khalasif3e0a9f2018-09-18 13:43:42 -0700306 ${VoltDeviceList}= utils.jsonToList ${VOLT_DEVICE_PATHFILE} VOLTDeviceInfo
Kailash Khalasi4e1ce762018-12-18 20:29:29 -0800307 ${VoltDeviceDict}= utils.setFieldValueInDict ${VoltDeviceList[0]} volt_service_id ${volt_service_id}
You Wang9f7eb392018-10-09 17:49:34 -0700308 Set Global Variable ${VoltDeviceList}
Kailash Khalasi4e1ce762018-12-18 20:29:29 -0800309 Set Global Variable ${VoltDeviceDict}
Kailash Khalasi6dab16e2018-09-17 20:24:08 -0700310 Set Suite Variable ${s_tag}
311 Set Suite Variable ${c_tag}
You Wang59ded6c2018-10-05 17:43:44 -0700312 Set Global Variable ${export_kubeconfig} export KUBECONFIG=${KUBERNETES_CONF}
313 # Read variables from yaml file
314 ${src_ip}= Evaluate ${hosts}.get("src").get("ip")
315 ${src_user}= Evaluate ${hosts}.get("src").get("user")
316 ${src_pass}= Evaluate ${hosts}.get("src").get("pass")
You Wang5be816a2018-10-11 16:45:31 -0700317 ${src_container_type}= Evaluate ${hosts}.get("src").get("container_type")
You Wang59ded6c2018-10-05 17:43:44 -0700318 ${src_container_name}= Evaluate ${hosts}.get("src").get("container_name")
319 ${src_iface}= Evaluate ${hosts}.get("src").get("dp_iface_name")
320 ${dst_ip}= Evaluate ${hosts}.get("dst").get("ip")
321 ${dst_user} = Evaluate ${hosts}.get("dst").get("user")
322 ${dst_pass}= Evaluate ${hosts}.get("dst").get("pass")
You Wang5be816a2018-10-11 16:45:31 -0700323 ${dst_container_type}= Evaluate ${hosts}.get("dst").get("container_type")
You Wang59ded6c2018-10-05 17:43:44 -0700324 ${dst_container_name}= Evaluate ${hosts}.get("dst").get("container_name")
325 ${dst_dp_iface}= Evaluate ${hosts}.get("dst").get("dp_iface_name")
326 ${dst_dp_ip}= Evaluate ${hosts}.get("dst").get("dp_iface_ip_qinq")
327 ${olt_ip}= Evaluate ${olts}[0].get("ip")
328 ${olt_user}= Evaluate ${olts}[0].get("user")
329 ${olt_pass}= Evaluate ${olts}[0].get("pass")
You Wang8fff6a02018-10-15 16:26:54 -0700330 ${k8s_node_ip}= Evaluate ${nodes}[0].get("ip")
331 ${k8s_node_user}= Evaluate ${nodes}[0].get("user")
332 ${k8s_node_pass}= Evaluate ${nodes}[0].get("pass")
You Wang59ded6c2018-10-05 17:43:44 -0700333 Set Suite Variable ${src_ip}
334 Set Suite Variable ${src_user}
335 Set Suite Variable ${src_pass}
You Wang5be816a2018-10-11 16:45:31 -0700336 Set Suite Variable ${src_container_type}
You Wang59ded6c2018-10-05 17:43:44 -0700337 Set Suite Variable ${src_container_name}
338 Set Suite Variable ${src_iface}
339 Set Suite Variable ${dst_ip}
340 Set Suite Variable ${dst_user}
341 Set Suite Variable ${dst_pass}
You Wang5be816a2018-10-11 16:45:31 -0700342 Set Suite Variable ${dst_container_type}
You Wang59ded6c2018-10-05 17:43:44 -0700343 Set Suite Variable ${dst_container_name}
344 Set Suite Variable ${dst_dp_iface}
345 Set Suite Variable ${dst_dp_ip}
346 Set Suite Variable ${olt_ip}
347 Set Suite Variable ${olt_user}
348 Set Suite Variable ${olt_pass}
You Wang8fff6a02018-10-15 16:26:54 -0700349 Set Suite Variable ${k8s_node_ip}
350 Set Suite Variable ${k8s_node_user}
351 Set Suite Variable ${k8s_node_pass}
352 @{container_list}= Create List
Kailash Khalasidd9136a2018-10-18 11:16:18 -0700353 Append To List ${container_list} att-workflow-att-workflow-driver
Kailash Khalasie59ba702018-12-18 19:36:03 -0800354 Append To List ${container_list} seba-services-volt
355 Append To List ${container_list} seba-services-rcord
Suchitra Vemuri38102e02019-02-26 16:20:21 -0800356 Append To List ${container_list} seba-services-onos
Kailash Khalasie59ba702018-12-18 19:36:03 -0800357 Append To List ${container_list} seba-services-fabric-crossconnect
You Wangf573e402018-10-17 14:01:59 -0700358 Append To List ${container_list} xos-core
359 Append To List ${container_list} vcore
You Wang8fff6a02018-10-15 16:26:54 -0700360 Set Suite Variable ${container_list}
361 ${datetime}= Get Current Datetime On Kubernetes Node ${k8s_node_ip} ${k8s_node_user} ${k8s_node_pass}
362 Set Suite Variable ${datetime}
Suchitra Vemuriff825322018-09-07 14:00:04 -0700363
You Wang9f7eb392018-10-09 17:49:34 -0700364Teardown Suite
Kailash Khalasif3e0a9f2018-09-18 13:43:42 -0700365 [Documentation] Performs any additional cleanup required
366 Log Suite Teardown cleanup
367 Delete All Sessions
368
You Wang9f7eb392018-10-09 17:49:34 -0700369Setup Test
Kailash Khalasif3e0a9f2018-09-18 13:43:42 -0700370 [Documentation] Re-create Subscriber, whitelist, and olt-device models to test
371 Log Re-creating objects
You Wang8fff6a02018-10-15 16:26:54 -0700372 ${datetime}= Get Current Datetime On Kubernetes Node ${k8s_node_ip} ${k8s_node_user} ${k8s_node_pass}
You Wang9f7eb392018-10-09 17:49:34 -0700373 Create Whitelist
374 Create Subscriber
375 Create VOLT
Suchitra Vemurif7b5d442019-02-27 15:17:03 -0800376 Wait Until Keyword Succeeds 200s 15s Validate OLT States ACTIVE ENABLED ${olt_ip}
You Wang9f7eb392018-10-09 17:49:34 -0700377
You Wang9f7eb392018-10-09 17:49:34 -0700378Teardown Test
Kailash Khalasif3e0a9f2018-09-18 13:43:42 -0700379 [Documentation] Delete xos objects, kills processes and cleans up interfaces on src+dst servers
Kailash266cc172019-03-05 14:32:10 -0800380 Get VOLTHA Status
381 Get ONOS Status
You Wang9f7eb392018-10-09 17:49:34 -0700382 Clean Up Linux
383 Clean Up XOS
You Wang8fff6a02018-10-15 16:26:54 -0700384 Log Kubernetes Containers Logs Since Time ${datetime} ${container_list}
You Wang9f7eb392018-10-09 17:49:34 -0700385
386Clean Up Linux
387 [Documentation] Kill processes and clean up interfaces on src+dst servers
You Wang5be816a2018-10-11 16:45:31 -0700388 Run Keyword And Ignore Error Kill Linux Process [w]pa_supplicant ${src_ip} ${src_user} ${src_pass} ${src_container_type} ${src_container_name}
389 Run Keyword And Ignore Error Kill Linux Process [d]hclient ${src_ip} ${src_user} ${src_pass} ${src_container_type} ${src_container_name}
390 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}
391 Delete IP Addresses from Interface on Remote Host ${src_iface} ${src_ip} ${src_user} ${src_pass} ${src_container_type} ${src_container_name}
392 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 -0700393
394Clean Up XOS
395 [Documentation] Clean up all XOS objects and reinstall voltha after OLT reboots
You Wang88e1d852018-10-05 11:44:19 -0700396 Wait Until Keyword Succeeds 60s 2s Clean Up Objects ${VOLT_SUBSCRIBER}
You Wang88e1d852018-10-05 11:44:19 -0700397 Wait Until Keyword Succeeds 60s 2s Clean Up Objects ${ATT_WHITELIST}
Suchitra Vemuri4d81bf12018-11-28 12:32:58 -0800398 Sleep 20s
Kailashefc1e0d2018-11-20 13:49:06 -0800399 Wait Until Keyword Succeeds 30s 2s Validate Subscriber Count 0
Kailashd1587112018-11-20 11:55:16 -0800400 Wait Until Keyword Succeeds 60s 2s Clean Up Objects ${VOLT_DEVICE}
Kailashefc1e0d2018-11-20 13:49:06 -0800401 Wait Until Keyword Succeeds 60s 2s Clean Up Objects ${ATT_SERVICEINSTANCES}
You Wang0c2b3662018-10-01 16:56:17 -0700402 Wait Until Keyword Succeeds 120s 10s Check Remote System Reachability False ${olt_ip}
403 Wait Until Keyword Succeeds 120s 10s Check Remote System Reachability True ${olt_ip}
404 Wait Until Keyword Succeeds 120s 10s Openolt is Up ${olt_ip} ${olt_user} ${olt_pass}
Kailash Khalasia0810ce2018-09-10 13:03:27 -0700405
You Wang5be816a2018-10-11 16:45:31 -0700406Create Whitelist
407 ${AttWhiteListDict}= utils.listToDict ${AttWhiteListList} 0
408 CORD Post ${ATT_WHITELIST} ${AttWhiteListDict}
409
You Wang9f7eb392018-10-09 17:49:34 -0700410Remove Whitelist
411 ${whitelist_id}= Retrieve Whitelist Entry ${onu_device}
412 CORD Delete ${ATT_WHITELIST} ${whitelist_id}
413
414Update Whitelist with Wrong Location
415 ${whitelist_id}= Retrieve Whitelist Entry ${onu_device}
416 CORD Put ${ATT_WHITELIST} {"pon_port_id": 55 } ${whitelist_id}
417
418Update Whitelist with Correct Location
419 ${whitelist_id}= Retrieve Whitelist Entry ${onu_device}
420 CORD Put ${ATT_WHITELIST} {"pon_port_id": ${onu_location} } ${whitelist_id}
421
You Wang5be816a2018-10-11 16:45:31 -0700422Create Subscriber
423 ${SubscriberDict}= utils.listToDict ${SubscriberList} 0
424 Wait Until Keyword Succeeds 120s 15s CORD Post ${VOLT_SUBSCRIBER} ${SubscriberDict}
Kailash Khalasia0810ce2018-09-10 13:03:27 -0700425
You Wangf573e402018-10-17 14:01:59 -0700426Remove Subscriber
427 ${subscriber_id}= Retrieve Subscriber ${c_tag}
428 CORD Delete ${VOLT_SUBSCRIBER} ${subscriber_id}
429
You Wang5be816a2018-10-11 16:45:31 -0700430Create VOLT
Suchitra Vemuria63b6de2019-02-04 18:55:33 -0800431 CORD Post ${VOLT_DEVICE} ${VoltDeviceDict}