diff --git a/voltha/adapters/brcm_openomci_onu/brcm_openomci_onu.py b/voltha/adapters/brcm_openomci_onu/brcm_openomci_onu.py
index b7af15e..0f07fa4 100644
--- a/voltha/adapters/brcm_openomci_onu/brcm_openomci_onu.py
+++ b/voltha/adapters/brcm_openomci_onu/brcm_openomci_onu.py
@@ -81,20 +81,25 @@
         #self.broadcom_omci['mib-synchronizer']['tasks']['mib-audit'] = BrcmGetMdsTask
         self.broadcom_omci['omci-capabilities']['tasks']['get-capabilities'] = BrcmCapabilitiesTask
 
-        self._omci_agent = OpenOMCIAgent(self.adapter_agent.core,
-                                         support_classes=self.broadcom_omci)
-
+	# Defer creation of omci agent to a lazy init that allows subclasses to override support classes
 
         # register for adapter messages
         self.adapter_agent.register_for_inter_adapter_messages()
 
+    def custom_me_entities(self):
+        return None
+
     @property
     def omci_agent(self):
+        if not hasattr(self, '_omci_agent') or self._omci_agent is None:
+            log.debug('creating-omci-agent')
+            self._omci_agent = OpenOMCIAgent(self.adapter_agent.core,
+                                             support_classes=self.broadcom_omci)
         return self._omci_agent
 
     def start(self):
         log.debug('starting')
-        self._omci_agent.start()
+        self.omci_agent.start()
         log.info('started')
 
     def stop(self):
diff --git a/voltha/adapters/brcm_openomci_onu/brcm_openomci_onu_handler.py b/voltha/adapters/brcm_openomci_onu/brcm_openomci_onu_handler.py
index fa2a2dc..dcc123e 100644
--- a/voltha/adapters/brcm_openomci_onu/brcm_openomci_onu_handler.py
+++ b/voltha/adapters/brcm_openomci_onu/brcm_openomci_onu_handler.py
@@ -228,7 +228,8 @@
         # Create and start the OpenOMCI ONU Device Entry for this ONU
         self._onu_omci_device = self.omci_agent.add_device(self.device_id,
                                                            self.adapter_agent,
-                                                           support_classes=self.adapter.broadcom_omci)
+                                                           support_classes=self.adapter.broadcom_omci,
+                                                           custom_me_map=self.adapter.custom_me_entities())
         # Port startup
         if self._pon is not None:
             self._pon.enabled = True
diff --git a/voltha/adapters/tellabs_openomci_onu/__init__.py b/voltha/adapters/tellabs_openomci_onu/__init__.py
new file mode 100755
index 0000000..b0fb0b2
--- /dev/null
+++ b/voltha/adapters/tellabs_openomci_onu/__init__.py
@@ -0,0 +1,13 @@
+# Copyright 2017-present Open Networking Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
diff --git a/voltha/adapters/tellabs_openomci_onu/omci/__init__.py b/voltha/adapters/tellabs_openomci_onu/omci/__init__.py
new file mode 100644
index 0000000..b0fb0b2
--- /dev/null
+++ b/voltha/adapters/tellabs_openomci_onu/omci/__init__.py
@@ -0,0 +1,13 @@
+# Copyright 2017-present Open Networking Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
diff --git a/voltha/adapters/tellabs_openomci_onu/omci/omci_entities.py b/voltha/adapters/tellabs_openomci_onu/omci/omci_entities.py
new file mode 100644
index 0000000..6929fa9
--- /dev/null
+++ b/voltha/adapters/tellabs_openomci_onu/omci/omci_entities.py
@@ -0,0 +1,54 @@
+# Copyright 2018-present Tellabs, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+""" Tellabs vendor-specific OMCI Entities"""
+
+import inspect
+import structlog
+import sys
+
+from scapy.fields import ShortField, IntField, ByteField, StrFixedLenField
+from voltha.extensions.omci.omci_entities import EntityClassAttribute, \
+    AttributeAccess, OmciNullPointer, EntityOperations, EntityClass
+
+log = structlog.get_logger()
+
+# abbreviations
+ECA = EntityClassAttribute
+AA = AttributeAccess
+OP = EntityOperations
+
+#################################################################################
+# entity class lookup table from entity_class values
+_onu_entity_classes_name_map = dict(
+    inspect.getmembers(sys.modules[__name__], lambda o:
+    inspect.isclass(o) and issubclass(o, EntityClass) and o is not EntityClass)
+)
+_onu_custom_entity_classes = [c for c in _onu_entity_classes_name_map.itervalues()]
+_onu_custom_entity_id_to_class_map = dict()
+
+
+def onu_custom_me_entities():
+    log.info('onu_custom_me_entities')
+
+    if len(_onu_custom_entity_id_to_class_map) == 0:
+        for entity_class in _onu_custom_entity_classes:
+            log.info('adding-custom-me', class_id=entity_class.class_id)
+            assert entity_class.class_id not in _onu_custom_entity_id_to_class_map, \
+                "Class ID '{}' already exists in the class map".format(entity_class.class_id)
+            _onu_custom_entity_id_to_class_map[entity_class.class_id] = entity_class
+
+    log.info('onu_custom_me_entities', map=_onu_custom_entity_id_to_class_map)
+    return _onu_custom_entity_id_to_class_map
+
diff --git a/voltha/adapters/tellabs_openomci_onu/tellabs_openomci_onu.py b/voltha/adapters/tellabs_openomci_onu/tellabs_openomci_onu.py
new file mode 100755
index 0000000..c1cf775
--- /dev/null
+++ b/voltha/adapters/tellabs_openomci_onu/tellabs_openomci_onu.py
@@ -0,0 +1,83 @@
+#
+# Copyright 2017-present Tellabs, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+"""
+Tellabs OpenOMCI OLT/ONU adapter.
+"""
+
+from twisted.internet import reactor, task
+from zope.interface import implementer
+
+from voltha.adapters.brcm_openomci_onu.brcm_openomci_onu import BrcmOpenomciOnuAdapter
+from voltha.adapters.brcm_openomci_onu.brcm_openomci_onu_handler import BrcmOpenomciOnuHandler
+from voltha.adapters.interface import IAdapterInterface
+from voltha.protos import third_party
+from voltha.protos.adapter_pb2 import Adapter
+from voltha.protos.adapter_pb2 import AdapterConfig
+from voltha.protos.common_pb2 import LogLevel
+from voltha.protos.device_pb2 import DeviceType, DeviceTypes, Port, Image
+from voltha.protos.health_pb2 import HealthStatus
+
+from common.frameio.frameio import hexify
+from voltha.extensions.omci.openomci_agent import OpenOMCIAgent, OpenOmciAgentDefaults
+from voltha.extensions.omci.omci_me import *
+from voltha.extensions.omci.database.mib_db_dict import MibDbVolatileDict
+from voltha.adapters.brcm_openomci_onu.omci.brcm_capabilities_task import BrcmCapabilitiesTask
+from voltha.adapters.brcm_openomci_onu.omci.brcm_get_mds_task import BrcmGetMdsTask
+from voltha.adapters.brcm_openomci_onu.omci.brcm_mib_sync import BrcmMibSynchronizer
+from copy import deepcopy
+
+from omci.omci_entities import onu_custom_me_entities
+
+from voltha.extensions.omci.database.mib_db_ext import MibDbExternal
+
+_ = third_party
+log = structlog.get_logger()
+
+
+@implementer(IAdapterInterface)
+class TellabsOpenomciOnuAdapter(BrcmOpenomciOnuAdapter):
+
+    name = 'tellabs_openomci_onu'
+
+    supported_device_types = [
+        DeviceType(
+            id=name,
+            vendor_ids=['BFWS', 'TSLS', 'IPHO', 'SHGJ'],
+            adapter=name,
+            accepts_bulk_flow_update=True
+        )
+    ]
+
+    def __init__(self, adapter_agent, config):
+        super(TellabsOpenomciOnuAdapter, self).__init__(adapter_agent, config)
+        
+        self.descriptor = Adapter(
+            id=self.name,
+            vendor='Tellabs Inc.',
+            version='0.1',
+            config=AdapterConfig(log_level=LogLevel.INFO)
+        )
+        log.info('tellabs_openomci_onu.__init__', adapter=self.descriptor)
+
+        self.broadcom_omci['mib-synchronizer']['database'] = MibDbExternal
+
+    def device_types(self):
+        return DeviceTypes(items=self.supported_device_types)
+
+    def custom_me_entities(self):
+        return onu_custom_me_entities()
+
