Tools: added decollector module

This commit is contained in:
Amin Ben Romdhane 2025-10-21 13:53:50 +02:00
parent 3e9faeff2b
commit d45e57afd6
2 changed files with 23 additions and 2 deletions

View file

@ -113,19 +113,22 @@ def build_command(plugin, proto):
service_name = get_option_value(plugin, "service_name")
unified = get_option_value(plugin, "unified_daemon", False)
daemon_name = get_option_value(plugin, "daemon_name", "")
schema_option = get_option_value(plugin, "schema_option", "d") # default stays 'd'
if not service_name:
return None # skip this plugin
# Start with base command
if unified:
base_cmd = f"{daemon_name}"
else:
base_cmd = f"dm-service -m {service_name}"
# Append protocol-specific schema options
if proto == "cwmp":
base_cmd += " -d"
base_cmd += f" -{schema_option}"
elif proto == "usp":
base_cmd += " -dd"
base_cmd += f" -{schema_option}{schema_option}"
return base_cmd

View file

@ -113,6 +113,24 @@
"cp -f /opt/dev/iopsys/wifidmd/bbfdm_service.json /etc/bbfdm/services/wifidmd.json"
]
},
{
"repo": "https://dev.iopsys.eu/multi-ap/decollector.git",
"proto": "git",
"service_name": "decollector",
"unified_daemon": true,
"daemon_name": "/usr/sbin/decollector",
"schema_option": "c",
"compile": [
"./gitlab-ci/install-dependencies.sh",
"rm -f /etc/supervisor/conf.d/iopsys-supervisord.conf",
"make -C src clean",
"make -C src DECOLLECTOR_BUILD_TR181_PLUGIN='y' CFLAGS+='-DEASYMESH_VERSION=6 -DDECOLLECTOR_BUILD_TR181_PLUGIN -DDECOLLECTOR_VENDOR_EXTENSIONS -DSERVICE_NAME=\\\"decollector\\\" -DCUSTOM_PREFIX=\\\"X_IOPSYS_EU_\\\"'"
],
"post_install": [
"cp -f src/decollector /usr/sbin/",
"cp -f /opt/dev/iopsys/decollector/bbfdm_service.json /etc/bbfdm/services/decollector.json"
]
},
{
"repo": "https://dev.iopsys.eu/hal/ethmngr.git",
"proto": "git",