VOL-1272 Loading an adapter that is a sub-class of another adapter
Change-Id: Idda9fe2437124074da0bd989bd6dce1271fd96de
diff --git a/voltha/adapters/loader.py b/voltha/adapters/loader.py
index 7c8340b..7535a1f 100644
--- a/voltha/adapters/loader.py
+++ b/voltha/adapters/loader.py
@@ -90,6 +90,9 @@
cls is not OnuAdapter and \
IAdapterInterface.implementedBy(cls):
verifyClass(IAdapterInterface, cls)
+ if cls.__module__.rsplit('.', 1)[0] != package_name:
+ continue
+
yield adapter_name, cls
except Exception, e:
log.exception('failed', e=e)