-
Type: Story
-
Status: Resolved (View Workflow)
-
Priority: Medium
-
Resolution: Won't Do
-
Affects Version/s: None
-
Fix Version/s: Future
-
Component/s: pyvoltha, voltha-lib-go
-
Labels:None
-
Story Points:3
-
Epic Link:
If the 'from_topic' available from a received inter-adapter message is passed in the IAdapter 'Process inter adapter message' RPC request, ONU device adapters could 'learn' the OLT device adapter endpoint and no longer would need to have that value provisioned. This would have the benefit that an ONU device adapter could support many OLT vendor and container replicas.
In addition, if the EndpointManager object provided a mechanism to return all endpoints for a given ServiceType (adapter), an OLT adapter could request all endpoints for a ServiceType (adapter) and send its initial ONU Indication event to all endpoints. The existing interadapter receive logic (both python and golang) already filters received messages based on destination device ID so only the replica instance running the would receive the ONU indication (as well as the from_topic for the OLT).
Background and Justification:
Existing python adapters cannot easily use the EndpointManager golang class (or duplicate functionality) and look up the proper endpoint via the 'GetEndpoint()' function due to the complexity of the consistent hash go module used. However, implementing a 'GetAllEndpoints' method is easy as it only needs to make use of the Service class. I have already implemented this in python and use it to autolearn the ONU adapter endpoint (both go and python versions) for the Tibit OLT device adapter.
A side benefit is that if this was implemented on golang based OLT and ONU device adapters, it would break the dependency of having to use the exact same consistent map settings (voltha-lib-go version) as the read-write core.