VOL-1689, VOL-1586: openolt now sets DISCOVERED state for onu
Needed to match what openolt-go does. Also needed to work with:
https://gerrit.opencord.org/#/c/14476/
Depends on commit: https://gerrit.opencord.org/#/c/14474/
Change-Id: I3f3087e636a85bb0fb225939ef11004d53873fe0
diff --git a/python/adapters/openolt/openolt_device.py b/python/adapters/openolt/openolt_device.py
index 997cd12..22ec2eb 100644
--- a/python/adapters/openolt/openolt_device.py
+++ b/python/adapters/openolt/openolt_device.py
@@ -765,7 +765,7 @@
serial_number_str = self.stringify_serial_number(serial_number)
# TODO NEW CORE dont hardcode child device type. find some way of determining by vendor in serial number
- yield self.core_proxy.child_device_detected(
+ onu_device = yield self.core_proxy.child_device_detected(
parent_device_id=self.device_id,
parent_port_no=port_no,
child_device_type='brcm_openomci_onu',
@@ -777,6 +777,12 @@
self.log.debug("onu-added", onu_id=onu_id, port_no=port_no, serial_number=serial_number_str)
+ yield self.core_proxy.device_state_update(onu_device.id, oper_status=OperStatus.DISCOVERED,
+ connect_status=ConnectStatus.REACHABLE)
+
+ self.log.debug("set-onu-discovered", onu_id=onu_id, port_no=port_no, serial_number=serial_number_str,
+ onu_device=onu_device)
+
def get_ofp_device_info(self, device):
self.log.info('get_ofp_device_info', device_id=device.id)
diff --git a/python/adapters/openolt/openolt_platform.py b/python/adapters/openolt/openolt_platform.py
index d39afc7..5193789 100644
--- a/python/adapters/openolt/openolt_platform.py
+++ b/python/adapters/openolt/openolt_platform.py
@@ -78,7 +78,7 @@
class OpenOltPlatform(object):
MAX_PONS_PER_OLT = 16
- MAX_ONUS_PER_PON = 32
+ MAX_ONUS_PER_PON = 64
MAX_UNIS_PER_ONU = 16
def __init__(self, log, resource_mgr):