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