diff --git a/devapp/dev_types.py b/devapp/dev_types.py index 8a232a5..7baf5e0 100644 --- a/devapp/dev_types.py +++ b/devapp/dev_types.py @@ -516,7 +516,12 @@ class ZteOnuDevice(OnuDevice): ip = device.parent_dev.ip_address if ip: mac = str(device.mac_addr).encode() - sn = b"ZTEG%s" % b''.join(mac.split(b':')[-4:]).upper() + + # Format serial number from mac address + # because saved mac address was make from serial number + sn = (b'%.2X' % int(x, base=16) for x in mac.split(b':')[-4:]) + sn = b"ZTEG%s" % b''.join(sn) + telnet = extra_data.get('telnet') if telnet is None: raise DeviceConfigurationError('For ZTE configuration needed "telnet" section in extra_data') diff --git a/devapp/templates/devapp/custom_dev_page/olt_ztec320.html b/devapp/templates/devapp/custom_dev_page/olt_ztec320.html index ee910f1..d1e9a02 100644 --- a/devapp/templates/devapp/custom_dev_page/olt_ztec320.html +++ b/devapp/templates/devapp/custom_dev_page/olt_ztec320.html @@ -17,15 +17,9 @@ {% for fiber in dev_manager.get_fibers %}