OpenOLT - hooks for customizing OpenOLT adapter
Change-Id: I88e0ab6bb5f2c14637f1d1462511f56f3d38c732
diff --git a/voltha/adapters/openolt/openolt.py b/voltha/adapters/openolt/openolt.py
index 239cc2a..7ccec65 100644
--- a/voltha/adapters/openolt/openolt.py
+++ b/voltha/adapters/openolt/openolt.py
@@ -29,11 +29,26 @@
from voltha.protos.common_pb2 import OperationResp
from voltha.protos.device_pb2 import DeviceType, DeviceTypes
from voltha.registry import registry
+from voltha.adapters.openolt.openolt_flow_mgr import OpenOltFlowMgr
+from voltha.adapters.openolt.openolt_alarms import OpenOltAlarmMgr
+from voltha.adapters.openolt.openolt_statistics import OpenOltStatisticsMgr
+from voltha.adapters.openolt.openolt_bw import OpenOltBW
+from voltha.adapters.openolt.openolt_platform import OpenOltPlatform
_ = third_party
log = structlog.get_logger()
+OpenOltDefaults = {
+ 'support_classes': {
+ 'platform': OpenOltPlatform,
+ 'flow_mgr': OpenOltFlowMgr,
+ 'alarm_mgr': OpenOltAlarmMgr,
+ 'stats_mgr': OpenOltStatisticsMgr,
+ 'bw_mgr': OpenOltBW
+ }
+}
+
@implementer(IAdapterInterface)
class OpenoltAdapter(object):
name = 'openolt'
@@ -88,7 +103,9 @@
def adopt_device(self, device):
log.info('adopt-device', device=device)
+
kwargs = {
+ 'support_classes': OpenOltDefaults['support_classes'],
'adapter_agent': self.adapter_agent,
'device': device,
'device_num': self.num_devices + 1