Skip to content
Snippets Groups Projects
Commit e4bbd4f3 authored by Vivek Dutta's avatar Vivek Dutta
Browse files

mosquitto: bbf datamodel plugin for mqtt broker

parent 9015fb15
No related branches found
No related tags found
No related merge requests found
......@@ -27,3 +27,10 @@ config MOSQUITTO_PASSWD
default y
help
mosquitto_passwd is a tool for managing password files for mosquitto.
config MOSQUITTO_BROKER_DATAMODEL
bool "Include MQTT.Broker. datamodel plugin"
depends on PACKAGE_mosquitto-ssl
default y
help
Include MQTT Broker TR181 datamodel plugin based on BBFDM
......@@ -183,6 +183,12 @@ ifeq ($(CONFIG_MOSQUITTO_DYNAMIC_SECURITY),y)
$(INSTALL_DIR) $(1)/usr/lib
$(INSTALL_BIN) $(PKG_BUILD_DIR)/plugins/dynamic-security/mosquitto_dynamic_security.so $(1)/usr/lib
endif
ifeq ($(CONFIG_MOSQUITTO_BROKER_DATAMODEL),y)
$(INSTALL_DIR) $(1)/usr/share/bbfdm/plugins
$(INSTALL_BIN) \
files/mqtt_broker_plugin.json \
$(1)/usr/share/bbfdm/plugins/MQTT_Broker.json
endif
endef
define Package/mosquitto-client-nossl/install
......
{
"json_plugin_version": 2,
"Device.MQTT.": {
"type": "object",
"protocols": [
"cwmp",
"usp"
],
"access": false,
"array": false,
"BrokerNumberOfEntries": {
"type": "unsignedInt",
"protocols": [
"cwmp",
"usp"
],
"read": true,
"write": false,
"mapping": [
{
"type": "uci",
"uci": {
"file": "mosquitto",
"section": {
"type": "listener"
},
"option": {
"name": "@Count"
}
}
}
]
},
"Device.MQTT.Broker.{i}.": {
"type": "object",
"protocols": [
"cwmp",
"usp"
],
"access": true,
"array": true,
"mapping": [
{
"type": "uci",
"uci": {
"file": "mosquitto",
"section": {
"type": "listener"
},
"dmmapfile": "dmmap_mosquitto"
}
}
],
"Alias": {
"type": "string",
"protocols": [
"cwmp",
"usp"
],
"read": true,
"write": true,
"mapping": [
{
"data": "@Parent",
"type": "uci_sec",
"key": "alias"
}
]
},
"Enable": {
"type": "boolean",
"read": true,
"write": true,
"protocols": [
"cwmp",
"usp"
],
"default": "1",
"mapping": [
{
"data": "@Parent",
"type": "uci_sec",
"key": "enabled"
}
]
},
"Name": {
"type": "string",
"read": true,
"write": false,
"protocols": [
"cwmp",
"usp"
],
"mapping": [
{
"type": "uci",
"uci": {
"file": "mosquitto",
"section": {
"type": "listener"
},
"option": {
"name": "@Name"
}
}
}
]
},
"Port": {
"type": "unsignedInt",
"read": true,
"write": true,
"protocols": [
"cwmp",
"usp"
],
"mapping": [
{
"data": "@Parent",
"type": "uci_sec",
"key": "port"
}
]
},
"Interface": {
"type": "string",
"read": true,
"write": true,
"protocols": [
"cwmp",
"usp"
],
"flags": [
"Reference"
],
"mapping": [
{
"data": "@Parent",
"type": "uci_sec",
"key": "interface",
"linker_obj": "Device.IP.Interface.*.Name"
}
]
},
"Username": {
"type": "string",
"read": true,
"write": true,
"protocols": [
"cwmp",
"usp"
],
"mapping": [
{
"data": "@Parent",
"type": "uci_sec",
"key": "username"
}
]
},
"Password": {
"type": "string",
"read": true,
"write": true,
"protocols": [
"cwmp",
"usp"
],
"flags": [
"Secure"
],
"mapping": [
{
"data": "@Parent",
"type": "uci_sec",
"key": "password"
}
]
}
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment