Test-VOLTHA:
Adding multiple test scenarios planned with test methods.
It covers authetication.
Change-Id: Ib1b137c03ab87dcae34941dff41ce6992021ba06
diff --git a/src/test/voltha/volthaTest.py b/src/test/voltha/volthaTest.py
index d7a6892..2578521 100644
--- a/src/test/voltha/volthaTest.py
+++ b/src/test/voltha/volthaTest.py
@@ -22,3 +22,230 @@
log_test.info('Enabling OLT type %s, MAC %s' %(self.OLT_TYPE, self.OLT_MAC))
status = self.voltha.enable_device(self.OLT_TYPE, self.OLT_MAC)
assert_equal(status, True)
+
+ def test_subscriber_with_voltha_for_eap_tls_authentication(self):
+ """
+ Test Method:
+ 0. Make sure that voltha is up and running on CORD-POD setup.
+ 1. OLT and ONU is detected and validated.
+ 2. Bring up freeradius server container using CORD TESTER and make sure that ONOS have connectivity to freeradius server.
+ 3. Issue auth request packets from CORD TESTER voltha test module acting as a subscriber..
+ 4. Validate that eap tls valid auth packets are being exchanged between subscriber, onos and freeradius.
+ 5. Verify that subscriber is authenticated successfully.
+ """
+
+ def test_subscriber_with_voltha_for_eap_tls_authentication_failure(self):
+ """
+ Test Method:
+ 0. Make sure that voltha is up and running on CORD-POD setup.
+ 1. OLT and ONU is detected and validated.
+ 2. Bring up freeradius server container using CORD TESTER and make sure that ONOS have connectivity to freeradius server.
+ 3. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
+ 4. Validate that eap tls without cert auth packet is being exchanged between subscriber, onos and freeradius.
+ 5. Verify that subscriber authentication is unsuccessful..
+ """
+
+ def test_subscriber_with_voltha_for_eap_tls_authentication_using_invalid_cert(self):
+ """
+ Test Method:
+ 0. Make sure that voltha is up and running on CORD-POD setup.
+ 1. OLT and ONU is detected and validated.
+ 2. Bring up freeradius server container using CORD TESTER and make sure that ONOS have connectivity to freeradius server.
+ 3. Issue tls auth packets and exchange invalid cert from CORD TESTER voltha test module acting as a subscriber..
+ 4. Validate that eap tls with invalid cert auth packet is being exchanged between subscriber, onos and freeradius.
+ 5. Verify that subscriber authentication is unsuccessful..
+ """
+
+ def test_subscriber_with_voltha_for_eap_tls_authentication_with_aaa_app_deactivation(self):
+ """
+ Test Method:
+ 0. Make sure that voltha is up and running on CORD-POD setup.
+ 1. OLT and ONU is detected and validated.
+ 2. Bring up freeradius server container using CORD TESTER and make sure that ONOS have connectivity to freeradius server.
+ 3. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
+ 4. Validate that eap tls without sending client hello, it's not being exchanged between client, onos and freeradius.
+ 5. Verify that subscriber authentication is unsuccessful..
+ """
+
+ def test_subscriber_with_voltha_for_eap_tls_authentication_restarting_radius_server(self):
+ """
+ Test Method:
+ 0. Make sure that voltha is up and running on CORD-POD setup.
+ 1. OLT and ONU is detected and validated.
+ 2. Bring up freeradius server container using CORD TESTER and make sure that ONOS have connectivity to freeradius server.
+ 3. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
+ 4. Validate that eap tls with restart of radius server and packets are being exchanged between subscriber, onos and freeradius.
+ 5. Verify that subscriber authentication is unsuccessful..
+ """
+
+ def test_subscriber_with_voltha_for_eap_tls_authentication_with_disabled_olt(self):
+ """
+ Test Method:
+ 0. Make sure that voltha is up and running on CORD-POD setup.
+ 1. OLT and ONU is detected and validated.
+ 2. Bring up freeradius server container using CORD TESTER and make sure that ONOS have connectivity to freeradius server.
+ 3. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
+ 5. Validate that eap tls packets are being exchanged between subscriber, onos and freeradius.
+ 6. Verify that subscriber authenticated successfully.
+ 7. Disable olt which is seen in voltha and issue tls auth packets from subscriber.
+ 8. Validate that eap tls packets are not being exchanged between subscriber, onos and freeradius.
+ 9. Verify that subscriber authentication is unsuccessful..
+ """
+
+ def test_subscriber_with_voltha_for_eap_tls_authentication_disabling_uni_port_in_voltha(self):
+ """
+ Test Method:
+ 0. Make sure that voltha is up and running on CORD-POD setup.
+ 1. OLT and ONU is detected and validated.
+ 2. Bring up freeradius server container using CORD TESTER and make sure that ONOS have connectivity to freeradius server.
+ 3. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
+ 5. Validate that eap tls packets are being exchanged between subscriber, onos and freeradius.
+ 6. Verify that subscriber authenticated successfully.
+ 7. Disable uni port which is seen in voltha and issue tls auth packets from subscriber.
+ 8. Validate that eap tls packets are not being exchanged between subscriber, onos and freeradius.
+ 9. Verify that subscriber authentication is unsuccessful..
+ """
+
+ def test_subscriber_with_voltha_for_eap_tls_authentication_restarting_olt(self):
+ """
+ Test Method:
+ 0. Make sure that voltha is up and running on CORD-POD setup.
+ 1. OLT and ONU is detected and validated.
+ 2. Bring up freeradius server container using CORD TESTER and make sure that ONOS have connectivity to freeradius server.
+ 3. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
+ 5. Validate that eap tls packets are being exchanged between subscriber, onos and freeradius.
+ 6. Verify that subscriber authenticated successfully.
+ 7. Restart olt which is seen in voltha and issue tls auth packets from subscriber.
+ 8. Validate that eap tls packets are not being exchanged between subscriber, onos and freeradius.
+ 9. Verify that subscriber authentication is unsuccessful..
+ """
+
+ def test_subscriber_with_voltha_for_eap_tls_authentication_restarting_onu(self):
+ """
+ Test Method:
+ 0. Make sure that voltha is up and running on CORD-POD setup.
+ 1. OLT and ONU is detected and validated.
+ 2. Bring up freeradius server container using CORD TESTER and make sure that ONOS have connectivity to freeradius server.
+ 3. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
+ 5. Validate that eap tls packets are being exchanged between subscriber, onos and freeradius.
+ 6. Verify that subscriber authenticated successfully.
+ 7. Restart onu which is seen in voltha and issue tls auth packets from subscriber.
+ 8. Validate that eap tls packets are not being exchanged between subscriber, onos and freeradius.
+ 9. Verify that subscriber authentication is unsuccessful..
+ """
+
+ def test_two_subscribers_with_voltha_for_eap_tls_authentication(self):
+ """
+ Test Method:
+ 0. Make sure that voltha is up and running on CORD-POD setup.
+ 1. OLT is detected and ONU ports(nni and 2 uni's) are being seen.
+ 2. Bring up freeradius server container using CORD TESTER and make sure that ONOS have connectivity to freeradius server.
+ 3. Bring up two Residential subscribers from cord-tester and issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
+ 4. Validate that eap tls valid auth packets are being exchanged between two subscriber, onos and freeradius.
+ 5. Verify that two subscribers are authenticated successfully.
+ """
+
+ def test_two_subscribers_with_voltha_for_eap_tls_authentication_using_same_certificates(self):
+ """
+ Test Method:
+ 0. Make sure that voltha is up and running on CORD-POD setup.
+ 1. OLT is detected and ONU ports(nni and 2 uni's) are being seen.
+ 2. Bring up freeradius server container using CORD TESTER and make sure that ONOS have connectivity to freeradius server.
+ 3. Bring up two Residential subscribers from cord-tester and issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
+ 4. Validate that two valid certificates are being exchanged between two subscriber, onos and freeradius.
+ 5. Verify that two subscribers are not authenticated.
+ """
+
+ def test_two_subscribers_with_voltha_for_eap_tls_authentication_initiating_invalid_tls_packets_for_one_subscriber(self):
+ """
+ Test Method:
+ 0. Make sure that voltha is up and running on CORD-POD setup.
+ 1. OLT is detected and ONU ports(nni and 2 uni's) are being seen.
+ 2. Bring up freeradius server container using CORD TESTER and make sure that ONOS have connectivity to freeradius server.
+ 3. Bring up two Residential subscribers from cord-tester and issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
+ 4. Validate that eap tls valid auth packets are being exchanged between valid subscriber, onos and freeradius.
+ 5. Validate that eap tls valid auth packets are being exchanged between invalid client, onos and freeradius.
+ 6. Verify that valid subscriber authenticated successfully.
+ 7. Verify that invalid subscriber are not authenticated successfully.
+ """
+
+ def test_two_subscribers_with_voltha_for_eap_tls_authentication_initiating_invalid_cert_for_one_subscriber(self):
+ """
+ Test Method:
+ 0. Make sure that voltha is up and running on CORD-POD setup.
+ 1. OLT is detected and ONU ports(nni and 2 uni's) are being seen.
+ 2. Bring up freeradius server container using CORD TESTER and make sure that ONOS have connectivity to freeradius server.
+ 3. Bring up two Residential subscribers from cord-tester and issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
+ 4. Validate that eap tls valid auth packets are being exchanged between valid subscriber, onos and freeradius.
+ 5. Validate that eap tls invalid cert auth packets are being exchanged between invalid subscriber, onos and freeradius.
+ 6. Verify that valid subscriber authenticated successfully.
+ 7. Verify that invalid subscriber are not authenticated successfully.
+ """
+
+ def test_two_subscribers_with_voltha_for_eap_tls_authentication_with_one_uni_port_disabled(self):
+ """
+ Test Method:
+ 0. Make sure that voltha is up and running on CORD-POD setup.
+ 1. OLT and ONU is detected and validated.
+ 2. Bring up freeradius server container using CORD TESTER and make sure that ONOS have connectivity to freeradius server.
+ 3. Bring up two Residential subscribers from cord-tester and issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
+ 5. Validate that eap tls packets are being exchanged between two subscriber, onos and freeradius.
+ 6. Verify that subscriber authenticated successfully.
+ 7. Disable one of the uni port which is seen in voltha and issue tls auth packets from subscriber.
+ 8. Validate that eap tls packets are not being exchanged between one subscriber, onos and freeradius.
+ 9. Verify that subscriber authentication is unsuccessful..
+ 10. Verify that other subscriber authenticated successfully.
+ """
+
+ def test_subscriber_with_voltha_for_dhcp_request(self):
+ """
+ Test Method:
+ 0. Make sure that voltha is up and running on CORD-POD setup.
+ 1. OLT and ONU is detected and validated.
+ 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
+ 3. Send dhcp request from residential subscrber to dhcp server which is running as onos app.
+ 4. Verify that subscriber get ip from dhcp server successfully.
+ """
+
+ def test_subscriber_with_voltha_for_dhcp_request_with_invalid_broadcast_source_mac(self):
+ """
+ Test Method:
+ 0. Make sure that voltha is up and running on CORD-POD setup.
+ 1. OLT and ONU is detected and validated.
+ 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
+ 3. Send dhcp request with invalid source mac broadcast from residential subscrber to dhcp server which is running as onos app.
+ 4. Verify that subscriber should not get ip from dhcp server.
+ """
+
+ def test_subscriber_with_voltha_for_dhcp_request_with_invalid_multicast_source_mac(self):
+ """
+ Test Method:
+ 0. Make sure that voltha is up and running on CORD-POD setup.
+ 1. OLT and ONU is detected and validated.
+ 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
+ 3. Send dhcp request with invalid source mac multicast from residential subscrber to dhcp server which is running as onos app.
+ 4. Verify that subscriber should not get ip from dhcp server.
+ """
+
+ def test_subscriber_with_voltha_for_dhcp_request_with_invalid_source_mac(self):
+ """
+ Test Method:
+ 0. Make sure that voltha is up and running on CORD-POD setup.
+ 1. OLT and ONU is detected and validated.
+ 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
+ 3. Send dhcp request with invalid source mac zero from residential subscrber to dhcp server which is running as onos app.
+ 4. Verify that subscriber should not get ip from dhcp server.
+ """
+
+ def test_subscriber_with_voltha_for_dhcp_request_and_release(self):
+ """
+ Test Method:
+ 0. Make sure that voltha is up and running on CORD-POD setup.
+ 1. OLT and ONU is detected and validated.
+ 2. Issue tls auth packets from CORD TESTER voltha test module acting as a subscriber..
+ 3. Send dhcp request from residential subscrber to dhcp server which is running as onos app.
+ 4. Verify that subscriber get ip from dhcp server successfully.
+ 5. Send dhcp release from residential subscrber to dhcp server which is running as onos app.
+ 6 Verify that subscriber should not get ip from dhcp server, ping to gateway.
+ """
+