bbfdm_tools: read the description from json plugin directly

This commit is contained in:
Amin Ben Romdhane 2025-07-08 13:49:29 +02:00
parent 549a296cbf
commit b9b9743cf0
2 changed files with 11 additions and 2 deletions

View file

@ -86,6 +86,7 @@ def get_info_from_json(data, dm_json_files=None):
string=string + "." string=string + "."
if len(string) != 0: if len(string) != 0:
string = string.replace("X_IOWRT_EU_", "{BBF_VENDOR_PREFIX}").replace("X_GENEXIS_EU_", "{BBF_VENDOR_PREFIX}")
list_data.append(string) list_data.append(string)
if len(list_data) == 0: if len(list_data) == 0:
@ -103,6 +104,12 @@ def get_info_from_json(data, dm_json_files=None):
index = -1 index = -1
for key in ob.keys(): for key in ob.keys():
if key == "json_plugin_version":
continue
key = key.replace("X_IOWRT_EU_", "{BBF_VENDOR_PREFIX}").replace("X_GENEXIS_EU_", "{BBF_VENDOR_PREFIX}")
if key in list_data: if key in list_data:
index = list_data.index(key) index = list_data.index(key)
break break

View file

@ -465,6 +465,7 @@
"version": "devel", "version": "devel",
"service_name": "ieee1905", "service_name": "ieee1905",
"unified_daemon": false, "unified_daemon": false,
"dm_info_file": "../iopsys/ieee1905/files/datamodel_description.json",
"compile": [ "compile": [
"make -C tr181 clean", "make -C tr181 clean",
"make -C tr181" "make -C tr181"
@ -598,6 +599,7 @@
"repo": "https://dev.iopsys.eu/feed/iopsys.git", "repo": "https://dev.iopsys.eu/feed/iopsys.git",
"proto": "git", "proto": "git",
"version": "devel", "version": "devel",
"dm_info_file": "netmode/files/datamodel.json",
"service_name": "netmode", "service_name": "netmode",
"unified_daemon": false, "unified_daemon": false,
"post_install": [ "post_install": [
@ -624,7 +626,7 @@
"repo": "https://dev.iopsys.eu/feed/gnx.git", "repo": "https://dev.iopsys.eu/feed/gnx.git",
"proto": "git", "proto": "git",
"version": "devel", "version": "devel",
"dm_info_file": "package/gnx-files-ftth/bbf_plugin/datamodel_description.json", "dm_info_file": "package/gnx-files-ftth/bbf_plugin/link_forwarding.json",
"post_install": [ "post_install": [
"mkdir -p /usr/share/bbfdm/micro_services/ethmngr", "mkdir -p /usr/share/bbfdm/micro_services/ethmngr",
"sed 's/{BBF_VENDOR_PREFIX}/X_GENEXIS_EU_/g' package/gnx-files-ftth/bbf_plugin/link_forwarding.json > /usr/share/bbfdm/micro_services/ethmngr/link_forwarding.json" "sed 's/{BBF_VENDOR_PREFIX}/X_GENEXIS_EU_/g' package/gnx-files-ftth/bbf_plugin/link_forwarding.json > /usr/share/bbfdm/micro_services/ethmngr/link_forwarding.json"
@ -666,7 +668,7 @@
"repo": "https://dev.iopsys.eu/feed/gnx.git", "repo": "https://dev.iopsys.eu/feed/gnx.git",
"proto": "git", "proto": "git",
"version": "devel", "version": "devel",
"dm_info_file": "genexis-packages/easywifi/files/datamodel_description.json", "dm_info_file": "genexis-packages/easywifi/files/wifi_extn.json",
"post_install": [ "post_install": [
"mkdir -p /usr/share/bbfdm/micro_services/wifidmd", "mkdir -p /usr/share/bbfdm/micro_services/wifidmd",
"sed 's/{BBF_VENDOR_PREFIX}/X_GENEXIS_EU_/g' genexis-packages/easywifi/files/wifi_extn.json > /usr/share/bbfdm/micro_services/wifidmd/wifi_extn.json" "sed 's/{BBF_VENDOR_PREFIX}/X_GENEXIS_EU_/g' genexis-packages/easywifi/files/wifi_extn.json > /usr/share/bbfdm/micro_services/wifidmd/wifi_extn.json"