VOL-1665: BBSim Radius Authentication Test Case

BBSim specific Test Case for Radius Authentication
Consists of verifying that all 16 ONUs have authenticated
- Restart Onos AAA application whcih is know to return exception
  upon executing aaa-users command
- Address comments from review

Change-Id: I5f7fb231067f77a1f2e52ecde7328f702b333fd1
diff --git a/tests/atests/common/auto_test.py b/tests/atests/common/auto_test.py
index 5182bdc..4dea0ab 100755
--- a/tests/atests/common/auto_test.py
+++ b/tests/atests/common/auto_test.py
@@ -31,7 +31,7 @@
 import logging
 
 DEFAULT_LOG_DIR = '/tmp/voltha_test_results'
-DEFAULT_ADAPTER = 'ponsim'
+DEFAULT_SIMTYPE = 'ponsim'
 logging.basicConfig(level=logging.INFO)
 
 
@@ -66,18 +66,18 @@
     return root_dir, voltha_dir, log_dir
 
 
-def adapter_init(adapter=DEFAULT_ADAPTER):
+def simtype_init(simtype=DEFAULT_SIMTYPE):
     """
 
-    :param adapter: ponsim or bbsim
+    :param simtype: ponsim or bbsim
     :return: olt_type, onu_type, olt_host_ip, onu_count
     """
-    if adapter == 'ponsim':
+    if simtype == 'ponsim':
         olt_type = 'ponsim_olt'
         onu_type = 'ponsim_onu'
         olt_host_ip = 'olt.voltha.svc'
         onu_count = 1
-    elif adapter == 'bbsim':
+    elif simtype == 'bbsim':
         olt_type = 'openolt'
         onu_type = 'brcm_openomci_onu'
         olt_host_ip = 'bbsim.voltha.svc'
@@ -102,21 +102,22 @@
     parser = argparse.ArgumentParser(description='VOLTHA Automated Testing')
     parser.add_argument('-l', dest='logDir', default=DEFAULT_LOG_DIR,
                         help='log directory (default: %s).' % DEFAULT_LOG_DIR)
-    parser.add_argument('-a', dest='adapter', choices=['ponsim', 'bbsim'], default=DEFAULT_ADAPTER,
-                        help='adapter (default: %s).' % DEFAULT_ADAPTER)
+    parser.add_argument('-a', dest='simtype', choices=['ponsim', 'bbsim'], default=DEFAULT_SIMTYPE,
+                        help='simtype (default: %s).' % DEFAULT_SIMTYPE)
     args = parser.parse_args()
 
     ROOT_DIR, VOLTHA_DIR, LOG_DIR = dir_init(args.logDir)
-    OLT_TYPE, ONU_TYPE, OLT_HOST_IP, ONU_COUNT = adapter_init(args.adapter)
+    OLT_TYPE, ONU_TYPE, OLT_HOST_IP, ONU_COUNT = simtype_init(args.simtype)
     
-    volthaMngr.voltha_initialize(ROOT_DIR, VOLTHA_DIR, LOG_DIR, args.adapter)
+    volthaMngr.voltha_initialize(ROOT_DIR, VOLTHA_DIR, LOG_DIR, args.simtype)
 
     preprovisioning.run_test(OLT_HOST_IP, 50060, OLT_TYPE, ONU_TYPE, ONU_COUNT, LOG_DIR)
 
     discovery.run_test(OLT_HOST_IP, OLT_TYPE, ONU_TYPE, ONU_COUNT, LOG_DIR)
-    if args.adapter == 'ponsim':
-        authentication.run_test(ROOT_DIR, VOLTHA_DIR, LOG_DIR)
 
+    authentication.run_test(ONU_COUNT, ROOT_DIR, VOLTHA_DIR, LOG_DIR, args.simtype)
+
+    if args.simtype == 'ponsim':
         dhcp.run_test(ROOT_DIR, VOLTHA_DIR, LOG_DIR)
 
         unicast.run_test(ONU_TYPE, ONU_COUNT, ROOT_DIR, VOLTHA_DIR, LOG_DIR)