[VOL-1034] This commit consists of:
1) Implement PM collections from the ONU
2) Update the Registration method to include for the adapter type
and its supported device types.
Change-Id: Id984468546328b6ebf2ca47578675c69b2b66f01
diff --git a/adapters/kafka/adapter_proxy.py b/adapters/kafka/adapter_proxy.py
index 2d4831a..fad1093 100644
--- a/adapters/kafka/adapter_proxy.py
+++ b/adapters/kafka/adapter_proxy.py
@@ -56,7 +56,7 @@
to_adapter,
to_device_id=None,
proxy_device_id=None,
- message_no=None):
+ message_id=None):
"""
Sends a message directly to an adapter. This is typically used to send
proxied messages from one adapter to another. An initial ACK response
@@ -73,7 +73,7 @@
:param proxy_device_id: The ID of the device which will proxy that
message. If it's None then there is no specific device to proxy the
message. Its interpretation is adapter specific.
- :param message_no: A unique number for this transaction that the
+ :param message_id: A unique number for this transaction that the
adapter may use to correlate a request and an async response.
"""
@@ -91,8 +91,8 @@
h.to_device_id = self._to_string(to_device_id)
h.proxy_device_id = self._to_string(proxy_device_id)
- if message_no:
- h.id = self._to_string(message_no)
+ if message_id:
+ h.id = self._to_string(message_id)
else:
h.id = uuid4().hex
diff --git a/adapters/kafka/core_proxy.py b/adapters/kafka/core_proxy.py
index 36459ed..cc3f081 100644
--- a/adapters/kafka/core_proxy.py
+++ b/adapters/kafka/core_proxy.py
@@ -38,10 +38,12 @@
@ContainerProxy.wrap_request(CoreInstance)
@inlineCallbacks
- def register(self, adapter):
+ def register(self, adapter, deviceTypes):
log.debug("register")
try:
- res = yield self.invoke(rpc="Register", adapter=adapter)
+ res = yield self.invoke(rpc="Register",
+ adapter=adapter,
+ deviceTypes=deviceTypes)
log.info("registration-returned", res=res)
returnValue(res)
except Exception as e: