A R Karthick | 35495c3 | 2017-05-11 14:58:32 -0700 | [diff] [blame] | 1 | import os |
| 2 | import sys |
| 3 | import unittest |
A.R Karthick | 8a507cf | 2017-06-02 18:44:49 -0700 | [diff] [blame] | 4 | import time |
Thangavelu K S | 77c8c0c | 2017-06-07 18:04:21 +0000 | [diff] [blame^] | 5 | import json |
| 6 | import requests |
A R Karthick | 35495c3 | 2017-05-11 14:58:32 -0700 | [diff] [blame] | 7 | from nose.tools import * |
Thangavelu K S | 77c8c0c | 2017-06-07 18:04:21 +0000 | [diff] [blame^] | 8 | from nose.twistedtools import reactor, deferred |
| 9 | from twisted.internet import defer |
A R Karthick | 35495c3 | 2017-05-11 14:58:32 -0700 | [diff] [blame] | 10 | from CordTestConfig import setup_module |
| 11 | from CordTestUtils import log_test |
| 12 | from VolthaCtrl import VolthaCtrl |
Thangavelu K S | 77c8c0c | 2017-06-07 18:04:21 +0000 | [diff] [blame^] | 13 | from CordTestUtils import log_test, get_controller |
| 14 | from portmaps import g_subscriber_port_map |
| 15 | from OltConfig import * |
| 16 | from EapTLS import TLSAuthTest |
| 17 | from OnosCtrl import OnosCtrl |
| 18 | from CordLogger import CordLogger |
| 19 | from scapy.all import * |
| 20 | from scapy_ssl_tls.ssl_tls import * |
| 21 | from scapy_ssl_tls.ssl_tls_crypto import * |
| 22 | from CordTestServer import cord_test_onos_restart, cord_test_shell, cord_test_radius_restart |
| 23 | |
A R Karthick | 35495c3 | 2017-05-11 14:58:32 -0700 | [diff] [blame] | 24 | |
| 25 | class 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 S | 77c8c0c | 2017-06-07 18:04:21 +0000 | [diff] [blame^] | 32 | 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' |
| 36 | |
| 37 | test_path = os.path.dirname(os.path.realpath(__file__)) |
| 38 | table_app_file = os.path.join(test_path, '..', 'apps/ciena-cordigmp-multitable-2.0-SNAPSHOT.oar') |
| 39 | olt_app_file = os.path.join(test_path, '..', 'apps/olt-app-1.2-SNAPSHOT.oar') |
| 40 | #onos_config_path = os.path.join(test_path, '..', 'setup/onos-config') |
| 41 | olt_conf_file = os.getenv('OLT_CONFIG_FILE', os.path.join(test_path, '..', 'setup/olt_config.json')) |
| 42 | onos_restartable = bool(int(os.getenv('ONOS_RESTART', 0))) |
| 43 | VOLTHA_ENABLED = True |
| 44 | INTF_TX_DEFAULT = 'veth2' |
| 45 | INTF_RX_DEFAULT = 'veth0' |
| 46 | TESTCASE_TIMEOUT = 300 |
| 47 | VOLTHA_CONFIG_FAKE = True |
| 48 | VOLTHA_UPLINK_VLAN_MAP = { 'of:0000000000000001' : '222' } |
| 49 | VOLTHA_ONU_UNI_PORT = 'veth0' |
| 50 | |
| 51 | CLIENT_CERT = """-----BEGIN CERTIFICATE----- |
| 52 | MIICuDCCAiGgAwIBAgIBAjANBgkqhkiG9w0BAQUFADCBizELMAkGA1UEBhMCVVMx |
| 53 | CzAJBgNVBAgTAkNBMRIwEAYDVQQHEwlTb21ld2hlcmUxEzARBgNVBAoTCkNpZW5h |
| 54 | IEluYy4xHjAcBgkqhkiG9w0BCQEWD2FkbWluQGNpZW5hLmNvbTEmMCQGA1UEAxMd |
| 55 | RXhhbXBsZSBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwHhcNMTYwNjA2MjExMjI3WhcN |
| 56 | MTcwNjAxMjExMjI3WjBnMQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExEzARBgNV |
| 57 | BAoTCkNpZW5hIEluYy4xFzAVBgNVBAMUDnVzZXJAY2llbmEuY29tMR0wGwYJKoZI |
| 58 | hvcNAQkBFg51c2VyQGNpZW5hLmNvbTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkC |
| 59 | gYEAwvXiSzb9LZ6c7uNziUfKvoHO7wu/uiFC5YUpXbmVGuGZizbVrny0xnR85Dfe |
| 60 | +9R4diansfDhIhzOUl1XjN3YDeSS9OeF5YWNNE8XDhlz2d3rVzaN6hIhdotBkUjg |
| 61 | rUewjTg5OFR31QEyG3v8xR3CLgiE9xQELjZbSA07pD79zuUCAwEAAaNPME0wEwYD |
| 62 | VR0lBAwwCgYIKwYBBQUHAwIwNgYDVR0fBC8wLTAroCmgJ4YlaHR0cDovL3d3dy5l |
| 63 | eGFtcGxlLmNvbS9leGFtcGxlX2NhLmNybDANBgkqhkiG9w0BAQUFAAOBgQDAjkrY |
| 64 | 6tDChmKbvr8w6Du/t8vHjTCoCIocHTN0qzWOeb1YsAGX89+TrWIuO1dFyYd+Z0KC |
| 65 | PDKB5j/ygml9Na+AklSYAVJIjvlzXKZrOaPmhZqDufi+rXWti/utVqY4VMW2+HKC |
| 66 | nXp37qWeuFLGyR1519Y1d6F/5XzqmvbwURuEug== |
| 67 | -----END CERTIFICATE-----""" |
| 68 | |
| 69 | CLIENT_CERT_INVALID = '''-----BEGIN CERTIFICATE----- |
| 70 | MIIDvTCCAqWgAwIBAgIBAjANBgkqhkiG9w0BAQUFADCBizELMAkGA1UEBhMCVVMx |
| 71 | CzAJBgNVBAgTAkNBMRIwEAYDVQQHEwlTb21ld2hlcmUxEzARBgNVBAoTCkNpZW5h |
| 72 | IEluYy4xHjAcBgkqhkiG9w0BCQEWD2FkbWluQGNpZW5hLmNvbTEmMCQGA1UEAxMd |
| 73 | RXhhbXBsZSBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwHhcNMTYwMzExMTg1MzM2WhcN |
| 74 | MTcwMzA2MTg1MzM2WjBnMQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExEzARBgNV |
| 75 | BAoTCkNpZW5hIEluYy4xFzAVBgNVBAMUDnVzZXJAY2llbmEuY29tMR0wGwYJKoZI |
| 76 | hvcNAQkBFg51c2VyQGNpZW5hLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCC |
| 77 | AQoCggEBAOxemcBsPn9tZsCa5o2JA6sQDC7A6JgCNXXl2VFzKLNNvB9PS6D7ZBsQ |
| 78 | 5An0zEDMNzi51q7lnrYg1XyiE4S8FzMGAFr94RlGMQJUbRD9V/oqszMX4k++iAOK |
| 79 | tIA1gr3x7Zi+0tkjVSVzXTmgNnhChAamdMsjYUG5+CY9WAicXyy+VEV3zTphZZDR |
| 80 | OjcjEp4m/TSXVPYPgYDXI40YZKX5BdvqykWtT/tIgZb48RS1NPyN/XkCYzl3bv21 |
| 81 | qx7Mc0fcEbsJBIIRYTUkfxnsilcnmLxSYO+p+DZ9uBLBzcQt+4Rd5pLSfi21WM39 |
| 82 | 2Z2oOi3vs/OYAPAqgmi2JWOv3mePa/8CAwEAAaNPME0wEwYDVR0lBAwwCgYIKwYB |
| 83 | BQUHAwIwNgYDVR0fBC8wLTAroCmgJ4YlaHR0cDovL3d3dy5leGFtcGxlLmNvbS9l |
| 84 | eGFtcGxlX2NhLmNybDANBgkqhkiG9w0BAQUFAAOCAQEALBzMPDTIB6sLyPl0T6JV |
| 85 | MjOkyldAVhXWiQsTjaGQGJUUe1cmUJyZbUZEc13MygXMPOM4x7z6VpXGuq1c/Vxn |
| 86 | VzQ2fNnbJcIAHi/7G8W5/SQfPesIVDsHTEc4ZspPi5jlS/MVX3HOC+BDbOjdbwqP |
| 87 | RX0JEr+uOyhjO+lRxG8ilMRACoBUbw1eDuVDoEBgErSUC44pq5ioDw2xelc+Y6hQ |
| 88 | dmtYwfY0DbvwxHtA495frLyPcastDiT/zre7NL51MyUDPjjYjghNQEwvu66IKbQ3 |
| 89 | T1tJBrgI7/WI+dqhKBFolKGKTDWIHsZXQvZ1snGu/FRYzg1l+R/jT8cRB9BDwhUt |
| 90 | yg== |
| 91 | -----END CERTIFICATE-----''' |
A R Karthick | 35495c3 | 2017-05-11 14:58:32 -0700 | [diff] [blame] | 92 | |
| 93 | @classmethod |
| 94 | def setUpClass(cls): |
| 95 | cls.voltha = VolthaCtrl(cls.VOLTHA_HOST, rest_port = cls.VOLTHA_REST_PORT) |
Thangavelu K S | 77c8c0c | 2017-06-07 18:04:21 +0000 | [diff] [blame^] | 96 | # cls.update_apps_version() |
| 97 | dids = OnosCtrl.get_device_ids() |
| 98 | device_map = {} |
| 99 | for did in dids: |
| 100 | device_map[did] = { 'basic' : { 'driver' : 'pmc-olt' } } |
| 101 | network_cfg = {} |
| 102 | network_cfg = { 'devices' : device_map } |
| 103 | ## Restart ONOS with cpqd driver config for OVS |
| 104 | cls.start_onos(network_cfg = network_cfg) |
| 105 | cls.install_app_table() |
| 106 | cls.olt = OltConfig(olt_conf_file = cls.olt_conf_file) |
| 107 | cls.port_map, cls.port_list = cls.olt.olt_port_map() |
| 108 | cls.switches = cls.port_map['switches'] |
| 109 | cls.num_ports = cls.port_map['num_ports'] |
| 110 | if cls.num_ports > 1: |
| 111 | cls.num_ports -= 1 ##account for the tx port |
| 112 | cls.activate_apps(cls.apps + cls.olt_apps) |
| 113 | |
| 114 | def remove_olt(self, switch_map): |
| 115 | controller = get_controller() |
| 116 | auth = ('karaf', 'karaf') |
| 117 | #remove subscriber for every port on all the voltha devices |
| 118 | for device, device_map in switch_map.iteritems(): |
| 119 | uni_ports = device_map['ports'] |
| 120 | uplink_vlan = device_map['uplink_vlan'] |
| 121 | for port in uni_ports: |
| 122 | rest_url = 'http://{}:8181/onos/olt/oltapp/{}/{}'.format(controller, |
| 123 | device, |
| 124 | port) |
| 125 | resp = requests.delete(rest_url, auth = auth) |
| 126 | if resp.status_code not in [204, 202, 200]: |
| 127 | log_test.error('Error deleting subscriber for device %s on port %s' %(device, port)) |
| 128 | else: |
| 129 | log_test.info('Deleted subscriber for device %s on port %s' %(device, port)) |
| 130 | OnosCtrl.uninstall_app(self.olt_app_file) |
| 131 | |
| 132 | def config_olt(self, switch_map): |
| 133 | controller = get_controller() |
| 134 | OnosCtrl.install_app(self.olt_app_file) |
| 135 | time.sleep(5) |
| 136 | auth = ('karaf', 'karaf') |
| 137 | #configure subscriber for every port on all the voltha devices |
| 138 | for device, device_map in switch_map.iteritems(): |
| 139 | uni_ports = device_map['ports'] |
| 140 | uplink_vlan = device_map['uplink_vlan'] |
| 141 | for port in uni_ports: |
| 142 | vlan = port |
| 143 | rest_url = 'http://{}:8181/onos/olt/oltapp/{}/{}/{}'.format(controller, |
| 144 | device, |
| 145 | port, |
| 146 | vlan) |
| 147 | resp = requests.post(rest_url, auth = auth) |
| 148 | #assert_equal(resp.ok, True) |
| 149 | |
| 150 | @classmethod |
| 151 | def start_onos(cls, network_cfg = None): |
| 152 | if cls.onos_restartable is False: |
| 153 | log_test.info('ONOS restart is disabled. Skipping ONOS restart') |
| 154 | return |
| 155 | if cls.VOLTHA_ENABLED is True: |
| 156 | log_test.info('ONOS restart skipped as VOLTHA is running') |
| 157 | return |
| 158 | if network_cfg is None: |
| 159 | network_cfg = cls.device_dict |
| 160 | |
| 161 | if type(network_cfg) is tuple: |
| 162 | res = [] |
| 163 | for v in network_cfg: |
| 164 | res += v.items() |
| 165 | config = dict(res) |
| 166 | else: |
| 167 | config = network_cfg |
| 168 | log_test.info('Restarting ONOS with new network configuration') |
| 169 | return cord_test_onos_restart(config = config) |
| 170 | |
| 171 | @classmethod |
| 172 | def install_app_table(cls): |
| 173 | ##Uninstall the existing app if any |
| 174 | OnosCtrl.uninstall_app(cls.table_app) |
| 175 | time.sleep(2) |
| 176 | log_test.info('Installing the multi table app %s for subscriber test' %(cls.table_app_file)) |
| 177 | OnosCtrl.install_app(cls.table_app_file) |
| 178 | time.sleep(3) |
| 179 | #onos_ctrl = OnosCtrl(cls.vtn_app) |
| 180 | #onos_ctrl.deactivate() |
| 181 | |
| 182 | @classmethod |
| 183 | def activate_apps(cls, apps): |
| 184 | for app in apps: |
| 185 | onos_ctrl = OnosCtrl(app) |
| 186 | status, _ = onos_ctrl.activate() |
| 187 | assert_equal(status, True) |
| 188 | time.sleep(2) |
| 189 | |
| 190 | def tls_flow_check(self, olt_uni_port, cert_info = None): |
| 191 | def tls_fail_cb(): |
| 192 | log_test.info('TLS verification failed') |
| 193 | if cert_info is None: |
| 194 | tls = TLSAuthTest(intf = olt_uni_port) |
| 195 | log_test.info('Running subscriber %s tls auth test with valid TLS certificate' %olt_uni_port) |
| 196 | tls.runTest() |
| 197 | assert_equal(tls.failTest, False) |
| 198 | if cert_info == "no_cert": |
| 199 | tls = TLSAuthTest(fail_cb = tls_fail_cb, intf = olt_uni_port, client_cert = '') |
| 200 | log_test.info('Running subscriber %s tls auth test with no TLS certificate' %olt_uni_port) |
| 201 | tls.runTest() |
| 202 | assert_equal(tls.failTest, True) |
| 203 | if cert_info == "invalid_cert": |
| 204 | tls = TLSAuthTest(fail_cb = tls_fail_cb, intf = olt_uni_port, client_cert = self.CLIENT_CERT_INVALID) |
| 205 | log_test.info('Running subscriber %s tls auth test with invalid TLS certificate' %olt_uni_port) |
| 206 | tls.runTest() |
| 207 | assert_equal(tls.failTest, True) |
| 208 | self.test_status = True |
| 209 | return self.test_status |
A R Karthick | 35495c3 | 2017-05-11 14:58:32 -0700 | [diff] [blame] | 210 | |
A.R Karthick | 8a507cf | 2017-06-02 18:44:49 -0700 | [diff] [blame] | 211 | def test_olt_enable_disable(self): |
A R Karthick | 35495c3 | 2017-05-11 14:58:32 -0700 | [diff] [blame] | 212 | log_test.info('Enabling OLT type %s, MAC %s' %(self.OLT_TYPE, self.OLT_MAC)) |
A.R Karthick | 8a507cf | 2017-06-02 18:44:49 -0700 | [diff] [blame] | 213 | device_id, status = self.voltha.enable_device(self.OLT_TYPE, self.OLT_MAC) |
| 214 | assert_not_equal(device_id, None) |
| 215 | try: |
| 216 | assert_equal(status, True) |
| 217 | time.sleep(10) |
| 218 | finally: |
| 219 | self.voltha.disable_device(device_id, delete = True) |
Thangavelu K S | 008f38e | 2017-05-15 19:36:55 +0000 | [diff] [blame] | 220 | |
A.R Karthick | 8a507cf | 2017-06-02 18:44:49 -0700 | [diff] [blame] | 221 | def test_ponsim_enable_disable(self): |
A.R Karthick | 8b9c5f1 | 2017-05-30 17:47:08 -0700 | [diff] [blame] | 222 | log_test.info('Enabling ponsim_olt') |
| 223 | ponsim_address = '{}:50060'.format(self.VOLTHA_HOST) |
A.R Karthick | 8a507cf | 2017-06-02 18:44:49 -0700 | [diff] [blame] | 224 | device_id, status = self.voltha.enable_device('ponsim_olt', address = ponsim_address) |
| 225 | assert_not_equal(device_id, None) |
| 226 | try: |
| 227 | assert_equal(status, True) |
| 228 | time.sleep(10) |
| 229 | finally: |
| 230 | self.voltha.disable_device(device_id, delete = True) |
A.R Karthick | 8b9c5f1 | 2017-05-30 17:47:08 -0700 | [diff] [blame] | 231 | |
Thangavelu K S | 008f38e | 2017-05-15 19:36:55 +0000 | [diff] [blame] | 232 | def test_subscriber_with_voltha_for_eap_tls_authentication(self): |
| 233 | """ |
| 234 | Test Method: |
| 235 | 0. Make sure that voltha is up and running on CORD-POD setup. |
| 236 | 1. OLT and ONU is detected and validated. |
| 237 | 2. Bring up freeradius server container using CORD TESTER and make sure that ONOS have connectivity to freeradius server. |
| 238 | 3. Issue auth request packets from CORD TESTER voltha test module acting as a subscriber.. |
| 239 | 4. Validate that eap tls valid auth packets are being exchanged between subscriber, onos and freeradius. |
| 240 | 5. Verify that subscriber is authenticated successfully. |
| 241 | """ |
Thangavelu K S | 77c8c0c | 2017-06-07 18:04:21 +0000 | [diff] [blame^] | 242 | log_test.info('Enabling ponsim_olt') |
| 243 | ponsim_address = '{}:50060'.format(self.VOLTHA_HOST) |
| 244 | device_id, status = self.voltha.enable_device('ponsim_olt', address = ponsim_address) |
| 245 | assert_not_equal(device_id, None) |
| 246 | voltha = VolthaCtrl(self.VOLTHA_HOST, |
| 247 | rest_port = self.VOLTHA_REST_PORT, |
| 248 | uplink_vlan_map = self.VOLTHA_UPLINK_VLAN_MAP) |
| 249 | time.sleep(10) |
| 250 | switch_map = None |
| 251 | olt_configured = False |
| 252 | switch_map = voltha.config(fake = self.VOLTHA_CONFIG_FAKE) |
| 253 | log_test.info('Installing OLT app') |
| 254 | OnosCtrl.install_app(self.olt_app_file) |
| 255 | time.sleep(5) |
| 256 | log_test.info('Adding subscribers through OLT app') |
| 257 | self.config_olt(switch_map) |
| 258 | olt_configured = True |
| 259 | time.sleep(5) |
| 260 | auth_status = self.tls_flow_check(self.INTF_RX_DEFAULT) |
| 261 | try: |
| 262 | assert_equal(auth_status, True) |
| 263 | assert_equal(status, True) |
| 264 | time.sleep(10) |
| 265 | finally: |
| 266 | self.voltha.disable_device(device_id, delete = True) |
Thangavelu K S | 008f38e | 2017-05-15 19:36:55 +0000 | [diff] [blame] | 267 | |
Thangavelu K S | 77c8c0c | 2017-06-07 18:04:21 +0000 | [diff] [blame^] | 268 | @deferred(TESTCASE_TIMEOUT) |
Thangavelu K S | 008f38e | 2017-05-15 19:36:55 +0000 | [diff] [blame] | 269 | def test_subscriber_with_voltha_for_eap_tls_authentication_failure(self): |
| 270 | """ |
| 271 | Test Method: |
| 272 | 0. Make sure that voltha is up and running on CORD-POD setup. |
| 273 | 1. OLT and ONU is detected and validated. |
| 274 | 2. Bring up freeradius server container using CORD TESTER and make sure that ONOS have connectivity to freeradius server. |
| 275 | 3. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber.. |
| 276 | 4. Validate that eap tls without cert auth packet is being exchanged between subscriber, onos and freeradius. |
| 277 | 5. Verify that subscriber authentication is unsuccessful.. |
| 278 | """ |
Thangavelu K S | 77c8c0c | 2017-06-07 18:04:21 +0000 | [diff] [blame^] | 279 | df = defer.Deferred() |
| 280 | def tls_flow_check_with_no_cert_scenario(df): |
| 281 | log_test.info('Enabling ponsim_olt') |
| 282 | ponsim_address = '{}:50060'.format(self.VOLTHA_HOST) |
| 283 | device_id, status = self.voltha.enable_device('ponsim_olt', address = ponsim_address) |
| 284 | assert_not_equal(device_id, None) |
| 285 | voltha = VolthaCtrl(self.VOLTHA_HOST, |
| 286 | rest_port = self.VOLTHA_REST_PORT, |
| 287 | uplink_vlan_map = self.VOLTHA_UPLINK_VLAN_MAP) |
| 288 | time.sleep(10) |
| 289 | switch_map = None |
| 290 | olt_configured = False |
| 291 | switch_map = voltha.config(fake = self.VOLTHA_CONFIG_FAKE) |
| 292 | log_test.info('Installing OLT app') |
| 293 | OnosCtrl.install_app(self.olt_app_file) |
| 294 | time.sleep(5) |
| 295 | log_test.info('Adding subscribers through OLT app') |
| 296 | self.config_olt(switch_map) |
| 297 | olt_configured = True |
| 298 | time.sleep(5) |
| 299 | auth_status = self.tls_flow_check(self.INTF_RX_DEFAULT, cert_info = "no_cert") |
| 300 | try: |
| 301 | assert_equal(auth_status, True) |
| 302 | assert_equal(status, True) |
| 303 | time.sleep(10) |
| 304 | finally: |
| 305 | self.voltha.disable_device(device_id, delete = True) |
| 306 | df.callback(0) |
| 307 | reactor.callLater(0, tls_flow_check_with_no_cert_scenario, df) |
| 308 | return df |
Thangavelu K S | 008f38e | 2017-05-15 19:36:55 +0000 | [diff] [blame] | 309 | |
Thangavelu K S | 77c8c0c | 2017-06-07 18:04:21 +0000 | [diff] [blame^] | 310 | @deferred(TESTCASE_TIMEOUT) |
Thangavelu K S | 008f38e | 2017-05-15 19:36:55 +0000 | [diff] [blame] | 311 | def test_subscriber_with_voltha_for_eap_tls_authentication_using_invalid_cert(self): |
| 312 | """ |
| 313 | Test Method: |
| 314 | 0. Make sure that voltha is up and running on CORD-POD setup. |
| 315 | 1. OLT and ONU is detected and validated. |
| 316 | 2. Bring up freeradius server container using CORD TESTER and make sure that ONOS have connectivity to freeradius server. |
| 317 | 3. Issue tls auth packets and exchange invalid cert from CORD TESTER voltha test module acting as a subscriber.. |
| 318 | 4. Validate that eap tls with invalid cert auth packet is being exchanged between subscriber, onos and freeradius. |
| 319 | 5. Verify that subscriber authentication is unsuccessful.. |
| 320 | """ |
Thangavelu K S | 77c8c0c | 2017-06-07 18:04:21 +0000 | [diff] [blame^] | 321 | df = defer.Deferred() |
| 322 | def tls_flow_check_with_invalid_cert_scenario(df): |
| 323 | log_test.info('Enabling ponsim_olt') |
| 324 | ponsim_address = '{}:50060'.format(self.VOLTHA_HOST) |
| 325 | device_id, status = self.voltha.enable_device('ponsim_olt', address = ponsim_address) |
| 326 | assert_not_equal(device_id, None) |
| 327 | voltha = VolthaCtrl(self.VOLTHA_HOST, |
| 328 | rest_port = self.VOLTHA_REST_PORT, |
| 329 | uplink_vlan_map = self.VOLTHA_UPLINK_VLAN_MAP) |
| 330 | time.sleep(10) |
| 331 | switch_map = None |
| 332 | olt_configured = False |
| 333 | switch_map = voltha.config(fake = self.VOLTHA_CONFIG_FAKE) |
| 334 | log_test.info('Installing OLT app') |
| 335 | OnosCtrl.install_app(self.olt_app_file) |
| 336 | time.sleep(5) |
| 337 | log_test.info('Adding subscribers through OLT app') |
| 338 | self.config_olt(switch_map) |
| 339 | olt_configured = True |
| 340 | time.sleep(5) |
| 341 | auth_status = self.tls_flow_check(self.INTF_RX_DEFAULT, cert_info = "invalid_cert") |
| 342 | try: |
| 343 | assert_equal(auth_status, True) |
| 344 | assert_equal(status, True) |
| 345 | time.sleep(10) |
| 346 | finally: |
| 347 | self.voltha.disable_device(device_id, delete = True) |
| 348 | df.callback(0) |
| 349 | reactor.callLater(0, tls_flow_check_with_invalid_cert_scenario, df) |
| 350 | return df |
Thangavelu K S | 008f38e | 2017-05-15 19:36:55 +0000 | [diff] [blame] | 351 | |
| 352 | def test_subscriber_with_voltha_for_eap_tls_authentication_with_aaa_app_deactivation(self): |
| 353 | """ |
| 354 | Test Method: |
| 355 | 0. Make sure that voltha is up and running on CORD-POD setup. |
| 356 | 1. OLT and ONU is detected and validated. |
| 357 | 2. Bring up freeradius server container using CORD TESTER and make sure that ONOS have connectivity to freeradius server. |
| 358 | 3. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber.. |
| 359 | 4. Validate that eap tls without sending client hello, it's not being exchanged between client, onos and freeradius. |
| 360 | 5. Verify that subscriber authentication is unsuccessful.. |
| 361 | """ |
| 362 | |
| 363 | def test_subscriber_with_voltha_for_eap_tls_authentication_restarting_radius_server(self): |
| 364 | """ |
| 365 | Test Method: |
| 366 | 0. Make sure that voltha is up and running on CORD-POD setup. |
| 367 | 1. OLT and ONU is detected and validated. |
| 368 | 2. Bring up freeradius server container using CORD TESTER and make sure that ONOS have connectivity to freeradius server. |
| 369 | 3. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber.. |
| 370 | 4. Validate that eap tls with restart of radius server and packets are being exchanged between subscriber, onos and freeradius. |
| 371 | 5. Verify that subscriber authentication is unsuccessful.. |
| 372 | """ |
| 373 | |
| 374 | def test_subscriber_with_voltha_for_eap_tls_authentication_with_disabled_olt(self): |
| 375 | """ |
| 376 | Test Method: |
| 377 | 0. Make sure that voltha is up and running on CORD-POD setup. |
| 378 | 1. OLT and ONU is detected and validated. |
| 379 | 2. Bring up freeradius server container using CORD TESTER and make sure that ONOS have connectivity to freeradius server. |
| 380 | 3. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber.. |
| 381 | 5. Validate that eap tls packets are being exchanged between subscriber, onos and freeradius. |
| 382 | 6. Verify that subscriber authenticated successfully. |
| 383 | 7. Disable olt which is seen in voltha and issue tls auth packets from subscriber. |
| 384 | 8. Validate that eap tls packets are not being exchanged between subscriber, onos and freeradius. |
| 385 | 9. Verify that subscriber authentication is unsuccessful.. |
| 386 | """ |
| 387 | |
| 388 | def test_subscriber_with_voltha_for_eap_tls_authentication_disabling_uni_port_in_voltha(self): |
| 389 | """ |
| 390 | Test Method: |
| 391 | 0. Make sure that voltha is up and running on CORD-POD setup. |
| 392 | 1. OLT and ONU is detected and validated. |
| 393 | 2. Bring up freeradius server container using CORD TESTER and make sure that ONOS have connectivity to freeradius server. |
| 394 | 3. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber.. |
| 395 | 5. Validate that eap tls packets are being exchanged between subscriber, onos and freeradius. |
| 396 | 6. Verify that subscriber authenticated successfully. |
| 397 | 7. Disable uni port which is seen in voltha and issue tls auth packets from subscriber. |
| 398 | 8. Validate that eap tls packets are not being exchanged between subscriber, onos and freeradius. |
| 399 | 9. Verify that subscriber authentication is unsuccessful.. |
| 400 | """ |
| 401 | |
| 402 | def test_subscriber_with_voltha_for_eap_tls_authentication_restarting_olt(self): |
| 403 | """ |
| 404 | Test Method: |
| 405 | 0. Make sure that voltha is up and running on CORD-POD setup. |
| 406 | 1. OLT and ONU is detected and validated. |
| 407 | 2. Bring up freeradius server container using CORD TESTER and make sure that ONOS have connectivity to freeradius server. |
| 408 | 3. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber.. |
| 409 | 5. Validate that eap tls packets are being exchanged between subscriber, onos and freeradius. |
| 410 | 6. Verify that subscriber authenticated successfully. |
| 411 | 7. Restart olt which is seen in voltha and issue tls auth packets from subscriber. |
| 412 | 8. Validate that eap tls packets are not being exchanged between subscriber, onos and freeradius. |
| 413 | 9. Verify that subscriber authentication is unsuccessful.. |
| 414 | """ |
| 415 | |
| 416 | def test_subscriber_with_voltha_for_eap_tls_authentication_restarting_onu(self): |
| 417 | """ |
| 418 | Test Method: |
| 419 | 0. Make sure that voltha is up and running on CORD-POD setup. |
| 420 | 1. OLT and ONU is detected and validated. |
| 421 | 2. Bring up freeradius server container using CORD TESTER and make sure that ONOS have connectivity to freeradius server. |
| 422 | 3. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber.. |
| 423 | 5. Validate that eap tls packets are being exchanged between subscriber, onos and freeradius. |
| 424 | 6. Verify that subscriber authenticated successfully. |
| 425 | 7. Restart onu which is seen in voltha and issue tls auth packets from subscriber. |
| 426 | 8. Validate that eap tls packets are not being exchanged between subscriber, onos and freeradius. |
| 427 | 9. Verify that subscriber authentication is unsuccessful.. |
| 428 | """ |
| 429 | |
| 430 | def test_two_subscribers_with_voltha_for_eap_tls_authentication(self): |
| 431 | """ |
| 432 | Test Method: |
| 433 | 0. Make sure that voltha is up and running on CORD-POD setup. |
| 434 | 1. OLT is detected and ONU ports(nni and 2 uni's) are being seen. |
| 435 | 2. Bring up freeradius server container using CORD TESTER and make sure that ONOS have connectivity to freeradius server. |
| 436 | 3. Bring up two Residential subscribers from cord-tester and issue tls auth packets from CORD TESTER voltha test module acting as a subscriber.. |
| 437 | 4. Validate that eap tls valid auth packets are being exchanged between two subscriber, onos and freeradius. |
| 438 | 5. Verify that two subscribers are authenticated successfully. |
| 439 | """ |
| 440 | |
| 441 | def test_two_subscribers_with_voltha_for_eap_tls_authentication_using_same_certificates(self): |
| 442 | """ |
| 443 | Test Method: |
| 444 | 0. Make sure that voltha is up and running on CORD-POD setup. |
| 445 | 1. OLT is detected and ONU ports(nni and 2 uni's) are being seen. |
| 446 | 2. Bring up freeradius server container using CORD TESTER and make sure that ONOS have connectivity to freeradius server. |
| 447 | 3. Bring up two Residential subscribers from cord-tester and issue tls auth packets from CORD TESTER voltha test module acting as a subscriber.. |
| 448 | 4. Validate that two valid certificates are being exchanged between two subscriber, onos and freeradius. |
| 449 | 5. Verify that two subscribers are not authenticated. |
| 450 | """ |
| 451 | |
| 452 | def test_two_subscribers_with_voltha_for_eap_tls_authentication_initiating_invalid_tls_packets_for_one_subscriber(self): |
| 453 | """ |
| 454 | Test Method: |
| 455 | 0. Make sure that voltha is up and running on CORD-POD setup. |
| 456 | 1. OLT is detected and ONU ports(nni and 2 uni's) are being seen. |
| 457 | 2. Bring up freeradius server container using CORD TESTER and make sure that ONOS have connectivity to freeradius server. |
| 458 | 3. Bring up two Residential subscribers from cord-tester and issue tls auth packets from CORD TESTER voltha test module acting as a subscriber.. |
| 459 | 4. Validate that eap tls valid auth packets are being exchanged between valid subscriber, onos and freeradius. |
| 460 | 5. Validate that eap tls valid auth packets are being exchanged between invalid client, onos and freeradius. |
| 461 | 6. Verify that valid subscriber authenticated successfully. |
| 462 | 7. Verify that invalid subscriber are not authenticated successfully. |
| 463 | """ |
| 464 | |
| 465 | def test_two_subscribers_with_voltha_for_eap_tls_authentication_initiating_invalid_cert_for_one_subscriber(self): |
| 466 | """ |
| 467 | Test Method: |
| 468 | 0. Make sure that voltha is up and running on CORD-POD setup. |
| 469 | 1. OLT is detected and ONU ports(nni and 2 uni's) are being seen. |
| 470 | 2. Bring up freeradius server container using CORD TESTER and make sure that ONOS have connectivity to freeradius server. |
| 471 | 3. Bring up two Residential subscribers from cord-tester and issue tls auth packets from CORD TESTER voltha test module acting as a subscriber.. |
| 472 | 4. Validate that eap tls valid auth packets are being exchanged between valid subscriber, onos and freeradius. |
| 473 | 5. Validate that eap tls invalid cert auth packets are being exchanged between invalid subscriber, onos and freeradius. |
| 474 | 6. Verify that valid subscriber authenticated successfully. |
| 475 | 7. Verify that invalid subscriber are not authenticated successfully. |
| 476 | """ |
| 477 | |
| 478 | def test_two_subscribers_with_voltha_for_eap_tls_authentication_with_one_uni_port_disabled(self): |
| 479 | """ |
| 480 | Test Method: |
| 481 | 0. Make sure that voltha is up and running on CORD-POD setup. |
| 482 | 1. OLT and ONU is detected and validated. |
| 483 | 2. Bring up freeradius server container using CORD TESTER and make sure that ONOS have connectivity to freeradius server. |
| 484 | 3. Bring up two Residential subscribers from cord-tester and issue tls auth packets from CORD TESTER voltha test module acting as a subscriber.. |
| 485 | 5. Validate that eap tls packets are being exchanged between two subscriber, onos and freeradius. |
| 486 | 6. Verify that subscriber authenticated successfully. |
| 487 | 7. Disable one of the uni port which is seen in voltha and issue tls auth packets from subscriber. |
| 488 | 8. Validate that eap tls packets are not being exchanged between one subscriber, onos and freeradius. |
| 489 | 9. Verify that subscriber authentication is unsuccessful.. |
| 490 | 10. Verify that other subscriber authenticated successfully. |
| 491 | """ |
| 492 | |
| 493 | def test_subscriber_with_voltha_for_dhcp_request(self): |
| 494 | """ |
| 495 | Test Method: |
| 496 | 0. Make sure that voltha is up and running on CORD-POD setup. |
| 497 | 1. OLT and ONU is detected and validated. |
| 498 | 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber.. |
| 499 | 3. Send dhcp request from residential subscrber to dhcp server which is running as onos app. |
| 500 | 4. Verify that subscriber get ip from dhcp server successfully. |
| 501 | """ |
| 502 | |
| 503 | def test_subscriber_with_voltha_for_dhcp_request_with_invalid_broadcast_source_mac(self): |
| 504 | """ |
| 505 | Test Method: |
| 506 | 0. Make sure that voltha is up and running on CORD-POD setup. |
| 507 | 1. OLT and ONU is detected and validated. |
| 508 | 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber.. |
| 509 | 3. Send dhcp request with invalid source mac broadcast from residential subscrber to dhcp server which is running as onos app. |
| 510 | 4. Verify that subscriber should not get ip from dhcp server. |
| 511 | """ |
| 512 | |
| 513 | def test_subscriber_with_voltha_for_dhcp_request_with_invalid_multicast_source_mac(self): |
| 514 | """ |
| 515 | Test Method: |
| 516 | 0. Make sure that voltha is up and running on CORD-POD setup. |
| 517 | 1. OLT and ONU is detected and validated. |
| 518 | 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber.. |
| 519 | 3. Send dhcp request with invalid source mac multicast from residential subscrber to dhcp server which is running as onos app. |
| 520 | 4. Verify that subscriber should not get ip from dhcp server. |
| 521 | """ |
| 522 | |
| 523 | def test_subscriber_with_voltha_for_dhcp_request_with_invalid_source_mac(self): |
| 524 | """ |
| 525 | Test Method: |
| 526 | 0. Make sure that voltha is up and running on CORD-POD setup. |
| 527 | 1. OLT and ONU is detected and validated. |
| 528 | 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber.. |
| 529 | 3. Send dhcp request with invalid source mac zero from residential subscrber to dhcp server which is running as onos app. |
| 530 | 4. Verify that subscriber should not get ip from dhcp server. |
| 531 | """ |
| 532 | |
| 533 | def test_subscriber_with_voltha_for_dhcp_request_and_release(self): |
| 534 | """ |
| 535 | Test Method: |
| 536 | 0. Make sure that voltha is up and running on CORD-POD setup. |
| 537 | 1. OLT and ONU is detected and validated. |
| 538 | 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber.. |
| 539 | 3. Send dhcp request from residential subscrber to dhcp server which is running as onos app. |
| 540 | 4. Verify that subscriber get ip from dhcp server successfully. |
| 541 | 5. Send dhcp release from residential subscrber to dhcp server which is running as onos app. |
| 542 | 6 Verify that subscriber should not get ip from dhcp server, ping to gateway. |
| 543 | """ |
| 544 | |
A.R Karthick | 57fa937 | 2017-05-24 12:47:03 -0700 | [diff] [blame] | 545 | def test_subscriber_with_voltha_for_dhcp_starvation_positive_scenario(self): |
Thangavelu K S | 057b7d2 | 2017-05-16 22:03:22 +0000 | [diff] [blame] | 546 | """ |
| 547 | Test Method: |
| 548 | 0. Make sure that voltha is up and running on CORD-POD setup. |
| 549 | 1. OLT and ONU is detected and validated. |
| 550 | 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber.. |
| 551 | 3. Send dhcp request from residential subscriber to dhcp server which is running as onos app. |
| 552 | 4. Verify that subscriber get ip from dhcp server successfully. |
| 553 | 5. Repeat step 3 and 4 for 10 times. |
| 554 | 6 Verify that subscriber should get ip from dhcp server. |
| 555 | """ |
| 556 | |
| 557 | def test_subscriber_with_voltha_for_dhcp_starvation_negative_scenario(self): |
| 558 | """ |
| 559 | Test Method: |
| 560 | 0. Make sure that voltha is up and running on CORD-POD setup. |
| 561 | 1. OLT and ONU is detected and validated. |
| 562 | 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber.. |
| 563 | 3. Send dhcp request from residential subscriber without of pool ip to dhcp server which is running as onos app. |
| 564 | 4. Verify that subscriber should not get ip from dhcp server. |
| 565 | 5. Repeat steps 3 and 4 for 10 times. |
| 566 | 6 Verify that subscriber should not get ip from dhcp server. |
| 567 | """ |
| 568 | def test_subscriber_with_voltha_for_dhcp_sending_multiple_discover(self): |
| 569 | """ |
| 570 | Test Method: |
| 571 | 0. Make sure that voltha is 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 subscriber to dhcp server which is running as onos app. |
| 575 | 4. Verify that subscriber get ip from dhcp server successfully. |
| 576 | 5. Repeat step 3 for 50 times. |
| 577 | 6 Verify that subscriber should get same ip which was received from 1st discover from dhcp server. |
| 578 | """ |
| 579 | def test_subscriber_with_voltha_for_dhcp_sending_multiple_request(self): |
| 580 | """ |
| 581 | Test Method: |
| 582 | 0. Make sure that voltha is up and running on CORD-POD setup. |
| 583 | 1. OLT and ONU is detected and validated. |
| 584 | 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber.. |
| 585 | 3. Send dhcp request from residential subscriber to dhcp server which is running as onos app. |
| 586 | 4. Verify that subscriber get ip from dhcp server successfully. |
| 587 | 5. Send DHCP request to dhcp server which is running as onos app. |
| 588 | 6. Repeat step 5 for 50 times. |
| 589 | 7. Verify that subscriber should get same ip which was received from 1st discover from dhcp server. |
| 590 | """ |
| 591 | |
| 592 | def test_subscriber_with_voltha_for_dhcp_requesting_desired_ip_address(self): |
| 593 | """ |
| 594 | Test Method: |
| 595 | 0. Make sure that voltha is 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 with desired ip address from residential subscriber to dhcp server which is running as onos app. |
| 599 | 4. Verify that subscriber get ip which was requested in step 3 from dhcp server successfully. |
| 600 | """ |
| 601 | |
| 602 | def test_subscriber_with_voltha_for_dhcp_requesting_desired_out_pool_ip_address(self): |
| 603 | """ |
| 604 | Test Method: |
| 605 | 0. Make sure that voltha is up and running on CORD-POD setup. |
| 606 | 1. OLT and ONU is detected and validated. |
| 607 | 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber.. |
| 608 | 3. Send dhcp request with desired out of pool ip address from residential subscriber to dhcp server which is running as onos app. |
| 609 | 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. |
| 610 | """ |
| 611 | def test_subscriber_with_voltha_for_dhcp_deactivate_dhcp_app_in_onos(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. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber.. |
| 617 | 3. Send dhcp request from residential subscriber to dhcp server which is running as onos app. |
| 618 | 4. Verify that subscriber get ip from dhcp server successfully. |
| 619 | 5. Deactivate dhcp server app in onos. |
| 620 | 6. Repeat step 3. |
| 621 | 7. Verify that subscriber should not get ip from dhcp server, and ping to gateway. |
| 622 | """ |
| 623 | def test_subscriber_with_voltha_for_dhcp_renew_time(self): |
| 624 | """ |
| 625 | Test Method: |
| 626 | 0. Make sure that voltha is up and running on CORD-POD setup. |
| 627 | 1. OLT and ONU is detected and validated. |
| 628 | 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber.. |
| 629 | 3. Send dhcp request from residential subscriber to dhcp server which is running as onos app. |
| 630 | 4. Verify that subscriber get ip from dhcp server successfully. |
| 631 | 5. Send dhcp renew packet to dhcp server which is running as onos app. |
| 632 | 6. Repeat step 4. |
| 633 | """ |
| 634 | def test_subscriber_with_voltha_for_dhcp_rebind_time(self): |
| 635 | """ |
| 636 | Test Method: |
| 637 | 0. Make sure that voltha is up and running on CORD-POD setup. |
| 638 | 1. OLT and ONU is detected and validated. |
| 639 | 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber.. |
| 640 | 3. Send dhcp request from residential subscriber to dhcp server which is running as onos app. |
| 641 | 4. Verify that subscriber get ip from dhcp server successfully. |
| 642 | 5. Send dhcp rebind packet to dhcp server which is running as onos app. |
| 643 | 6. Repeat step 4. |
| 644 | """ |
| 645 | def test_subscriber_with_voltha_for_dhcp_disable_olt_in_voltha(self): |
| 646 | """ |
| 647 | Test Method: |
| 648 | 0. Make sure that voltha is up and running on CORD-POD setup. |
| 649 | 1. OLT and ONU is detected and validated. |
| 650 | 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber.. |
| 651 | 3. Send dhcp request from residential subscriber to dhcp server which is running as onos app. |
| 652 | 4. Verify that subscriber get ip from dhcp server successfully. |
| 653 | 5. Disable olt devices which is being detected in voltha CLI. |
| 654 | 6. Repeat step 3. |
| 655 | 7. Verify that subscriber should not get ip from dhcp server, and ping to gateway. |
| 656 | """ |
| 657 | def test_subscriber_with_voltha_for_dhcp_disable_enable_olt_in_voltha(self): |
| 658 | """ |
| 659 | Test Method: |
| 660 | 0. Make sure that voltha is up and running on CORD-POD setup. |
| 661 | 1. OLT and ONU is detected and validated. |
| 662 | 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber.. |
| 663 | 3. Send dhcp request from residential subscriber to dhcp server which is running as onos app. |
| 664 | 4. Verify that subscriber get ip from dhcp server successfully. |
| 665 | 5. Disable olt devices which is being detected in voltha CLI. |
| 666 | 6. Repeat step 3. |
| 667 | 7. Verify that subscriber should not get ip from dhcp server, and ping to gateway. |
| 668 | 8. Enable olt devices which is being detected in voltha CLI. |
| 669 | 9. Repeat steps 3 and 4. |
| 670 | """ |
| 671 | def test_subscriber_with_voltha_for_dhcp_disable_onu_port_in_voltha(self): |
| 672 | """ |
| 673 | Test Method: |
| 674 | 0. Make sure that voltha is up and running on CORD-POD setup. |
| 675 | 1. OLT and ONU is detected and validated. |
| 676 | 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber.. |
| 677 | 3. Send dhcp request from residential subscriber to dhcp server which is running as onos app. |
| 678 | 4. Verify that subscriber get ip from dhcp server successfully. |
| 679 | 5. Disable onu port which is being detected in voltha CLI. |
| 680 | 6. Repeat step 3. |
| 681 | 7. Verify that subscriber should not get ip from dhcp server, and ping to gateway. |
| 682 | """ |
| 683 | def test_subscriber_with_voltha_for_dhcp_disable_enable_onu_port_in_voltha(self): |
| 684 | """ |
| 685 | Test Method: |
| 686 | 0. Make sure that voltha is up and running on CORD-POD setup. |
| 687 | 1. OLT and ONU is detected and validated. |
| 688 | 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber.. |
| 689 | 3. Send dhcp request from residential subscriber to dhcp server which is running as onos app. |
| 690 | 4. Verify that subscriber get ip from dhcp server successfully. |
| 691 | 5. Disable onu port which is being detected in voltha CLI. |
| 692 | 6. Repeat step 3. |
| 693 | 7. Verify that subscriber should not get ip from dhcp server, and ping to gateway. |
| 694 | 8. Enable onu port which is being detected in voltha CLI. |
| 695 | 9. Repeat steps 3 and 4. |
| 696 | """ |
| 697 | |
| 698 | def test_two_subscriber_with_voltha_for_dhcp_discover(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 from two residential subscribers to dhcp server which is running as onos app. |
| 705 | 4. Verify that subscribers had got different ips from dhcp server successfully. |
| 706 | """ |
| 707 | |
| 708 | def test_two_subscriber_with_voltha_for_dhcp_multiple_discover(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 from two residential subscribers to dhcp server which is running as onos app. |
| 715 | 4. Verify that subscribers had got ip from dhcp server successfully. |
| 716 | 5. Repeat step 3 and 4 for 10 times for both subscribers. |
| 717 | 6 Verify that subscribers should get same ips which are offered the first time from dhcp server. |
| 718 | """ |
| 719 | def test_two_subscriber_with_voltha_for_dhcp_multiple_discover_for_one_subscriber(self): |
| 720 | """ |
| 721 | Test Method: |
| 722 | 0. Make sure that voltha is up and running on CORD-POD setup. |
| 723 | 1. OLT and ONU is detected and validated. |
| 724 | 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber.. |
| 725 | 3. Send dhcp request from two residential subscribers to dhcp server which is running as onos app. |
| 726 | 4. Verify that subscribers had got ip from dhcp server successfully. |
| 727 | 5. Repeat step 3 and 4 for 10 times for only one subscriber and ping to gateway from other subscriber. |
| 728 | 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 |
| 729 | """ |
| 730 | def test_two_subscriber_with_voltha_for_dhcp_discover_desired_ip_address_for_one_subscriber(self): |
| 731 | """ |
| 732 | Test Method: |
| 733 | 0. Make sure that voltha is up and running on CORD-POD setup. |
| 734 | 1. OLT and ONU is detected and validated. |
| 735 | 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber.. |
| 736 | 3. Send dhcp request from one residential subscriber to dhcp server which is running as onos app. |
| 737 | 3. Send dhcp request with desired ip from other residential subscriber to dhcp server which is running as onos app. |
| 738 | 4. Verify that subscribers had got different ips (one subscriber desired ip and other subscriber random ip) from dhcp server successfully. |
| 739 | """ |
| 740 | def test_two_subscriber_with_voltha_for_dhcp_discover_within_and_wothout_dhcp_pool_ip_addresses(self): |
| 741 | """ |
| 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 with desired wihtin dhcp pool ip from one residential subscriber to dhcp server which is running as onos app. |
| 747 | 3. Send dhcp request with desired without in dhcp pool ip from other residential subscriber to dhcp server which is running as onos app. |
| 748 | 4. Verify that subscribers had got different ips (both subscriber got random ips within dhcp pool) from dhcp server successfully. |
| 749 | """ |
| 750 | def test_two_subscriber_with_voltha_for_dhcp_disable_onu_port_for_one_subscriber(self): |
| 751 | """ |
| 752 | Test Method: |
| 753 | 0. Make sure that voltha is 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 dhcp server which is running as onos app. |
| 757 | 4. Verify that subscribers had got ip from dhcp server successfully. |
| 758 | 5. Disable onu port on which access one subscriber and ping to gateway from other subscriber. |
| 759 | 6. Repeat step 3 and 4 for one subscriber where uni port is down. |
| 760 | 7. Verify that subscriber should not get ip from dhcp server and other subscriber ping to gateway should not failed. |
| 761 | """ |
| 762 | def test_two_subscriber_with_voltha_for_dhcp_disable_enable_onu_port_for_one_subscriber(self): |
| 763 | """ |
| 764 | Test Method: |
| 765 | 0. Make sure that voltha is 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 dhcp server which is running as onos app. |
| 769 | 4. Verify that subscribers had got ip from dhcp server successfully. |
| 770 | 5. Disable onu port on which access one subscriber and ping to gateway from other subscriber. |
| 771 | 6. Repeat step 3 and 4 for one subscriber where uni port is down. |
| 772 | 7. Verify that subscriber should not get ip from dhcp server and other subscriber ping to gateway should not failed. |
| 773 | 8. Enable onu port on which was disable at step 5 and ping to gateway from other subscriber. |
| 774 | 9. Repeat step 3 and 4 for one subscriber where uni port is up now. |
| 775 | 10. Verify that subscriber should get ip from dhcp server and other subscriber ping to gateway should not failed. |
| 776 | """ |
| 777 | def test_two_subscriber_with_voltha_for_dhcp_disable_olt_detected_in_voltha(self): |
| 778 | """ |
| 779 | Test Method: |
| 780 | 0. Make sure that voltha is up and running on CORD-POD setup. |
| 781 | 1. OLT and ONU is detected and validated. |
| 782 | 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber.. |
| 783 | 3. Send dhcp request from two residential subscribers to dhcp server which is running as onos app. |
| 784 | 4. Verify that subscribers had got ip from dhcp server successfully. |
| 785 | 5. Start pinging continuously from one subscriber and repeat steps 3 and 4 for other subscriber. |
| 786 | 6. Disable the olt device which is detected in voltha. |
| 787 | 7. Verify that subscriber should not get ip from dhcp server and other subscriber ping to gateway should failed. |
| 788 | """ |
| 789 | def test_two_subscriber_with_voltha_for_dhcp_disable_enable_olt_detected_in_voltha(self): |
| 790 | """ |
| 791 | Test Method: |
| 792 | 0. Make sure that voltha is up and running on CORD-POD setup. |
| 793 | 1. OLT and ONU is detected and validated. |
| 794 | 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber.. |
| 795 | 3. Send dhcp request from two residential subscribers to dhcp server which is running as onos app. |
| 796 | 4. Verify that subscribers had got ip from dhcp server successfully. |
| 797 | 5. Start pinging continuously from one subscriber and repeat steps 3 and 4 for other subscriber. |
| 798 | 6. Disable the olt device which is detected in voltha. |
| 799 | 7. Verify that subscriber should not get ip from dhcp server and other subscriber ping to gateway should failed. |
| 800 | 8. Enable the olt device which is detected in voltha. |
| 801 | 9. Verify that subscriber should get ip from dhcp server and other subscriber ping to gateway should not failed. |
| 802 | """ |
| 803 | def test_two_subscriber_with_voltha_for_dhcp_pause_olt_detected_in_voltha(self): |
| 804 | """ |
| 805 | Test Method: |
| 806 | 0. Make sure that voltha is up and running on CORD-POD setup. |
| 807 | 1. OLT and ONU is detected and validated. |
| 808 | 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber.. |
| 809 | 3. Send dhcp request from two residential subscribers to dhcp server which is running as onos app. |
| 810 | 4. Verify that subscribers had got ip from dhcp server successfully. |
| 811 | 5. Start pinging continuously from one subscriber and repeat steps 3 and 4 for other subscriber. |
| 812 | 6. Pause the olt device which is detected in voltha. |
| 813 | 7. Verify that subscriber should not get ip from dhcp server and other subscriber ping to gateway should failed. |
| 814 | """ |
| 815 | def test_subscriber_with_voltha_for_dhcpRelay_dhcp_request(self): |
| 816 | """ |
| 817 | Test Method: |
| 818 | 0. Make sure that voltha and external dhcp server are up and running on CORD-POD setup. |
| 819 | 1. OLT and ONU is detected and validated. |
| 820 | 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber.. |
| 821 | 3. Send dhcp request from residential subscrber to external dhcp server. |
| 822 | 4. Verify that subscriber get ip from external dhcp server successfully. |
| 823 | """ |
| 824 | |
| 825 | def test_subscriber_with_voltha_for_dhcpRelay_dhcp_request_with_invalid_broadcast_source_mac(self): |
| 826 | """ |
| 827 | Test Method: |
| 828 | 0. Make sure that voltha and external dhcp server are is 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 with invalid source mac broadcast from residential subscrber to external dhcp server. |
| 832 | 4. Verify that subscriber should not get ip from external dhcp server. |
| 833 | """ |
| 834 | |
| 835 | def test_subscriber_with_voltha_for_dhcpRelay_dhcp_request_with_invalid_multicast_source_mac(self): |
| 836 | """ |
| 837 | Test Method: |
| 838 | 0. Make sure that voltha and external dhcp server are is up and running on CORD-POD setup. |
| 839 | 1. OLT and ONU is detected and validated. |
| 840 | 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber.. |
| 841 | 3. Send dhcp request with invalid source mac multicast from residential subscrber to external dhcp server. |
| 842 | 4. Verify that subscriber should not get ip from external dhcp server. |
| 843 | """ |
| 844 | |
| 845 | def test_subscriber_with_voltha_for_dhcpRelay_dhcp_request_with_invalid_source_mac(self): |
| 846 | """ |
| 847 | Test Method: |
| 848 | 0. Make sure that voltha and external dhcp server are up and running on CORD-POD setup. |
| 849 | 1. OLT and ONU is detected and validated. |
| 850 | 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber.. |
| 851 | 3. Send dhcp request with invalid source mac zero from residential subscrber to external dhcp server. |
| 852 | 4. Verify that subscriber should not get ip from external dhcp server. |
| 853 | """ |
| 854 | |
| 855 | def test_subscriber_with_voltha_for_dhcpRelay_dhcp_request_and_release(self): |
| 856 | """ |
| 857 | Test Method: |
| 858 | 0. Make sure that voltha and external dhcp server are up and running on CORD-POD setup. |
| 859 | 1. OLT and ONU is detected and validated. |
| 860 | 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber.. |
| 861 | 3. Send dhcp request from residential subscrber to external dhcp server. |
| 862 | 4. Verify that subscriber get ip from external dhcp server successfully. |
| 863 | 5. Send dhcp release from residential subscrber to external dhcp server. |
| 864 | 6 Verify that subscriber should not get ip from external dhcp server, ping to gateway. |
| 865 | """ |
| 866 | |
| 867 | def test_subscriber_with_voltha_for_dhcpRelay_starvation(self): |
| 868 | """ |
| 869 | Test Method: |
| 870 | 0. Make sure that voltha and external dhcp server are up and running on CORD-POD setup. |
| 871 | 1. OLT and ONU is detected and validated. |
| 872 | 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber.. |
| 873 | 3. Send dhcp request from residential subscriber to external dhcp server. |
| 874 | 4. Verify that subscriber get ip from external dhcp server. successfully. |
| 875 | 5. Repeat step 3 and 4 for 10 times. |
| 876 | 6 Verify that subscriber should get ip from external dhcp server.. |
| 877 | """ |
| 878 | |
| 879 | def test_subscriber_with_voltha_for_dhcpRelay_starvation_negative_scenario(self): |
| 880 | """ |
| 881 | Test Method: |
| 882 | 0. Make sure that voltha and external dhcp server are up and running on CORD-POD setup. |
| 883 | 1. OLT and ONU is detected and validated. |
| 884 | 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber.. |
| 885 | 3. Send dhcp request from residential subscriber without of pool ip to external dhcp server. |
| 886 | 4. Verify that subscriber should not get ip from external dhcp server.. |
| 887 | 5. Repeat steps 3 and 4 for 10 times. |
| 888 | 6 Verify that subscriber should not get ip from external dhcp server.. |
| 889 | """ |
| 890 | def test_subscriber_with_voltha_for_dhcpRelay_sending_multiple_discover(self): |
| 891 | """ |
| 892 | Test Method: |
| 893 | 0. Make sure that voltha and external dhcp server are up and running on CORD-POD setup. |
| 894 | 1. OLT and ONU is detected and validated. |
| 895 | 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber.. |
| 896 | 3. Send dhcp request from residential subscriber to external dhcp server. |
| 897 | 4. Verify that subscriber get ip from external dhcp server. successfully. |
| 898 | 5. Repeat step 3 for 50 times. |
| 899 | 6 Verify that subscriber should get same ip which was received from 1st discover from external dhcp server.. |
| 900 | """ |
| 901 | def test_subscriber_with_voltha_for_dhcpRelay_sending_multiple_request(self): |
| 902 | """ |
| 903 | Test Method: |
| 904 | 0. Make sure that voltha and external dhcp server are up and running on CORD-POD setup. |
| 905 | 1. OLT and ONU is detected and validated. |
| 906 | 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber.. |
| 907 | 3. Send dhcp request from residential subscriber to external dhcp server. |
| 908 | 4. Verify that subscriber get ip from external dhcp server. successfully. |
| 909 | 5. Send DHCP request to external dhcp server. |
| 910 | 6. Repeat step 5 for 50 times. |
| 911 | 7. Verify that subscriber should get same ip which was received from 1st discover from external dhcp server.. |
| 912 | """ |
| 913 | |
| 914 | def test_subscriber_with_voltha_for_dhcpRelay_requesting_desired_ip_address(self): |
| 915 | """ |
| 916 | Test Method: |
| 917 | 0. Make sure that voltha and external dhcp server are 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 with desired ip address from residential subscriber to external dhcp server. |
| 921 | 4. Verify that subscriber get ip which was requested in step 3 from external dhcp server. successfully. |
| 922 | """ |
| 923 | |
| 924 | def test_subscriber_with_voltha_for_dhcpRelay_requesting_desired_out_of_pool_ip_address(self): |
| 925 | """ |
| 926 | Test Method: |
| 927 | 0. Make sure that voltha and external dhcp server are up and running on CORD-POD setup. |
| 928 | 1. OLT and ONU is detected and validated. |
| 929 | 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber.. |
| 930 | 3. Send dhcp request with desired out of pool ip address from residential subscriber to external dhcp server. |
| 931 | 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. |
| 932 | """ |
| 933 | |
| 934 | def test_subscriber_with_voltha_for_dhcpRelay_deactivating_dhcpRelay_app_in_onos(self): |
| 935 | """ |
| 936 | Test Method: |
| 937 | 0. Make sure that voltha and external dhcp server are up and running on CORD-POD setup. |
| 938 | 1. OLT and ONU is detected and validated. |
| 939 | 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber.. |
| 940 | 3. Send dhcp request from residential subscriber to external dhcp server. |
| 941 | 4. Verify that subscriber get ip from external dhcp server. successfully. |
| 942 | 5. Deactivate dhcp server app in onos. |
| 943 | 6. Repeat step 3. |
| 944 | 7. Verify that subscriber should not get ip from external dhcp server., and ping to gateway. |
| 945 | """ |
| 946 | |
| 947 | def test_subscriber_with_voltha_for_dhcpRelay_renew_time(self): |
| 948 | """ |
| 949 | Test Method: |
| 950 | 0. Make sure that voltha and external dhcp server are up and running on CORD-POD setup. |
| 951 | 1. OLT and ONU is detected and validated. |
| 952 | 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber.. |
| 953 | 3. Send dhcp request from residential subscriber to external dhcp server. |
| 954 | 4. Verify that subscriber get ip from external dhcp server. successfully. |
| 955 | 5. Send dhcp renew packet to external dhcp server. |
| 956 | 6. Repeat step 4. |
| 957 | """ |
| 958 | |
| 959 | def test_subscriber_with_voltha_for_dhcpRelay_rebind_time(self): |
| 960 | """ |
| 961 | Test Method: |
| 962 | 0. Make sure that voltha and external dhcp server are up and running on CORD-POD setup. |
| 963 | 1. OLT and ONU is detected and validated. |
| 964 | 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber.. |
| 965 | 3. Send dhcp request from residential subscriber to external dhcp server. |
| 966 | 4. Verify that subscriber get ip from external dhcp server. successfully. |
| 967 | 5. Send dhcp rebind packet to external dhcp server. |
| 968 | 6. Repeat step 4. |
| 969 | """ |
| 970 | |
| 971 | def test_subscriber_with_voltha_for_dhcpRelay_disable_olt_in_voltha(self): |
| 972 | """ |
| 973 | Test Method: |
| 974 | 0. Make sure that voltha and external dhcp server are up and running on CORD-POD setup. |
| 975 | 1. OLT and ONU is detected and validated. |
| 976 | 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber.. |
| 977 | 3. Send dhcp request from residential subscriber to external dhcp server. |
| 978 | 4. Verify that subscriber get ip from external dhcp server. successfully. |
| 979 | 5. Disable olt devices which is being detected in voltha CLI. |
| 980 | 6. Repeat step 3. |
| 981 | 7. Verify that subscriber should not get ip from external dhcp server., and ping to gateway. |
| 982 | """ |
| 983 | |
| 984 | def test_subscriber_with_voltha_for_dhcpRelay_toggling_olt_in_voltha(self): |
| 985 | """ |
| 986 | Test Method: |
| 987 | 0. Make sure that voltha and external dhcp server are 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 residential subscriber to external dhcp server. |
| 991 | 4. Verify that subscriber get ip from external dhcp server. successfully. |
| 992 | 5. Disable olt devices which is being detected in voltha CLI. |
| 993 | 6. Repeat step 3. |
| 994 | 7. Verify that subscriber should not get ip from external dhcp server., and ping to gateway. |
| 995 | 8. Enable olt devices which is being detected in voltha CLI. |
| 996 | 9. Repeat steps 3 and 4. |
| 997 | """ |
| 998 | |
| 999 | def test_subscriber_with_voltha_for_dhcpRelay_disable_onu_port_in_voltha(self): |
| 1000 | """ |
| 1001 | Test Method: |
| 1002 | 0. Make sure that voltha and external dhcp server are up and running on CORD-POD setup. |
| 1003 | 1. OLT and ONU is detected and validated. |
| 1004 | 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber.. |
| 1005 | 3. Send dhcp request from residential subscriber to external dhcp server. |
| 1006 | 4. Verify that subscriber get ip from external dhcp server. successfully. |
| 1007 | 5. Disable onu port which is being detected in voltha CLI. |
| 1008 | 6. Repeat step 3. |
| 1009 | 7. Verify that subscriber should not get ip from external dhcp server., and ping to gateway. |
| 1010 | """ |
| 1011 | |
| 1012 | def test_subscriber_with_voltha_for_dhcpRelay_disable_enable_onu_port_in_voltha(self): |
| 1013 | """ |
| 1014 | Test Method: |
| 1015 | 0. Make sure that voltha and external dhcp server are up and running on CORD-POD setup. |
| 1016 | 1. OLT and ONU is detected and validated. |
| 1017 | 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber.. |
| 1018 | 3. Send dhcp request from residential subscriber to external dhcp server. |
| 1019 | 4. Verify that subscriber get ip from external dhcp server. successfully. |
| 1020 | 5. Disable onu port which is being detected in voltha CLI. |
| 1021 | 6. Repeat step 3. |
| 1022 | 7. Verify that subscriber should not get ip from external dhcp server., and ping to gateway. |
| 1023 | 8. Enable onu port which is being detected in voltha CLI. |
| 1024 | 9. Repeat steps 3 and 4. |
| 1025 | """ |
| 1026 | |
| 1027 | def test_two_subscriber_with_voltha_for_dhcpRelay_discover(self): |
| 1028 | """ |
| 1029 | Test Method: |
| 1030 | 0. Make sure that voltha and external dhcp server are up and running on CORD-POD setup. |
| 1031 | 1. OLT and ONU is detected and validated. |
| 1032 | 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber.. |
| 1033 | 3. Send dhcp request from two residential subscribers to external dhcp server. |
| 1034 | 4. Verify that subscribers had got different ips from external dhcp server. successfully. |
| 1035 | """ |
| 1036 | |
| 1037 | def test_two_subscriber_with_voltha_for_dhcpRelay_multiple_discover(self): |
| 1038 | """ |
| 1039 | Test Method: |
| 1040 | 0. Make sure that voltha and external dhcp server are up and running on CORD-POD setup. |
| 1041 | 1. OLT and ONU is detected and validated. |
| 1042 | 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber.. |
| 1043 | 3. Send dhcp request from two residential subscribers to external dhcp server. |
| 1044 | 4. Verify that subscribers had got ip from external dhcp server. successfully. |
| 1045 | 5. Repeat step 3 and 4 for 10 times for both subscribers. |
| 1046 | 6 Verify that subscribers should get same ips which are offered the first time from external dhcp server.. |
| 1047 | """ |
| 1048 | |
| 1049 | def test_two_subscriber_with_voltha_for_dhcpRelay_multiple_discover_for_one_subscriber(self): |
| 1050 | """ |
| 1051 | Test Method: |
| 1052 | 0. Make sure that voltha and external dhcp server are up and running on CORD-POD setup. |
| 1053 | 1. OLT and ONU is detected and validated. |
| 1054 | 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber.. |
| 1055 | 3. Send dhcp request from two residential subscribers to external dhcp server. |
| 1056 | 4. Verify that subscribers had got ip from external dhcp server. successfully. |
| 1057 | 5. Repeat step 3 and 4 for 10 times for only one subscriber and ping to gateway from other subscriber. |
| 1058 | 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 |
| 1059 | """ |
| 1060 | |
| 1061 | def test_two_subscriber_with_voltha_for_dhcpRelay_discover_desired_ip_address_for_one_subscriber(self): |
| 1062 | """ |
| 1063 | Test Method: |
| 1064 | 0. Make sure that voltha and external dhcp server are up and running on CORD-POD setup. |
| 1065 | 1. OLT and ONU is detected and validated. |
| 1066 | 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber.. |
| 1067 | 3. Send dhcp request from one residential subscriber to external dhcp server. |
| 1068 | 3. Send dhcp request with desired ip from other residential subscriber to external dhcp server. |
| 1069 | 4. Verify that subscribers had got different ips (one subscriber desired ip and other subscriber random ip) from external dhcp server. successfully. |
| 1070 | """ |
| 1071 | |
| 1072 | def test_two_subscriber_with_voltha_for_dhcpRelay_discover_in_range_and_out_of_range_from_dhcp_pool_ip_addresses(self): |
| 1073 | """ |
| 1074 | Test Method: |
| 1075 | 0. Make sure that voltha and external dhcp server are up and running on CORD-POD setup. |
| 1076 | 1. OLT and ONU is detected and validated. |
| 1077 | 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber.. |
| 1078 | 3. Send dhcp request with desired wihtin dhcp pool ip from one residential subscriber to external dhcp server. |
| 1079 | 3. Send dhcp request with desired without in dhcp pool ip from other residential subscriber to external dhcp server. |
| 1080 | 4. Verify that subscribers had got different ips (both subscriber got random ips within dhcp pool) from external dhcp server. successfully. |
| 1081 | """ |
| 1082 | |
| 1083 | def test_two_subscriber_with_voltha_for_dhcpRelay_disable_onu_port_for_one_subscriber(self): |
| 1084 | """ |
| 1085 | Test Method: |
| 1086 | 0. Make sure that voltha and external dhcp server are up and running on CORD-POD setup. |
| 1087 | 1. OLT and ONU is detected and validated. |
| 1088 | 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber.. |
| 1089 | 3. Send dhcp request from two residential subscribers to external dhcp server. |
| 1090 | 4. Verify that subscribers had got ip from external dhcp server. successfully. |
| 1091 | 5. Disable onu port on which access one subscriber and ping to gateway from other subscriber. |
| 1092 | 6. Repeat step 3 and 4 for one subscriber where uni port is down. |
| 1093 | 7. Verify that subscriber should not get ip from external dhcp server. and other subscriber ping to gateway should not failed. |
| 1094 | """ |
| 1095 | |
| 1096 | def test_two_subscriber_with_voltha_for_dhcpRelay_toggle_onu_port_for_one_subscriber(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 two residential subscribers to external dhcp server. |
| 1103 | 4. Verify that subscribers had got ip from external dhcp server. successfully. |
| 1104 | 5. Disable onu port on which access one subscriber and ping to gateway from other subscriber. |
| 1105 | 6. Repeat step 3 and 4 for one subscriber where uni port is down. |
| 1106 | 7. Verify that subscriber should not get ip from external dhcp server. and other subscriber ping to gateway should not failed. |
| 1107 | 8. Enable onu port on which was disable at step 5 and ping to gateway from other subscriber. |
| 1108 | 9. Repeat step 3 and 4 for one subscriber where uni port is up now. |
| 1109 | 10. Verify that subscriber should get ip from external dhcp server. and other subscriber ping to gateway should not failed. |
| 1110 | """ |
| 1111 | |
| 1112 | def test_two_subscriber_with_voltha_for_dhcpRelay_disable_olt_detected_in_voltha(self): |
| 1113 | """ |
| 1114 | Test Method: |
| 1115 | 0. Make sure that voltha and external dhcp server are up and running on CORD-POD setup. |
| 1116 | 1. OLT and ONU is detected and validated. |
| 1117 | 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber.. |
| 1118 | 3. Send dhcp request from two residential subscribers to external dhcp server. |
| 1119 | 4. Verify that subscribers had got ip from external dhcp server. successfully. |
| 1120 | 5. Start pinging continuously from one subscriber and repeat steps 3 and 4 for other subscriber. |
| 1121 | 6. Disable the olt device which is detected in voltha. |
| 1122 | 7. Verify that subscriber should not get ip from external dhcp server. and other subscriber ping to gateway should failed. |
| 1123 | """ |
| 1124 | |
| 1125 | def test_two_subscriber_with_voltha_for_dhcpRelay_toggle_olt_detected_in_voltha(self): |
| 1126 | """ |
| 1127 | Test Method: |
| 1128 | 0. Make sure that voltha and external dhcp server are up and running on CORD-POD setup. |
| 1129 | 1. OLT and ONU is detected and validated. |
| 1130 | 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber.. |
| 1131 | 3. Send dhcp request from two residential subscribers to external dhcp server. |
| 1132 | 4. Verify that subscribers had got ip from external dhcp server. successfully. |
| 1133 | 5. Start pinging continuously from one subscriber and repeat steps 3 and 4 for other subscriber. |
| 1134 | 6. Disable the olt device which is detected in voltha. |
| 1135 | 7. Verify that subscriber should not get ip from external dhcp server. and other subscriber ping to gateway should failed. |
| 1136 | 8. Enable the olt device which is detected in voltha. |
| 1137 | 9. Verify that subscriber should get ip from external dhcp server. and other subscriber ping to gateway should not failed. |
| 1138 | """ |
| 1139 | |
| 1140 | def test_two_subscriber_with_voltha_for_dhcpRelay_pause_olt_detected_in_voltha(self): |
| 1141 | """ |
| 1142 | Test Method: |
| 1143 | 0. Make sure that voltha and external dhcp server are up and running on CORD-POD setup. |
| 1144 | 1. OLT and ONU is detected and validated. |
| 1145 | 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber.. |
| 1146 | 3. Send dhcp request from two residential subscribers to external dhcp server. |
| 1147 | 4. Verify that subscribers had got ip from external dhcp server. successfully. |
| 1148 | 5. Start pinging continuously from one subscriber and repeat steps 3 and 4 for other subscriber. |
| 1149 | 6. Pause the olt device which is detected in voltha. |
| 1150 | 7. Verify that subscriber should not get ip from external dhcp server. and other subscriber ping to gateway should failed. |
| 1151 | """ |