{
	"json_plugin_version": 1,
	"Device.UCI_TEST_V1.": {
		"type": "object",
		"protocols": [
			"cwmp",
			"usp"
		],
		"access": false,
		"array": false,
		"Password": {
			"type": "string",
			"read": true,
			"write": true,
			"protocols": [
				"cwmp",
				"usp"
			],
			"flags": [
				"Secure"
			],
			"mapping": [
				{
					"type": "uci",
					"uci": {
						"file": "users",
						"section": {
							"name": "user"
						},
						"option": {
							"name": "password_required"
						}
					}
				}
			]
		},
		"OWSDNumberOfEntries": {
			"type": "unsignedInt",
			"read": true,
			"write": false,
			"protocols": [
				"cwmp",
				"usp"
			],			
			"mapping": [
				{
					"type": "uci",
					"uci": {
						"file": "owsd",
						"section": {
							"type": "owsd_listen"
						},
						"option": {
							"name": "@Count"
						}
					}
				}
			]	
		},		
		"Device.UCI_TEST_V1.OWSD.{i}.": {
			"type": "object",
			"protocols": [
				"cwmp",
				"usp"
			],
			"access": true,
			"array": true,
			"mapping": [
				{
					"type": "uci", 
					"uci": {
						"file": "owsd", 
						"section": {
							"type": "owsd_listen"
						}, 
						"dmmapfile": "dmmap_owsd"
					}
				}
			],
			"IPv6": {
				"type": "string",
				"read": true,
				"write": true,
				"protocols": [
					"cwmp",
					"usp"
				],
				"mapping": [
					{
						"data": "@Parent",
						"type": "uci_sec",
						"key": "ipv6"
					}
				]
			},
			"Port": {
				"type": "unsignedInt",
				"read": true,
				"write": true,
				"protocols": [
					"cwmp",
					"usp"
				],
				"range": [
					{
						"min": 0,
						"max": 65535
					}
				],
				"mapping": [
					{
						"type": "uci", 
						"uci": {
							"file": "owsd", 
							"section": {
								"type": "owsd_listen"
							}, 
							"option": {
								"name": "port"
							}
						}
					}
				]
			},
			"Password": {
				"type": "string",
				"read": true,
				"write": true,
				"protocols": [
					"cwmp",
					"usp"
				],
				"flags": [
					"Secure"
				],
				"mapping": [
					{
						"type": "uci", 
						"uci": {
							"file": "owsd", 
							"section": {
								"type": "owsd_listen"
							}, 
							"option": {
								"name": "password"
							}
						}						
					}
				]
			}
		}
	},
	"Device.UBUS_TEST_V1.": {
		"type": "object",
		"protocols": [
			"cwmp",
			"usp"
		],
		"access": false,
		"array": false,
		"Uptime": {
			"type": "string",
			"read": true,
			"write": true,
			"protocols": [
				"cwmp",
				"usp"
			],
			"mapping": [
				{
					"rpc": "get",
					"type": "ubus",
					"ubus": {
						"object": "network.interface",
						"method": "status",
						"args": {
							"interface":"lan"
						},
						"key": "uptime"
					}
				},
				{
					"rpc": "set",
					"type": "ubus",
					"ubus": {
						"object": "network.interface",
						"method": "status",
						"args": {"interface":"@Value"}
					}
				}
			]
		},
		"InterfaceNumberOfEntries": {
			"type": "unsignedInt",
			"read": true,
			"write": false,
			"protocols": [
				"cwmp",
				"usp"
			],			
			"mapping": [
				{
					"type": "ubus",
					"ubus": {
						"object": "ieee1905",
						"method": "info",
						"args": {},
						"key": "interface.@Count"
					}
				}
			]
		},
		"Device.UBUS_TEST_V1.Interface.{i}.": {
			"type": "object",
			"protocols": [
				"cwmp",
				"usp"
			],
			"access": false,
			"array": true,
			"mapping": [
				{
					"type": "ubus",
					"ubus": {
						"object": "ieee1905",
						"method": "info",
						"args": {},
						"key": "interface"
					}
				}
			],
			"MacAddress": {
				"type": "string",
				"read": true,
				"write": false,
				"protocols": [
					"cwmp",
					"usp"
				],
				"mapping": [
					{
						"data": "@Parent",
						"type": "json",
						"key": "macaddress"
					}
				]
			},
			"Ifname": {
				"type": "string",
				"read": true,
				"write": false,
				"protocols": [
					"cwmp",
					"usp"
				],
				"mapping": [
					{
						"type": "ubus", 
						"ubus": {
							"object": "ieee1905",
							"method": "info",
							"args": {},
							"key": "interface[@index].ifname"
						}
					}
				]
			},
			"Media": {
				"type": "string",
				"read": true,
				"write": false,
				"protocols": [
					"cwmp",
					"usp"
				],
				"mapping": [
					{
						"rpc": "get",
						"type": "ubus", 
						"ubus": {
							"object": "ieee1905",
							"method": "info",
							"args": {},
							"key": "interface[@index].media"
						}
					}
				]
			},	
			"Push!": {
				"type": "event",
				"protocols": [
					"usp"
				],
				"Data": {
					"type": "string",
					"read": true,
					"write": true,
					"protocols": [
						"usp"
					]
				},
				"Status": {
					"type": "string",
					"read": true,
					"write": true,
					"protocols": [
						"usp"
					]
				},
				"Value": {
					"type": "string",
					"read": true,
					"write": true,
					"protocols": [
						"usp"
					]
				}
			},
			"Periodic!": {
				"type": "event",
				"protocols": [
					"usp"
				]
			},
			"Status()": {
				"type": "command",
				"async": true,
				"protocols": [
					"usp"
				],
				"input": {
					"Option" : {
						"type" : "string",
						"read" : "true",
						"write" : "true",
						"protocol" : [
							"usp"
						]
					},
					"Value" : {
						"type" : "string",
						"read" : "true",
						"write" : "true",
						"protocol" : [
							"usp"
						]
					}				
				},
				"output": {
					"Result" : {
						"type" : "string",
						"read" : "true",
						"write" : "false",
						"protocol" : [
							"usp"
						]
					},
					"Value" : {
						"type" : "string",
						"read" : "true",
						"write" : "false",
						"protocol" : [
							"usp"
						]
					}
				},
				"mapping": [
					{
						"type" : "ubus",
						"ubus" : {
							"object" : "test",
							"method" : "status"
						}
					}
				]
			}
		}
	}	
}
