diff --git a/ponmngr/Makefile b/ponmngr/Makefile index 9e6f96c1d..e51e90b38 100644 --- a/ponmngr/Makefile +++ b/ponmngr/Makefile @@ -39,6 +39,8 @@ ifneq ($(CONFIG_TARGET_brcmbca),) else ifneq ($(CONFIG_TARGET_airoha),) $(CP) ./files/airoha/* $(1)/ endif + $(INSTALL_DIR) $(1)/etc/bbfdm/json + $(CP) ./files/etc/bbfdm/json/* $(1)/etc/bbfdm/json/ endef $(eval $(call BuildPackage,ponmngr)) diff --git a/ponmngr/files/etc/bbfdm/json/xpon.json b/ponmngr/files/etc/bbfdm/json/xpon.json new file mode 100644 index 000000000..fba619df5 --- /dev/null +++ b/ponmngr/files/etc/bbfdm/json/xpon.json @@ -0,0 +1,656 @@ +{ + "json_plugin_version": 1, + "Device.XPON.": { + "type": "object", + "protocols": [ + "usp" + ], + "access": false, + "array": false, + "dependency": "file:/etc/config/xpon", + "ONUNumberOfEntries": { + "type": "unsignedInt", + "read": true, + "write": false, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt", + "mapping": [ + { + "type": "ubus", + "ubus": { + "object": "xpon", + "method": "status", + "args": {}, + "key": "ONU.@Count" + } + } + ] + }, + "Device.XPON.ONU.{i}.": { + "type": "object", + "protocols": [ + "usp" + ], + "access": false, + "array": true, + "mapping": [ + { + "type": "ubus", + "ubus": { + "object": "xpon", + "method": "status", + "args": {}, + "key": "ONU" + } + } + ], + "Enable": { + "type": "boolean", + "read": true, + "write": false, + "protocols": [ + "usp" + ], + "datatype": "boolean", + "mapping": [ + { + "data": "@Parent", + "type": "json", + "key": "Enable" + } + ] + }, + "Version": { + "type": "string", + "read": true, + "write": false, + "protocols": [ + "usp" + ], + "datatype": "string", + "range": [ + { + "max": 14 + } + ], + "mapping": [ + { + "data": "@Parent", + "type": "json", + "key": "Version" + } + ] + }, + "EquipmentID": { + "type": "string", + "read": true, + "write": false, + "protocols": [ + "usp" + ], + "datatype": "string", + "range": [ + { + "max": 20 + } + ], + "mapping": [ + { + "data": "@Parent", + "type": "json", + "key": "EquipmentID" + } + ] + }, + "SoftwareImageNumberOfEntries": { + "type": "unsignedInt", + "read": true, + "write": false, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt", + "mapping": [ + { + "type": "ubus", + "ubus": { + "object": "xpon", + "method": "status", + "args": {}, + "key": "ONU[@index].softwareImage.@Count" + } + } + ] + }, + "EthernetUNINumberOfEntries": { + "type": "unsignedInt", + "read": true, + "write": false, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt", + "mapping": [ + { + "type": "ubus", + "ubus": { + "object": "xpon", + "method": "status", + "args": {}, + "key": "ONU[@index].EthernetUNI.@Count" + } + } + ] + }, + "ANINumberOfEntries": { + "type": "unsignedInt", + "read": true, + "write": false, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt", + "mapping": [ + { + "type": "ubus", + "ubus": { + "object": "xpon", + "method": "status", + "args": {}, + "key": "ONU[@index].ANI.@Count" + } + } + ] + }, + "Device.XPON.ONU.{i}.SoftwareImage.{i}.": { + "type": "object", + "protocols": [ + "usp" + ], + "access": false, + "array": true, + "mapping": [ + { + "type": "ubus", + "ubus": { + "object": "xpon", + "method": "status", + "args": {}, + "key": "ONU[@index].softwareImage" + } + } + ], + "ID": { + "type": "unsignedInt", + "read": true, + "write": false, + "protocols": [ + "usp" + ], + "datatype": "unsignedInt", + "range": [ + { + "min": 0, + "max": 1 + } + ], + "mapping": [ + { + "data": "@Parent", + "type": "json", + "key": "ID" + } + ] + }, + "Version": { + "type": "string", + "read": true, + "write": false, + "protocols": [ + "usp" + ], + "datatype": "string", + "range": [ + { + "max": 14 + } + ], + "mapping": [ + { + "data": "@Parent", + "type": "json", + "key": "Version" + } + ] + }, + "IsCommitted": { + "type": "boolean", + "read": true, + "write": false, + "protocols": [ + "usp" + ], + "datatype": "boolean", + "mapping": [ + { + "data": "@Parent", + "type": "json", + "key": "IsCommitted" + } + ] + }, + "IsActive": { + "type": "boolean", + "read": true, + "write": false, + "protocols": [ + "usp" + ], + "datatype": "boolean", + "mapping": [ + { + "data": "@Parent", + "type": "json", + "key": "IsActive" + } + ] + }, + "IsValid": { + "type": "boolean", + "read": true, + "write": false, + "protocols": [ + "usp" + ], + "datatype": "boolean", + "mapping": [ + { + "data": "@Parent", + "type": "json", + "key": "IsValid" + } + ] + } + }, + "Device.XPON.ONU.{i}.EthernetUNI.{i}.": { + "type": "object", + "protocols": [ + "usp" + ], + "access": false, + "array": true, + "mapping": [ + { + "type": "ubus", + "ubus": { + "object": "xpon", + "method": "status", + "args": {}, + "key": "ONU[@index].EthernetUNI" + } + } + ], + "Enable": { + "type": "boolean", + "read": true, + "write": false, + "protocols": [ + "usp" + ], + "datatype": "boolean", + "mapping": [ + { + "data": "@Parent", + "type": "json", + "key": "Enable" + } + ] + }, + "Status": { + "type": "string", + "read": true, + "write": false, + "protocols": [ + "usp" + ], + "datatype": "string", + "enumerations": [ + "Up", + "Down", + "unknown", + "Dormant", + "NotPresent", + "LowerLayerDown", + "Error" + ], + "mapping": [ + { + "data": "@Parent", + "type": "json", + "key": "Status" + } + ] + }, + "ANIs": { + "type": "string", + "read": true, + "write": false, + "protocols": [ + "usp" + ], + "datatype": "string", + "range": [ + { + "max": 1024 + } + ], + "mapping": [ + { + "data": "@Parent", + "type": "json", + "key": "ANIs" + } + ] + }, + "InterdomainID": { + "type": "string", + "read": true, + "write": false, + "protocols": [ + "usp" + ], + "datatype": "string", + "range": [ + { + "max": 256 + } + ], + "mapping": [ + { + "data": "@Parent", + "type": "json", + "key": "InterDomainID" + } + ] + }, + "InterdomainName": { + "type": "string", + "read": true, + "write": false, + "protocols": [ + "usp" + ], + "datatype": "string", + "range": [ + { + "max": 25 + } + ], + "mapping": [ + { + "data": "@Parent", + "type": "json", + "key": "InterDomainName" + } + ] + }, + "Device.XPON.ONU.{i}.EthernetUNI.{i}.Stats.": { + "type": "object", + "protocols": [ + "usp" + ], + "access": false, + "array": false, + "mapping": [ + { + "data": "@Parent", + "type": "json", + "key": "Stats" + } + ], + "BytesSent": { + "type": "unsignedLong", + "read": true, + "write": false, + "protocols": [ + "usp" + ], + "datatype": "unsignedLong", + "mapping": [ + { + "data": "@Parent", + "type": "json", + "key": "Stats.BytesSent" + } + ] + }, + "BytesReceived": { + "type": "unsignedLong", + "read": true, + "write": false, + "protocols": [ + "usp" + ], + "datatype": "unsignedLong", + "mapping": [ + { + "data": "@Parent", + "type": "json", + "key": "Stats.BytesReceived" + } + ] + }, + "PacketsSent": { + "type": "unsignedLong", + "read": true, + "write": false, + "protocols": [ + "usp" + ], + "datatype": "unsignedLong", + "mapping": [ + { + "data": "@Parent", + "type": "json", + "key": "Stats.PacketsSent" + } + ] + }, + "PacketsReceived": { + "type": "unsignedLong", + "read": true, + "write": false, + "protocols": [ + "usp" + ], + "datatype": "unsignedLong", + "mapping": [ + { + "data": "@Parent", + "type": "json", + "key": "Stats.PacketsReceived" + } + ] + } + } + }, + "Device.XPON.ONU.{i}.ANI.{i}.": { + "type": "object", + "protocols": [ + "usp" + ], + "access": false, + "array": true, + "mapping": [ + { + "type": "ubus", + "ubus": { + "object": "xpon", + "method": "status", + "args": {}, + "key": "ONU[@index].ANI" + } + } + ], + "Enable": { + "type": "boolean", + "read": true, + "write": true, + "protocols": [ + "usp" + ], + "datatype": "boolean", + "mapping": [ + { + "rpc": "get", + "data": "@Parent", + "type": "json", + "key": "Enable" + }, + { + "rpc": "set", + "type": "uci", + "uci": { + "file": "xpon", + "section": { + "name": "ani" + }, + "option": { + "name": "enable" + } + } + } + ] + }, + "Status": { + "type": "string", + "read": true, + "write": false, + "protocols": [ + "usp" + ], + "datatype": "string", + "enumerations": [ + "Up", + "Down", + "Dormant", + "Unknown", + "NotPresent", + "Error" + ], + "mapping": [ + { + "data": "@Parent", + "type": "json", + "key": "Status" + } + ] + }, + "PONMode": { + "type": "string", + "read": true, + "write": false, + "protocols": [ + "usp" + ], + "datatype": "string", + "enumerations": [ + "GPON", + "XG-PON", + "NG-PON2", + "XGS-PON" + ], + "mapping": [ + { + "data": "@Parent", + "type": "json", + "key": "PONMode" + } + ] + }, + "Device.XPON.ONU.{i}.ANI.{i}.Stats.": { + "type": "object", + "protocols": [ + "usp" + ], + "access": false, + "array": false, + "mapping": [ + { + "data": "@Parent", + "type": "json", + "key": "Stats" + } + ], + "BytesSent": { + "type": "unsignedLong", + "read": true, + "write": false, + "protocols": [ + "usp" + ], + "datatype": "unsignedLong", + "mapping": [ + { + "data": "@Parent", + "type": "json", + "key": "Stats.BytesSent" + } + ] + }, + "BytesReceived": { + "type": "unsignedLong", + "read": true, + "write": false, + "protocols": [ + "usp" + ], + "datatype": "unsignedLong", + "mapping": [ + { + "data": "@Parent", + "type": "json", + "key": "Stats.BytesReceived" + } + ] + }, + "PacketsSent": { + "type": "unsignedLong", + "read": true, + "write": false, + "protocols": [ + "usp" + ], + "datatype": "unsignedLong", + "mapping": [ + { + "data": "@Parent", + "type": "json", + "key": "Stats.PacketsSent" + } + ] + }, + "PacketsReceived": { + "type": "unsignedLong", + "read": true, + "write": false, + "protocols": [ + "usp" + ], + "datatype": "unsignedLong", + "mapping": [ + { + "data": "@Parent", + "type": "json", + "key": "Stats.PacketsReceived" + } + ] + } + } + } + } + } +} +