blob: 0d0ad1da9de3032e4f760cc75ffb89b0077f8716 [file] [log] [blame]
A R Karthick35495c32017-05-11 14:58:32 -07001import os
2import sys
3import unittest
A.R Karthick8a507cf2017-06-02 18:44:49 -07004import time
Thangavelu K S77c8c0c2017-06-07 18:04:21 +00005import json
6import requests
A R Karthick35495c32017-05-11 14:58:32 -07007from nose.tools import *
Thangavelu K S77c8c0c2017-06-07 18:04:21 +00008from nose.twistedtools import reactor, deferred
9from twisted.internet import defer
A R Karthick35495c32017-05-11 14:58:32 -070010from CordTestConfig import setup_module
11from CordTestUtils import log_test
12from VolthaCtrl import VolthaCtrl
Thangavelu K S77c8c0c2017-06-07 18:04:21 +000013from CordTestUtils import log_test, get_controller
14from portmaps import g_subscriber_port_map
15from OltConfig import *
16from EapTLS import TLSAuthTest
17from OnosCtrl import OnosCtrl
18from CordLogger import CordLogger
19from scapy.all import *
20from scapy_ssl_tls.ssl_tls import *
21from scapy_ssl_tls.ssl_tls_crypto import *
22from CordTestServer import cord_test_onos_restart, cord_test_shell, cord_test_radius_restart
A.R Karthickb9eab5a2017-06-07 16:03:51 -070023from CordContainer import Onos
A R Karthick35495c32017-05-11 14:58:32 -070024
25class voltha_exchange(unittest.TestCase):
26
27 OLT_TYPE = 'tibit_olt'
28 OLT_MAC = '00:0c:e2:31:12:00'
29 VOLTHA_HOST = 'localhost'
30 VOLTHA_REST_PORT = 8881
31 voltha = None
Thangavelu K S77c8c0c2017-06-07 18:04:21 +000032 apps = ('org.opencord.aaa', 'org.onosproject.dhcp')
33 olt_apps = () #'org.opencord.cordmcast')
34 vtn_app = 'org.opencord.vtn'
35 table_app = 'org.ciena.cordigmp'
Thangavelu K S77c8c0c2017-06-07 18:04:21 +000036 test_path = os.path.dirname(os.path.realpath(__file__))
37 table_app_file = os.path.join(test_path, '..', 'apps/ciena-cordigmp-multitable-2.0-SNAPSHOT.oar')
A.R Karthickb9eab5a2017-06-07 16:03:51 -070038 app_file = os.path.join(test_path, '..', 'apps/ciena-cordigmp-2.0-SNAPSHOT.oar')
Thangavelu K S77c8c0c2017-06-07 18:04:21 +000039 olt_app_file = os.path.join(test_path, '..', 'apps/olt-app-1.2-SNAPSHOT.oar')
A.R Karthick3493a572017-06-07 18:28:10 -070040 olt_app_name = 'org.onosproject.olt'
Thangavelu K S77c8c0c2017-06-07 18:04:21 +000041 #onos_config_path = os.path.join(test_path, '..', 'setup/onos-config')
42 olt_conf_file = os.getenv('OLT_CONFIG_FILE', os.path.join(test_path, '..', 'setup/olt_config.json'))
43 onos_restartable = bool(int(os.getenv('ONOS_RESTART', 0)))
44 VOLTHA_ENABLED = True
45 INTF_TX_DEFAULT = 'veth2'
46 INTF_RX_DEFAULT = 'veth0'
47 TESTCASE_TIMEOUT = 300
48 VOLTHA_CONFIG_FAKE = True
49 VOLTHA_UPLINK_VLAN_MAP = { 'of:0000000000000001' : '222' }
50 VOLTHA_ONU_UNI_PORT = 'veth0'
51
52 CLIENT_CERT = """-----BEGIN CERTIFICATE-----
53MIICuDCCAiGgAwIBAgIBAjANBgkqhkiG9w0BAQUFADCBizELMAkGA1UEBhMCVVMx
54CzAJBgNVBAgTAkNBMRIwEAYDVQQHEwlTb21ld2hlcmUxEzARBgNVBAoTCkNpZW5h
55IEluYy4xHjAcBgkqhkiG9w0BCQEWD2FkbWluQGNpZW5hLmNvbTEmMCQGA1UEAxMd
56RXhhbXBsZSBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwHhcNMTYwNjA2MjExMjI3WhcN
57MTcwNjAxMjExMjI3WjBnMQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExEzARBgNV
58BAoTCkNpZW5hIEluYy4xFzAVBgNVBAMUDnVzZXJAY2llbmEuY29tMR0wGwYJKoZI
59hvcNAQkBFg51c2VyQGNpZW5hLmNvbTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkC
60gYEAwvXiSzb9LZ6c7uNziUfKvoHO7wu/uiFC5YUpXbmVGuGZizbVrny0xnR85Dfe
61+9R4diansfDhIhzOUl1XjN3YDeSS9OeF5YWNNE8XDhlz2d3rVzaN6hIhdotBkUjg
62rUewjTg5OFR31QEyG3v8xR3CLgiE9xQELjZbSA07pD79zuUCAwEAAaNPME0wEwYD
63VR0lBAwwCgYIKwYBBQUHAwIwNgYDVR0fBC8wLTAroCmgJ4YlaHR0cDovL3d3dy5l
64eGFtcGxlLmNvbS9leGFtcGxlX2NhLmNybDANBgkqhkiG9w0BAQUFAAOBgQDAjkrY
656tDChmKbvr8w6Du/t8vHjTCoCIocHTN0qzWOeb1YsAGX89+TrWIuO1dFyYd+Z0KC
66PDKB5j/ygml9Na+AklSYAVJIjvlzXKZrOaPmhZqDufi+rXWti/utVqY4VMW2+HKC
67nXp37qWeuFLGyR1519Y1d6F/5XzqmvbwURuEug==
68-----END CERTIFICATE-----"""
69
70 CLIENT_CERT_INVALID = '''-----BEGIN CERTIFICATE-----
71MIIDvTCCAqWgAwIBAgIBAjANBgkqhkiG9w0BAQUFADCBizELMAkGA1UEBhMCVVMx
72CzAJBgNVBAgTAkNBMRIwEAYDVQQHEwlTb21ld2hlcmUxEzARBgNVBAoTCkNpZW5h
73IEluYy4xHjAcBgkqhkiG9w0BCQEWD2FkbWluQGNpZW5hLmNvbTEmMCQGA1UEAxMd
74RXhhbXBsZSBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwHhcNMTYwMzExMTg1MzM2WhcN
75MTcwMzA2MTg1MzM2WjBnMQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExEzARBgNV
76BAoTCkNpZW5hIEluYy4xFzAVBgNVBAMUDnVzZXJAY2llbmEuY29tMR0wGwYJKoZI
77hvcNAQkBFg51c2VyQGNpZW5hLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCC
78AQoCggEBAOxemcBsPn9tZsCa5o2JA6sQDC7A6JgCNXXl2VFzKLNNvB9PS6D7ZBsQ
795An0zEDMNzi51q7lnrYg1XyiE4S8FzMGAFr94RlGMQJUbRD9V/oqszMX4k++iAOK
80tIA1gr3x7Zi+0tkjVSVzXTmgNnhChAamdMsjYUG5+CY9WAicXyy+VEV3zTphZZDR
81OjcjEp4m/TSXVPYPgYDXI40YZKX5BdvqykWtT/tIgZb48RS1NPyN/XkCYzl3bv21
82qx7Mc0fcEbsJBIIRYTUkfxnsilcnmLxSYO+p+DZ9uBLBzcQt+4Rd5pLSfi21WM39
832Z2oOi3vs/OYAPAqgmi2JWOv3mePa/8CAwEAAaNPME0wEwYDVR0lBAwwCgYIKwYB
84BQUHAwIwNgYDVR0fBC8wLTAroCmgJ4YlaHR0cDovL3d3dy5leGFtcGxlLmNvbS9l
85eGFtcGxlX2NhLmNybDANBgkqhkiG9w0BAQUFAAOCAQEALBzMPDTIB6sLyPl0T6JV
86MjOkyldAVhXWiQsTjaGQGJUUe1cmUJyZbUZEc13MygXMPOM4x7z6VpXGuq1c/Vxn
87VzQ2fNnbJcIAHi/7G8W5/SQfPesIVDsHTEc4ZspPi5jlS/MVX3HOC+BDbOjdbwqP
88RX0JEr+uOyhjO+lRxG8ilMRACoBUbw1eDuVDoEBgErSUC44pq5ioDw2xelc+Y6hQ
89dmtYwfY0DbvwxHtA495frLyPcastDiT/zre7NL51MyUDPjjYjghNQEwvu66IKbQ3
90T1tJBrgI7/WI+dqhKBFolKGKTDWIHsZXQvZ1snGu/FRYzg1l+R/jT8cRB9BDwhUt
91yg==
92-----END CERTIFICATE-----'''
A R Karthick35495c32017-05-11 14:58:32 -070093
A.R Karthick3493a572017-06-07 18:28:10 -070094 @classmethod
95 def update_apps_version(cls):
96 version = Onos.getVersion()
97 major = int(version.split('.')[0])
98 minor = int(version.split('.')[1])
99 cordigmp_app_version = '2.0-SNAPSHOT'
100 olt_app_version = '1.2-SNAPSHOT'
101 if major > 1:
102 cordigmp_app_version = '3.0-SNAPSHOT'
103 olt_app_version = '2.0-SNAPSHOT'
104 elif major == 1:
105 if minor > 10:
106 cordigmp_app_version = '3.0-SNAPSHOT'
107 olt_app_version = '2.0-SNAPSHOT'
108 elif minor <= 8:
109 olt_app_version = '1.1-SNAPSHOT'
A.R Karthickb9eab5a2017-06-07 16:03:51 -0700110 cls.app_file = os.path.join(cls.test_path, '..', 'apps/ciena-cordigmp-{}.oar'.format(cordigmp_app_version))
111 cls.table_app_file = os.path.join(cls.test_path, '..', 'apps/ciena-cordigmp-multitable-{}.oar'.format(cordigmp_app_version))
112 cls.olt_app_file = os.path.join(cls.test_path, '..', 'apps/olt-app-{}.oar'.format(olt_app_version))
113
A R Karthick35495c32017-05-11 14:58:32 -0700114 @classmethod
A.R Karthickf874d032017-06-07 18:47:51 -0700115 def onos_load_config(cls, app, config):
116 status, code = OnosCtrl.config(config)
117 if status is False:
118 log_test.info('JSON config request for app %s returned status %d' %(app, code))
119 assert_equal(status, True)
120 time.sleep(2)
121
122 @classmethod
123 def onos_aaa_load(cls):
124 aaa_dict = {'apps' : { 'org.opencord.aaa' : { 'AAA' : { 'radiusSecret': 'radius_password',
125 'radiusIp': '172.17.0.2' } } } }
126 radius_ip = os.getenv('ONOS_AAA_IP') or '172.17.0.2'
127 aaa_dict['apps']['org.opencord.aaa']['AAA']['radiusIp'] = radius_ip
128 cls.onos_load_config('org.opencord.aaa', aaa_dict)
129
130 @classmethod
A R Karthick35495c32017-05-11 14:58:32 -0700131 def setUpClass(cls):
A.R Karthickb9eab5a2017-06-07 16:03:51 -0700132 cls.update_apps_version()
A R Karthick35495c32017-05-11 14:58:32 -0700133 cls.voltha = VolthaCtrl(cls.VOLTHA_HOST, rest_port = cls.VOLTHA_REST_PORT)
Thangavelu K S77c8c0c2017-06-07 18:04:21 +0000134 cls.install_app_table()
135 cls.olt = OltConfig(olt_conf_file = cls.olt_conf_file)
136 cls.port_map, cls.port_list = cls.olt.olt_port_map()
137 cls.switches = cls.port_map['switches']
138 cls.num_ports = cls.port_map['num_ports']
139 if cls.num_ports > 1:
140 cls.num_ports -= 1 ##account for the tx port
141 cls.activate_apps(cls.apps + cls.olt_apps)
A.R Karthickf874d032017-06-07 18:47:51 -0700142 cls.onos_aaa_load()
Thangavelu K S77c8c0c2017-06-07 18:04:21 +0000143
A.R Karthick3493a572017-06-07 18:28:10 -0700144 @classmethod
145 def tearDownClass(cls):
146 '''Deactivate the olt apps and restart OVS back'''
147 apps = cls.olt_apps + ( cls.table_app,)
148 for app in apps:
149 onos_ctrl = OnosCtrl(app)
150 onos_ctrl.deactivate()
151 cls.install_app_igmp()
A.R Karthickb9eab5a2017-06-07 16:03:51 -0700152
A.R Karthick3493a572017-06-07 18:28:10 -0700153 @classmethod
154 def install_app_igmp(cls):
155 ##Uninstall the table app on class exit
156 OnosCtrl.uninstall_app(cls.table_app)
157 time.sleep(2)
158 log_test.info('Installing back the cord igmp app %s for subscriber test on exit' %(cls.app_file))
159 OnosCtrl.install_app(cls.app_file)
A.R Karthickb9eab5a2017-06-07 16:03:51 -0700160
Thangavelu K S77c8c0c2017-06-07 18:04:21 +0000161 def remove_olt(self, switch_map):
162 controller = get_controller()
163 auth = ('karaf', 'karaf')
164 #remove subscriber for every port on all the voltha devices
165 for device, device_map in switch_map.iteritems():
166 uni_ports = device_map['ports']
167 uplink_vlan = device_map['uplink_vlan']
168 for port in uni_ports:
169 rest_url = 'http://{}:8181/onos/olt/oltapp/{}/{}'.format(controller,
170 device,
171 port)
172 resp = requests.delete(rest_url, auth = auth)
173 if resp.status_code not in [204, 202, 200]:
174 log_test.error('Error deleting subscriber for device %s on port %s' %(device, port))
175 else:
176 log_test.info('Deleted subscriber for device %s on port %s' %(device, port))
177 OnosCtrl.uninstall_app(self.olt_app_file)
178
179 def config_olt(self, switch_map):
180 controller = get_controller()
Thangavelu K S77c8c0c2017-06-07 18:04:21 +0000181 auth = ('karaf', 'karaf')
182 #configure subscriber for every port on all the voltha devices
183 for device, device_map in switch_map.iteritems():
184 uni_ports = device_map['ports']
185 uplink_vlan = device_map['uplink_vlan']
186 for port in uni_ports:
187 vlan = port
188 rest_url = 'http://{}:8181/onos/olt/oltapp/{}/{}/{}'.format(controller,
189 device,
190 port,
191 vlan)
192 resp = requests.post(rest_url, auth = auth)
193 #assert_equal(resp.ok, True)
194
195 @classmethod
Thangavelu K S77c8c0c2017-06-07 18:04:21 +0000196 def install_app_table(cls):
197 ##Uninstall the existing app if any
198 OnosCtrl.uninstall_app(cls.table_app)
199 time.sleep(2)
200 log_test.info('Installing the multi table app %s for subscriber test' %(cls.table_app_file))
201 OnosCtrl.install_app(cls.table_app_file)
202 time.sleep(3)
Thangavelu K S77c8c0c2017-06-07 18:04:21 +0000203
204 @classmethod
205 def activate_apps(cls, apps):
206 for app in apps:
207 onos_ctrl = OnosCtrl(app)
208 status, _ = onos_ctrl.activate()
209 assert_equal(status, True)
210 time.sleep(2)
211
212 def tls_flow_check(self, olt_uni_port, cert_info = None):
213 def tls_fail_cb():
214 log_test.info('TLS verification failed')
215 if cert_info is None:
A.R Karthickb9eab5a2017-06-07 16:03:51 -0700216 tls = TLSAuthTest(fail_cb = tls_fail_cb, intf = olt_uni_port)
Thangavelu K S77c8c0c2017-06-07 18:04:21 +0000217 log_test.info('Running subscriber %s tls auth test with valid TLS certificate' %olt_uni_port)
218 tls.runTest()
219 assert_equal(tls.failTest, False)
220 if cert_info == "no_cert":
221 tls = TLSAuthTest(fail_cb = tls_fail_cb, intf = olt_uni_port, client_cert = '')
222 log_test.info('Running subscriber %s tls auth test with no TLS certificate' %olt_uni_port)
223 tls.runTest()
224 assert_equal(tls.failTest, True)
225 if cert_info == "invalid_cert":
226 tls = TLSAuthTest(fail_cb = tls_fail_cb, intf = olt_uni_port, client_cert = self.CLIENT_CERT_INVALID)
227 log_test.info('Running subscriber %s tls auth test with invalid TLS certificate' %olt_uni_port)
228 tls.runTest()
229 assert_equal(tls.failTest, True)
230 self.test_status = True
231 return self.test_status
A R Karthick35495c32017-05-11 14:58:32 -0700232
A.R Karthick8a507cf2017-06-02 18:44:49 -0700233 def test_olt_enable_disable(self):
A R Karthick35495c32017-05-11 14:58:32 -0700234 log_test.info('Enabling OLT type %s, MAC %s' %(self.OLT_TYPE, self.OLT_MAC))
A.R Karthick8a507cf2017-06-02 18:44:49 -0700235 device_id, status = self.voltha.enable_device(self.OLT_TYPE, self.OLT_MAC)
236 assert_not_equal(device_id, None)
237 try:
238 assert_equal(status, True)
239 time.sleep(10)
240 finally:
241 self.voltha.disable_device(device_id, delete = True)
Thangavelu K S008f38e2017-05-15 19:36:55 +0000242
A.R Karthick8a507cf2017-06-02 18:44:49 -0700243 def test_ponsim_enable_disable(self):
A.R Karthick8b9c5f12017-05-30 17:47:08 -0700244 log_test.info('Enabling ponsim_olt')
245 ponsim_address = '{}:50060'.format(self.VOLTHA_HOST)
A.R Karthick8a507cf2017-06-02 18:44:49 -0700246 device_id, status = self.voltha.enable_device('ponsim_olt', address = ponsim_address)
247 assert_not_equal(device_id, None)
248 try:
249 assert_equal(status, True)
250 time.sleep(10)
251 finally:
252 self.voltha.disable_device(device_id, delete = True)
A.R Karthick8b9c5f12017-05-30 17:47:08 -0700253
Thangavelu K S008f38e2017-05-15 19:36:55 +0000254 def test_subscriber_with_voltha_for_eap_tls_authentication(self):
255 """
256 Test Method:
257 0. Make sure that voltha is up and running on CORD-POD setup.
258 1. OLT and ONU is detected and validated.
259 2. Bring up freeradius server container using CORD TESTER and make sure that ONOS have connectivity to freeradius server.
260 3. Issue auth request packets from CORD TESTER voltha test module acting as a subscriber..
261 4. Validate that eap tls valid auth packets are being exchanged between subscriber, onos and freeradius.
262 5. Verify that subscriber is authenticated successfully.
263 """
Thangavelu K S77c8c0c2017-06-07 18:04:21 +0000264 log_test.info('Enabling ponsim_olt')
265 ponsim_address = '{}:50060'.format(self.VOLTHA_HOST)
266 device_id, status = self.voltha.enable_device('ponsim_olt', address = ponsim_address)
267 assert_not_equal(device_id, None)
A.R Karthickb9eab5a2017-06-07 16:03:51 -0700268 if status == False:
269 self.voltha.disable_device(device_id, delete = True)
270 assert_equal(status, True)
Thangavelu K S77c8c0c2017-06-07 18:04:21 +0000271 time.sleep(10)
272 switch_map = None
273 olt_configured = False
A.R Karthickb9eab5a2017-06-07 16:03:51 -0700274 voltha = VolthaCtrl(self.VOLTHA_HOST,
275 rest_port = self.VOLTHA_REST_PORT,
276 uplink_vlan_map = self.VOLTHA_UPLINK_VLAN_MAP)
Thangavelu K S77c8c0c2017-06-07 18:04:21 +0000277 try:
A.R Karthickb9eab5a2017-06-07 16:03:51 -0700278 switch_map = voltha.config(fake = self.VOLTHA_CONFIG_FAKE)
279 if not switch_map:
280 log_test.info('No voltha devices found')
281 return
282 log_test.info('Installing OLT app')
283 OnosCtrl.install_app(self.olt_app_file)
284 time.sleep(5)
285 log_test.info('Adding subscribers through OLT app')
286 self.config_olt(switch_map)
287 olt_configured = True
288 time.sleep(5)
289 auth_status = self.tls_flow_check(self.INTF_RX_DEFAULT)
Thangavelu K S77c8c0c2017-06-07 18:04:21 +0000290 assert_equal(auth_status, True)
Thangavelu K S77c8c0c2017-06-07 18:04:21 +0000291 finally:
A.R Karthickb9eab5a2017-06-07 16:03:51 -0700292 if switch_map is not None:
293 if olt_configured is True:
294 self.remove_olt(switch_map)
295 self.voltha.disable_device(device_id, delete = True)
296 time.sleep(10)
297 OnosCtrl.uninstall_app(self.olt_app_name)
Thangavelu K S008f38e2017-05-15 19:36:55 +0000298
Thangavelu K S77c8c0c2017-06-07 18:04:21 +0000299 @deferred(TESTCASE_TIMEOUT)
Thangavelu K S008f38e2017-05-15 19:36:55 +0000300 def test_subscriber_with_voltha_for_eap_tls_authentication_failure(self):
301 """
302 Test Method:
303 0. Make sure that voltha is up and running on CORD-POD setup.
304 1. OLT and ONU is detected and validated.
305 2. Bring up freeradius server container using CORD TESTER and make sure that ONOS have connectivity to freeradius server.
306 3. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
307 4. Validate that eap tls without cert auth packet is being exchanged between subscriber, onos and freeradius.
308 5. Verify that subscriber authentication is unsuccessful..
309 """
Thangavelu K S77c8c0c2017-06-07 18:04:21 +0000310 df = defer.Deferred()
311 def tls_flow_check_with_no_cert_scenario(df):
312 log_test.info('Enabling ponsim_olt')
313 ponsim_address = '{}:50060'.format(self.VOLTHA_HOST)
314 device_id, status = self.voltha.enable_device('ponsim_olt', address = ponsim_address)
315 assert_not_equal(device_id, None)
316 voltha = VolthaCtrl(self.VOLTHA_HOST,
A.R Karthickb9eab5a2017-06-07 16:03:51 -0700317 rest_port = self.VOLTHA_REST_PORT,
318 uplink_vlan_map = self.VOLTHA_UPLINK_VLAN_MAP)
Thangavelu K S77c8c0c2017-06-07 18:04:21 +0000319 time.sleep(10)
320 switch_map = None
321 olt_configured = False
322 switch_map = voltha.config(fake = self.VOLTHA_CONFIG_FAKE)
323 log_test.info('Installing OLT app')
324 OnosCtrl.install_app(self.olt_app_file)
325 time.sleep(5)
326 log_test.info('Adding subscribers through OLT app')
327 self.config_olt(switch_map)
328 olt_configured = True
329 time.sleep(5)
330 auth_status = self.tls_flow_check(self.INTF_RX_DEFAULT, cert_info = "no_cert")
331 try:
332 assert_equal(auth_status, True)
333 assert_equal(status, True)
334 time.sleep(10)
335 finally:
A.R Karthickb9eab5a2017-06-07 16:03:51 -0700336 self.remove_olt(switch_map)
Thangavelu K S77c8c0c2017-06-07 18:04:21 +0000337 self.voltha.disable_device(device_id, delete = True)
338 df.callback(0)
A.R Karthickb9eab5a2017-06-07 16:03:51 -0700339
Thangavelu K S77c8c0c2017-06-07 18:04:21 +0000340 reactor.callLater(0, tls_flow_check_with_no_cert_scenario, df)
341 return df
Thangavelu K S008f38e2017-05-15 19:36:55 +0000342
Thangavelu K S77c8c0c2017-06-07 18:04:21 +0000343 @deferred(TESTCASE_TIMEOUT)
Thangavelu K S008f38e2017-05-15 19:36:55 +0000344 def test_subscriber_with_voltha_for_eap_tls_authentication_using_invalid_cert(self):
345 """
346 Test Method:
347 0. Make sure that voltha is up and running on CORD-POD setup.
348 1. OLT and ONU is detected and validated.
349 2. Bring up freeradius server container using CORD TESTER and make sure that ONOS have connectivity to freeradius server.
350 3. Issue tls auth packets and exchange invalid cert from CORD TESTER voltha test module acting as a subscriber..
351 4. Validate that eap tls with invalid cert auth packet is being exchanged between subscriber, onos and freeradius.
352 5. Verify that subscriber authentication is unsuccessful..
353 """
Thangavelu K S77c8c0c2017-06-07 18:04:21 +0000354 df = defer.Deferred()
355 def tls_flow_check_with_invalid_cert_scenario(df):
356 log_test.info('Enabling ponsim_olt')
357 ponsim_address = '{}:50060'.format(self.VOLTHA_HOST)
358 device_id, status = self.voltha.enable_device('ponsim_olt', address = ponsim_address)
359 assert_not_equal(device_id, None)
360 voltha = VolthaCtrl(self.VOLTHA_HOST,
361 rest_port = self.VOLTHA_REST_PORT,
362 uplink_vlan_map = self.VOLTHA_UPLINK_VLAN_MAP)
363 time.sleep(10)
364 switch_map = None
365 olt_configured = False
366 switch_map = voltha.config(fake = self.VOLTHA_CONFIG_FAKE)
367 log_test.info('Installing OLT app')
368 OnosCtrl.install_app(self.olt_app_file)
369 time.sleep(5)
370 log_test.info('Adding subscribers through OLT app')
371 self.config_olt(switch_map)
372 olt_configured = True
373 time.sleep(5)
374 auth_status = self.tls_flow_check(self.INTF_RX_DEFAULT, cert_info = "invalid_cert")
375 try:
376 assert_equal(auth_status, True)
377 assert_equal(status, True)
378 time.sleep(10)
379 finally:
A.R Karthickb9eab5a2017-06-07 16:03:51 -0700380 self.remove_olt(switch_map)
Thangavelu K S77c8c0c2017-06-07 18:04:21 +0000381 self.voltha.disable_device(device_id, delete = True)
382 df.callback(0)
383 reactor.callLater(0, tls_flow_check_with_invalid_cert_scenario, df)
384 return df
Thangavelu K S008f38e2017-05-15 19:36:55 +0000385
Thangavelu K S0d745c82017-06-09 21:56:08 +0000386 @deferred(TESTCASE_TIMEOUT)
387 def test_subscriber_with_voltha_for_multiple_invalid_authentication_attempts(self):
388 """
389 Test Method:
390 0. Make sure that voltha is up and running on CORD-POD setup.
391 1. OLT and ONU is detected and validated.
392 2. Bring up freeradius server container using CORD TESTER and make sure that ONOS have connectivity to freeradius server.
393 3. Issue tls auth packets and exchange invalid cert from CORD TESTER voltha test module acting as a subscriber for multiple times.
394 4. Validate that eap tls with invalid cert auth packet is being exchanged between subscriber, onos and freeradius.
395 5. Verify that subscriber authentication is unsuccessful..
396 """
397 df = defer.Deferred()
398 def tls_flow_check_with_no_cert_scenario(df):
399 log_test.info('Enabling ponsim_olt')
400 ponsim_address = '{}:50060'.format(self.VOLTHA_HOST)
401 device_id, status = self.voltha.enable_device('ponsim_olt', address = ponsim_address)
402 assert_not_equal(device_id, None)
403 voltha = VolthaCtrl(self.VOLTHA_HOST,
404 rest_port = self.VOLTHA_REST_PORT,
405 uplink_vlan_map = self.VOLTHA_UPLINK_VLAN_MAP)
406 time.sleep(10)
407 switch_map = None
408 olt_configured = False
409 switch_map = voltha.config(fake = self.VOLTHA_CONFIG_FAKE)
410 log_test.info('Installing OLT app')
411 OnosCtrl.install_app(self.olt_app_file)
412 time.sleep(5)
413 log_test.info('Adding subscribers through OLT app')
414 self.config_olt(switch_map)
415 olt_configured = True
416 time.sleep(5)
417 auth_status = self.tls_flow_check(self.INTF_RX_DEFAULT, cert_info = "invalid_cert")
418 auth_status = self.tls_flow_check(self.INTF_RX_DEFAULT, cert_info = "invalid_cert")
419 auth_status = self.tls_flow_check(self.INTF_RX_DEFAULT, cert_info = "no_cert")
420 auth_status = self.tls_flow_check(self.INTF_RX_DEFAULT, cert_info = "invalid_cert")
421 try:
422 assert_equal(auth_status, True)
423 assert_equal(status, True)
424 time.sleep(10)
425 finally:
426 self.voltha.disable_device(device_id, delete = True)
427 df.callback(0)
428 reactor.callLater(0, tls_flow_check_with_no_cert_scenario, df)
429 return df
430
431 @deferred(TESTCASE_TIMEOUT)
Thangavelu K S008f38e2017-05-15 19:36:55 +0000432 def test_subscriber_with_voltha_for_eap_tls_authentication_with_aaa_app_deactivation(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. Bring up freeradius server container using CORD TESTER and make sure that ONOS have connectivity to freeradius server.
438 3. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
439 4. Validate that eap tls without sending client hello, it's not being exchanged between client, onos and freeradius.
440 5. Verify that subscriber authentication is unsuccessful..
441 """
Thangavelu K S0d745c82017-06-09 21:56:08 +0000442 df = defer.Deferred()
443 def tls_flow_check_with_deactivate_app_scenario(df):
444 aaa_app = ["org.opencord.aaa"]
445 log_test.info('Enabling ponsim_olt')
446 ponsim_address = '{}:50060'.format(self.VOLTHA_HOST)
447 device_id, status = self.voltha.enable_device('ponsim_olt', address = ponsim_address)
448 assert_not_equal(device_id, None)
449 voltha = VolthaCtrl(self.VOLTHA_HOST,
450 rest_port = self.VOLTHA_REST_PORT,
451 uplink_vlan_map = self.VOLTHA_UPLINK_VLAN_MAP)
452 time.sleep(10)
453 switch_map = None
454 olt_configured = False
455 switch_map = voltha.config(fake = self.VOLTHA_CONFIG_FAKE)
456 log_test.info('Installing OLT app')
457 OnosCtrl.install_app(self.olt_app_file)
458 time.sleep(5)
459 log_test.info('Adding subscribers through OLT app')
460 self.config_olt(switch_map)
461 olt_configured = True
462 time.sleep(5)
Thangavelu K S008f38e2017-05-15 19:36:55 +0000463
Thangavelu K S0d745c82017-06-09 21:56:08 +0000464 thread1 = threading.Thread(target = self.tls_flow_check, args = (self.INTF_RX_DEFAULT,"app_deactivate",))
465 thread2 = threading.Thread(target = self.deactivate_apps, args = (aaa_app,))
466 thread1.start()
467 time.sleep(randint(1,2))
468 thread2.start()
469 time.sleep(10)
470 thread1.join()
471 thread2.join()
472 try:
473 # assert_equal(status, True)
474 time.sleep(10)
475 finally:
476 self.voltha.disable_device(device_id, delete = True)
477 df.callback(0)
478 reactor.callLater(0, tls_flow_check_with_deactivate_app_scenario, df)
479 return df
480
481 @deferred(TESTCASE_TIMEOUT)
Thangavelu K S008f38e2017-05-15 19:36:55 +0000482 def test_subscriber_with_voltha_for_eap_tls_authentication_restarting_radius_server(self):
483 """
484 Test Method:
485 0. Make sure that voltha is up and running on CORD-POD setup.
486 1. OLT and ONU is detected and validated.
487 2. Bring up freeradius server container using CORD TESTER and make sure that ONOS have connectivity to freeradius server.
488 3. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
489 4. Validate that eap tls with restart of radius server and packets are being exchanged between subscriber, onos and freeradius.
490 5. Verify that subscriber authentication is unsuccessful..
491 """
Thangavelu K S0d745c82017-06-09 21:56:08 +0000492 df = defer.Deferred()
493 def tls_flow_check_with_restart_radius_scenario(df):
494 aaa_app = ["org.opencord.aaa"]
495 log_test.info('Enabling ponsim_olt')
496 ponsim_address = '{}:50060'.format(self.VOLTHA_HOST)
497 device_id, status = self.voltha.enable_device('ponsim_olt', address = ponsim_address)
498 assert_not_equal(device_id, None)
499 voltha = VolthaCtrl(self.VOLTHA_HOST,
500 rest_port = self.VOLTHA_REST_PORT,
501 uplink_vlan_map = self.VOLTHA_UPLINK_VLAN_MAP)
502 time.sleep(10)
503 switch_map = None
504 olt_configured = False
505 switch_map = voltha.config(fake = self.VOLTHA_CONFIG_FAKE)
506 log_test.info('Installing OLT app')
507 OnosCtrl.install_app(self.olt_app_file)
508 time.sleep(5)
509 log_test.info('Adding subscribers through OLT app')
510 self.config_olt(switch_map)
511 olt_configured = True
512 time.sleep(5)
513
514 thread1 = threading.Thread(target = self.tls_flow_check, args = (self.INTF_RX_DEFAULT,"restart_radius"))
515 thread2 = threading.Thread(target = cord_test_radius_restart)
516 thread1.start()
517 time.sleep(randint(3,4))
518 thread2.start()
519 time.sleep(10)
520 thread1.join()
521 thread2.join()
522 try:
523 # assert_equal(status, True)
524 time.sleep(10)
525 finally:
526 self.voltha.disable_device(device_id, delete = True)
527 df.callback(0)
528 reactor.callLater(0, tls_flow_check_with_restart_radius_scenario, df)
529 return df
Thangavelu K S008f38e2017-05-15 19:36:55 +0000530
531 def test_subscriber_with_voltha_for_eap_tls_authentication_with_disabled_olt(self):
532 """
533 Test Method:
534 0. Make sure that voltha is up and running on CORD-POD setup.
535 1. OLT and ONU is detected and validated.
536 2. Bring up freeradius server container using CORD TESTER and make sure that ONOS have connectivity to freeradius server.
537 3. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
538 5. Validate that eap tls packets are being exchanged between subscriber, onos and freeradius.
539 6. Verify that subscriber authenticated successfully.
540 7. Disable olt which is seen in voltha and issue tls auth packets from subscriber.
541 8. Validate that eap tls packets are not being exchanged between subscriber, onos and freeradius.
542 9. Verify that subscriber authentication is unsuccessful..
543 """
Thangavelu K S0d745c82017-06-09 21:56:08 +0000544 df = defer.Deferred()
545 def tls_flow_check_with_disable_olt_device_scenario(df):
546 aaa_app = ["org.opencord.aaa"]
547 log_test.info('Enabling ponsim_olt')
548 ponsim_address = '{}:50060'.format(self.VOLTHA_HOST)
549 device_id, status = self.voltha.enable_device('ponsim_olt', address = ponsim_address)
550 assert_not_equal(device_id, None)
551 voltha = VolthaCtrl(self.VOLTHA_HOST,
552 rest_port = self.VOLTHA_REST_PORT,
553 uplink_vlan_map = self.VOLTHA_UPLINK_VLAN_MAP)
554 time.sleep(10)
555 switch_map = None
556 olt_configured = False
557 switch_map = voltha.config(fake = self.VOLTHA_CONFIG_FAKE)
558 log_test.info('Installing OLT app')
559 OnosCtrl.install_app(self.olt_app_file)
560 time.sleep(5)
561 log_test.info('Adding subscribers through OLT app')
562 self.config_olt(switch_map)
563 olt_configured = True
564 time.sleep(5)
Thangavelu K S008f38e2017-05-15 19:36:55 +0000565
Thangavelu K S0d745c82017-06-09 21:56:08 +0000566 thread1 = threading.Thread(target = self.tls_flow_check, args = (self.INTF_RX_DEFAULT, "disable_olt_device",))
567 thread2 = threading.Thread(target = self.voltha.disable_device, args = (device_id,))
568 thread1.start()
569 time.sleep(randint(3,4))
570 thread2.start()
571 time.sleep(10)
572 thread1.join()
573 thread2.join()
574 try:
575 # assert_equal(status, True)
576 time.sleep(10)
577 finally:
578 self.voltha.disable_device(device_id, delete = True)
579 df.callback(0)
580 reactor.callLater(0, tls_flow_check_with_disable_olt_device_scenario, df)
581 return df
582
583 def test_subscriber_with_voltha_for_eap_tls_authentication_disabling_uni_port_in_voltha(self):
Thangavelu K S008f38e2017-05-15 19:36:55 +0000584 """
585 Test Method:
586 0. Make sure that voltha is up and running on CORD-POD setup.
587 1. OLT and ONU is detected and validated.
588 2. Bring up freeradius server container using CORD TESTER and make sure that ONOS have connectivity to freeradius server.
589 3. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
590 5. Validate that eap tls packets are being exchanged between subscriber, onos and freeradius.
591 6. Verify that subscriber authenticated successfully.
592 7. Disable uni port which is seen in voltha and issue tls auth packets from subscriber.
593 8. Validate that eap tls packets are not being exchanged between subscriber, onos and freeradius.
594 9. Verify that subscriber authentication is unsuccessful..
595 """
596
597 def test_subscriber_with_voltha_for_eap_tls_authentication_restarting_olt(self):
598 """
599 Test Method:
600 0. Make sure that voltha is up and running on CORD-POD setup.
601 1. OLT and ONU is detected and validated.
602 2. Bring up freeradius server container using CORD TESTER and make sure that ONOS have connectivity to freeradius server.
603 3. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
604 5. Validate that eap tls packets are being exchanged between subscriber, onos and freeradius.
605 6. Verify that subscriber authenticated successfully.
606 7. Restart olt which is seen in voltha and issue tls auth packets from subscriber.
607 8. Validate that eap tls packets are not being exchanged between subscriber, onos and freeradius.
608 9. Verify that subscriber authentication is unsuccessful..
609 """
610
611 def test_subscriber_with_voltha_for_eap_tls_authentication_restarting_onu(self):
612 """
613 Test Method:
614 0. Make sure that voltha is up and running on CORD-POD setup.
615 1. OLT and ONU is detected and validated.
616 2. Bring up freeradius server container using CORD TESTER and make sure that ONOS have connectivity to freeradius server.
617 3. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
618 5. Validate that eap tls packets are being exchanged between subscriber, onos and freeradius.
619 6. Verify that subscriber authenticated successfully.
620 7. Restart onu which is seen in voltha and issue tls auth packets from subscriber.
621 8. Validate that eap tls packets are not being exchanged between subscriber, onos and freeradius.
622 9. Verify that subscriber authentication is unsuccessful..
623 """
624
625 def test_two_subscribers_with_voltha_for_eap_tls_authentication(self):
626 """
627 Test Method:
628 0. Make sure that voltha is up and running on CORD-POD setup.
629 1. OLT is detected and ONU ports(nni and 2 uni's) are being seen.
630 2. Bring up freeradius server container using CORD TESTER and make sure that ONOS have connectivity to freeradius server.
631 3. Bring up two Residential subscribers from cord-tester and issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
632 4. Validate that eap tls valid auth packets are being exchanged between two subscriber, onos and freeradius.
633 5. Verify that two subscribers are authenticated successfully.
634 """
635
636 def test_two_subscribers_with_voltha_for_eap_tls_authentication_using_same_certificates(self):
637 """
638 Test Method:
639 0. Make sure that voltha is up and running on CORD-POD setup.
640 1. OLT is detected and ONU ports(nni and 2 uni's) are being seen.
641 2. Bring up freeradius server container using CORD TESTER and make sure that ONOS have connectivity to freeradius server.
642 3. Bring up two Residential subscribers from cord-tester and issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
643 4. Validate that two valid certificates are being exchanged between two subscriber, onos and freeradius.
644 5. Verify that two subscribers are not authenticated.
645 """
646
647 def test_two_subscribers_with_voltha_for_eap_tls_authentication_initiating_invalid_tls_packets_for_one_subscriber(self):
648 """
649 Test Method:
650 0. Make sure that voltha is up and running on CORD-POD setup.
651 1. OLT is detected and ONU ports(nni and 2 uni's) are being seen.
652 2. Bring up freeradius server container using CORD TESTER and make sure that ONOS have connectivity to freeradius server.
653 3. Bring up two Residential subscribers from cord-tester and issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
654 4. Validate that eap tls valid auth packets are being exchanged between valid subscriber, onos and freeradius.
655 5. Validate that eap tls valid auth packets are being exchanged between invalid client, onos and freeradius.
656 6. Verify that valid subscriber authenticated successfully.
657 7. Verify that invalid subscriber are not authenticated successfully.
658 """
659
660 def test_two_subscribers_with_voltha_for_eap_tls_authentication_initiating_invalid_cert_for_one_subscriber(self):
661 """
662 Test Method:
663 0. Make sure that voltha is up and running on CORD-POD setup.
664 1. OLT is detected and ONU ports(nni and 2 uni's) are being seen.
665 2. Bring up freeradius server container using CORD TESTER and make sure that ONOS have connectivity to freeradius server.
666 3. Bring up two Residential subscribers from cord-tester and issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
667 4. Validate that eap tls valid auth packets are being exchanged between valid subscriber, onos and freeradius.
668 5. Validate that eap tls invalid cert auth packets are being exchanged between invalid subscriber, onos and freeradius.
669 6. Verify that valid subscriber authenticated successfully.
670 7. Verify that invalid subscriber are not authenticated successfully.
671 """
672
673 def test_two_subscribers_with_voltha_for_eap_tls_authentication_with_one_uni_port_disabled(self):
674 """
675 Test Method:
676 0. Make sure that voltha is up and running on CORD-POD setup.
677 1. OLT and ONU is detected and validated.
678 2. Bring up freeradius server container using CORD TESTER and make sure that ONOS have connectivity to freeradius server.
679 3. Bring up two Residential subscribers from cord-tester and issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
680 5. Validate that eap tls packets are being exchanged between two subscriber, onos and freeradius.
681 6. Verify that subscriber authenticated successfully.
682 7. Disable one of the uni port which is seen in voltha and issue tls auth packets from subscriber.
683 8. Validate that eap tls packets are not being exchanged between one subscriber, onos and freeradius.
684 9. Verify that subscriber authentication is unsuccessful..
685 10. Verify that other subscriber authenticated successfully.
686 """
687
688 def test_subscriber_with_voltha_for_dhcp_request(self):
689 """
690 Test Method:
691 0. Make sure that voltha is up and running on CORD-POD setup.
692 1. OLT and ONU is detected and validated.
693 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
694 3. Send dhcp request from residential subscrber to dhcp server which is running as onos app.
695 4. Verify that subscriber get ip from dhcp server successfully.
696 """
697
698 def test_subscriber_with_voltha_for_dhcp_request_with_invalid_broadcast_source_mac(self):
699 """
700 Test Method:
701 0. Make sure that voltha is up and running on CORD-POD setup.
702 1. OLT and ONU is detected and validated.
703 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
704 3. Send dhcp request with invalid source mac broadcast from residential subscrber to dhcp server which is running as onos app.
705 4. Verify that subscriber should not get ip from dhcp server.
706 """
707
708 def test_subscriber_with_voltha_for_dhcp_request_with_invalid_multicast_source_mac(self):
709 """
710 Test Method:
711 0. Make sure that voltha is up and running on CORD-POD setup.
712 1. OLT and ONU is detected and validated.
713 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
714 3. Send dhcp request with invalid source mac multicast from residential subscrber to dhcp server which is running as onos app.
715 4. Verify that subscriber should not get ip from dhcp server.
716 """
717
718 def test_subscriber_with_voltha_for_dhcp_request_with_invalid_source_mac(self):
719 """
720 Test Method:
721 0. Make sure that voltha is up and running on CORD-POD setup.
722 1. OLT and ONU is detected and validated.
723 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
724 3. Send dhcp request with invalid source mac zero from residential subscrber to dhcp server which is running as onos app.
725 4. Verify that subscriber should not get ip from dhcp server.
726 """
727
728 def test_subscriber_with_voltha_for_dhcp_request_and_release(self):
729 """
730 Test Method:
731 0. Make sure that voltha is up and running on CORD-POD setup.
732 1. OLT and ONU is detected and validated.
733 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
734 3. Send dhcp request from residential subscrber to dhcp server which is running as onos app.
735 4. Verify that subscriber get ip from dhcp server successfully.
736 5. Send dhcp release from residential subscrber to dhcp server which is running as onos app.
737 6 Verify that subscriber should not get ip from dhcp server, ping to gateway.
738 """
739
A.R Karthick57fa9372017-05-24 12:47:03 -0700740 def test_subscriber_with_voltha_for_dhcp_starvation_positive_scenario(self):
Thangavelu K S057b7d22017-05-16 22:03:22 +0000741 """
742 Test Method:
743 0. Make sure that voltha is 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 residential subscriber to dhcp server which is running as onos app.
747 4. Verify that subscriber get ip from dhcp server successfully.
748 5. Repeat step 3 and 4 for 10 times.
749 6 Verify that subscriber should get ip from dhcp server.
750 """
751
752 def test_subscriber_with_voltha_for_dhcp_starvation_negative_scenario(self):
753 """
754 Test Method:
755 0. Make sure that voltha is up and running on CORD-POD setup.
756 1. OLT and ONU is detected and validated.
757 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
758 3. Send dhcp request from residential subscriber without of pool ip to dhcp server which is running as onos app.
759 4. Verify that subscriber should not get ip from dhcp server.
760 5. Repeat steps 3 and 4 for 10 times.
761 6 Verify that subscriber should not get ip from dhcp server.
762 """
763 def test_subscriber_with_voltha_for_dhcp_sending_multiple_discover(self):
764 """
765 Test Method:
766 0. Make sure that voltha is up and running on CORD-POD setup.
767 1. OLT and ONU is detected and validated.
768 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
769 3. Send dhcp request from residential subscriber to dhcp server which is running as onos app.
770 4. Verify that subscriber get ip from dhcp server successfully.
771 5. Repeat step 3 for 50 times.
772 6 Verify that subscriber should get same ip which was received from 1st discover from dhcp server.
773 """
774 def test_subscriber_with_voltha_for_dhcp_sending_multiple_request(self):
775 """
776 Test Method:
777 0. Make sure that voltha is 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 residential subscriber to dhcp server which is running as onos app.
781 4. Verify that subscriber get ip from dhcp server successfully.
782 5. Send DHCP request to dhcp server which is running as onos app.
783 6. Repeat step 5 for 50 times.
784 7. Verify that subscriber should get same ip which was received from 1st discover from dhcp server.
785 """
786
787 def test_subscriber_with_voltha_for_dhcp_requesting_desired_ip_address(self):
788 """
789 Test Method:
790 0. Make sure that voltha is up and running on CORD-POD setup.
791 1. OLT and ONU is detected and validated.
792 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
793 3. Send dhcp request with desired ip address from residential subscriber to dhcp server which is running as onos app.
794 4. Verify that subscriber get ip which was requested in step 3 from dhcp server successfully.
795 """
796
797 def test_subscriber_with_voltha_for_dhcp_requesting_desired_out_pool_ip_address(self):
798 """
799 Test Method:
800 0. Make sure that voltha is up and running on CORD-POD setup.
801 1. OLT and ONU is detected and validated.
802 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
803 3. Send dhcp request with desired out of pool ip address from residential subscriber to dhcp server which is running as onos app.
804 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.
805 """
806 def test_subscriber_with_voltha_for_dhcp_deactivate_dhcp_app_in_onos(self):
807 """
808 Test Method:
809 0. Make sure that voltha is up and running on CORD-POD setup.
810 1. OLT and ONU is detected and validated.
811 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
812 3. Send dhcp request from residential subscriber to dhcp server which is running as onos app.
813 4. Verify that subscriber get ip from dhcp server successfully.
814 5. Deactivate dhcp server app in onos.
815 6. Repeat step 3.
816 7. Verify that subscriber should not get ip from dhcp server, and ping to gateway.
817 """
818 def test_subscriber_with_voltha_for_dhcp_renew_time(self):
819 """
820 Test Method:
821 0. Make sure that voltha is up and running on CORD-POD setup.
822 1. OLT and ONU is detected and validated.
823 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
824 3. Send dhcp request from residential subscriber to dhcp server which is running as onos app.
825 4. Verify that subscriber get ip from dhcp server successfully.
826 5. Send dhcp renew packet to dhcp server which is running as onos app.
827 6. Repeat step 4.
828 """
829 def test_subscriber_with_voltha_for_dhcp_rebind_time(self):
830 """
831 Test Method:
832 0. Make sure that voltha is up and running on CORD-POD setup.
833 1. OLT and ONU is detected and validated.
834 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
835 3. Send dhcp request from residential subscriber to dhcp server which is running as onos app.
836 4. Verify that subscriber get ip from dhcp server successfully.
837 5. Send dhcp rebind packet to dhcp server which is running as onos app.
838 6. Repeat step 4.
839 """
840 def test_subscriber_with_voltha_for_dhcp_disable_olt_in_voltha(self):
841 """
842 Test Method:
843 0. Make sure that voltha is up and running on CORD-POD setup.
844 1. OLT and ONU is detected and validated.
845 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
846 3. Send dhcp request from residential subscriber to dhcp server which is running as onos app.
847 4. Verify that subscriber get ip from dhcp server successfully.
848 5. Disable olt devices which is being detected in voltha CLI.
849 6. Repeat step 3.
850 7. Verify that subscriber should not get ip from dhcp server, and ping to gateway.
851 """
852 def test_subscriber_with_voltha_for_dhcp_disable_enable_olt_in_voltha(self):
853 """
854 Test Method:
855 0. Make sure that voltha is up and running on CORD-POD setup.
856 1. OLT and ONU is detected and validated.
857 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
858 3. Send dhcp request from residential subscriber to dhcp server which is running as onos app.
859 4. Verify that subscriber get ip from dhcp server successfully.
860 5. Disable olt devices which is being detected in voltha CLI.
861 6. Repeat step 3.
862 7. Verify that subscriber should not get ip from dhcp server, and ping to gateway.
863 8. Enable olt devices which is being detected in voltha CLI.
864 9. Repeat steps 3 and 4.
865 """
866 def test_subscriber_with_voltha_for_dhcp_disable_onu_port_in_voltha(self):
867 """
868 Test Method:
869 0. Make sure that voltha is up and running on CORD-POD setup.
870 1. OLT and ONU is detected and validated.
871 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
872 3. Send dhcp request from residential subscriber to dhcp server which is running as onos app.
873 4. Verify that subscriber get ip from dhcp server successfully.
874 5. Disable onu port which is being detected in voltha CLI.
875 6. Repeat step 3.
876 7. Verify that subscriber should not get ip from dhcp server, and ping to gateway.
877 """
878 def test_subscriber_with_voltha_for_dhcp_disable_enable_onu_port_in_voltha(self):
879 """
880 Test Method:
881 0. Make sure that voltha is up and running on CORD-POD setup.
882 1. OLT and ONU is detected and validated.
883 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
884 3. Send dhcp request from residential subscriber to dhcp server which is running as onos app.
885 4. Verify that subscriber get ip from dhcp server successfully.
886 5. Disable onu port which is being detected in voltha CLI.
887 6. Repeat step 3.
888 7. Verify that subscriber should not get ip from dhcp server, and ping to gateway.
889 8. Enable onu port which is being detected in voltha CLI.
890 9. Repeat steps 3 and 4.
891 """
892
893 def test_two_subscriber_with_voltha_for_dhcp_discover(self):
894 """
895 Test Method:
896 0. Make sure that voltha is up and running on CORD-POD setup.
897 1. OLT and ONU is detected and validated.
898 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
899 3. Send dhcp request from two residential subscribers to dhcp server which is running as onos app.
900 4. Verify that subscribers had got different ips from dhcp server successfully.
901 """
902
903 def test_two_subscriber_with_voltha_for_dhcp_multiple_discover(self):
904 """
905 Test Method:
906 0. Make sure that voltha is up and running on CORD-POD setup.
907 1. OLT and ONU is detected and validated.
908 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
909 3. Send dhcp request from two residential subscribers to dhcp server which is running as onos app.
910 4. Verify that subscribers had got ip from dhcp server successfully.
911 5. Repeat step 3 and 4 for 10 times for both subscribers.
912 6 Verify that subscribers should get same ips which are offered the first time from dhcp server.
913 """
914 def test_two_subscriber_with_voltha_for_dhcp_multiple_discover_for_one_subscriber(self):
915 """
916 Test Method:
917 0. Make sure that voltha is up and running on CORD-POD setup.
918 1. OLT and ONU is detected and validated.
919 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
920 3. Send dhcp request from two residential subscribers to dhcp server which is running as onos app.
921 4. Verify that subscribers had got ip from dhcp server successfully.
922 5. Repeat step 3 and 4 for 10 times for only one subscriber and ping to gateway from other subscriber.
923 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
924 """
925 def test_two_subscriber_with_voltha_for_dhcp_discover_desired_ip_address_for_one_subscriber(self):
926 """
927 Test Method:
928 0. Make sure that voltha is up and running on CORD-POD setup.
929 1. OLT and ONU is detected and validated.
930 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
931 3. Send dhcp request from one residential subscriber to dhcp server which is running as onos app.
932 3. Send dhcp request with desired ip from other residential subscriber to dhcp server which is running as onos app.
933 4. Verify that subscribers had got different ips (one subscriber desired ip and other subscriber random ip) from dhcp server successfully.
934 """
935 def test_two_subscriber_with_voltha_for_dhcp_discover_within_and_wothout_dhcp_pool_ip_addresses(self):
936 """
937 Test Method:
938 0. Make sure that voltha is up and running on CORD-POD setup.
939 1. OLT and ONU is detected and validated.
940 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
941 3. Send dhcp request with desired wihtin dhcp pool ip from one residential subscriber to dhcp server which is running as onos app.
942 3. Send dhcp request with desired without in dhcp pool ip from other residential subscriber to dhcp server which is running as onos app.
943 4. Verify that subscribers had got different ips (both subscriber got random ips within dhcp pool) from dhcp server successfully.
944 """
945 def test_two_subscriber_with_voltha_for_dhcp_disable_onu_port_for_one_subscriber(self):
946 """
947 Test Method:
948 0. Make sure that voltha is up and running on CORD-POD setup.
949 1. OLT and ONU is detected and validated.
950 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
951 3. Send dhcp request from two residential subscribers to dhcp server which is running as onos app.
952 4. Verify that subscribers had got ip from dhcp server successfully.
953 5. Disable onu port on which access one subscriber and ping to gateway from other subscriber.
954 6. Repeat step 3 and 4 for one subscriber where uni port is down.
955 7. Verify that subscriber should not get ip from dhcp server and other subscriber ping to gateway should not failed.
956 """
957 def test_two_subscriber_with_voltha_for_dhcp_disable_enable_onu_port_for_one_subscriber(self):
958 """
959 Test Method:
960 0. Make sure that voltha is up and running on CORD-POD setup.
961 1. OLT and ONU is detected and validated.
962 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
963 3. Send dhcp request from two residential subscribers to dhcp server which is running as onos app.
964 4. Verify that subscribers had got ip from dhcp server successfully.
965 5. Disable onu port on which access one subscriber and ping to gateway from other subscriber.
966 6. Repeat step 3 and 4 for one subscriber where uni port is down.
967 7. Verify that subscriber should not get ip from dhcp server and other subscriber ping to gateway should not failed.
968 8. Enable onu port on which was disable at step 5 and ping to gateway from other subscriber.
969 9. Repeat step 3 and 4 for one subscriber where uni port is up now.
970 10. Verify that subscriber should get ip from dhcp server and other subscriber ping to gateway should not failed.
971 """
972 def test_two_subscriber_with_voltha_for_dhcp_disable_olt_detected_in_voltha(self):
973 """
974 Test Method:
975 0. Make sure that voltha is up and running on CORD-POD setup.
976 1. OLT and ONU is detected and validated.
977 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
978 3. Send dhcp request from two residential subscribers to dhcp server which is running as onos app.
979 4. Verify that subscribers had got ip from dhcp server successfully.
980 5. Start pinging continuously from one subscriber and repeat steps 3 and 4 for other subscriber.
981 6. Disable the olt device which is detected in voltha.
982 7. Verify that subscriber should not get ip from dhcp server and other subscriber ping to gateway should failed.
983 """
984 def test_two_subscriber_with_voltha_for_dhcp_disable_enable_olt_detected_in_voltha(self):
985 """
986 Test Method:
987 0. Make sure that voltha is up and running on CORD-POD setup.
988 1. OLT and ONU is detected and validated.
989 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
990 3. Send dhcp request from two residential subscribers to dhcp server which is running as onos app.
991 4. Verify that subscribers had got ip from dhcp server successfully.
992 5. Start pinging continuously from one subscriber and repeat steps 3 and 4 for other subscriber.
993 6. Disable the olt device which is detected in voltha.
994 7. Verify that subscriber should not get ip from dhcp server and other subscriber ping to gateway should failed.
995 8. Enable the olt device which is detected in voltha.
996 9. Verify that subscriber should get ip from dhcp server and other subscriber ping to gateway should not failed.
997 """
998 def test_two_subscriber_with_voltha_for_dhcp_pause_olt_detected_in_voltha(self):
999 """
1000 Test Method:
1001 0. Make sure that voltha is up and running on CORD-POD setup.
1002 1. OLT and ONU is detected and validated.
1003 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
1004 3. Send dhcp request from two residential subscribers to dhcp server which is running as onos app.
1005 4. Verify that subscribers had got ip from dhcp server successfully.
1006 5. Start pinging continuously from one subscriber and repeat steps 3 and 4 for other subscriber.
1007 6. Pause the olt device which is detected in voltha.
1008 7. Verify that subscriber should not get ip from dhcp server and other subscriber ping to gateway should failed.
1009 """
1010 def test_subscriber_with_voltha_for_dhcpRelay_dhcp_request(self):
1011 """
1012 Test Method:
1013 0. Make sure that voltha and external dhcp server are up and running on CORD-POD setup.
1014 1. OLT and ONU is detected and validated.
1015 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
1016 3. Send dhcp request from residential subscrber to external dhcp server.
1017 4. Verify that subscriber get ip from external dhcp server successfully.
1018 """
1019
1020 def test_subscriber_with_voltha_for_dhcpRelay_dhcp_request_with_invalid_broadcast_source_mac(self):
1021 """
1022 Test Method:
1023 0. Make sure that voltha and external dhcp server are is up and running on CORD-POD setup.
1024 1. OLT and ONU is detected and validated.
1025 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
1026 3. Send dhcp request with invalid source mac broadcast from residential subscrber to external dhcp server.
1027 4. Verify that subscriber should not get ip from external dhcp server.
1028 """
1029
1030 def test_subscriber_with_voltha_for_dhcpRelay_dhcp_request_with_invalid_multicast_source_mac(self):
1031 """
1032 Test Method:
1033 0. Make sure that voltha and external dhcp server are is up and running on CORD-POD setup.
1034 1. OLT and ONU is detected and validated.
1035 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
1036 3. Send dhcp request with invalid source mac multicast from residential subscrber to external dhcp server.
1037 4. Verify that subscriber should not get ip from external dhcp server.
1038 """
1039
1040 def test_subscriber_with_voltha_for_dhcpRelay_dhcp_request_with_invalid_source_mac(self):
1041 """
1042 Test Method:
1043 0. Make sure that voltha and external dhcp server are up and running on CORD-POD setup.
1044 1. OLT and ONU is detected and validated.
1045 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
1046 3. Send dhcp request with invalid source mac zero from residential subscrber to external dhcp server.
1047 4. Verify that subscriber should not get ip from external dhcp server.
1048 """
1049
1050 def test_subscriber_with_voltha_for_dhcpRelay_dhcp_request_and_release(self):
1051 """
1052 Test Method:
1053 0. Make sure that voltha and external dhcp server are up and running on CORD-POD setup.
1054 1. OLT and ONU is detected and validated.
1055 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
1056 3. Send dhcp request from residential subscrber to external dhcp server.
1057 4. Verify that subscriber get ip from external dhcp server successfully.
1058 5. Send dhcp release from residential subscrber to external dhcp server.
1059 6 Verify that subscriber should not get ip from external dhcp server, ping to gateway.
1060 """
1061
1062 def test_subscriber_with_voltha_for_dhcpRelay_starvation(self):
1063 """
1064 Test Method:
1065 0. Make sure that voltha and external dhcp server are up and running on CORD-POD setup.
1066 1. OLT and ONU is detected and validated.
1067 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
1068 3. Send dhcp request from residential subscriber to external dhcp server.
1069 4. Verify that subscriber get ip from external dhcp server. successfully.
1070 5. Repeat step 3 and 4 for 10 times.
1071 6 Verify that subscriber should get ip from external dhcp server..
1072 """
1073
1074 def test_subscriber_with_voltha_for_dhcpRelay_starvation_negative_scenario(self):
1075 """
1076 Test Method:
1077 0. Make sure that voltha and external dhcp server are up and running on CORD-POD setup.
1078 1. OLT and ONU is detected and validated.
1079 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
1080 3. Send dhcp request from residential subscriber without of pool ip to external dhcp server.
1081 4. Verify that subscriber should not get ip from external dhcp server..
1082 5. Repeat steps 3 and 4 for 10 times.
1083 6 Verify that subscriber should not get ip from external dhcp server..
1084 """
1085 def test_subscriber_with_voltha_for_dhcpRelay_sending_multiple_discover(self):
1086 """
1087 Test Method:
1088 0. Make sure that voltha and external dhcp server are up and running on CORD-POD setup.
1089 1. OLT and ONU is detected and validated.
1090 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
1091 3. Send dhcp request from residential subscriber to external dhcp server.
1092 4. Verify that subscriber get ip from external dhcp server. successfully.
1093 5. Repeat step 3 for 50 times.
1094 6 Verify that subscriber should get same ip which was received from 1st discover from external dhcp server..
1095 """
1096 def test_subscriber_with_voltha_for_dhcpRelay_sending_multiple_request(self):
1097 """
1098 Test Method:
1099 0. Make sure that voltha and external dhcp server are up and running on CORD-POD setup.
1100 1. OLT and ONU is detected and validated.
1101 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
1102 3. Send dhcp request from residential subscriber to external dhcp server.
1103 4. Verify that subscriber get ip from external dhcp server. successfully.
1104 5. Send DHCP request to external dhcp server.
1105 6. Repeat step 5 for 50 times.
1106 7. Verify that subscriber should get same ip which was received from 1st discover from external dhcp server..
1107 """
1108
1109 def test_subscriber_with_voltha_for_dhcpRelay_requesting_desired_ip_address(self):
1110 """
1111 Test Method:
1112 0. Make sure that voltha and external dhcp server are up and running on CORD-POD setup.
1113 1. OLT and ONU is detected and validated.
1114 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
1115 3. Send dhcp request with desired ip address from residential subscriber to external dhcp server.
1116 4. Verify that subscriber get ip which was requested in step 3 from external dhcp server. successfully.
1117 """
1118
1119 def test_subscriber_with_voltha_for_dhcpRelay_requesting_desired_out_of_pool_ip_address(self):
1120 """
1121 Test Method:
1122 0. Make sure that voltha and external dhcp server are up and running on CORD-POD setup.
1123 1. OLT and ONU is detected and validated.
1124 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
1125 3. Send dhcp request with desired out of pool ip address from residential subscriber to external dhcp server.
1126 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.
1127 """
1128
1129 def test_subscriber_with_voltha_for_dhcpRelay_deactivating_dhcpRelay_app_in_onos(self):
1130 """
1131 Test Method:
1132 0. Make sure that voltha and external dhcp server are up and running on CORD-POD setup.
1133 1. OLT and ONU is detected and validated.
1134 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
1135 3. Send dhcp request from residential subscriber to external dhcp server.
1136 4. Verify that subscriber get ip from external dhcp server. successfully.
1137 5. Deactivate dhcp server app in onos.
1138 6. Repeat step 3.
1139 7. Verify that subscriber should not get ip from external dhcp server., and ping to gateway.
1140 """
1141
1142 def test_subscriber_with_voltha_for_dhcpRelay_renew_time(self):
1143 """
1144 Test Method:
1145 0. Make sure that voltha and external dhcp server are up and running on CORD-POD setup.
1146 1. OLT and ONU is detected and validated.
1147 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
1148 3. Send dhcp request from residential subscriber to external dhcp server.
1149 4. Verify that subscriber get ip from external dhcp server. successfully.
1150 5. Send dhcp renew packet to external dhcp server.
1151 6. Repeat step 4.
1152 """
1153
1154 def test_subscriber_with_voltha_for_dhcpRelay_rebind_time(self):
1155 """
1156 Test Method:
1157 0. Make sure that voltha and external dhcp server are up and running on CORD-POD setup.
1158 1. OLT and ONU is detected and validated.
1159 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
1160 3. Send dhcp request from residential subscriber to external dhcp server.
1161 4. Verify that subscriber get ip from external dhcp server. successfully.
1162 5. Send dhcp rebind packet to external dhcp server.
1163 6. Repeat step 4.
1164 """
1165
1166 def test_subscriber_with_voltha_for_dhcpRelay_disable_olt_in_voltha(self):
1167 """
1168 Test Method:
1169 0. Make sure that voltha and external dhcp server are up and running on CORD-POD setup.
1170 1. OLT and ONU is detected and validated.
1171 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
1172 3. Send dhcp request from residential subscriber to external dhcp server.
1173 4. Verify that subscriber get ip from external dhcp server. successfully.
1174 5. Disable olt devices which is being detected in voltha CLI.
1175 6. Repeat step 3.
1176 7. Verify that subscriber should not get ip from external dhcp server., and ping to gateway.
1177 """
1178
1179 def test_subscriber_with_voltha_for_dhcpRelay_toggling_olt_in_voltha(self):
1180 """
1181 Test Method:
1182 0. Make sure that voltha and external dhcp server are up and running on CORD-POD setup.
1183 1. OLT and ONU is detected and validated.
1184 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
1185 3. Send dhcp request from residential subscriber to external dhcp server.
1186 4. Verify that subscriber get ip from external dhcp server. successfully.
1187 5. Disable olt devices which is being detected in voltha CLI.
1188 6. Repeat step 3.
1189 7. Verify that subscriber should not get ip from external dhcp server., and ping to gateway.
1190 8. Enable olt devices which is being detected in voltha CLI.
1191 9. Repeat steps 3 and 4.
1192 """
1193
1194 def test_subscriber_with_voltha_for_dhcpRelay_disable_onu_port_in_voltha(self):
1195 """
1196 Test Method:
1197 0. Make sure that voltha and external dhcp server are up and running on CORD-POD setup.
1198 1. OLT and ONU is detected and validated.
1199 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
1200 3. Send dhcp request from residential subscriber to external dhcp server.
1201 4. Verify that subscriber get ip from external dhcp server. successfully.
1202 5. Disable onu port which is being detected in voltha CLI.
1203 6. Repeat step 3.
1204 7. Verify that subscriber should not get ip from external dhcp server., and ping to gateway.
1205 """
1206
1207 def test_subscriber_with_voltha_for_dhcpRelay_disable_enable_onu_port_in_voltha(self):
1208 """
1209 Test Method:
1210 0. Make sure that voltha and external dhcp server are up and running on CORD-POD setup.
1211 1. OLT and ONU is detected and validated.
1212 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
1213 3. Send dhcp request from residential subscriber to external dhcp server.
1214 4. Verify that subscriber get ip from external dhcp server. successfully.
1215 5. Disable onu port which is being detected in voltha CLI.
1216 6. Repeat step 3.
1217 7. Verify that subscriber should not get ip from external dhcp server., and ping to gateway.
1218 8. Enable onu port which is being detected in voltha CLI.
1219 9. Repeat steps 3 and 4.
1220 """
1221
1222 def test_two_subscriber_with_voltha_for_dhcpRelay_discover(self):
1223 """
1224 Test Method:
1225 0. Make sure that voltha and external dhcp server are up and running on CORD-POD setup.
1226 1. OLT and ONU is detected and validated.
1227 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
1228 3. Send dhcp request from two residential subscribers to external dhcp server.
1229 4. Verify that subscribers had got different ips from external dhcp server. successfully.
1230 """
1231
1232 def test_two_subscriber_with_voltha_for_dhcpRelay_multiple_discover(self):
1233 """
1234 Test Method:
1235 0. Make sure that voltha and external dhcp server are up and running on CORD-POD setup.
1236 1. OLT and ONU is detected and validated.
1237 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
1238 3. Send dhcp request from two residential subscribers to external dhcp server.
1239 4. Verify that subscribers had got ip from external dhcp server. successfully.
1240 5. Repeat step 3 and 4 for 10 times for both subscribers.
1241 6 Verify that subscribers should get same ips which are offered the first time from external dhcp server..
1242 """
1243
1244 def test_two_subscriber_with_voltha_for_dhcpRelay_multiple_discover_for_one_subscriber(self):
1245 """
1246 Test Method:
1247 0. Make sure that voltha and external dhcp server are up and running on CORD-POD setup.
1248 1. OLT and ONU is detected and validated.
1249 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
1250 3. Send dhcp request from two residential subscribers to external dhcp server.
1251 4. Verify that subscribers had got ip from external dhcp server. successfully.
1252 5. Repeat step 3 and 4 for 10 times for only one subscriber and ping to gateway from other subscriber.
1253 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
1254 """
1255
1256 def test_two_subscriber_with_voltha_for_dhcpRelay_discover_desired_ip_address_for_one_subscriber(self):
1257 """
1258 Test Method:
1259 0. Make sure that voltha and external dhcp server are up and running on CORD-POD setup.
1260 1. OLT and ONU is detected and validated.
1261 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
1262 3. Send dhcp request from one residential subscriber to external dhcp server.
1263 3. Send dhcp request with desired ip from other residential subscriber to external dhcp server.
1264 4. Verify that subscribers had got different ips (one subscriber desired ip and other subscriber random ip) from external dhcp server. successfully.
1265 """
1266
1267 def test_two_subscriber_with_voltha_for_dhcpRelay_discover_in_range_and_out_of_range_from_dhcp_pool_ip_addresses(self):
1268 """
1269 Test Method:
1270 0. Make sure that voltha and external dhcp server are up and running on CORD-POD setup.
1271 1. OLT and ONU is detected and validated.
1272 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
1273 3. Send dhcp request with desired wihtin dhcp pool ip from one residential subscriber to external dhcp server.
1274 3. Send dhcp request with desired without in dhcp pool ip from other residential subscriber to external dhcp server.
1275 4. Verify that subscribers had got different ips (both subscriber got random ips within dhcp pool) from external dhcp server. successfully.
1276 """
1277
1278 def test_two_subscriber_with_voltha_for_dhcpRelay_disable_onu_port_for_one_subscriber(self):
1279 """
1280 Test Method:
1281 0. Make sure that voltha and external dhcp server are up and running on CORD-POD setup.
1282 1. OLT and ONU is detected and validated.
1283 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
1284 3. Send dhcp request from two residential subscribers to external dhcp server.
1285 4. Verify that subscribers had got ip from external dhcp server. successfully.
1286 5. Disable onu port on which access one subscriber and ping to gateway from other subscriber.
1287 6. Repeat step 3 and 4 for one subscriber where uni port is down.
1288 7. Verify that subscriber should not get ip from external dhcp server. and other subscriber ping to gateway should not failed.
1289 """
1290
1291 def test_two_subscriber_with_voltha_for_dhcpRelay_toggle_onu_port_for_one_subscriber(self):
1292 """
1293 Test Method:
1294 0. Make sure that voltha and external dhcp server are up and running on CORD-POD setup.
1295 1. OLT and ONU is detected and validated.
1296 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
1297 3. Send dhcp request from two residential subscribers to external dhcp server.
1298 4. Verify that subscribers had got ip from external dhcp server. successfully.
1299 5. Disable onu port on which access one subscriber and ping to gateway from other subscriber.
1300 6. Repeat step 3 and 4 for one subscriber where uni port is down.
1301 7. Verify that subscriber should not get ip from external dhcp server. and other subscriber ping to gateway should not failed.
1302 8. Enable onu port on which was disable at step 5 and ping to gateway from other subscriber.
1303 9. Repeat step 3 and 4 for one subscriber where uni port is up now.
1304 10. Verify that subscriber should get ip from external dhcp server. and other subscriber ping to gateway should not failed.
1305 """
1306
1307 def test_two_subscriber_with_voltha_for_dhcpRelay_disable_olt_detected_in_voltha(self):
1308 """
1309 Test Method:
1310 0. Make sure that voltha and external dhcp server are up and running on CORD-POD setup.
1311 1. OLT and ONU is detected and validated.
1312 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
1313 3. Send dhcp request from two residential subscribers to external dhcp server.
1314 4. Verify that subscribers had got ip from external dhcp server. successfully.
1315 5. Start pinging continuously from one subscriber and repeat steps 3 and 4 for other subscriber.
1316 6. Disable the olt device which is detected in voltha.
1317 7. Verify that subscriber should not get ip from external dhcp server. and other subscriber ping to gateway should failed.
1318 """
1319
1320 def test_two_subscriber_with_voltha_for_dhcpRelay_toggle_olt_detected_in_voltha(self):
1321 """
1322 Test Method:
1323 0. Make sure that voltha and external dhcp server are up and running on CORD-POD setup.
1324 1. OLT and ONU is detected and validated.
1325 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
1326 3. Send dhcp request from two residential subscribers to external dhcp server.
1327 4. Verify that subscribers had got ip from external dhcp server. successfully.
1328 5. Start pinging continuously from one subscriber and repeat steps 3 and 4 for other subscriber.
1329 6. Disable the olt device which is detected in voltha.
1330 7. Verify that subscriber should not get ip from external dhcp server. and other subscriber ping to gateway should failed.
1331 8. Enable the olt device which is detected in voltha.
1332 9. Verify that subscriber should get ip from external dhcp server. and other subscriber ping to gateway should not failed.
1333 """
1334
1335 def test_two_subscriber_with_voltha_for_dhcpRelay_pause_olt_detected_in_voltha(self):
1336 """
1337 Test Method:
1338 0. Make sure that voltha and external dhcp server are up and running on CORD-POD setup.
1339 1. OLT and ONU is detected and validated.
1340 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
1341 3. Send dhcp request from two residential subscribers to external dhcp server.
1342 4. Verify that subscribers had got ip from external dhcp server. successfully.
1343 5. Start pinging continuously from one subscriber and repeat steps 3 and 4 for other subscriber.
1344 6. Pause the olt device which is detected in voltha.
1345 7. Verify that subscriber should not get ip from external dhcp server. and other subscriber ping to gateway should failed.
1346 """