VOL-1172 OpenOLT - Change connect_status of ONU only on up onu_indication
Change-Id: Id3e2b1e6aaf48310a6329efe32e1f69afd410ed6
diff --git a/voltha/adapters/openolt/openolt_device.py b/voltha/adapters/openolt/openolt_device.py
index 1127e83..bb4e629 100644
--- a/voltha/adapters/openolt/openolt_device.py
+++ b/voltha/adapters/openolt/openolt_device.py
@@ -441,9 +441,7 @@
onu_id=onu_indication.onu_id)
return
- if onu_device.connect_status != ConnectStatus.REACHABLE:
- onu_device.connect_status = ConnectStatus.REACHABLE
- self.adapter_agent.update_device(onu_device)
+
if platform.intf_id_from_pon_port_no(onu_device.parent_port_no) \
!= onu_indication.intf_id:
@@ -511,6 +509,10 @@
elif onu_indication.oper_state == 'up':
+ if onu_device.connect_status != ConnectStatus.REACHABLE:
+ onu_device.connect_status = ConnectStatus.REACHABLE
+ self.adapter_agent.update_device(onu_device)
+
if onu_device.oper_status != OperStatus.DISCOVERED:
self.log.debug("ignore onu indication",
intf_id=onu_indication.intf_id,