VOL-592 Bug-Fix, Moving update_logical_port method from BroadcomOnuAdapter class to BroadcomOnuHandler class
Change-Id: Id3a137ce071c93a09a9ad6667674937e8c544806
diff --git a/voltha/adapters/broadcom_onu/broadcom_onu.py b/voltha/adapters/broadcom_onu/broadcom_onu.py
index 85b7dc8..d421690 100644
--- a/voltha/adapters/broadcom_onu/broadcom_onu.py
+++ b/voltha/adapters/broadcom_onu/broadcom_onu.py
@@ -74,7 +74,7 @@
self.descriptor = Adapter(
id=self.name,
vendor='Voltha project',
- version='0.42',
+ version='0.43',
config=AdapterConfig(log_level=LogLevel.INFO)
)
self.devices_handlers = dict() # device_id -> BroadcomOnuHandler()
@@ -214,15 +214,6 @@
handler = self.devices_handlers[device.id]
handler.event_messages.put(msg)
- def update_logical_port(self, logical_device_id, port_id, state):
- self.log.info('updating-logical-port', logical_port_id=port_id,
- logical_device_id=logical_device_id, state=state)
- logical_port = self.adapter_agent.get_logical_port(logical_device_id,
- port_id)
- logical_port.ofp_port.state = state
- self.adapter_agent.update_logical_port(logical_device_id,
- logical_port)
-
def create_interface(self, device, data):
log.info('create-interface', device_id=device.id)
if device.id in self.devices_handlers:
@@ -445,6 +436,15 @@
log.info('reconciling-broadcom-onu-device-ends')
+ def update_logical_port(self, logical_device_id, port_id, state):
+ self.log.info('updating-logical-port', logical_port_id=port_id,
+ logical_device_id=logical_device_id, state=state)
+ logical_port = self.adapter_agent.get_logical_port(logical_device_id,
+ port_id)
+ logical_port.ofp_port.state = state
+ self.adapter_agent.update_logical_port(logical_device_id,
+ logical_port)
+
@inlineCallbacks
def delete(self, device):
self.log.info('delete-onu')