mirror of
https://dev.iopsys.eu/bbf/bbfdm.git
synced 2025-12-10 07:44:39 +01:00
Fix tools
This commit is contained in:
parent
64c02cebbb
commit
f12e97522c
6 changed files with 40 additions and 55 deletions
|
|
@ -35,28 +35,28 @@ run_unit_test:
|
|||
paths:
|
||||
- unit-test-coverage.xml
|
||||
|
||||
#run_tools_test:
|
||||
# stage: unit_test
|
||||
# image: ${COMMON_IMAGE}
|
||||
# allow_failure: false
|
||||
# script:
|
||||
# - |
|
||||
# echo "
|
||||
# machine dev.iopsys.eu
|
||||
# login gitlab-ci-token
|
||||
# password $CI_JOB_TOKEN
|
||||
# " > ~/.netrc
|
||||
# - "./gitlab-ci/pipeline_setup.sh"
|
||||
# - "./gitlab-ci/setup.sh ms"
|
||||
run_tools_test:
|
||||
stage: unit_test
|
||||
image: ${COMMON_IMAGE}
|
||||
allow_failure: false
|
||||
script:
|
||||
- |
|
||||
echo "
|
||||
machine dev.iopsys.eu
|
||||
login gitlab-ci-token
|
||||
password $CI_JOB_TOKEN
|
||||
" > ~/.netrc
|
||||
- "./gitlab-ci/pipeline_setup.sh"
|
||||
- "./gitlab-ci/setup.sh ms"
|
||||
# - "./gitlab-ci/tools-test.sh"
|
||||
# - "./gitlab-ci/generate_supported_dm.sh"
|
||||
- "./gitlab-ci/generate_supported_dm.sh"
|
||||
|
||||
# artifacts:
|
||||
# when: always
|
||||
# paths:
|
||||
# - out/datamodel_default.xml
|
||||
# - out/datamodel_hdm.xml
|
||||
# - out/datamodel.xls
|
||||
artifacts:
|
||||
when: always
|
||||
paths:
|
||||
- out/datamodel_default.xml
|
||||
- out/datamodel_hdm.xml
|
||||
- out/datamodel.xls
|
||||
|
||||
run_libbbfdm_api_functional_test:
|
||||
stage: functional_test
|
||||
|
|
|
|||
|
|
@ -19,12 +19,11 @@ install_cmph
|
|||
install_libeasy
|
||||
install_libethernet
|
||||
|
||||
# Make sure that all plugins are removed
|
||||
[ ! -d "${BBFDM_PLUGIN_DIR}" ] && mkdir -p "${BBFDM_PLUGIN_DIR}"
|
||||
rm -f ${BBFDM_PLUGIN_DIR}/*
|
||||
|
||||
[ ! -d "${BBFDM_MS_DIR}" ] && mkdir -p "${BBFDM_MS_DIR}"
|
||||
rm -f ${BBFDM_MS_DIR}/*
|
||||
rm -rf ${BBFDM_MS_DIR}/*
|
||||
|
||||
mkdir -p ${BBFDM_MS_DIR}/core
|
||||
|
||||
|
||||
if [ -z "${1}" ]; then
|
||||
./tools/generate_dm.py tools/tools_input.json
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ echo "Validate BBF Data Model JSON Plugin"
|
|||
check_ret $?
|
||||
|
||||
echo "Validating plugins"
|
||||
for plugin in $(ls -1 test/files/usr/share/bbfdm/plugins/*); do
|
||||
for plugin in $(ls -1 test/files/usr/share/bbfdm/micro_services/core/*); do
|
||||
echo "Validating ${plugin} JSON Plugin"
|
||||
./tools/validate_json_plugin.py ${plugin}
|
||||
check_ret $?
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ int bbfdm_load_internal_plugin(struct bbfdm_context *bbfdm_ctx, DM_MAP_OBJ *dyna
|
|||
return -1;
|
||||
}
|
||||
|
||||
if (dynamic_obj[i].root_obj != NULL) {
|
||||
if (dynamic_obj[i].root_obj != NULL && bbfdm_ctx != NULL) {
|
||||
struct dm_obj_s *entryobj = dynamic_obj[i].root_obj;
|
||||
for (; (entryobj && entryobj->obj); entryobj++) {
|
||||
char path[MAX_DM_PATH] = {0};
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ import glob
|
|||
# Constants
|
||||
BBF_ERROR_CODE = 0
|
||||
CURRENT_PATH = os.getcwd()
|
||||
BBF_PLUGIN_DIR = "/usr/share/bbfdm/plugins/"
|
||||
BBF_MS_CORE_DIR = "/usr/share/bbfdm/micro_services/core/"
|
||||
BBF_MS_DIR = "/usr/share/bbfdm/micro_services/"
|
||||
|
||||
DM_JSON_FILE = os.path.join(CURRENT_PATH, "tools", "datamodel.json")
|
||||
|
|
@ -151,7 +151,7 @@ def generate_shared_library(dm_name, source_files, vendor_prefix,
|
|||
if is_microservice:
|
||||
outdir = BBF_MS_DIR
|
||||
else:
|
||||
outdir = BBF_PLUGIN_DIR
|
||||
outdir = BBF_MS_CORE_DIR
|
||||
|
||||
output_library = outdir + dm_name
|
||||
|
||||
|
|
@ -233,7 +233,7 @@ def build_and_install_dmcli():
|
|||
"-lbbfdm-ubus",
|
||||
"-lubox",
|
||||
"-lblobmsg_json",
|
||||
"-lbbfdm",
|
||||
"-lcore",
|
||||
"-ljson-c",
|
||||
"-lssl",
|
||||
"-lcrypto",
|
||||
|
|
@ -257,7 +257,7 @@ def fill_list_dm(proto, dm_list, dm_name=None):
|
|||
if dm_name:
|
||||
command = f"dm-cli -l {dm_name}"
|
||||
else:
|
||||
command = "dm-cli -p /usr/share/bbfdm/plugins"
|
||||
command = "dm-cli -p /usr/share/bbfdm/micro_services/core"
|
||||
|
||||
# Add the appropriate flag (-c or -u) based on the proto value
|
||||
if proto == "cwmp":
|
||||
|
|
@ -411,7 +411,7 @@ def download_and_build_plugins(plugins, vendor_prefix):
|
|||
if filename.endswith('.c'):
|
||||
LIST_FILES.append(filename)
|
||||
elif filename.endswith('.json'):
|
||||
install_json_plugin(filename, "/usr/share/bbfdm/plugins/"+f"{plugin_index}_{name}.json", prefix)
|
||||
install_json_plugin(filename, "/usr/share/bbfdm/micro_services/core/"+f"{plugin_index}_{name}.json", prefix)
|
||||
else:
|
||||
BBF_ERROR_CODE += 1
|
||||
print(f"# Unknown file format {filename} {BBF_ERROR_CODE}")
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
{
|
||||
"repo": "https://dev.iopsys.eu/system/sysmngr.git",
|
||||
"proto": "git",
|
||||
"version": "devel",
|
||||
"version": "bbfdm_core",
|
||||
"dm_info_file": "src/datamodel_description.json",
|
||||
"extra_dependencies": [
|
||||
"-DSYSMNGR_VENDOR_CONFIG_FILE",
|
||||
|
|
@ -159,7 +159,7 @@
|
|||
{
|
||||
"repo": "https://dev.iopsys.eu/iopsys/hostmngr.git",
|
||||
"proto": "git",
|
||||
"version": "devel",
|
||||
"version": "bbfdm_core",
|
||||
"dm_files": [
|
||||
"src/bbf_plugin/hosts.c"
|
||||
]
|
||||
|
|
@ -167,7 +167,7 @@
|
|||
{
|
||||
"repo": "https://dev.iopsys.eu/iopsys/hostmngr.git",
|
||||
"proto": "git",
|
||||
"version": "devel",
|
||||
"version": "bbfdm_core",
|
||||
"extra_dependencies": [
|
||||
"-DHAS_VENDOR_EXT",
|
||||
"-DCUSTOM_PREFIX=\\\"X_IOPSYS_EU_\\\""
|
||||
|
|
@ -356,22 +356,15 @@
|
|||
{
|
||||
"repo": "https://dev.iopsys.eu/bbf/wifidmd.git",
|
||||
"proto": "git",
|
||||
"version": "devel",
|
||||
"version": "bbfdm_core",
|
||||
"dm_files": [
|
||||
"src/wifi.c"
|
||||
"src/wifi.c",
|
||||
"src/dataelements.c"
|
||||
],
|
||||
"extra_dependencies": [
|
||||
"-lm"
|
||||
]
|
||||
},
|
||||
{
|
||||
"repo": "https://dev.iopsys.eu/bbf/wifidmd.git",
|
||||
"proto": "git",
|
||||
"version": "devel",
|
||||
"dm_files": [
|
||||
"src/dataelements.c"
|
||||
]
|
||||
},
|
||||
{
|
||||
"repo": "https://dev.iopsys.eu/hal/mcastmngr.git",
|
||||
"proto": "git",
|
||||
|
|
@ -413,15 +406,7 @@
|
|||
{
|
||||
"repo": "https://dev.iopsys.eu/network/netmngr.git",
|
||||
"proto": "git",
|
||||
"version": "devel",
|
||||
"dm_files": [
|
||||
"src/interfacestack.c"
|
||||
]
|
||||
},
|
||||
{
|
||||
"repo": "https://dev.iopsys.eu/network/netmngr.git",
|
||||
"proto": "git",
|
||||
"version": "devel",
|
||||
"version": "bbfdm_core",
|
||||
"extra_dependencies": [
|
||||
"-DNETMNGR_GRE_OBJ",
|
||||
"-DNETMNGR_IP_OBJ",
|
||||
|
|
@ -438,7 +423,8 @@
|
|||
"src/routeradvertisement.c",
|
||||
"src/routing.c",
|
||||
"src/ipv6rd.c",
|
||||
"src/common.c"
|
||||
"src/common.c",
|
||||
"src/interfacestack.c"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue