blob: 526f5932ed0f75271e4bae96da217ffc631d031e [file] [log] [blame]
A R Karthick35495c32017-05-11 14:58:32 -07001import os
2import sys
3import unittest
4from nose.tools import *
5from CordTestConfig import setup_module
6from CordTestUtils import log_test
7from VolthaCtrl import VolthaCtrl
8
9class voltha_exchange(unittest.TestCase):
10
11 OLT_TYPE = 'tibit_olt'
12 OLT_MAC = '00:0c:e2:31:12:00'
13 VOLTHA_HOST = 'localhost'
14 VOLTHA_REST_PORT = 8881
15 voltha = None
16
17 @classmethod
18 def setUpClass(cls):
19 cls.voltha = VolthaCtrl(cls.VOLTHA_HOST, rest_port = cls.VOLTHA_REST_PORT)
20
21 def test_olt_enable(self):
22 log_test.info('Enabling OLT type %s, MAC %s' %(self.OLT_TYPE, self.OLT_MAC))
23 status = self.voltha.enable_device(self.OLT_TYPE, self.OLT_MAC)
24 assert_equal(status, True)
Thangavelu K S008f38e2017-05-15 19:36:55 +000025
26 def test_subscriber_with_voltha_for_eap_tls_authentication(self):
27 """
28 Test Method:
29 0. Make sure that voltha is up and running on CORD-POD setup.
30 1. OLT and ONU is detected and validated.
31 2. Bring up freeradius server container using CORD TESTER and make sure that ONOS have connectivity to freeradius server.
32 3. Issue auth request packets from CORD TESTER voltha test module acting as a subscriber..
33 4. Validate that eap tls valid auth packets are being exchanged between subscriber, onos and freeradius.
34 5. Verify that subscriber is authenticated successfully.
35 """
36
37 def test_subscriber_with_voltha_for_eap_tls_authentication_failure(self):
38 """
39 Test Method:
40 0. Make sure that voltha is up and running on CORD-POD setup.
41 1. OLT and ONU is detected and validated.
42 2. Bring up freeradius server container using CORD TESTER and make sure that ONOS have connectivity to freeradius server.
43 3. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
44 4. Validate that eap tls without cert auth packet is being exchanged between subscriber, onos and freeradius.
45 5. Verify that subscriber authentication is unsuccessful..
46 """
47
48 def test_subscriber_with_voltha_for_eap_tls_authentication_using_invalid_cert(self):
49 """
50 Test Method:
51 0. Make sure that voltha is up and running on CORD-POD setup.
52 1. OLT and ONU is detected and validated.
53 2. Bring up freeradius server container using CORD TESTER and make sure that ONOS have connectivity to freeradius server.
54 3. Issue tls auth packets and exchange invalid cert from CORD TESTER voltha test module acting as a subscriber..
55 4. Validate that eap tls with invalid cert auth packet is being exchanged between subscriber, onos and freeradius.
56 5. Verify that subscriber authentication is unsuccessful..
57 """
58
59 def test_subscriber_with_voltha_for_eap_tls_authentication_with_aaa_app_deactivation(self):
60 """
61 Test Method:
62 0. Make sure that voltha is up and running on CORD-POD setup.
63 1. OLT and ONU is detected and validated.
64 2. Bring up freeradius server container using CORD TESTER and make sure that ONOS have connectivity to freeradius server.
65 3. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
66 4. Validate that eap tls without sending client hello, it's not being exchanged between client, onos and freeradius.
67 5. Verify that subscriber authentication is unsuccessful..
68 """
69
70 def test_subscriber_with_voltha_for_eap_tls_authentication_restarting_radius_server(self):
71 """
72 Test Method:
73 0. Make sure that voltha is up and running on CORD-POD setup.
74 1. OLT and ONU is detected and validated.
75 2. Bring up freeradius server container using CORD TESTER and make sure that ONOS have connectivity to freeradius server.
76 3. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
77 4. Validate that eap tls with restart of radius server and packets are being exchanged between subscriber, onos and freeradius.
78 5. Verify that subscriber authentication is unsuccessful..
79 """
80
81 def test_subscriber_with_voltha_for_eap_tls_authentication_with_disabled_olt(self):
82 """
83 Test Method:
84 0. Make sure that voltha is up and running on CORD-POD setup.
85 1. OLT and ONU is detected and validated.
86 2. Bring up freeradius server container using CORD TESTER and make sure that ONOS have connectivity to freeradius server.
87 3. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
88 5. Validate that eap tls packets are being exchanged between subscriber, onos and freeradius.
89 6. Verify that subscriber authenticated successfully.
90 7. Disable olt which is seen in voltha and issue tls auth packets from subscriber.
91 8. Validate that eap tls packets are not being exchanged between subscriber, onos and freeradius.
92 9. Verify that subscriber authentication is unsuccessful..
93 """
94
95 def test_subscriber_with_voltha_for_eap_tls_authentication_disabling_uni_port_in_voltha(self):
96 """
97 Test Method:
98 0. Make sure that voltha is up and running on CORD-POD setup.
99 1. OLT and ONU is detected and validated.
100 2. Bring up freeradius server container using CORD TESTER and make sure that ONOS have connectivity to freeradius server.
101 3. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
102 5. Validate that eap tls packets are being exchanged between subscriber, onos and freeradius.
103 6. Verify that subscriber authenticated successfully.
104 7. Disable uni port which is seen in voltha and issue tls auth packets from subscriber.
105 8. Validate that eap tls packets are not being exchanged between subscriber, onos and freeradius.
106 9. Verify that subscriber authentication is unsuccessful..
107 """
108
109 def test_subscriber_with_voltha_for_eap_tls_authentication_restarting_olt(self):
110 """
111 Test Method:
112 0. Make sure that voltha is up and running on CORD-POD setup.
113 1. OLT and ONU is detected and validated.
114 2. Bring up freeradius server container using CORD TESTER and make sure that ONOS have connectivity to freeradius server.
115 3. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
116 5. Validate that eap tls packets are being exchanged between subscriber, onos and freeradius.
117 6. Verify that subscriber authenticated successfully.
118 7. Restart olt which is seen in voltha and issue tls auth packets from subscriber.
119 8. Validate that eap tls packets are not being exchanged between subscriber, onos and freeradius.
120 9. Verify that subscriber authentication is unsuccessful..
121 """
122
123 def test_subscriber_with_voltha_for_eap_tls_authentication_restarting_onu(self):
124 """
125 Test Method:
126 0. Make sure that voltha is up and running on CORD-POD setup.
127 1. OLT and ONU is detected and validated.
128 2. Bring up freeradius server container using CORD TESTER and make sure that ONOS have connectivity to freeradius server.
129 3. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
130 5. Validate that eap tls packets are being exchanged between subscriber, onos and freeradius.
131 6. Verify that subscriber authenticated successfully.
132 7. Restart onu which is seen in voltha and issue tls auth packets from subscriber.
133 8. Validate that eap tls packets are not being exchanged between subscriber, onos and freeradius.
134 9. Verify that subscriber authentication is unsuccessful..
135 """
136
137 def test_two_subscribers_with_voltha_for_eap_tls_authentication(self):
138 """
139 Test Method:
140 0. Make sure that voltha is up and running on CORD-POD setup.
141 1. OLT is detected and ONU ports(nni and 2 uni's) are being seen.
142 2. Bring up freeradius server container using CORD TESTER and make sure that ONOS have connectivity to freeradius server.
143 3. Bring up two Residential subscribers from cord-tester and issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
144 4. Validate that eap tls valid auth packets are being exchanged between two subscriber, onos and freeradius.
145 5. Verify that two subscribers are authenticated successfully.
146 """
147
148 def test_two_subscribers_with_voltha_for_eap_tls_authentication_using_same_certificates(self):
149 """
150 Test Method:
151 0. Make sure that voltha is up and running on CORD-POD setup.
152 1. OLT is detected and ONU ports(nni and 2 uni's) are being seen.
153 2. Bring up freeradius server container using CORD TESTER and make sure that ONOS have connectivity to freeradius server.
154 3. Bring up two Residential subscribers from cord-tester and issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
155 4. Validate that two valid certificates are being exchanged between two subscriber, onos and freeradius.
156 5. Verify that two subscribers are not authenticated.
157 """
158
159 def test_two_subscribers_with_voltha_for_eap_tls_authentication_initiating_invalid_tls_packets_for_one_subscriber(self):
160 """
161 Test Method:
162 0. Make sure that voltha is up and running on CORD-POD setup.
163 1. OLT is detected and ONU ports(nni and 2 uni's) are being seen.
164 2. Bring up freeradius server container using CORD TESTER and make sure that ONOS have connectivity to freeradius server.
165 3. Bring up two Residential subscribers from cord-tester and issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
166 4. Validate that eap tls valid auth packets are being exchanged between valid subscriber, onos and freeradius.
167 5. Validate that eap tls valid auth packets are being exchanged between invalid client, onos and freeradius.
168 6. Verify that valid subscriber authenticated successfully.
169 7. Verify that invalid subscriber are not authenticated successfully.
170 """
171
172 def test_two_subscribers_with_voltha_for_eap_tls_authentication_initiating_invalid_cert_for_one_subscriber(self):
173 """
174 Test Method:
175 0. Make sure that voltha is up and running on CORD-POD setup.
176 1. OLT is detected and ONU ports(nni and 2 uni's) are being seen.
177 2. Bring up freeradius server container using CORD TESTER and make sure that ONOS have connectivity to freeradius server.
178 3. Bring up two Residential subscribers from cord-tester and issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
179 4. Validate that eap tls valid auth packets are being exchanged between valid subscriber, onos and freeradius.
180 5. Validate that eap tls invalid cert auth packets are being exchanged between invalid subscriber, onos and freeradius.
181 6. Verify that valid subscriber authenticated successfully.
182 7. Verify that invalid subscriber are not authenticated successfully.
183 """
184
185 def test_two_subscribers_with_voltha_for_eap_tls_authentication_with_one_uni_port_disabled(self):
186 """
187 Test Method:
188 0. Make sure that voltha is up and running on CORD-POD setup.
189 1. OLT and ONU is detected and validated.
190 2. Bring up freeradius server container using CORD TESTER and make sure that ONOS have connectivity to freeradius server.
191 3. Bring up two Residential subscribers from cord-tester and issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
192 5. Validate that eap tls packets are being exchanged between two subscriber, onos and freeradius.
193 6. Verify that subscriber authenticated successfully.
194 7. Disable one of the uni port which is seen in voltha and issue tls auth packets from subscriber.
195 8. Validate that eap tls packets are not being exchanged between one subscriber, onos and freeradius.
196 9. Verify that subscriber authentication is unsuccessful..
197 10. Verify that other subscriber authenticated successfully.
198 """
199
200 def test_subscriber_with_voltha_for_dhcp_request(self):
201 """
202 Test Method:
203 0. Make sure that voltha is up and running on CORD-POD setup.
204 1. OLT and ONU is detected and validated.
205 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
206 3. Send dhcp request from residential subscrber to dhcp server which is running as onos app.
207 4. Verify that subscriber get ip from dhcp server successfully.
208 """
209
210 def test_subscriber_with_voltha_for_dhcp_request_with_invalid_broadcast_source_mac(self):
211 """
212 Test Method:
213 0. Make sure that voltha is up and running on CORD-POD setup.
214 1. OLT and ONU is detected and validated.
215 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
216 3. Send dhcp request with invalid source mac broadcast from residential subscrber to dhcp server which is running as onos app.
217 4. Verify that subscriber should not get ip from dhcp server.
218 """
219
220 def test_subscriber_with_voltha_for_dhcp_request_with_invalid_multicast_source_mac(self):
221 """
222 Test Method:
223 0. Make sure that voltha is up and running on CORD-POD setup.
224 1. OLT and ONU is detected and validated.
225 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
226 3. Send dhcp request with invalid source mac multicast from residential subscrber to dhcp server which is running as onos app.
227 4. Verify that subscriber should not get ip from dhcp server.
228 """
229
230 def test_subscriber_with_voltha_for_dhcp_request_with_invalid_source_mac(self):
231 """
232 Test Method:
233 0. Make sure that voltha is up and running on CORD-POD setup.
234 1. OLT and ONU is detected and validated.
235 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
236 3. Send dhcp request with invalid source mac zero from residential subscrber to dhcp server which is running as onos app.
237 4. Verify that subscriber should not get ip from dhcp server.
238 """
239
240 def test_subscriber_with_voltha_for_dhcp_request_and_release(self):
241 """
242 Test Method:
243 0. Make sure that voltha is up and running on CORD-POD setup.
244 1. OLT and ONU is detected and validated.
245 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
246 3. Send dhcp request from residential subscrber to dhcp server which is running as onos app.
247 4. Verify that subscriber get ip from dhcp server successfully.
248 5. Send dhcp release from residential subscrber to dhcp server which is running as onos app.
249 6 Verify that subscriber should not get ip from dhcp server, ping to gateway.
250 """
251
Thangavelu K S057b7d22017-05-16 22:03:22 +0000252def test_subscriber_with_voltha_for_dhcp_starvation_positive_scenario(self):
253 """
254 Test Method:
255 0. Make sure that voltha is up and running on CORD-POD setup.
256 1. OLT and ONU is detected and validated.
257 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
258 3. Send dhcp request from residential subscriber to dhcp server which is running as onos app.
259 4. Verify that subscriber get ip from dhcp server successfully.
260 5. Repeat step 3 and 4 for 10 times.
261 6 Verify that subscriber should get ip from dhcp server.
262 """
263
264 def test_subscriber_with_voltha_for_dhcp_starvation_negative_scenario(self):
265 """
266 Test Method:
267 0. Make sure that voltha is up and running on CORD-POD setup.
268 1. OLT and ONU is detected and validated.
269 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
270 3. Send dhcp request from residential subscriber without of pool ip to dhcp server which is running as onos app.
271 4. Verify that subscriber should not get ip from dhcp server.
272 5. Repeat steps 3 and 4 for 10 times.
273 6 Verify that subscriber should not get ip from dhcp server.
274 """
275 def test_subscriber_with_voltha_for_dhcp_sending_multiple_discover(self):
276 """
277 Test Method:
278 0. Make sure that voltha is up and running on CORD-POD setup.
279 1. OLT and ONU is detected and validated.
280 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
281 3. Send dhcp request from residential subscriber to dhcp server which is running as onos app.
282 4. Verify that subscriber get ip from dhcp server successfully.
283 5. Repeat step 3 for 50 times.
284 6 Verify that subscriber should get same ip which was received from 1st discover from dhcp server.
285 """
286 def test_subscriber_with_voltha_for_dhcp_sending_multiple_request(self):
287 """
288 Test Method:
289 0. Make sure that voltha is up and running on CORD-POD setup.
290 1. OLT and ONU is detected and validated.
291 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
292 3. Send dhcp request from residential subscriber to dhcp server which is running as onos app.
293 4. Verify that subscriber get ip from dhcp server successfully.
294 5. Send DHCP request to dhcp server which is running as onos app.
295 6. Repeat step 5 for 50 times.
296 7. Verify that subscriber should get same ip which was received from 1st discover from dhcp server.
297 """
298
299 def test_subscriber_with_voltha_for_dhcp_requesting_desired_ip_address(self):
300 """
301 Test Method:
302 0. Make sure that voltha is up and running on CORD-POD setup.
303 1. OLT and ONU is detected and validated.
304 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
305 3. Send dhcp request with desired ip address from residential subscriber to dhcp server which is running as onos app.
306 4. Verify that subscriber get ip which was requested in step 3 from dhcp server successfully.
307 """
308
309 def test_subscriber_with_voltha_for_dhcp_requesting_desired_out_pool_ip_address(self):
310 """
311 Test Method:
312 0. Make sure that voltha is up and running on CORD-POD setup.
313 1. OLT and ONU is detected and validated.
314 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
315 3. Send dhcp request with desired out of pool ip address from residential subscriber to dhcp server which is running as onos app.
316 4. Verify that subscriber should not get ip which was requested in step 3 from dhcp server, and its offered only within dhcp pool of ip.
317 """
318 def test_subscriber_with_voltha_for_dhcp_deactivate_dhcp_app_in_onos(self):
319 """
320 Test Method:
321 0. Make sure that voltha is up and running on CORD-POD setup.
322 1. OLT and ONU is detected and validated.
323 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
324 3. Send dhcp request from residential subscriber to dhcp server which is running as onos app.
325 4. Verify that subscriber get ip from dhcp server successfully.
326 5. Deactivate dhcp server app in onos.
327 6. Repeat step 3.
328 7. Verify that subscriber should not get ip from dhcp server, and ping to gateway.
329 """
330 def test_subscriber_with_voltha_for_dhcp_renew_time(self):
331 """
332 Test Method:
333 0. Make sure that voltha is up and running on CORD-POD setup.
334 1. OLT and ONU is detected and validated.
335 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
336 3. Send dhcp request from residential subscriber to dhcp server which is running as onos app.
337 4. Verify that subscriber get ip from dhcp server successfully.
338 5. Send dhcp renew packet to dhcp server which is running as onos app.
339 6. Repeat step 4.
340 """
341 def test_subscriber_with_voltha_for_dhcp_rebind_time(self):
342 """
343 Test Method:
344 0. Make sure that voltha is up and running on CORD-POD setup.
345 1. OLT and ONU is detected and validated.
346 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
347 3. Send dhcp request from residential subscriber to dhcp server which is running as onos app.
348 4. Verify that subscriber get ip from dhcp server successfully.
349 5. Send dhcp rebind packet to dhcp server which is running as onos app.
350 6. Repeat step 4.
351 """
352 def test_subscriber_with_voltha_for_dhcp_disable_olt_in_voltha(self):
353 """
354 Test Method:
355 0. Make sure that voltha is up and running on CORD-POD setup.
356 1. OLT and ONU is detected and validated.
357 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
358 3. Send dhcp request from residential subscriber to dhcp server which is running as onos app.
359 4. Verify that subscriber get ip from dhcp server successfully.
360 5. Disable olt devices which is being detected in voltha CLI.
361 6. Repeat step 3.
362 7. Verify that subscriber should not get ip from dhcp server, and ping to gateway.
363 """
364 def test_subscriber_with_voltha_for_dhcp_disable_enable_olt_in_voltha(self):
365 """
366 Test Method:
367 0. Make sure that voltha is up and running on CORD-POD setup.
368 1. OLT and ONU is detected and validated.
369 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
370 3. Send dhcp request from residential subscriber to dhcp server which is running as onos app.
371 4. Verify that subscriber get ip from dhcp server successfully.
372 5. Disable olt devices which is being detected in voltha CLI.
373 6. Repeat step 3.
374 7. Verify that subscriber should not get ip from dhcp server, and ping to gateway.
375 8. Enable olt devices which is being detected in voltha CLI.
376 9. Repeat steps 3 and 4.
377 """
378 def test_subscriber_with_voltha_for_dhcp_disable_onu_port_in_voltha(self):
379 """
380 Test Method:
381 0. Make sure that voltha is up and running on CORD-POD setup.
382 1. OLT and ONU is detected and validated.
383 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
384 3. Send dhcp request from residential subscriber to dhcp server which is running as onos app.
385 4. Verify that subscriber get ip from dhcp server successfully.
386 5. Disable onu port which is being detected in voltha CLI.
387 6. Repeat step 3.
388 7. Verify that subscriber should not get ip from dhcp server, and ping to gateway.
389 """
390 def test_subscriber_with_voltha_for_dhcp_disable_enable_onu_port_in_voltha(self):
391 """
392 Test Method:
393 0. Make sure that voltha is up and running on CORD-POD setup.
394 1. OLT and ONU is detected and validated.
395 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
396 3. Send dhcp request from residential subscriber to dhcp server which is running as onos app.
397 4. Verify that subscriber get ip from dhcp server successfully.
398 5. Disable onu port which is being detected in voltha CLI.
399 6. Repeat step 3.
400 7. Verify that subscriber should not get ip from dhcp server, and ping to gateway.
401 8. Enable onu port which is being detected in voltha CLI.
402 9. Repeat steps 3 and 4.
403 """
404
405 def test_two_subscriber_with_voltha_for_dhcp_discover(self):
406 """
407 Test Method:
408 0. Make sure that voltha is up and running on CORD-POD setup.
409 1. OLT and ONU is detected and validated.
410 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
411 3. Send dhcp request from two residential subscribers to dhcp server which is running as onos app.
412 4. Verify that subscribers had got different ips from dhcp server successfully.
413 """
414
415 def test_two_subscriber_with_voltha_for_dhcp_multiple_discover(self):
416 """
417 Test Method:
418 0. Make sure that voltha is up and running on CORD-POD setup.
419 1. OLT and ONU is detected and validated.
420 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
421 3. Send dhcp request from two residential subscribers to dhcp server which is running as onos app.
422 4. Verify that subscribers had got ip from dhcp server successfully.
423 5. Repeat step 3 and 4 for 10 times for both subscribers.
424 6 Verify that subscribers should get same ips which are offered the first time from dhcp server.
425 """
426 def test_two_subscriber_with_voltha_for_dhcp_multiple_discover_for_one_subscriber(self):
427 """
428 Test Method:
429 0. Make sure that voltha is up and running on CORD-POD setup.
430 1. OLT and ONU is detected and validated.
431 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
432 3. Send dhcp request from two residential subscribers to dhcp server which is running as onos app.
433 4. Verify that subscribers had got ip from dhcp server successfully.
434 5. Repeat step 3 and 4 for 10 times for only one subscriber and ping to gateway from other subscriber.
435 6 Verify that subscriber should get same ip which is offered the first time from dhcp server and other subscriber ping to gateway should not failed
436 """
437 def test_two_subscriber_with_voltha_for_dhcp_discover_desired_ip_address_for_one_subscriber(self):
438 """
439 Test Method:
440 0. Make sure that voltha is up and running on CORD-POD setup.
441 1. OLT and ONU is detected and validated.
442 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
443 3. Send dhcp request from one residential subscriber to dhcp server which is running as onos app.
444 3. Send dhcp request with desired ip from other residential subscriber to dhcp server which is running as onos app.
445 4. Verify that subscribers had got different ips (one subscriber desired ip and other subscriber random ip) from dhcp server successfully.
446 """
447 def test_two_subscriber_with_voltha_for_dhcp_discover_within_and_wothout_dhcp_pool_ip_addresses(self):
448 """
449 Test Method:
450 0. Make sure that voltha is up and running on CORD-POD setup.
451 1. OLT and ONU is detected and validated.
452 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
453 3. Send dhcp request with desired wihtin dhcp pool ip from one residential subscriber to dhcp server which is running as onos app.
454 3. Send dhcp request with desired without in dhcp pool ip from other residential subscriber to dhcp server which is running as onos app.
455 4. Verify that subscribers had got different ips (both subscriber got random ips within dhcp pool) from dhcp server successfully.
456 """
457 def test_two_subscriber_with_voltha_for_dhcp_disable_onu_port_for_one_subscriber(self):
458 """
459 Test Method:
460 0. Make sure that voltha is up and running on CORD-POD setup.
461 1. OLT and ONU is detected and validated.
462 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
463 3. Send dhcp request from two residential subscribers to dhcp server which is running as onos app.
464 4. Verify that subscribers had got ip from dhcp server successfully.
465 5. Disable onu port on which access one subscriber and ping to gateway from other subscriber.
466 6. Repeat step 3 and 4 for one subscriber where uni port is down.
467 7. Verify that subscriber should not get ip from dhcp server and other subscriber ping to gateway should not failed.
468 """
469 def test_two_subscriber_with_voltha_for_dhcp_disable_enable_onu_port_for_one_subscriber(self):
470 """
471 Test Method:
472 0. Make sure that voltha is up and running on CORD-POD setup.
473 1. OLT and ONU is detected and validated.
474 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
475 3. Send dhcp request from two residential subscribers to dhcp server which is running as onos app.
476 4. Verify that subscribers had got ip from dhcp server successfully.
477 5. Disable onu port on which access one subscriber and ping to gateway from other subscriber.
478 6. Repeat step 3 and 4 for one subscriber where uni port is down.
479 7. Verify that subscriber should not get ip from dhcp server and other subscriber ping to gateway should not failed.
480 8. Enable onu port on which was disable at step 5 and ping to gateway from other subscriber.
481 9. Repeat step 3 and 4 for one subscriber where uni port is up now.
482 10. Verify that subscriber should get ip from dhcp server and other subscriber ping to gateway should not failed.
483 """
484 def test_two_subscriber_with_voltha_for_dhcp_disable_olt_detected_in_voltha(self):
485 """
486 Test Method:
487 0. Make sure that voltha is up and running on CORD-POD setup.
488 1. OLT and ONU is detected and validated.
489 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
490 3. Send dhcp request from two residential subscribers to dhcp server which is running as onos app.
491 4. Verify that subscribers had got ip from dhcp server successfully.
492 5. Start pinging continuously from one subscriber and repeat steps 3 and 4 for other subscriber.
493 6. Disable the olt device which is detected in voltha.
494 7. Verify that subscriber should not get ip from dhcp server and other subscriber ping to gateway should failed.
495 """
496 def test_two_subscriber_with_voltha_for_dhcp_disable_enable_olt_detected_in_voltha(self):
497 """
498 Test Method:
499 0. Make sure that voltha is up and running on CORD-POD setup.
500 1. OLT and ONU is detected and validated.
501 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
502 3. Send dhcp request from two residential subscribers to dhcp server which is running as onos app.
503 4. Verify that subscribers had got ip from dhcp server successfully.
504 5. Start pinging continuously from one subscriber and repeat steps 3 and 4 for other subscriber.
505 6. Disable the olt device which is detected in voltha.
506 7. Verify that subscriber should not get ip from dhcp server and other subscriber ping to gateway should failed.
507 8. Enable the olt device which is detected in voltha.
508 9. Verify that subscriber should get ip from dhcp server and other subscriber ping to gateway should not failed.
509 """
510 def test_two_subscriber_with_voltha_for_dhcp_pause_olt_detected_in_voltha(self):
511 """
512 Test Method:
513 0. Make sure that voltha is up and running on CORD-POD setup.
514 1. OLT and ONU is detected and validated.
515 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
516 3. Send dhcp request from two residential subscribers to dhcp server which is running as onos app.
517 4. Verify that subscribers had got ip from dhcp server successfully.
518 5. Start pinging continuously from one subscriber and repeat steps 3 and 4 for other subscriber.
519 6. Pause the olt device which is detected in voltha.
520 7. Verify that subscriber should not get ip from dhcp server and other subscriber ping to gateway should failed.
521 """
522 def test_subscriber_with_voltha_for_dhcpRelay_dhcp_request(self):
523 """
524 Test Method:
525 0. Make sure that voltha and external dhcp server are up and running on CORD-POD setup.
526 1. OLT and ONU is detected and validated.
527 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
528 3. Send dhcp request from residential subscrber to external dhcp server.
529 4. Verify that subscriber get ip from external dhcp server successfully.
530 """
531
532 def test_subscriber_with_voltha_for_dhcpRelay_dhcp_request_with_invalid_broadcast_source_mac(self):
533 """
534 Test Method:
535 0. Make sure that voltha and external dhcp server are is up and running on CORD-POD setup.
536 1. OLT and ONU is detected and validated.
537 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
538 3. Send dhcp request with invalid source mac broadcast from residential subscrber to external dhcp server.
539 4. Verify that subscriber should not get ip from external dhcp server.
540 """
541
542 def test_subscriber_with_voltha_for_dhcpRelay_dhcp_request_with_invalid_multicast_source_mac(self):
543 """
544 Test Method:
545 0. Make sure that voltha and external dhcp server are is up and running on CORD-POD setup.
546 1. OLT and ONU is detected and validated.
547 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
548 3. Send dhcp request with invalid source mac multicast from residential subscrber to external dhcp server.
549 4. Verify that subscriber should not get ip from external dhcp server.
550 """
551
552 def test_subscriber_with_voltha_for_dhcpRelay_dhcp_request_with_invalid_source_mac(self):
553 """
554 Test Method:
555 0. Make sure that voltha and external dhcp server are up and running on CORD-POD setup.
556 1. OLT and ONU is detected and validated.
557 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
558 3. Send dhcp request with invalid source mac zero from residential subscrber to external dhcp server.
559 4. Verify that subscriber should not get ip from external dhcp server.
560 """
561
562 def test_subscriber_with_voltha_for_dhcpRelay_dhcp_request_and_release(self):
563 """
564 Test Method:
565 0. Make sure that voltha and external dhcp server are up and running on CORD-POD setup.
566 1. OLT and ONU is detected and validated.
567 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
568 3. Send dhcp request from residential subscrber to external dhcp server.
569 4. Verify that subscriber get ip from external dhcp server successfully.
570 5. Send dhcp release from residential subscrber to external dhcp server.
571 6 Verify that subscriber should not get ip from external dhcp server, ping to gateway.
572 """
573
574 def test_subscriber_with_voltha_for_dhcpRelay_starvation(self):
575 """
576 Test Method:
577 0. Make sure that voltha and external dhcp server are up and running on CORD-POD setup.
578 1. OLT and ONU is detected and validated.
579 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
580 3. Send dhcp request from residential subscriber to external dhcp server.
581 4. Verify that subscriber get ip from external dhcp server. successfully.
582 5. Repeat step 3 and 4 for 10 times.
583 6 Verify that subscriber should get ip from external dhcp server..
584 """
585
586 def test_subscriber_with_voltha_for_dhcpRelay_starvation_negative_scenario(self):
587 """
588 Test Method:
589 0. Make sure that voltha and external dhcp server are up and running on CORD-POD setup.
590 1. OLT and ONU is detected and validated.
591 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
592 3. Send dhcp request from residential subscriber without of pool ip to external dhcp server.
593 4. Verify that subscriber should not get ip from external dhcp server..
594 5. Repeat steps 3 and 4 for 10 times.
595 6 Verify that subscriber should not get ip from external dhcp server..
596 """
597 def test_subscriber_with_voltha_for_dhcpRelay_sending_multiple_discover(self):
598 """
599 Test Method:
600 0. Make sure that voltha and external dhcp server are up and running on CORD-POD setup.
601 1. OLT and ONU is detected and validated.
602 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
603 3. Send dhcp request from residential subscriber to external dhcp server.
604 4. Verify that subscriber get ip from external dhcp server. successfully.
605 5. Repeat step 3 for 50 times.
606 6 Verify that subscriber should get same ip which was received from 1st discover from external dhcp server..
607 """
608 def test_subscriber_with_voltha_for_dhcpRelay_sending_multiple_request(self):
609 """
610 Test Method:
611 0. Make sure that voltha and external dhcp server are up and running on CORD-POD setup.
612 1. OLT and ONU is detected and validated.
613 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
614 3. Send dhcp request from residential subscriber to external dhcp server.
615 4. Verify that subscriber get ip from external dhcp server. successfully.
616 5. Send DHCP request to external dhcp server.
617 6. Repeat step 5 for 50 times.
618 7. Verify that subscriber should get same ip which was received from 1st discover from external dhcp server..
619 """
620
621 def test_subscriber_with_voltha_for_dhcpRelay_requesting_desired_ip_address(self):
622 """
623 Test Method:
624 0. Make sure that voltha and external dhcp server are up and running on CORD-POD setup.
625 1. OLT and ONU is detected and validated.
626 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
627 3. Send dhcp request with desired ip address from residential subscriber to external dhcp server.
628 4. Verify that subscriber get ip which was requested in step 3 from external dhcp server. successfully.
629 """
630
631 def test_subscriber_with_voltha_for_dhcpRelay_requesting_desired_out_of_pool_ip_address(self):
632 """
633 Test Method:
634 0. Make sure that voltha and external dhcp server are up and running on CORD-POD setup.
635 1. OLT and ONU is detected and validated.
636 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
637 3. Send dhcp request with desired out of pool ip address from residential subscriber to external dhcp server.
638 4. Verify that subscriber should not get ip which was requested in step 3 from external dhcp server., and its offered only within dhcp pool of ip.
639 """
640
641 def test_subscriber_with_voltha_for_dhcpRelay_deactivating_dhcpRelay_app_in_onos(self):
642 """
643 Test Method:
644 0. Make sure that voltha and external dhcp server are up and running on CORD-POD setup.
645 1. OLT and ONU is detected and validated.
646 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
647 3. Send dhcp request from residential subscriber to external dhcp server.
648 4. Verify that subscriber get ip from external dhcp server. successfully.
649 5. Deactivate dhcp server app in onos.
650 6. Repeat step 3.
651 7. Verify that subscriber should not get ip from external dhcp server., and ping to gateway.
652 """
653
654 def test_subscriber_with_voltha_for_dhcpRelay_renew_time(self):
655 """
656 Test Method:
657 0. Make sure that voltha and external dhcp server are up and running on CORD-POD setup.
658 1. OLT and ONU is detected and validated.
659 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
660 3. Send dhcp request from residential subscriber to external dhcp server.
661 4. Verify that subscriber get ip from external dhcp server. successfully.
662 5. Send dhcp renew packet to external dhcp server.
663 6. Repeat step 4.
664 """
665
666 def test_subscriber_with_voltha_for_dhcpRelay_rebind_time(self):
667 """
668 Test Method:
669 0. Make sure that voltha and external dhcp server are up and running on CORD-POD setup.
670 1. OLT and ONU is detected and validated.
671 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
672 3. Send dhcp request from residential subscriber to external dhcp server.
673 4. Verify that subscriber get ip from external dhcp server. successfully.
674 5. Send dhcp rebind packet to external dhcp server.
675 6. Repeat step 4.
676 """
677
678 def test_subscriber_with_voltha_for_dhcpRelay_disable_olt_in_voltha(self):
679 """
680 Test Method:
681 0. Make sure that voltha and external dhcp server are up and running on CORD-POD setup.
682 1. OLT and ONU is detected and validated.
683 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
684 3. Send dhcp request from residential subscriber to external dhcp server.
685 4. Verify that subscriber get ip from external dhcp server. successfully.
686 5. Disable olt devices which is being detected in voltha CLI.
687 6. Repeat step 3.
688 7. Verify that subscriber should not get ip from external dhcp server., and ping to gateway.
689 """
690
691 def test_subscriber_with_voltha_for_dhcpRelay_toggling_olt_in_voltha(self):
692 """
693 Test Method:
694 0. Make sure that voltha and external dhcp server are up and running on CORD-POD setup.
695 1. OLT and ONU is detected and validated.
696 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
697 3. Send dhcp request from residential subscriber to external dhcp server.
698 4. Verify that subscriber get ip from external dhcp server. successfully.
699 5. Disable olt devices which is being detected in voltha CLI.
700 6. Repeat step 3.
701 7. Verify that subscriber should not get ip from external dhcp server., and ping to gateway.
702 8. Enable olt devices which is being detected in voltha CLI.
703 9. Repeat steps 3 and 4.
704 """
705
706 def test_subscriber_with_voltha_for_dhcpRelay_disable_onu_port_in_voltha(self):
707 """
708 Test Method:
709 0. Make sure that voltha and external dhcp server are up and running on CORD-POD setup.
710 1. OLT and ONU is detected and validated.
711 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
712 3. Send dhcp request from residential subscriber to external dhcp server.
713 4. Verify that subscriber get ip from external dhcp server. successfully.
714 5. Disable onu port which is being detected in voltha CLI.
715 6. Repeat step 3.
716 7. Verify that subscriber should not get ip from external dhcp server., and ping to gateway.
717 """
718
719 def test_subscriber_with_voltha_for_dhcpRelay_disable_enable_onu_port_in_voltha(self):
720 """
721 Test Method:
722 0. Make sure that voltha and external dhcp server are up and running on CORD-POD setup.
723 1. OLT and ONU is detected and validated.
724 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
725 3. Send dhcp request from residential subscriber to external dhcp server.
726 4. Verify that subscriber get ip from external dhcp server. successfully.
727 5. Disable onu port which is being detected in voltha CLI.
728 6. Repeat step 3.
729 7. Verify that subscriber should not get ip from external dhcp server., and ping to gateway.
730 8. Enable onu port which is being detected in voltha CLI.
731 9. Repeat steps 3 and 4.
732 """
733
734 def test_two_subscriber_with_voltha_for_dhcpRelay_discover(self):
735 """
736 Test Method:
737 0. Make sure that voltha and external dhcp server are up and running on CORD-POD setup.
738 1. OLT and ONU is detected and validated.
739 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
740 3. Send dhcp request from two residential subscribers to external dhcp server.
741 4. Verify that subscribers had got different ips from external dhcp server. successfully.
742 """
743
744 def test_two_subscriber_with_voltha_for_dhcpRelay_multiple_discover(self):
745 """
746 Test Method:
747 0. Make sure that voltha and external dhcp server are up and running on CORD-POD setup.
748 1. OLT and ONU is detected and validated.
749 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
750 3. Send dhcp request from two residential subscribers to external dhcp server.
751 4. Verify that subscribers had got ip from external dhcp server. successfully.
752 5. Repeat step 3 and 4 for 10 times for both subscribers.
753 6 Verify that subscribers should get same ips which are offered the first time from external dhcp server..
754 """
755
756 def test_two_subscriber_with_voltha_for_dhcpRelay_multiple_discover_for_one_subscriber(self):
757 """
758 Test Method:
759 0. Make sure that voltha and external dhcp server are up and running on CORD-POD setup.
760 1. OLT and ONU is detected and validated.
761 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
762 3. Send dhcp request from two residential subscribers to external dhcp server.
763 4. Verify that subscribers had got ip from external dhcp server. successfully.
764 5. Repeat step 3 and 4 for 10 times for only one subscriber and ping to gateway from other subscriber.
765 6 Verify that subscriber should get same ip which is offered the first time from external dhcp server. and other subscriber ping to gateway should not failed
766 """
767
768 def test_two_subscriber_with_voltha_for_dhcpRelay_discover_desired_ip_address_for_one_subscriber(self):
769 """
770 Test Method:
771 0. Make sure that voltha and external dhcp server are up and running on CORD-POD setup.
772 1. OLT and ONU is detected and validated.
773 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
774 3. Send dhcp request from one residential subscriber to external dhcp server.
775 3. Send dhcp request with desired ip from other residential subscriber to external dhcp server.
776 4. Verify that subscribers had got different ips (one subscriber desired ip and other subscriber random ip) from external dhcp server. successfully.
777 """
778
779 def test_two_subscriber_with_voltha_for_dhcpRelay_discover_in_range_and_out_of_range_from_dhcp_pool_ip_addresses(self):
780 """
781 Test Method:
782 0. Make sure that voltha and external dhcp server are up and running on CORD-POD setup.
783 1. OLT and ONU is detected and validated.
784 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
785 3. Send dhcp request with desired wihtin dhcp pool ip from one residential subscriber to external dhcp server.
786 3. Send dhcp request with desired without in dhcp pool ip from other residential subscriber to external dhcp server.
787 4. Verify that subscribers had got different ips (both subscriber got random ips within dhcp pool) from external dhcp server. successfully.
788 """
789
790 def test_two_subscriber_with_voltha_for_dhcpRelay_disable_onu_port_for_one_subscriber(self):
791 """
792 Test Method:
793 0. Make sure that voltha and external dhcp server are up and running on CORD-POD setup.
794 1. OLT and ONU is detected and validated.
795 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
796 3. Send dhcp request from two residential subscribers to external dhcp server.
797 4. Verify that subscribers had got ip from external dhcp server. successfully.
798 5. Disable onu port on which access one subscriber and ping to gateway from other subscriber.
799 6. Repeat step 3 and 4 for one subscriber where uni port is down.
800 7. Verify that subscriber should not get ip from external dhcp server. and other subscriber ping to gateway should not failed.
801 """
802
803 def test_two_subscriber_with_voltha_for_dhcpRelay_toggle_onu_port_for_one_subscriber(self):
804 """
805 Test Method:
806 0. Make sure that voltha and external dhcp server are up and running on CORD-POD setup.
807 1. OLT and ONU is detected and validated.
808 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
809 3. Send dhcp request from two residential subscribers to external dhcp server.
810 4. Verify that subscribers had got ip from external dhcp server. successfully.
811 5. Disable onu port on which access one subscriber and ping to gateway from other subscriber.
812 6. Repeat step 3 and 4 for one subscriber where uni port is down.
813 7. Verify that subscriber should not get ip from external dhcp server. and other subscriber ping to gateway should not failed.
814 8. Enable onu port on which was disable at step 5 and ping to gateway from other subscriber.
815 9. Repeat step 3 and 4 for one subscriber where uni port is up now.
816 10. Verify that subscriber should get ip from external dhcp server. and other subscriber ping to gateway should not failed.
817 """
818
819 def test_two_subscriber_with_voltha_for_dhcpRelay_disable_olt_detected_in_voltha(self):
820 """
821 Test Method:
822 0. Make sure that voltha and external dhcp server are up and running on CORD-POD setup.
823 1. OLT and ONU is detected and validated.
824 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
825 3. Send dhcp request from two residential subscribers to external dhcp server.
826 4. Verify that subscribers had got ip from external dhcp server. successfully.
827 5. Start pinging continuously from one subscriber and repeat steps 3 and 4 for other subscriber.
828 6. Disable the olt device which is detected in voltha.
829 7. Verify that subscriber should not get ip from external dhcp server. and other subscriber ping to gateway should failed.
830 """
831
832 def test_two_subscriber_with_voltha_for_dhcpRelay_toggle_olt_detected_in_voltha(self):
833 """
834 Test Method:
835 0. Make sure that voltha and external dhcp server are up and running on CORD-POD setup.
836 1. OLT and ONU is detected and validated.
837 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
838 3. Send dhcp request from two residential subscribers to external dhcp server.
839 4. Verify that subscribers had got ip from external dhcp server. successfully.
840 5. Start pinging continuously from one subscriber and repeat steps 3 and 4 for other subscriber.
841 6. Disable the olt device which is detected in voltha.
842 7. Verify that subscriber should not get ip from external dhcp server. and other subscriber ping to gateway should failed.
843 8. Enable the olt device which is detected in voltha.
844 9. Verify that subscriber should get ip from external dhcp server. and other subscriber ping to gateway should not failed.
845 """
846
847 def test_two_subscriber_with_voltha_for_dhcpRelay_pause_olt_detected_in_voltha(self):
848 """
849 Test Method:
850 0. Make sure that voltha and external dhcp server are up and running on CORD-POD setup.
851 1. OLT and ONU is detected and validated.
852 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
853 3. Send dhcp request from two residential subscribers to external dhcp server.
854 4. Verify that subscribers had got ip from external dhcp server. successfully.
855 5. Start pinging continuously from one subscriber and repeat steps 3 and 4 for other subscriber.
856 6. Pause the olt device which is detected in voltha.
857 7. Verify that subscriber should not get ip from external dhcp server. and other subscriber ping to gateway should failed.
858 """
859