Refactored protobuf framework, added loader
Included changes:
* Initial adapter interface spec
* Adapter loader to auto-load adapters
* Initial adapter NBI
* Better import support in chameleon, allowing more flexible
protobuf structure (by organizing artifacts and service
into separate proto files.
* Refactored voltha.proto to split things into logical proto
modules.
* Some additional cleanup
Change-Id: I75f9883c6992148ea8df430bcdaebf85115fea4a
diff --git a/ofagent/connection_mgr.py b/ofagent/connection_mgr.py
index 0bb2f89..b55d47a 100644
--- a/ofagent/connection_mgr.py
+++ b/ofagent/connection_mgr.py
@@ -23,14 +23,16 @@
from common.utils.consulhelpers import get_endpoint_from_consul
from structlog import get_logger
import grpc
-from ofagent.protos import third_party
+# from ofagent.protos import third_party
from protos import voltha_pb2
from grpc_client import GrpcClient
from agent import Agent
+from google.protobuf.empty_pb2 import Empty
+
log = get_logger()
-_ = third_party
+# _ = third_party
class ConnectionManager(object):
@@ -121,8 +123,7 @@
log.info('Retrieve devices from voltha')
try:
stub = voltha_pb2.VolthaLogicalLayerStub(self.channel)
- devices = stub.ListLogicalDevices(
- voltha_pb2.NullMessage()).items
+ devices = stub.ListLogicalDevices(Empty()).items
for device in devices:
log.info("Devices {} -> {}".format(device.id,
device.datapath_id))