ponmngr: Added Device.XPON. json plugin

This commit is contained in:
suvendhu 2022-12-15 18:13:14 +05:30 committed by Rahul Thakur
parent 677c712117
commit 5ed51849bb
2 changed files with 658 additions and 0 deletions

View file

@ -39,6 +39,8 @@ ifneq ($(CONFIG_TARGET_brcmbca),)
else ifneq ($(CONFIG_TARGET_airoha),) else ifneq ($(CONFIG_TARGET_airoha),)
$(CP) ./files/airoha/* $(1)/ $(CP) ./files/airoha/* $(1)/
endif endif
$(INSTALL_DIR) $(1)/etc/bbfdm/json
$(CP) ./files/etc/bbfdm/json/* $(1)/etc/bbfdm/json/
endef endef
$(eval $(call BuildPackage,ponmngr)) $(eval $(call BuildPackage,ponmngr))

View file

@ -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"
}
]
}
}
}
}
}
}