diff --git a/src/test/tls/tlsTest.json b/src/test/tls/tlsTest.json
new file mode 100644
index 0000000..fd88ff0
--- /dev/null
+++ b/src/test/tls/tlsTest.json
@@ -0,0 +1,6 @@
+{
+    "VOLTHA_HOST" : "172.17.0.1",
+    "VOLTHA_REST_PORT" : 8881,
+    "VOLTHA_OLT_TYPE" : "ponsim_olt",
+    "VOLTHA_OLT_MAC" : "00:0c:e2:31:12:00"
+}
diff --git a/src/test/tls/tlsTest.py b/src/test/tls/tlsTest.py
index 295f23e..3fd72f5 100644
--- a/src/test/tls/tlsTest.py
+++ b/src/test/tls/tlsTest.py
@@ -23,6 +23,8 @@
 from OnosCtrl import OnosCtrl
 from CordLogger import CordLogger
 from CordTestUtils import log_test
+from CordTestConfig import setup_module
+from VolthaCtrl import VolthaCtrl, voltha_setup, voltha_teardown
 from scapy.all import *
 from scapy_ssl_tls.ssl_tls import *
 from scapy_ssl_tls.ssl_tls_crypto import *
@@ -33,6 +35,15 @@
     app = 'org.opencord.aaa'
     TLS_TIMEOUT = 20
     TEST_TIMEOUT = 3600
+    VOLTHA_HOST = None
+    VOLTHA_REST_PORT = 8881
+    VOLTHA_ENABLED = bool(int(os.getenv('VOLTHA_ENABLED', 0)))
+    VOLTHA_OLT_TYPE = 'simulated_olt'
+    VOLTHA_OLT_MAC = '00:0c:e2:31:12:00'
+    VOLTHA_UPLINK_VLAN_MAP = { 'of:0000000000000001' : '222' }
+    voltha_device = None
+    voltha_ctrl = None
+    voltha_switch_map = None
     #this is from ca.pem file
     CLIENT_CERT_INVALID = '''-----BEGIN CERTIFICATE-----
 MIIEyTCCA7GgAwIBAgIJAN3OagiHm6AXMA0GCSqGSIb3DQEBCwUAMIGLMQswCQYD
@@ -74,6 +85,25 @@
                              'TLS_DHE_RSA_WITH_AES_256_CBC_SHA256',
                              'TLS_DH_anon_WITH_AES_256_CBC_SHA256']
 
+
+    @classmethod
+    def setUpClass(cls):
+        #activate the device if voltha was enabled
+        if cls.VOLTHA_ENABLED is False or cls.VOLTHA_HOST is None:
+            return
+        ret = voltha_setup(host = cls.VOLTHA_HOST,
+                           rest_port = cls.VOLTHA_REST_PORT,
+                           olt_type = cls.VOLTHA_OLT_TYPE,
+                           olt_mac = cls.VOLTHA_OLT_MAC,
+                           uplink_vlan_map = cls.VOLTHA_UPLINK_VLAN_MAP)
+        if ret is not None:
+            cls.voltha_ctrl, cls.voltha_device, cls.voltha_switch_map = ret[0], ret[1], ret[2]
+
+    @classmethod
+    def tearDownClass(cls):
+        if cls.voltha_ctrl and cls.voltha_device:
+            voltha_teardown(cls.voltha_ctrl, cls.voltha_device, cls.voltha_switch_map)
+
     def setUp(self):
         super(eap_auth_exchange, self).setUp()
         self.onos_ctrl = OnosCtrl(self.app)
diff --git a/src/test/utils/VolthaCtrl.py b/src/test/utils/VolthaCtrl.py
index ccf0c65..955644e 100644
--- a/src/test/utils/VolthaCtrl.py
+++ b/src/test/utils/VolthaCtrl.py
@@ -4,7 +4,7 @@
 import os
 import signal
 from CordTestUtils import log_test as log, getstatusoutput, get_controller
-from CordContainer import Container
+from CordContainer import Container, Onos
 from OnosCtrl import OnosCtrl
 from OltConfig import OltConfig
 
@@ -126,8 +126,9 @@
 class VolthaCtrl(object):
 
     UPLINK_VLAN_MAP = { 'of:0000000000000001' : '222' }
+    REST_PORT = 8881
 
-    def __init__(self, host, rest_port = 8881, uplink_vlan_map = UPLINK_VLAN_MAP):
+    def __init__(self, host, rest_port = REST_PORT, uplink_vlan_map = UPLINK_VLAN_MAP):
         self.host = host
         self.rest_port = rest_port
         self.rest_url = 'http://{}:{}/api/v1'.format(host, rest_port)
@@ -285,3 +286,67 @@
         if device_info['admin_status'] == 'PREPROVISIONED':
            return True
         return False
+
+def get_olt_app():
+    our_path = os.path.dirname(os.path.realpath(__file__))
+    version = Onos.getVersion()
+    major = int(version.split('.')[0])
+    minor = int(version.split('.')[1])
+    olt_app_version = '1.2-SNAPSHOT'
+    if major > 1:
+        olt_app_version = '2.0-SNAPSHOT'
+    elif major == 1:
+        if minor > 10:
+            olt_app_version = '2.0-SNAPSHOT'
+        elif minor <= 8:
+            olt_app_version = '1.1-SNAPSHOT'
+    olt_app_file = os.path.join(our_path, '..', 'apps/olt-app-{}.oar'.format(olt_app_version))
+    return olt_app_file
+
+def voltha_setup(host = '172.17.0.1', rest_port = VolthaCtrl.REST_PORT,
+                 olt_type = 'ponsim', olt_mac = '00:0c:e2:31:12:00',
+                 uplink_vlan_map = VolthaCtrl.UPLINK_VLAN_MAP,
+                 config_fake = False, olt_app = None):
+
+    voltha = VolthaCtrl(host, rest_port = rest_port, uplink_vlan_map = uplink_vlan_map)
+    if olt_type.startswith('ponsim'):
+        ponsim_address = '{}:50060'.format(host)
+        log.info('Enabling ponsim olt')
+        device_id, status = voltha.enable_device(olt_type, address = ponsim_address)
+    else:
+        log.info('Enabling OLT instance for %s with mac %s' %(olt_type, olt_mac))
+        device_id, status = voltha.enable_device(olt_type, olt_mac)
+
+    if device_id is None or status is False:
+        voltha.disable_device(device_id)
+        return None
+
+    switch_map = None
+    olt_installed = False
+    if olt_app is None:
+        olt_app = get_olt_app()
+    try:
+        switch_map = voltha.config(fake = config_fake)
+        if switch_map is None:
+            voltha.disable_device(device_id)
+            return None
+        log.info('Installing OLT app %s' %olt_app)
+        OnosCtrl.install_app(olt_app)
+        olt_installed = True
+        time.sleep(5)
+        return voltha, device_id, switch_map
+    except:
+        voltha.disable_device(device_id)
+        time.sleep(10)
+        if olt_installed is True:
+            log.info('Uninstalling OLT app %s' %olt_app)
+            OnosCtrl.uninstall_app(olt_app)
+
+    return None
+
+def voltha_teardown(voltha_ctrl, device_id, switch_map, olt_app = None):
+    voltha_ctrl.disable_device(device_id)
+    time.sleep(10)
+    if olt_app is None:
+        olt_app = get_olt_app()
+    OnosCtrl.uninstall_app(olt_app)
