diff --git a/tests/atests/common/auto_test.py b/tests/atests/common/auto_test.py
index d93e7b5..6e21842 100755
--- a/tests/atests/common/auto_test.py
+++ b/tests/atests/common/auto_test.py
@@ -31,12 +31,20 @@
 import logging
 
 DEFAULT_LOG_DIR = '/tmp/voltha_test_results'
+DEFAULT_ADAPTER = 'ponsim'
 logging.basicConfig(level=logging.INFO)
 
 
 def dir_init(log_dir=DEFAULT_LOG_DIR, voltha_dir=os.environ['VOLTHA_BASE']):
-    logging.info(__file__)
     """
+
+    :param log_dir: default log dir
+    :param voltha_dir: voltha base dir
+    :return: root_dir, voltha_dir, log_dir
+    """
+    logging.info(__file__)
+
+    """   
     Init automated testing environment and return three directories: root dir,
     voltha sources dir and log dir
     """
@@ -58,6 +66,31 @@
     return root_dir, voltha_dir, log_dir
 
 
+def adapter_init(adapter=DEFAULT_ADAPTER):
+    """
+
+    :param adapter: ponsim or bbsim
+    :return: olt_type, onu_type, olt_host_ip, onu_count
+    """
+    if adapter == 'ponsim':
+        olt_type = 'ponsim_olt'
+        onu_type = 'ponsim_onu'
+        olt_host_ip = 'olt.voltha.svc'
+        onu_count = 1
+    elif adapter == 'bbsim':
+        olt_type = 'openolt'
+        onu_type = 'brcm_openomci_onu'
+        olt_host_ip = 'bbsim.voltha.svc'
+        onu_count = 16
+    else:
+        olt_type = None
+        onu_type = None
+        olt_host_ip = None
+        onu_count = 0
+
+    return olt_type, onu_type, olt_host_ip, onu_count
+
+
 #
 # MAIN
 #
@@ -69,20 +102,21 @@
     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)
     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)
     
-    volthaMngr.voltha_initialize(ROOT_DIR, VOLTHA_DIR, LOG_DIR)
+    volthaMngr.voltha_initialize(ROOT_DIR, VOLTHA_DIR, LOG_DIR, args.adapter)
 
-    preprovisioning.run_test('olt.voltha.svc', 50060, 'ponsim_olt', 'ponsim_onu', LOG_DIR)
-    
-    discovery.run_test('olt.voltha.svc', 'ponsim_olt', 'ponsim_onu', LOG_DIR)
+    preprovisioning.run_test(OLT_HOST_IP, 50060, OLT_TYPE, ONU_TYPE, ONU_COUNT, LOG_DIR)
+    time.sleep(60)
+    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(ROOT_DIR, VOLTHA_DIR, LOG_DIR)
+        dhcp.run_test(ROOT_DIR, VOLTHA_DIR, LOG_DIR)
 
-    dhcp.run_test(ROOT_DIR, VOLTHA_DIR, LOG_DIR)
-
-    unicast.run_test(ROOT_DIR, VOLTHA_DIR, LOG_DIR)
-
-    time.sleep(5)
+        unicast.run_test(ONU_TYPE, ONU_COUNT, ROOT_DIR, VOLTHA_DIR, LOG_DIR)
diff --git a/tests/atests/common/build.sh b/tests/atests/common/build.sh
index 23e9adb..6c0b7ed 100755
--- a/tests/atests/common/build.sh
+++ b/tests/atests/common/build.sh
@@ -16,29 +16,28 @@
 SRC_DIR="$( cd -P "$( dirname "${BASH_SOURCE[0]}" )" && pwd)"
 BUILD_DIR="$SRC_DIR/../build"
 
-cd $BUILD_DIR
-
-if [ $# -ne 1 ]
+cd ${BUILD_DIR}
+if [[ $# -ne 2 ]]
   then
-    echo "No arguments supplied"
+    echo "Wrong number of arguments supplied"
     exit 1
 fi
-if [ -z "$1" ]
+if [[ -z "${1}" || -z "${2}" ]]
   then
     echo "Empty argument supplied"
     exit 1
 fi
-if [ $1 == "clear" ]
+if [[ "${1}" == "clear" ]]
   then
     sudo make reset-kubeadm
-elif [ $1 == "start" ]
+elif [[ "${1}" == "start" ]]
   then
     sudo service docker restart
-    sudo make -f Makefile
-elif [ $1 == "stop" ]
+    sudo make -f Makefile ${2}
+elif [[ "${1}" == "stop" ]]
   then
     pods=$( /usr/bin/kubectl get pods --all-namespaces 2>&1 | grep -c -e refused -e resource )
-    if  [ $pods -eq 0 ]
+    if  [[ ${pods} -eq 0 ]]
       then
         sudo make teardown-charts
     fi
diff --git a/tests/atests/common/dhcp.py b/tests/atests/common/dhcp.py
index d52234a..a9acd8e 100644
--- a/tests/atests/common/dhcp.py
+++ b/tests/atests/common/dhcp.py
@@ -70,13 +70,14 @@
 
     def should_now_have_two_dhcp_flows(self):
         testCaseUtils.send_command_to_onos_cli(testCaseUtils.get_dir(self, 'log'),
-                                               'voltha_onos_flows.log', 'flows')
+                                               'voltha_onos_flows.log', 'flows -s')
         statusLines = testCaseUtils.get_fields_from_grep_command(self, 'IP_PROTO:17', 'voltha_onos_flows.log')
         assert statusLines, 'No DHCP Detection flows'
         lines = statusLines.splitlines()
+        assert len(lines) == 2, 'Expected 2 DHCP Detection Flows but result was %s' % len(lines)
         for line in lines:
             self.__fields = testCaseUtils.parse_fields(line, ',')
-            inPortStr = self.__fields[10].strip()
+            inPortStr = self.__fields[5].strip()
             selector, delimiter, inPort = inPortStr.partition('=[')
             assert (inPort == 'IN_PORT:2' or inPort == 'IN_PORT:128'), 'DHCP detection flows not associated with expected ports'
 
diff --git a/tests/atests/common/discovery.py b/tests/atests/common/discovery.py
index 1c5234a..3f0804f 100755
--- a/tests/atests/common/discovery.py
+++ b/tests/atests/common/discovery.py
@@ -38,6 +38,7 @@
         self.__logicalDeviceType = None
         self.__oltType = None
         self.__onuType = None
+        self.__onuCount = None
         self.__fields = []
         self.__logicalDeviceId = None
         self.__oltDeviceId = None
@@ -47,17 +48,21 @@
     def d_set_log_dirs(self, log_dir):
         testCaseUtils.config_dirs(self, log_dir)
 
-    def d_configure(self, logical_device_type, olt_type, onu_type):
+    def d_configure(self, logical_device_type, olt_type, onu_type, onu_count):
         self.__logicalDeviceType = logical_device_type
         self.__oltType = olt_type
         self.__onuType = onu_type
+        self.__onuCount = onu_count
 
     def logical_device(self):
         logging.info('Logical Device Info')
-        statusLines = testCaseUtils.get_fields_from_grep_command(self, self.__logicalDeviceType, 'voltha_devices_after_enable.log')
-        assert statusLines, 'No Logical Devices listed under devices'
+        testCaseUtils.send_command_to_voltha_cli(testCaseUtils.get_dir(self, 'log'),
+                                                 'voltha_logical_devices.log', 'logical_devices')
+        testCaseUtils.print_log_file(self, 'voltha_logical_devices.log')
+        statusLines = testCaseUtils.get_fields_from_grep_command(self, '-i olt', 'voltha_logical_devices.log')
+        assert statusLines, 'No Logical Device listed under logical devices'
         self.__fields = testCaseUtils.parse_fields(statusLines, '|')
-        self.__logicalDeviceId = self.__fields[4].strip()
+        self.__logicalDeviceId = self.__fields[1].strip()
         testCaseUtils.send_command_to_voltha_cli(testCaseUtils.get_dir(self, 'log'),
                                                  'voltha_logical_device.log', 'logical_device ' + self.__logicalDeviceId,
                                                  'voltha_logical_device_ports.log', 'ports', 'voltha_logical_device_flows.log', 'flows')
@@ -69,18 +74,16 @@
 
     def logical_device_ports_should_exist(self):
         statusLines = testCaseUtils.get_fields_from_grep_command(self, self.__oltDeviceId, 'voltha_logical_device_ports.log')
-        assert statusLines, 'No Olt device listed under logical device ports'
+        assert statusLines, 'No Olt ports listed under logical device ports'
         self.__fields = testCaseUtils.parse_fields(statusLines, '|')
         portType = self.__fields[1].strip()
-        assert portType == 'nni', 'Port type for %s does not match expected nni' % self.__oltDeviceId
+        assert portType.count('nni') == 1, 'Port type for %s does not match expected nni' % self.__oltDeviceId
         for onuDeviceId in self.__onuDeviceIds:
             statusLines = testCaseUtils.get_fields_from_grep_command(self, onuDeviceId, 'voltha_logical_device_ports.log')
             assert statusLines, 'No Onu device %s listed under logical device ports' % onuDeviceId
-            lines = statusLines.splitlines()
-            for line in lines:
-                self.__fields = testCaseUtils.parse_fields(line, '|')
-                portType = self.__fields[1].strip()
-                assert portType == 'uni-128', 'Port type for %s does not match expected uni-128' % onuDeviceId
+            self.__fields = testCaseUtils.parse_fields(statusLines, '|')
+            portType = self.__fields[1].strip()
+            assert portType.count('uni') == 1, 'Port type for %s does not match expected uni' % onuDeviceId
 
     def logical_device_should_have_at_least_one_flow(self):
         statusLines = testCaseUtils.get_fields_from_grep_command(self, 'Flows', 'voltha_logical_device_flows.log')
@@ -107,6 +110,7 @@
         statusLines = testCaseUtils.get_fields_from_grep_command(self, self.__onuType, 'voltha_devices_after_enable.log')
         assert statusLines, 'No Onu listed under devices'
         lines = statusLines.splitlines()
+        assert len(lines) == self.__onuCount, 'Onu count mismatch found: %s, should be: %s' % (len(lines), self.__onuCount)
         for line in lines:
             self.__fields = testCaseUtils.parse_fields(line, '|')
             onuDeviceId = self.__fields[1].strip()
@@ -127,7 +131,7 @@
             self.__fields = testCaseUtils.parse_fields(line, '|')
             assert (self.check_states(self.__oltDeviceId) is True), 'States of %s does match expected ' % self.__oltDeviceId
             portType = self.__fields[3].strip()
-            assert (portType == 'ETHERNET_NNI' or portType == 'PON_OLT'),\
+            assert (portType == 'ETHERNET_NNI' or portType == 'PON_OLT' or portType == 'ETHERNET_UNI'),\
                 'Port type for %s does not match expected ETHERNET_NNI or PON_OLT' % self.__oltDeviceId
             if portType == 'PON_OLT':
                 self.__peers = self.__fields[7].strip()
@@ -160,10 +164,12 @@
                     
     def check_states(self, device_id):
         result = True
-        adminState = self.__fields[4].strip()
-        assert adminState == 'ENABLED', 'Admin State of %s not ENABLED' % device_id
-        operatorStatus = self.__fields[5].strip()
-        assert operatorStatus == 'ACTIVE', 'Operator Status of %s not ACTIVE' % device_id
+        stateMatchCount = 0
+        for field in self.__fields:
+            field_no_space = field.strip()
+            if field_no_space == 'ENABLED' or field_no_space == 'ACTIVE':
+                stateMatchCount += 1
+        assert stateMatchCount == 2, 'State of %s is not ENABLED or ACTIVE' % device_id
         return result
 
     def olt_should_have_at_least_one_flow(self):
@@ -185,10 +191,10 @@
                 assert int(plainNumber) > 0, 'Zero number of flows for Onu %s' % onuDeviceId
                       
 
-def run_test(logical_device_type, olt_type, onu_type, log_dir):
+def run_test(logical_device_type, olt_type, onu_type, onu_count, log_dir):
     discovery = Discovery()
     discovery.d_set_log_dirs(log_dir)
-    discovery.d_configure(logical_device_type, olt_type, onu_type)
+    discovery.d_configure(logical_device_type, olt_type, onu_type, onu_count)
     discovery.olt_discovery()
     discovery.onu_discovery()
     discovery.logical_device()
diff --git a/tests/atests/common/preprovisioning.py b/tests/atests/common/preprovisioning.py
index a7f8a7f..fb68634 100755
--- a/tests/atests/common/preprovisioning.py
+++ b/tests/atests/common/preprovisioning.py
@@ -39,23 +39,25 @@
         self.__oltPort = None
         self.__oltType = None
         self.__onuType = None
+        self.__onuCount = None
         self.__fields = []
         self.__oltDeviceId = None
         
     def p_set_log_dirs(self, log_dir):
         testCaseUtils.config_dirs(self, log_dir)
 
-    def p_configure(self, olt_ip_address, olt_port, olt_type, onu_type):
+    def p_configure(self, olt_ip_address, olt_port, olt_type, onu_type, onu_count):
         self.__oltIpAddress = olt_ip_address
         self.__oltPort = olt_port
         self.__oltType = olt_type
         self.__onuType = onu_type
+        self.__onuCount = onu_count
 
     def preprovision_olt(self):
         logging.info('Do PROVISIONING')
         testCaseUtils.send_command_to_voltha_cli(testCaseUtils.get_dir(self, 'log'),
-                                                 'voltha_preprovision_olt.log', 'preprovision_olt -t ponsim_olt -H %s:%s' %
-                                                 (self.__oltIpAddress, self.__oltPort))
+                                                 'voltha_preprovision_olt.log', 'preprovision_olt -t %s -H %s:%s' %
+                                                 (self.__oltType, self.__oltIpAddress, self.__oltPort))
         time.sleep(5)
         
     def status_should_be_success_after_preprovision_command(self):
@@ -84,12 +86,12 @@
            
     def check_states(self, dev_type):
         result = True
-        adminState = self.__fields[7].strip()
-        assert adminState == 'ENABLED', 'Admin State of %s not ENABLED' % dev_type
-        operatorStatus = self.__fields[8].strip()
-        assert operatorStatus == 'ACTIVE', 'Operator Status of %s not ACTIVE' % dev_type
-        connectStatus = self.__fields[9].strip()
-        assert connectStatus == 'REACHABLE', 'Connect Status of %s not REACHABLE' % dev_type
+        stateMatchCount = 0
+        for field in self.__fields:
+            field_no_space = field.strip()
+            if field_no_space == 'ENABLED' or field_no_space == 'ACTIVE' or field_no_space == 'DISCOVERED' or field_no_space == 'REACHABLE':
+                stateMatchCount += 1
+        assert stateMatchCount == 3, 'State of %s is not ENABLED, ACTIVE or DISCOVERED and REACHABLE' % dev_type
         return result
 
     def check_olt_fields_after_enabling(self):
@@ -97,18 +99,17 @@
         assert statusLines, 'No Olt listed under devices'
         self.__fields = testCaseUtils.parse_fields(statusLines, '|')
         assert self.check_states(self.__oltType), 'States of %s does match expected' % self.__oltType
-        hostPort = self.__fields[11].strip()
-        assert hostPort, 'hostPort field is empty'
-        hostPortFields = hostPort.split(":")
-        assert hostPortFields[0] == self.__oltIpAddress or hostPortFields[1] == str(self.__oltPort), \
-            'Olt IP or Port does not match'
-                      
+        for field in self.__fields:
+            if field.strip() == self.__oltIpAddress + ':' + str(self.__oltPort):
+                hostPortCount = True
+        assert hostPortCount, 'hostPort field is empty or Olt IP and/or Port does not match'
+
     def check_onu_fields_after_enabling(self):        
         statusLines = testCaseUtils.get_fields_from_grep_command(self, self.__onuType, 'voltha_devices_after_enable.log')
         assert statusLines, 'No Onu listed under devices'
         lines = statusLines.splitlines()
         lenLines = len(lines)
-        assert lenLines == 1, 'Fixed single onu does not match, ONU Count was %d' % lenLines
+        assert lenLines == self.__onuCount, ' Discovered onu(s) does not match, ONU Count was %d' % lenLines
         for line in lines:
             self.__fields = testCaseUtils.parse_fields(line, '|')
             assert (self.check_states(self.__onuType) is True), 'States of %s does match expected' % self.__onuType
@@ -128,10 +129,10 @@
         testCaseUtils.print_log_file(self, 'voltha_devices_after_enable.log')
 
 
-def run_test(olt_ip_address, olt_port, olt_type, onu_type, log_dir):
+def run_test(olt_ip_address, olt_port, olt_type, onu_type, onu_count, log_dir):
     preprovisioning = Preprovisioning()
     preprovisioning.p_set_log_dirs(log_dir)
-    preprovisioning.p_configure(olt_ip_address, olt_port, olt_type, onu_type)
+    preprovisioning.p_configure(olt_ip_address, olt_port, olt_type, onu_type, onu_count)
     preprovisioning.preprovision_olt()
     preprovisioning.status_should_be_success_after_preprovision_command()
     preprovisioning.query_devices_before_enabling()
diff --git a/tests/atests/common/run_robot.sh b/tests/atests/common/run_robot.sh
index b86a267..84e6bcd 100755
--- a/tests/atests/common/run_robot.sh
+++ b/tests/atests/common/run_robot.sh
@@ -16,7 +16,13 @@
 SRC_DIR="$( cd -P "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
 VOLTHA_DIR="$SRC_DIR/../../.."
 
-echo "Run Robot Framework TEST. Log: $1"
-cd $VOLTHA_DIR
+echo "Run Robot Framework TEST. Log: $1, Adapter: ${2:-ponsim}"
+cd ${VOLTHA_DIR}
 source env.sh
-robot -d $1 -v LOG_DIR:$1/voltha_test_results ./tests/atests/robot/voltha_automated_test_suite.robot
+if [[ "${2:-ponsim}" == "ponsim" ]]
+  then
+    robot -d $1 -v LOG_DIR:$1/voltha_test_results -v ADAPTER:ponsim ./tests/atests/robot/voltha_automated_test_suite.robot
+elif [[ "${2}" == "bbsim" ]]
+    then
+      robot -d $1 -v LOG_DIR:$1/voltha_test_results -v ADAPTER:bbsim -e ponsim ./tests/atests/robot/voltha_automated_test_suite.robot
+fi
\ No newline at end of file
diff --git a/tests/atests/common/unicast.py b/tests/atests/common/unicast.py
index 66db06f..69d3d1a 100644
--- a/tests/atests/common/unicast.py
+++ b/tests/atests/common/unicast.py
@@ -22,7 +22,7 @@
 import testCaseUtils
 import logging
 import subprocess
-import commands
+import json
 
 
 class Unicast(object):
@@ -42,12 +42,20 @@
         self.__rgName = testCaseUtils.discover_rg_pod_name()
         self.__fields = None
         self.__tcpdumpPid = None
+        self.__onuType = None
+        self.__onuCount = None
+        self.__onuSerialNum = []
         self.__sadisCTag = None
         self.__sadisSTag = None
+        self.__datastore = None
 
     def u_set_log_dirs(self, root_dir, voltha_dir, log_dir):
         testCaseUtils.config_dirs(self, log_dir, root_dir, voltha_dir)
 
+    def u_configure(self, onu_type, onu_count):
+        self.__onuType = onu_type
+        self.__onuCount = onu_count
+
     def execute_ping_test(self):
         logging.info('Ping 1.2.3.4 IP Test')
         process_output = open('%s/%s' % (testCaseUtils.get_dir(self, 'log'), self.PING_TEST_FILENAME), 'w')
@@ -144,34 +152,47 @@
             tagCount = line.count('802.1Q')
             assert tagCount == 2, 'Found a non double tagged packet'
 
-    def retrieve_stag_and_ctag_from_sadis_entries(self):
-        logging.info('Retrieving sTag and cTag from Sadis entries')
-        ctagGrepCommand = "grep %s %s/tests/atests/build/sadis_json" % ('cTag', testCaseUtils.get_dir(self, 'voltha'))
-        statusLines = commands.getstatusoutput(ctagGrepCommand)[1]
-        assert statusLines, 'No cTag found in sadis_json'
-        self.__sadisCTag = statusLines.split(':')[1].strip(',')
-        stagGrepCommand = "grep %s %s/tests/atests/build/sadis_json" % ('sTag', testCaseUtils.get_dir(self, 'voltha'))
-        statusLines = commands.getstatusoutput(stagGrepCommand)[1]
-        assert statusLines, 'No sTag found in sadis_json'
-        self.__sadisSTag = statusLines.split(':')[1].strip(',')
+    def retrieve_onu_serial_numbers(self):
+        logging.info('Onu Serial Number Discovery')
+        statusLines = testCaseUtils.get_fields_from_grep_command(self, self.__onuType, 'voltha_devices_after_enable.log')
+        assert statusLines, 'No Onu listed under devices'
+        lines = statusLines.splitlines()
+        assert len(lines) == self.__onuCount, 'Onu count mismatch found: %s, should be: %s' % (len(lines), self.__onuCount)
+        for line in lines:
+            self.__fields = testCaseUtils.parse_fields(line, '|')
+            onuSerialNum = self.__fields[5].strip()
+            self.__onuSerialNum.append(onuSerialNum)
+
+    def retrieve_stag_and_ctag_for_onu(self, onu_serial_num):
+        entries = self.__datastore['org.opencord.sadis']['sadis']['entries']
+        for entry in entries:
+            entry_id = entry['id']
+            if entry_id == onu_serial_num:
+                self.__sadisCTag = entry['cTag']
+                self.__sadisSTag = entry['sTag']
+
+    def read_sadis_entries_from_sadis_json(self):
+        with open('%s/tests/atests/build/sadis_json' % testCaseUtils.get_dir(self, 'voltha'), 'r') as sadis:
+            self.__datastore = json.load(sadis)
 
     def stag_and_ctag_should_match_sadis_file(self, ctag, stag):
-        assert ctag == self.__sadisCTag and stag == self.__sadisSTag, 'cTag and/or sTag do not match value in sadis file\n \
+        assert ctag == str(self.__sadisCTag) and stag == str(self.__sadisSTag), 'cTag and/or sTag do not match value in sadis file\n \
             vlan cTag = %s, sadis cTag = %s : vlan sTag = %s, sadis sTag = %s' % (ctag, self.__sadisCTag, stag, self.__sadisSTag)
 
+    def manage_onu_testing(self):
+        for onuSerial in self.__onuSerialNum:
+            self.retrieve_stag_and_ctag_for_onu(onuSerial)
+            self.execute_ping_test()
+            self.ping_test_should_have_failed()
+            self.should_have_q_in_q_vlan_tagging()
+            self.stag_and_ctag_should_match_sadis_entry()
 
-def run_test(root_dir, voltha_dir, log_dir):
+
+def run_test(onu_type, onu_count, root_dir, voltha_dir, log_dir):
 
     unicast = Unicast()
     unicast.u_set_log_dirs(root_dir, voltha_dir, log_dir)
-    unicast.execute_ping_test()
-    unicast.should_have_q_in_q_vlan_tagging()
-    unicast.retrieve_stag_and_ctag_from_sadis_entries()
-    unicast.stag_and_ctag_should_match_sadis_entry()
-
-
-
-
-
-
-
+    unicast.u_configure(onu_type, onu_count)
+    unicast.read_sadis_entries_from_sadis_json()
+    unicast.retrieve_onu_serial_numbers()
+    unicast.manage_onu_testing()
diff --git a/tests/atests/common/volthaMngr.py b/tests/atests/common/volthaMngr.py
index 20b45bc..1751fa4 100755
--- a/tests/atests/common/volthaMngr.py
+++ b/tests/atests/common/volthaMngr.py
@@ -25,11 +25,15 @@
 import logging
 
 
+
 class VolthaMngr(object):
 
     """
     This class implements voltha startup/shutdown callable helper functions
     """
+
+    DEFAULT_ADAPTER = 'ponsim'
+
     def __init__(self):
         self.dirs = dict()
         self.dirs['root'] = None
@@ -38,25 +42,25 @@
         
     def v_set_log_dirs(self, root_dir, voltha_dir, log_dir):
         testCaseUtils.config_dirs(self, log_dir, root_dir, voltha_dir)
-        
-    def start_all_pods(self):
-        proc1 = subprocess.Popen([testCaseUtils.get_dir(self, 'root') + '/build.sh', 'start'],
+
+    def start_all_pods(self, adapter=DEFAULT_ADAPTER):
+        proc1 = subprocess.Popen([testCaseUtils.get_dir(self, 'root') + '/build.sh', 'start', adapter],
                                  stdout=subprocess.PIPE,
                                  stderr=subprocess.PIPE)
         output = proc1.communicate()[0]
         print(output)
         proc1.stdout.close()
 
-    def stop_all_pods(self):
-        proc1 = subprocess.Popen([testCaseUtils.get_dir(self, 'root') + '/build.sh', 'stop'],
+    def stop_all_pods(self, adapter=DEFAULT_ADAPTER):
+        proc1 = subprocess.Popen([testCaseUtils.get_dir(self, 'root') + '/build.sh', 'stop', adapter],
                                  stdout=subprocess.PIPE,
                                  stderr=subprocess.PIPE)
         output = proc1.communicate()[0]
         print(output)
         proc1.stdout.close()
         
-    def reset_kube_adm(self):
-        proc1 = subprocess.Popen([testCaseUtils.get_dir(self, 'root') + '/build.sh', 'clear'],
+    def reset_kube_adm(self, adapter=DEFAULT_ADAPTER):
+        proc1 = subprocess.Popen([testCaseUtils.get_dir(self, 'root') + '/build.sh', 'clear', adapter],
                                  stdout=subprocess.PIPE,
                                  stderr=subprocess.PIPE)
         output = proc1.communicate()[0]
@@ -123,11 +127,11 @@
     return allRunningPods
 
 
-def voltha_initialize(root_dir, voltha_dir, log_dir):
+def voltha_initialize(root_dir, voltha_dir, log_dir, adapter):
     voltha = VolthaMngr()
     voltha.v_set_log_dirs(root_dir, voltha_dir, log_dir)
-    voltha.stop_all_pods()
-    voltha.reset_kube_adm()
-    voltha.start_all_pods()
+    voltha.stop_all_pods(adapter)
+    voltha.reset_kube_adm(adapter)
+    voltha.start_all_pods(adapter)
     voltha.alter_onos_net_cfg()
     voltha.collect_pod_logs()
