VOL-1493 VOL-1454:
Process omci messages. Properly set device state
using new core_proxy api
Implement and process inter adapter messages.
Handle omci_indications. Also keep track of stacked
up onu discovery indications so we dont repeatedly
add onu. Future data_model changes could
likely encompass this.
Can now successfully mib upload and mib_sync
is success with onu adapter
Change-Id: Ib0f0c2f29f6410736ef8db3bde143206d603a140
diff --git a/python/adapters/openolt/openolt.py b/python/adapters/openolt/openolt.py
index 49e0d16..abc95c1 100644
--- a/python/adapters/openolt/openolt.py
+++ b/python/adapters/openolt/openolt.py
@@ -352,6 +352,20 @@
except Exception as e:
log.error('packet-out:exception', e=e.message)
+ def process_inter_adapter_message(self, msg):
+ log.debug('process-inter-adapter-message', msg=msg)
+ # Unpack the header to know which device needs to handle this message
+ handler = None
+ if msg.header.proxy_device_id:
+ # typical request
+ handler = self.devices[msg.header.proxy_device_id]
+ elif msg.header.to_device_id and \
+ msg.header.to_device_id in self.devices_handlers:
+ # typical response
+ handler = self.devices[msg.header.to_device_id]
+ if handler:
+ reactor.callLater(0, handler.process_inter_adapter_message, msg)
+
def receive_inter_adapter_message(self, msg):
log.info('rx_inter_adapter_msg - Not implemented')
raise NotImplementedError()