From 64e898c47ef9e95e0939ae36fa0768c27dd7b3c3 Mon Sep 17 00:00:00 2001 From: Vivek Kumar Dutta Date: Tue, 25 Feb 2025 17:01:08 +0530 Subject: [PATCH] Update vendor extension in pipeline --- .../How_to_extend_datamodel_with_JSON.md | 14 +- gitlab-ci/shared.sh | 6 +- test/bbf_test/libbbf_test.c | 46 +-- test/bbf_test/libbbf_test.h | 6 +- test/cmocka/functional_test_bbfd.c | 266 +++++++++--------- test/cmocka/unit_test_bbfd.c | 44 +-- ...YS_EU_Dropbear.json => Dropbear_extn.json} | 0 ...EU_JSON_TEST_V1.json => JSON_TEST_V1.json} | 0 .../core/{X_IOPSYS_EU_TEST.json => TEST.json} | 0 .../{X_IOPSYS_EU_WiFi.json => WiFi_extn.json} | 0 test/vendor_test/device.c | 2 +- test/vendor_test/extension.c | 2 +- tools/README.md | 6 +- tools/bbf_common.py | 4 +- tools/generate_dm_excel.py | 4 +- tools/generate_dm_xml.py | 8 +- tools/tools_input.json | 4 +- 17 files changed, 206 insertions(+), 206 deletions(-) rename test/files/usr/share/bbfdm/micro_services/core/{X_IOPSYS_EU_Dropbear.json => Dropbear_extn.json} (100%) rename test/files/usr/share/bbfdm/micro_services/core/{X_IOPSYS_EU_JSON_TEST_V1.json => JSON_TEST_V1.json} (100%) rename test/files/usr/share/bbfdm/micro_services/core/{X_IOPSYS_EU_TEST.json => TEST.json} (100%) rename test/files/usr/share/bbfdm/micro_services/core/{X_IOPSYS_EU_WiFi.json => WiFi_extn.json} (100%) diff --git a/docs/guide/How_to_extend_datamodel_with_JSON.md b/docs/guide/How_to_extend_datamodel_with_JSON.md index 5ae73e8f..f0c2e73b 100644 --- a/docs/guide/How_to_extend_datamodel_with_JSON.md +++ b/docs/guide/How_to_extend_datamodel_with_JSON.md @@ -147,7 +147,7 @@ The JSON Plugin V2 operates by parsing the JSON file. Then it checks the parent Examples - - Device.WiFi.AccessPoint.{i}.Security.X_IOPSYS_EU_KeyPassphrase: This parameter will be extended to the core data model since it does not exist. + - Device.WiFi.AccessPoint.{i}.Security.X_IOWRT_EU_KeyPassphrase: This parameter will be extended to the core data model since it does not exist. - Device.WiFi.AccessPoint.{i}.Security.WEPKey: This parameter will be overwritten in the core data model since it already exists. - Device.WiFi.AccessPoint.{i}.Security.SAEPassphrase: This parameter will be excluded from the core data model since it exists, but the new protocol defined is `none`. @@ -192,7 +192,7 @@ More example(s): - **UCI command:** uci show wireless | grep wifi-device ```bash -"Device.X_IOPSYS_EU_Radio.{i}.": { +"Device.X_IOWRT_EU_Radio.{i}.": { "type": "object", "protocols": [ "cwmp", @@ -626,7 +626,7 @@ If we consider multi-instance objects, they are kind of special because we have ## How to have different mappings for get/set: ```json { - "Device.X_IOPSYS_EU-UserInterface.": { + "Device.X_IOWRT_EU-UserInterface.": { "type": "object", "protocols": [ "cwmp", @@ -707,7 +707,7 @@ These are special parameters all with a suffix "NumberOfEntries", which has coun For multi-instance on ubus mapping, it has to point to an array of objects, so for NumberOfEntries, we need to get the size of that array, which is refered here as `@Count` ```bash { - "Device.X_IOPSYS_EU_WiFi.RadioNumberOfEntries": { + "Device.X_IOWRT_EU_WiFi.RadioNumberOfEntries": { "type": "unsignedInt", "protocols": [ "cwmp", @@ -734,7 +734,7 @@ For multi-instance on ubus mapping, it has to point to an array of objects, so f For multi-instance object mapped on uci, it has to point a uci section, so for NumberOfEntries it basically has the count of the sections. ```json { - "Device.X_IOPSYS_EU_DropbearNumberOfEntries": { + "Device.X_IOWRT_EU_DropbearNumberOfEntries": { "type": "unsignedInt", "protocols": [ "cwmp", @@ -765,7 +765,7 @@ Multi-instance mapping either maps to array of json objects or uci section, so f ```json { - "Device.X_IOPSYS_EU_Dropbear.{i}.": { + "Device.X_IOWRT_EU_Dropbear.{i}.": { "type": "object", "protocols": [ "cwmp", @@ -847,7 +847,7 @@ Multi-instance mapping either maps to array of json objects or uci section, so f Ubus example for the same ```json { - "Device.X_IOPSYS_EU_WiFi.Radio.{i}.": { + "Device.X_IOWRT_EU_WiFi.Radio.{i}.": { "type": "object", "protocols": [ "cwmp", diff --git a/gitlab-ci/shared.sh b/gitlab-ci/shared.sh index 74252527..56a15b75 100755 --- a/gitlab-ci/shared.sh +++ b/gitlab-ci/shared.sh @@ -63,7 +63,7 @@ function install_libbbf() COV_LDFLAGS='--coverage' fi - VENDOR_PREFIX='X_IOPSYS_EU_' + VENDOR_PREFIX='X_IOWRT_EU_' echo "Compiling libbbf" if [ -d build ]; then @@ -100,7 +100,7 @@ function install_wifidmd_as_micro_service() exec_cmd git clone -b devel https://dev.iopsys.eu/bbf/wifidmd.git /opt/dev/wifidmd - exec_cmd make -C /opt/dev/wifidmd/src/ clean && make -C /opt/dev/wifidmd/src/ CFLAGS="-D'BBF_VENDOR_PREFIX=\"X_IOPSYS_EU_\"'" WIFIDMD_WIFI_DATAELEMENTS='y' + exec_cmd make -C /opt/dev/wifidmd/src/ clean && make -C /opt/dev/wifidmd/src/ CFLAGS="-D'BBF_VENDOR_PREFIX=\"X_IOWRT_EU_\"'" WIFIDMD_WIFI_DATAELEMENTS='y' install_ms /opt/dev/wifidmd/src/libwifi.so wifidmd } @@ -184,7 +184,7 @@ function install_sysmngr_as_micro_service() exec_cmd make -C /opt/dev/sysmngr/src/ clean && \ exec_cmd make -C /opt/dev/sysmngr/src/ \ - CFLAGS+="-DBBF_VENDOR_PREFIX=\\\"X_IOPSYS_EU_\\\"" \ + CFLAGS+="-DBBF_VENDOR_PREFIX=\\\"X_IOWRT_EU_\\\"" \ SYSMNGR_VENDOR_CONFIG_FILE='y' \ SYSMNGR_MEMORY_STATUS='y' \ SYSMNGR_PROCESS_STATUS='y' \ diff --git a/test/bbf_test/libbbf_test.c b/test/bbf_test/libbbf_test.c index 173ef9e7..c77ac505 100644 --- a/test/bbf_test/libbbf_test.c +++ b/test/bbf_test/libbbf_test.c @@ -26,7 +26,7 @@ DM_MAP_OBJ tDynamicObj[] = { /************************************************************* * ENTRY METHOD **************************************************************/ -static int browseX_IOPSYS_EU_EventTESTInst(struct dmctx *dmctx, DMNODE *parent_node, void *prev_data, char *prev_instance) +static int browseX_IOWRT_EU_EventTESTInst(struct dmctx *dmctx, DMNODE *parent_node, void *prev_data, char *prev_instance) { char *inst = NULL; @@ -44,13 +44,13 @@ static int browseX_IOPSYS_EU_EventTESTInst(struct dmctx *dmctx, DMNODE *parent_n /************************************************************* * GET & SET PARAM **************************************************************/ -static int get_X_IOPSYS_EU_Syslog_ServerIPAddress(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value) +static int get_X_IOWRT_EU_Syslog_ServerIPAddress(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value) { dmuci_get_option_value_string("system", "@system[0]", "log_ip", value); return 0; } -static int set_X_IOPSYS_EU_Syslog_ServerIPAddress(char *refparam, struct dmctx *ctx, void *data, char *instance, char *value, int action) +static int set_X_IOWRT_EU_Syslog_ServerIPAddress(char *refparam, struct dmctx *ctx, void *data, char *instance, char *value, int action) { switch (action) { case VALUECHECK: @@ -62,13 +62,13 @@ static int set_X_IOPSYS_EU_Syslog_ServerIPAddress(char *refparam, struct dmctx * return 0; } -static int get_X_IOPSYS_EU_Syslog_ServerPort(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value) +static int get_X_IOWRT_EU_Syslog_ServerPort(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value) { *value = dmuci_get_option_value_fallback_def("system", "@system[0]", "log_port", "514"); return 0; } -static int set_X_IOPSYS_EU_Syslog_ServerPort(char *refparam, struct dmctx *ctx, void *data, char *instance, char *value, int action) +static int set_X_IOWRT_EU_Syslog_ServerPort(char *refparam, struct dmctx *ctx, void *data, char *instance, char *value, int action) { switch (action) { case VALUECHECK: @@ -80,13 +80,13 @@ static int set_X_IOPSYS_EU_Syslog_ServerPort(char *refparam, struct dmctx *ctx, return 0; } -static int get_X_IOPSYS_EU_Syslog_ConsoleLogLevel(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value) +static int get_X_IOWRT_EU_Syslog_ConsoleLogLevel(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value) { *value = dmuci_get_option_value_fallback_def("system", "@system[0]", "conloglevel", "7"); return 0; } -static int set_X_IOPSYS_EU_Syslog_ConsoleLogLevel(char *refparam, struct dmctx *ctx, void *data, char *instance, char *value, int action) +static int set_X_IOWRT_EU_Syslog_ConsoleLogLevel(char *refparam, struct dmctx *ctx, void *data, char *instance, char *value, int action) { switch (action) { case VALUECHECK: @@ -101,7 +101,7 @@ static int set_X_IOPSYS_EU_Syslog_ConsoleLogLevel(char *refparam, struct dmctx * /************************************************************* * OPERATE COMMANDS *************************************************************/ -static int operate_Device_X_IOPSYS_EU_Reboot(char *refparam, struct dmctx *ctx, void *data, char *instance, char *value, int action) +static int operate_Device_X_IOWRT_EU_Reboot(char *refparam, struct dmctx *ctx, void *data, char *instance, char *value, int action) { TRACE("Reboot sync operate called"); return 0; @@ -221,38 +221,38 @@ static int event_XIOPSYSEUEventTEST_Test(char *refparam, struct dmctx *ctx, void /* *** Device. *** */ DMOBJ tDynamicDeviceObj[] = { /* OBJ, permission, addobj, delobj, checkdep, browseinstobj, nextdynamicobj, dynamicleaf, nextobj, leaf, linker, bbfdm_type, uniqueKeys*/ -{"X_IOPSYS_EU_Syslog", &DMREAD, NULL, NULL, "file:/etc/config/system", NULL, NULL, NULL, NULL, tX_IOPSYS_EU_SyslogParam, NULL, BBFDM_BOTH}, -{"X_IOPSYS_EU_PingTEST", &DMREAD, NULL, NULL, NULL, NULL, NULL, NULL, NULL, tX_IOPSYS_EU_PingTESTParam, NULL, BBFDM_BOTH}, -{"X_IOPSYS_EU_EventTEST", &DMREAD, NULL, NULL, NULL, browseX_IOPSYS_EU_EventTESTInst, NULL, NULL, NULL, tX_IOPSYS_EU_EventTESTParam, NULL, BBFDM_BOTH}, +{"X_IOWRT_EU_Syslog", &DMREAD, NULL, NULL, "file:/etc/config/system", NULL, NULL, NULL, NULL, tX_IOWRT_EU_SyslogParam, NULL, BBFDM_BOTH}, +{"X_IOWRT_EU_PingTEST", &DMREAD, NULL, NULL, NULL, NULL, NULL, NULL, NULL, tX_IOWRT_EU_PingTESTParam, NULL, BBFDM_BOTH}, +{"X_IOWRT_EU_EventTEST", &DMREAD, NULL, NULL, NULL, browseX_IOWRT_EU_EventTESTInst, NULL, NULL, NULL, tX_IOWRT_EU_EventTESTParam, NULL, BBFDM_BOTH}, {0} }; DMLEAF tDynamicDeviceParams[] = { /* PARAM, permission, type, getvalue, setvalue, bbfdm_type*/ -{"X_IOPSYS_EU_Reboot()", &DMSYNC, DMT_COMMAND, NULL, operate_Device_X_IOPSYS_EU_Reboot, BBFDM_USP}, -{"X_IOPSYS_EU_Boot!", &DMREAD, DMT_EVENT, get_event_args_XIOPSYSEU_Boot, NULL, BBFDM_USP}, -{"X_IOPSYS_EU_WakeUp!", &DMREAD, DMT_EVENT, NULL, NULL, BBFDM_USP}, +{"X_IOWRT_EU_Reboot()", &DMSYNC, DMT_COMMAND, NULL, operate_Device_X_IOWRT_EU_Reboot, BBFDM_USP}, +{"X_IOWRT_EU_Boot!", &DMREAD, DMT_EVENT, get_event_args_XIOPSYSEU_Boot, NULL, BBFDM_USP}, +{"X_IOWRT_EU_WakeUp!", &DMREAD, DMT_EVENT, NULL, NULL, BBFDM_USP}, {0} }; -/*** Device.X_IOPSYS_EU_Syslog. ***/ -DMLEAF tX_IOPSYS_EU_SyslogParam[] = { +/*** Device.X_IOWRT_EU_Syslog. ***/ +DMLEAF tX_IOWRT_EU_SyslogParam[] = { /* PARAM, permission, type, getvalue, setvalue, bbfdm_type*/ -{"ServerIPAddress", &DMWRITE, DMT_STRING, get_X_IOPSYS_EU_Syslog_ServerIPAddress, set_X_IOPSYS_EU_Syslog_ServerIPAddress, BBFDM_BOTH}, -{"ServerPort", &DMWRITE, DMT_UNINT, get_X_IOPSYS_EU_Syslog_ServerPort, set_X_IOPSYS_EU_Syslog_ServerPort, BBFDM_BOTH}, -{"ConsoleLogLevel", &DMWRITE, DMT_UNINT, get_X_IOPSYS_EU_Syslog_ConsoleLogLevel, set_X_IOPSYS_EU_Syslog_ConsoleLogLevel, BBFDM_BOTH}, +{"ServerIPAddress", &DMWRITE, DMT_STRING, get_X_IOWRT_EU_Syslog_ServerIPAddress, set_X_IOWRT_EU_Syslog_ServerIPAddress, BBFDM_BOTH}, +{"ServerPort", &DMWRITE, DMT_UNINT, get_X_IOWRT_EU_Syslog_ServerPort, set_X_IOWRT_EU_Syslog_ServerPort, BBFDM_BOTH}, +{"ConsoleLogLevel", &DMWRITE, DMT_UNINT, get_X_IOWRT_EU_Syslog_ConsoleLogLevel, set_X_IOWRT_EU_Syslog_ConsoleLogLevel, BBFDM_BOTH}, {0} }; -/*** Device.X_IOPSYS_EU_PingTEST. ***/ -DMLEAF tX_IOPSYS_EU_PingTESTParam[] = { +/*** Device.X_IOWRT_EU_PingTEST. ***/ +DMLEAF tX_IOWRT_EU_PingTESTParam[] = { /* PARAM, permission, type, getvalue, setvalue, bbfdm_type*/ {"Run()", &DMASYNC, DMT_COMMAND, get_operate_args_XIOPSYSEUPingTEST_Run, operate_DeviceXIOPSYSEUPingTEST_Run, BBFDM_USP}, {0} }; -/*** Device.X_IOPSYS_EU_EventTEST. ***/ -DMLEAF tX_IOPSYS_EU_EventTESTParam[] = { +/*** Device.X_IOWRT_EU_EventTEST. ***/ +DMLEAF tX_IOWRT_EU_EventTESTParam[] = { /* PARAM, permission, type, getvalue, setvalue, bbfdm_type*/ {"Test!", &DMREAD, DMT_EVENT, get_event_args_XIOPSYSEUEventTEST_Test, event_XIOPSYSEUEventTEST_Test, BBFDM_USP}, {0} diff --git a/test/bbf_test/libbbf_test.h b/test/bbf_test/libbbf_test.h index 47098fe2..c35e888e 100644 --- a/test/bbf_test/libbbf_test.h +++ b/test/bbf_test/libbbf_test.h @@ -13,9 +13,9 @@ extern DMOBJ tDynamicDeviceObj[]; extern DMLEAF tDynamicDeviceParams[]; -extern DMLEAF tX_IOPSYS_EU_SyslogParam[]; -extern DMLEAF tX_IOPSYS_EU_PingTESTParam[]; -extern DMLEAF tX_IOPSYS_EU_EventTESTParam[]; +extern DMLEAF tX_IOWRT_EU_SyslogParam[]; +extern DMLEAF tX_IOWRT_EU_PingTESTParam[]; +extern DMLEAF tX_IOWRT_EU_EventTESTParam[]; #endif //__LIBBBFD_TEST_H diff --git a/test/cmocka/functional_test_bbfd.c b/test/cmocka/functional_test_bbfd.c index 8518c4b6..3921cd8e 100644 --- a/test/cmocka/functional_test_bbfd.c +++ b/test/cmocka/functional_test_bbfd.c @@ -125,44 +125,44 @@ static void test_api_bbfdm_get_set_json_parameter(void **state) int fault = 0; // get value ==> expected "0" error - ctx->in_param = "Device.X_IOPSYS_EU_WiFi.Radio.1.Noise"; + ctx->in_param = "Device.X_IOWRT_EU_WiFi.Radio.1.Noise"; fault = bbf_entry_method(ctx, BBF_GET_VALUE); assert_int_equal(fault, 0); // validate parameter : name, type, value - validate_parameter(ctx, "Device.X_IOPSYS_EU_WiFi.Radio.1.Noise", "-87", "xsd:int"); + validate_parameter(ctx, "Device.X_IOWRT_EU_WiFi.Radio.1.Noise", "-87", "xsd:int"); // get value ==> expected "0" error - ctx->in_param = "Device.X_IOPSYS_EU_WiFi.Radio.2.Noise"; + ctx->in_param = "Device.X_IOWRT_EU_WiFi.Radio.2.Noise"; fault = bbf_entry_method(ctx, BBF_GET_VALUE); assert_int_equal(fault, 0); // validate parameter : name, type, value - validate_parameter(ctx, "Device.X_IOPSYS_EU_WiFi.Radio.2.Noise", "-85", "xsd:int"); + validate_parameter(ctx, "Device.X_IOWRT_EU_WiFi.Radio.2.Noise", "-85", "xsd:int"); // get value ==> expected "0" error - ctx->in_param = "Device.X_IOPSYS_EU_WiFi.Radio.2.Band"; + ctx->in_param = "Device.X_IOWRT_EU_WiFi.Radio.2.Band"; fault = bbf_entry_method(ctx, BBF_GET_VALUE); assert_int_equal(fault, 0); // validate parameter : name, type, value - validate_parameter(ctx, "Device.X_IOPSYS_EU_WiFi.Radio.2.Band", "2.4GHz", "xsd:string"); + validate_parameter(ctx, "Device.X_IOWRT_EU_WiFi.Radio.2.Band", "2.4GHz", "xsd:string"); // get value ==> expected "0" error - ctx->in_param = "Device.X_IOPSYS_EU_WiFi.Radio.1.Stats.BytesSent"; + ctx->in_param = "Device.X_IOWRT_EU_WiFi.Radio.1.Stats.BytesSent"; fault = bbf_entry_method(ctx, BBF_GET_VALUE); assert_int_equal(fault, 0); // validate parameter : name, type, value - validate_parameter(ctx, "Device.X_IOPSYS_EU_WiFi.Radio.1.Stats.BytesSent", "14418177", "xsd:unsignedInt"); + validate_parameter(ctx, "Device.X_IOWRT_EU_WiFi.Radio.1.Stats.BytesSent", "14418177", "xsd:unsignedInt"); // get value ==> expected "0" error - ctx->in_param = "Device.X_IOPSYS_EU_WiFi.Radio.2.Stats.BytesSent"; + ctx->in_param = "Device.X_IOWRT_EU_WiFi.Radio.2.Stats.BytesSent"; fault = bbf_entry_method(ctx, BBF_GET_VALUE); assert_int_equal(fault, 0); // validate parameter : name, type, value - validate_parameter(ctx, "Device.X_IOPSYS_EU_WiFi.Radio.2.Stats.BytesSent", "14417451", "xsd:unsignedInt"); + validate_parameter(ctx, "Device.X_IOWRT_EU_WiFi.Radio.2.Stats.BytesSent", "14417451", "xsd:unsignedInt"); } static void test_api_bbfdm_get_set_json_v1_parameter(void **state) @@ -428,592 +428,592 @@ static void test_api_bbfdm_input_value_validation_json_parameter(void **state) */ // Set Wrong Value ==> expected "9007" error - ctx->in_param = "Device.X_IOPSYS_EU_TEST.1.Enable"; + ctx->in_param = "Device.X_IOWRT_EU_TEST.1.Enable"; ctx->in_value = "64t"; fault = bbf_entry_method(ctx, BBF_SET_VALUE); assert_int_equal(fault, FAULT_9007); // Set Wrong Value ==> expected "9007" error - ctx->in_param = "Device.X_IOPSYS_EU_TEST.1.Enable"; + ctx->in_param = "Device.X_IOWRT_EU_TEST.1.Enable"; ctx->in_value = "truee"; fault = bbf_entry_method(ctx, BBF_SET_VALUE); assert_int_equal(fault, FAULT_9007); // set value ==> expected "0" error - ctx->in_param = "Device.X_IOPSYS_EU_TEST.1.Enable"; + ctx->in_param = "Device.X_IOWRT_EU_TEST.1.Enable"; ctx->in_value = "true"; fault = bbf_entry_method(ctx, BBF_SET_VALUE); assert_int_equal(fault, 0); // get value ==> expected "0" error - ctx->in_param = "Device.X_IOPSYS_EU_TEST.1.Enable"; + ctx->in_param = "Device.X_IOWRT_EU_TEST.1.Enable"; fault = bbf_entry_method(ctx, BBF_GET_VALUE); assert_int_equal(fault, 0); // validate parameter after setting to true: name, type, value - validate_parameter(ctx, "Device.X_IOPSYS_EU_TEST.1.Enable", "1", "xsd:boolean"); + validate_parameter(ctx, "Device.X_IOWRT_EU_TEST.1.Enable", "1", "xsd:boolean"); /* * Validate unsignedInt parameters */ // Mapping without range: Set Wrong Value ==> expected "9007" error - ctx->in_param = "Device.X_IOPSYS_EU_TEST.1.Nbr_Retries"; + ctx->in_param = "Device.X_IOWRT_EU_TEST.1.Nbr_Retries"; ctx->in_value = "64t"; fault = bbf_entry_method(ctx, BBF_SET_VALUE); assert_int_equal(fault, FAULT_9007); // set value ==> expected "0" error - ctx->in_param = "Device.X_IOPSYS_EU_TEST.1.Nbr_Retries"; + ctx->in_param = "Device.X_IOWRT_EU_TEST.1.Nbr_Retries"; ctx->in_value = "15600"; fault = bbf_entry_method(ctx, BBF_SET_VALUE); assert_int_equal(fault, 0); // get value ==> expected "0" error - ctx->in_param = "Device.X_IOPSYS_EU_TEST.1.Nbr_Retries"; + ctx->in_param = "Device.X_IOWRT_EU_TEST.1.Nbr_Retries"; fault = bbf_entry_method(ctx, BBF_GET_VALUE); assert_int_equal(fault, 0); // validate parameter after setting to true: name, type, value - validate_parameter(ctx, "Device.X_IOPSYS_EU_TEST.1.Nbr_Retries", "15600", "xsd:unsignedInt"); + validate_parameter(ctx, "Device.X_IOWRT_EU_TEST.1.Nbr_Retries", "15600", "xsd:unsignedInt"); // Mapping with range: Set Wrong Value out of range ==> expected "9007" error - ctx->in_param = "Device.X_IOPSYS_EU_TEST.1.Port"; + ctx->in_param = "Device.X_IOWRT_EU_TEST.1.Port"; ctx->in_value = "1050"; fault = bbf_entry_method(ctx, BBF_SET_VALUE); assert_int_equal(fault, FAULT_9007); // Mapping with range: set value in the first range [0-1000] ==> expected "0" error - ctx->in_param = "Device.X_IOPSYS_EU_TEST.1.Port"; + ctx->in_param = "Device.X_IOWRT_EU_TEST.1.Port"; ctx->in_value = "1000"; fault = bbf_entry_method(ctx, BBF_SET_VALUE); assert_int_equal(fault, 0); // get value ==> expected "0" error - ctx->in_param = "Device.X_IOPSYS_EU_TEST.1.Port"; + ctx->in_param = "Device.X_IOWRT_EU_TEST.1.Port"; fault = bbf_entry_method(ctx, BBF_GET_VALUE); assert_int_equal(fault, 0); // validate parameter after setting to true: name, type, value - validate_parameter(ctx, "Device.X_IOPSYS_EU_TEST.1.Port", "1000", "xsd:unsignedInt"); + validate_parameter(ctx, "Device.X_IOWRT_EU_TEST.1.Port", "1000", "xsd:unsignedInt"); // Mapping with range: set value in the second range [15000-65535] ==> expected "0" error - ctx->in_param = "Device.X_IOPSYS_EU_TEST.1.Port"; + ctx->in_param = "Device.X_IOWRT_EU_TEST.1.Port"; ctx->in_value = "20546"; fault = bbf_entry_method(ctx, BBF_SET_VALUE); assert_int_equal(fault, 0); // get value ==> expected "0" error - ctx->in_param = "Device.X_IOPSYS_EU_TEST.1.Port"; + ctx->in_param = "Device.X_IOWRT_EU_TEST.1.Port"; fault = bbf_entry_method(ctx, BBF_GET_VALUE); assert_int_equal(fault, 0); // validate parameter after setting to true: name, type, value - validate_parameter(ctx, "Device.X_IOPSYS_EU_TEST.1.Port", "20546", "xsd:unsignedInt"); + validate_parameter(ctx, "Device.X_IOWRT_EU_TEST.1.Port", "20546", "xsd:unsignedInt"); /* * Validate int parameters */ // Mapping with range (only min): Set Wrong Value ==> expected "9007" error - ctx->in_param = "Device.X_IOPSYS_EU_TEST.1.Min_value"; + ctx->in_param = "Device.X_IOWRT_EU_TEST.1.Min_value"; ctx->in_value = "-300"; fault = bbf_entry_method(ctx, BBF_SET_VALUE); assert_int_equal(fault, FAULT_9007); // set value ==> expected "0" error - ctx->in_param = "Device.X_IOPSYS_EU_TEST.1.Min_value"; + ctx->in_param = "Device.X_IOWRT_EU_TEST.1.Min_value"; ctx->in_value = "-273"; fault = bbf_entry_method(ctx, BBF_SET_VALUE); assert_int_equal(fault, 0); // get value ==> expected "0" error - ctx->in_param = "Device.X_IOPSYS_EU_TEST.1.Min_value"; + ctx->in_param = "Device.X_IOWRT_EU_TEST.1.Min_value"; fault = bbf_entry_method(ctx, BBF_GET_VALUE); assert_int_equal(fault, 0); // validate parameter after setting to true: name, type, value - validate_parameter(ctx, "Device.X_IOPSYS_EU_TEST.1.Min_value", "-273", "xsd:int"); + validate_parameter(ctx, "Device.X_IOWRT_EU_TEST.1.Min_value", "-273", "xsd:int"); // Mapping with range (only max): Set Wrong Value out of range ==> expected "9007" error - ctx->in_param = "Device.X_IOPSYS_EU_TEST.1.Max_value"; + ctx->in_param = "Device.X_IOWRT_EU_TEST.1.Max_value"; ctx->in_value = "280"; fault = bbf_entry_method(ctx, BBF_SET_VALUE); assert_int_equal(fault, FAULT_9007); // Mapping with range: set value in the first range [0-1000] ==> expected "0" error - ctx->in_param = "Device.X_IOPSYS_EU_TEST.1.Max_value"; + ctx->in_param = "Device.X_IOWRT_EU_TEST.1.Max_value"; ctx->in_value = "274"; fault = bbf_entry_method(ctx, BBF_SET_VALUE); assert_int_equal(fault, 0); // get value ==> expected "0" error - ctx->in_param = "Device.X_IOPSYS_EU_TEST.1.Max_value"; + ctx->in_param = "Device.X_IOWRT_EU_TEST.1.Max_value"; fault = bbf_entry_method(ctx, BBF_GET_VALUE); assert_int_equal(fault, 0); // validate parameter after setting to true: name, type, value - validate_parameter(ctx, "Device.X_IOPSYS_EU_TEST.1.Max_value", "274", "xsd:int"); + validate_parameter(ctx, "Device.X_IOWRT_EU_TEST.1.Max_value", "274", "xsd:int"); // Mapping with range: Set Wrong Value out of range ==> expected "9007" error - ctx->in_param = "Device.X_IOPSYS_EU_TEST.1.Value"; + ctx->in_param = "Device.X_IOWRT_EU_TEST.1.Value"; ctx->in_value = "-3"; fault = bbf_entry_method(ctx, BBF_SET_VALUE); assert_int_equal(fault, FAULT_9007); // Mapping with range: set value in the first range [-10:-5] ==> expected "0" error - ctx->in_param = "Device.X_IOPSYS_EU_TEST.1.Value"; + ctx->in_param = "Device.X_IOWRT_EU_TEST.1.Value"; ctx->in_value = "-7"; fault = bbf_entry_method(ctx, BBF_SET_VALUE); assert_int_equal(fault, 0); // get value ==> expected "0" error - ctx->in_param = "Device.X_IOPSYS_EU_TEST.1.Value"; + ctx->in_param = "Device.X_IOWRT_EU_TEST.1.Value"; fault = bbf_entry_method(ctx, BBF_GET_VALUE); assert_int_equal(fault, 0); // validate parameter after setting to true: name, type, value - validate_parameter(ctx, "Device.X_IOPSYS_EU_TEST.1.Value", "-7", "xsd:int"); + validate_parameter(ctx, "Device.X_IOWRT_EU_TEST.1.Value", "-7", "xsd:int"); // Mapping with range: set value in the second range [-1:10] ==> expected "0" error - ctx->in_param = "Device.X_IOPSYS_EU_TEST.1.Value"; + ctx->in_param = "Device.X_IOWRT_EU_TEST.1.Value"; ctx->in_value = "1"; fault = bbf_entry_method(ctx, BBF_SET_VALUE); assert_int_equal(fault, 0); // get value ==> expected "0" error - ctx->in_param = "Device.X_IOPSYS_EU_TEST.1.Value"; + ctx->in_param = "Device.X_IOWRT_EU_TEST.1.Value"; fault = bbf_entry_method(ctx, BBF_GET_VALUE); assert_int_equal(fault, 0); // validate parameter after setting to true: name, type, value - validate_parameter(ctx, "Device.X_IOPSYS_EU_TEST.1.Value", "1", "xsd:int"); + validate_parameter(ctx, "Device.X_IOWRT_EU_TEST.1.Value", "1", "xsd:int"); /* * Validate unsignedLong parameters */ // Mapping without range: Set Wrong Value ==> expected "9007" error - ctx->in_param = "Device.X_IOPSYS_EU_TEST.1.Nbr_bytes"; + ctx->in_param = "Device.X_IOWRT_EU_TEST.1.Nbr_bytes"; ctx->in_value = "64t"; fault = bbf_entry_method(ctx, BBF_SET_VALUE); assert_int_equal(fault, FAULT_9007); // set value ==> expected "0" error - ctx->in_param = "Device.X_IOPSYS_EU_TEST.1.Nbr_bytes"; + ctx->in_param = "Device.X_IOWRT_EU_TEST.1.Nbr_bytes"; ctx->in_value = "15600"; fault = bbf_entry_method(ctx, BBF_SET_VALUE); assert_int_equal(fault, 0); // get value ==> expected "0" error - ctx->in_param = "Device.X_IOPSYS_EU_TEST.1.Nbr_bytes"; + ctx->in_param = "Device.X_IOWRT_EU_TEST.1.Nbr_bytes"; fault = bbf_entry_method(ctx, BBF_GET_VALUE); assert_int_equal(fault, 0); // validate parameter after setting to true: name, type, value - validate_parameter(ctx, "Device.X_IOPSYS_EU_TEST.1.Nbr_bytes", "15600", "xsd:unsignedLong"); + validate_parameter(ctx, "Device.X_IOWRT_EU_TEST.1.Nbr_bytes", "15600", "xsd:unsignedLong"); // Mapping with range: Set Wrong Value out of range ==> expected "9007" error - ctx->in_param = "Device.X_IOPSYS_EU_TEST.1.Nbr_packets"; + ctx->in_param = "Device.X_IOWRT_EU_TEST.1.Nbr_packets"; ctx->in_value = "499"; fault = bbf_entry_method(ctx, BBF_SET_VALUE); assert_int_equal(fault, FAULT_9007); // Mapping with range: set value in the first range [0-100] ==> expected "0" error - ctx->in_param = "Device.X_IOPSYS_EU_TEST.1.Nbr_packets"; + ctx->in_param = "Device.X_IOWRT_EU_TEST.1.Nbr_packets"; ctx->in_value = "99"; fault = bbf_entry_method(ctx, BBF_SET_VALUE); assert_int_equal(fault, 0); // get value ==> expected "0" error - ctx->in_param = "Device.X_IOPSYS_EU_TEST.1.Nbr_packets"; + ctx->in_param = "Device.X_IOWRT_EU_TEST.1.Nbr_packets"; fault = bbf_entry_method(ctx, BBF_GET_VALUE); assert_int_equal(fault, 0); // validate parameter after setting to true: name, type, value - validate_parameter(ctx, "Device.X_IOPSYS_EU_TEST.1.Nbr_packets", "99", "xsd:unsignedLong"); + validate_parameter(ctx, "Device.X_IOWRT_EU_TEST.1.Nbr_packets", "99", "xsd:unsignedLong"); // Mapping with range: set value in the second range [500-3010] ==> expected "0" error - ctx->in_param = "Device.X_IOPSYS_EU_TEST.1.Nbr_packets"; + ctx->in_param = "Device.X_IOWRT_EU_TEST.1.Nbr_packets"; ctx->in_value = "1024"; fault = bbf_entry_method(ctx, BBF_SET_VALUE); assert_int_equal(fault, 0); // get value ==> expected "0" error - ctx->in_param = "Device.X_IOPSYS_EU_TEST.1.Nbr_packets"; + ctx->in_param = "Device.X_IOWRT_EU_TEST.1.Nbr_packets"; fault = bbf_entry_method(ctx, BBF_GET_VALUE); assert_int_equal(fault, 0); // validate parameter after setting to true: name, type, value - validate_parameter(ctx, "Device.X_IOPSYS_EU_TEST.1.Nbr_packets", "1024", "xsd:unsignedLong"); + validate_parameter(ctx, "Device.X_IOWRT_EU_TEST.1.Nbr_packets", "1024", "xsd:unsignedLong"); /* * Validate long parameters */ // Mapping without range: Set Wrong Value ==> expected "9007" error - ctx->in_param = "Device.X_IOPSYS_EU_TEST.1.MaxTxPower"; + ctx->in_param = "Device.X_IOWRT_EU_TEST.1.MaxTxPower"; ctx->in_value = "-300t"; fault = bbf_entry_method(ctx, BBF_SET_VALUE); assert_int_equal(fault, FAULT_9007); // set value ==> expected "0" error - ctx->in_param = "Device.X_IOPSYS_EU_TEST.1.MaxTxPower"; + ctx->in_param = "Device.X_IOWRT_EU_TEST.1.MaxTxPower"; ctx->in_value = "-273"; fault = bbf_entry_method(ctx, BBF_SET_VALUE); assert_int_equal(fault, 0); // get value ==> expected "0" error - ctx->in_param = "Device.X_IOPSYS_EU_TEST.1.MaxTxPower"; + ctx->in_param = "Device.X_IOWRT_EU_TEST.1.MaxTxPower"; fault = bbf_entry_method(ctx, BBF_GET_VALUE); assert_int_equal(fault, 0); // validate parameter after setting to true: name, type, value - validate_parameter(ctx, "Device.X_IOPSYS_EU_TEST.1.MaxTxPower", "-273", "xsd:long"); + validate_parameter(ctx, "Device.X_IOWRT_EU_TEST.1.MaxTxPower", "-273", "xsd:long"); // Mapping with range: Set Wrong Value out of range ==> expected "9007" error - ctx->in_param = "Device.X_IOPSYS_EU_TEST.1.TransmitPowerLimit"; + ctx->in_param = "Device.X_IOWRT_EU_TEST.1.TransmitPowerLimit"; ctx->in_value = "-91"; fault = bbf_entry_method(ctx, BBF_SET_VALUE); assert_int_equal(fault, FAULT_9007); // Mapping with range: set value in the first range [-90:36] ==> expected "0" error - ctx->in_param = "Device.X_IOPSYS_EU_TEST.1.TransmitPowerLimit"; + ctx->in_param = "Device.X_IOWRT_EU_TEST.1.TransmitPowerLimit"; ctx->in_value = "274"; fault = bbf_entry_method(ctx, BBF_SET_VALUE); assert_int_equal(fault, 0); // get value ==> expected "0" error - ctx->in_param = "Device.X_IOPSYS_EU_TEST.1.TransmitPowerLimit"; + ctx->in_param = "Device.X_IOWRT_EU_TEST.1.TransmitPowerLimit"; fault = bbf_entry_method(ctx, BBF_GET_VALUE); assert_int_equal(fault, 0); // validate parameter after setting to true: name, type, value - validate_parameter(ctx, "Device.X_IOPSYS_EU_TEST.1.TransmitPowerLimit", "274", "xsd:long"); + validate_parameter(ctx, "Device.X_IOWRT_EU_TEST.1.TransmitPowerLimit", "274", "xsd:long"); // Mapping with range: Set Wrong Value out of range ==> expected "9007" error - ctx->in_param = "Device.X_IOPSYS_EU_TEST.1.TransmitPowerLimit"; + ctx->in_param = "Device.X_IOWRT_EU_TEST.1.TransmitPowerLimit"; ctx->in_value = "37"; fault = bbf_entry_method(ctx, BBF_SET_VALUE); assert_int_equal(fault, FAULT_9007); // Mapping with range: set value in the first range [70:360] ==> expected "0" error - ctx->in_param = "Device.X_IOPSYS_EU_TEST.1.TransmitPowerLimit"; + ctx->in_param = "Device.X_IOWRT_EU_TEST.1.TransmitPowerLimit"; ctx->in_value = "70"; fault = bbf_entry_method(ctx, BBF_SET_VALUE); assert_int_equal(fault, 0); // get value ==> expected "0" error - ctx->in_param = "Device.X_IOPSYS_EU_TEST.1.TransmitPowerLimit"; + ctx->in_param = "Device.X_IOWRT_EU_TEST.1.TransmitPowerLimit"; fault = bbf_entry_method(ctx, BBF_GET_VALUE); assert_int_equal(fault, 0); // validate parameter after setting to true: name, type, value - validate_parameter(ctx, "Device.X_IOPSYS_EU_TEST.1.TransmitPowerLimit", "70", "xsd:long"); + validate_parameter(ctx, "Device.X_IOWRT_EU_TEST.1.TransmitPowerLimit", "70", "xsd:long"); /* * Validate dateTime parameters */ // Set Wrong Value ==> expected "9007" error - ctx->in_param = "Device.X_IOPSYS_EU_TEST.1.AssociationTime"; + ctx->in_param = "Device.X_IOWRT_EU_TEST.1.AssociationTime"; ctx->in_value = "2030-01-01T11:22:33.2Z"; fault = bbf_entry_method(ctx, BBF_SET_VALUE); assert_int_equal(fault, FAULT_9007); // Set Wrong Value ==> expected "9007" error - ctx->in_param = "Device.X_IOPSYS_EU_TEST.1.AssociationTime"; + ctx->in_param = "Device.X_IOWRT_EU_TEST.1.AssociationTime"; ctx->in_value = "2022-01-01T12:20:22.2222Z"; fault = bbf_entry_method(ctx, BBF_SET_VALUE); assert_int_equal(fault, FAULT_9007); // set value ==> expected "0" error - ctx->in_param = "Device.X_IOPSYS_EU_TEST.1.AssociationTime"; + ctx->in_param = "Device.X_IOWRT_EU_TEST.1.AssociationTime"; ctx->in_value = "2022-01-01T12:20:22Z"; fault = bbf_entry_method(ctx, BBF_SET_VALUE); assert_int_equal(fault, 0); // get value ==> expected "0" error - ctx->in_param = "Device.X_IOPSYS_EU_TEST.1.AssociationTime"; + ctx->in_param = "Device.X_IOWRT_EU_TEST.1.AssociationTime"; fault = bbf_entry_method(ctx, BBF_GET_VALUE); assert_int_equal(fault, 0); // validate parameter after setting to true: name, type, value - validate_parameter(ctx, "Device.X_IOPSYS_EU_TEST.1.AssociationTime", "2022-01-01T12:20:22Z", "xsd:dateTime"); + validate_parameter(ctx, "Device.X_IOWRT_EU_TEST.1.AssociationTime", "2022-01-01T12:20:22Z", "xsd:dateTime"); /* * Validate hexBinary parameters */ // Mapping without range: Set Wrong Value ==> expected "9007" error - ctx->in_param = "Device.X_IOPSYS_EU_TEST.1.ButtonColor"; + ctx->in_param = "Device.X_IOWRT_EU_TEST.1.ButtonColor"; ctx->in_value = "64t"; fault = bbf_entry_method(ctx, BBF_SET_VALUE); assert_int_equal(fault, FAULT_9007); // set value ==> expected "0" error - ctx->in_param = "Device.X_IOPSYS_EU_TEST.1.ButtonColor"; + ctx->in_param = "Device.X_IOWRT_EU_TEST.1.ButtonColor"; ctx->in_value = "64ab78cef12"; fault = bbf_entry_method(ctx, BBF_SET_VALUE); assert_int_equal(fault, 0); // get value ==> expected "0" error - ctx->in_param = "Device.X_IOPSYS_EU_TEST.1.ButtonColor"; + ctx->in_param = "Device.X_IOWRT_EU_TEST.1.ButtonColor"; fault = bbf_entry_method(ctx, BBF_GET_VALUE); assert_int_equal(fault, 0); // validate parameter after setting to true: name, type, value - validate_parameter(ctx, "Device.X_IOPSYS_EU_TEST.1.ButtonColor", "64ab78cef12", "xsd:hexBinary"); + validate_parameter(ctx, "Device.X_IOWRT_EU_TEST.1.ButtonColor", "64ab78cef12", "xsd:hexBinary"); // Mapping with range: Set Wrong Value out of range ==> expected "9007" error - ctx->in_param = "Device.X_IOPSYS_EU_TEST.1.TextColor"; + ctx->in_param = "Device.X_IOWRT_EU_TEST.1.TextColor"; ctx->in_value = "am123"; fault = bbf_entry_method(ctx, BBF_SET_VALUE); assert_int_equal(fault, FAULT_9007); // Mapping with range: set value in the first range [3-3] ==> expected "0" error - ctx->in_param = "Device.X_IOPSYS_EU_TEST.1.TextColor"; + ctx->in_param = "Device.X_IOWRT_EU_TEST.1.TextColor"; ctx->in_value = "123abc"; fault = bbf_entry_method(ctx, BBF_SET_VALUE); assert_int_equal(fault, 0); // get value ==> expected "0" error - ctx->in_param = "Device.X_IOPSYS_EU_TEST.1.TextColor"; + ctx->in_param = "Device.X_IOWRT_EU_TEST.1.TextColor"; fault = bbf_entry_method(ctx, BBF_GET_VALUE); assert_int_equal(fault, 0); // validate parameter after setting to true: name, type, value - validate_parameter(ctx, "Device.X_IOPSYS_EU_TEST.1.TextColor", "123abc", "xsd:hexBinary"); + validate_parameter(ctx, "Device.X_IOWRT_EU_TEST.1.TextColor", "123abc", "xsd:hexBinary"); // Mapping with range: set value in the second range [5-5] ==> expected "0" error - ctx->in_param = "Device.X_IOPSYS_EU_TEST.1.TextColor"; + ctx->in_param = "Device.X_IOWRT_EU_TEST.1.TextColor"; ctx->in_value = "12345abcde"; fault = bbf_entry_method(ctx, BBF_SET_VALUE); assert_int_equal(fault, 0); // get value ==> expected "0" error - ctx->in_param = "Device.X_IOPSYS_EU_TEST.1.TextColor"; + ctx->in_param = "Device.X_IOWRT_EU_TEST.1.TextColor"; fault = bbf_entry_method(ctx, BBF_GET_VALUE); assert_int_equal(fault, 0); // validate parameter after setting to true: name, type, value - validate_parameter(ctx, "Device.X_IOPSYS_EU_TEST.1.TextColor", "12345abcde", "xsd:hexBinary"); + validate_parameter(ctx, "Device.X_IOWRT_EU_TEST.1.TextColor", "12345abcde", "xsd:hexBinary"); // Mapping without range: Set Wrong Value ==> expected "9007" error - ctx->in_param = "Device.X_IOPSYS_EU_TEST.1.BackgroundColor"; + ctx->in_param = "Device.X_IOWRT_EU_TEST.1.BackgroundColor"; ctx->in_value = "12345abce"; fault = bbf_entry_method(ctx, BBF_SET_VALUE); assert_int_equal(fault, FAULT_9007); // set value ==> expected "0" error - ctx->in_param = "Device.X_IOPSYS_EU_TEST.1.BackgroundColor"; + ctx->in_param = "Device.X_IOWRT_EU_TEST.1.BackgroundColor"; ctx->in_value = "45a1bd"; fault = bbf_entry_method(ctx, BBF_SET_VALUE); assert_int_equal(fault, 0); // get value ==> expected "0" error - ctx->in_param = "Device.X_IOPSYS_EU_TEST.1.BackgroundColor"; + ctx->in_param = "Device.X_IOWRT_EU_TEST.1.BackgroundColor"; fault = bbf_entry_method(ctx, BBF_GET_VALUE); assert_int_equal(fault, 0); // validate parameter after setting to true: name, type, value - validate_parameter(ctx, "Device.X_IOPSYS_EU_TEST.1.BackgroundColor", "45a1bd", "xsd:hexBinary"); + validate_parameter(ctx, "Device.X_IOWRT_EU_TEST.1.BackgroundColor", "45a1bd", "xsd:hexBinary"); /* * Validate string parameters */ // Set Wrong Value ==> expected "9007" error - ctx->in_param = "Device.X_IOPSYS_EU_TEST.1.Interface"; + ctx->in_param = "Device.X_IOWRT_EU_TEST.1.Interface"; ctx->in_value = "64"; fault = bbf_entry_method(ctx, BBF_SET_VALUE); assert_int_equal(fault, FAULT_9007); // set value ==> expected "0" error - ctx->in_param = "Device.X_IOPSYS_EU_TEST.1.Interface"; + ctx->in_param = "Device.X_IOWRT_EU_TEST.1.Interface"; ctx->in_value = "wan"; fault = bbf_entry_method(ctx, BBF_SET_VALUE); assert_int_equal(fault, 0); // get value ==> expected "0" error - ctx->in_param = "Device.X_IOPSYS_EU_TEST.1.Interface"; + ctx->in_param = "Device.X_IOWRT_EU_TEST.1.Interface"; fault = bbf_entry_method(ctx, BBF_GET_VALUE); assert_int_equal(fault, 0); // validate parameter after setting to true: name, type, value - validate_parameter(ctx, "Device.X_IOPSYS_EU_TEST.1.Interface", "wan", "xsd:string"); + validate_parameter(ctx, "Device.X_IOWRT_EU_TEST.1.Interface", "wan", "xsd:string"); // Set Wrong Value ==> expected "9007" error - ctx->in_param = "Device.X_IOPSYS_EU_TEST.1.IPAddr"; + ctx->in_param = "Device.X_IOWRT_EU_TEST.1.IPAddr"; ctx->in_value = "192.168.1.789"; fault = bbf_entry_method(ctx, BBF_SET_VALUE); assert_int_equal(fault, FAULT_9007); // Set value ==> expected "0" error - ctx->in_param = "Device.X_IOPSYS_EU_TEST.1.IPAddr"; + ctx->in_param = "Device.X_IOWRT_EU_TEST.1.IPAddr"; ctx->in_value = "192.168.117.45"; fault = bbf_entry_method(ctx, BBF_SET_VALUE); assert_int_equal(fault, 0); // get value ==> expected "0" error - ctx->in_param = "Device.X_IOPSYS_EU_TEST.1.IPAddr"; + ctx->in_param = "Device.X_IOWRT_EU_TEST.1.IPAddr"; fault = bbf_entry_method(ctx, BBF_GET_VALUE); assert_int_equal(fault, 0); // validate parameter after setting to true: name, type, value - validate_parameter(ctx, "Device.X_IOPSYS_EU_TEST.1.IPAddr", "192.168.117.45", "xsd:string"); + validate_parameter(ctx, "Device.X_IOWRT_EU_TEST.1.IPAddr", "192.168.117.45", "xsd:string"); // Set Wrong Value ==> expected "9007" error - ctx->in_param = "Device.X_IOPSYS_EU_TEST.1.Protocol"; + ctx->in_param = "Device.X_IOWRT_EU_TEST.1.Protocol"; ctx->in_value = "OMA-D"; fault = bbf_entry_method(ctx, BBF_SET_VALUE); assert_int_equal(fault, FAULT_9007); // set value ==> expected "0" error - ctx->in_param = "Device.X_IOPSYS_EU_TEST.1.Protocol"; + ctx->in_param = "Device.X_IOWRT_EU_TEST.1.Protocol"; ctx->in_value = "OMA-DM"; fault = bbf_entry_method(ctx, BBF_SET_VALUE); assert_int_equal(fault, 0); // get value ==> expected "0" error - ctx->in_param = "Device.X_IOPSYS_EU_TEST.1.Protocol"; + ctx->in_param = "Device.X_IOWRT_EU_TEST.1.Protocol"; fault = bbf_entry_method(ctx, BBF_GET_VALUE); assert_int_equal(fault, 0); // validate parameter after setting to true: name, type, value - validate_parameter(ctx, "Device.X_IOPSYS_EU_TEST.1.Protocol", "OMA-DM", "xsd:string"); + validate_parameter(ctx, "Device.X_IOWRT_EU_TEST.1.Protocol", "OMA-DM", "xsd:string"); // set value ==> expected "0" error - ctx->in_param = "Device.X_IOPSYS_EU_TEST.1.Description"; + ctx->in_param = "Device.X_IOWRT_EU_TEST.1.Description"; ctx->in_value = "bbf validate test"; fault = bbf_entry_method(ctx, BBF_SET_VALUE); assert_int_equal(fault, 0); // get value ==> expected "0" error - ctx->in_param = "Device.X_IOPSYS_EU_TEST.1.Description"; + ctx->in_param = "Device.X_IOWRT_EU_TEST.1.Description"; fault = bbf_entry_method(ctx, BBF_GET_VALUE); assert_int_equal(fault, 0); // validate parameter after setting to true: name, type, value - validate_parameter(ctx, "Device.X_IOPSYS_EU_TEST.1.Description", "bbf validate test", "xsd:string"); + validate_parameter(ctx, "Device.X_IOWRT_EU_TEST.1.Description", "bbf validate test", "xsd:string"); /* * Validate list string parameters */ // Set Wrong Value ==> expected "9007" error - ctx->in_param = "Device.X_IOPSYS_EU_TEST.1.FailureReasons"; + ctx->in_param = "Device.X_IOWRT_EU_TEST.1.FailureReasons"; ctx->in_value = "te,be,re,yu"; fault = bbf_entry_method(ctx, BBF_SET_VALUE); assert_int_equal(fault, FAULT_9007); // Set Wrong Value ==> expected "9007" error - ctx->in_param = "Device.X_IOPSYS_EU_TEST.1.FailureReasons"; + ctx->in_param = "Device.X_IOWRT_EU_TEST.1.FailureReasons"; ctx->in_value = "ExcessiveDelay,InsufficientBuffers"; fault = bbf_entry_method(ctx, BBF_SET_VALUE); assert_int_equal(fault, FAULT_9007); // set value ==> expected "0" error - ctx->in_param = "Device.X_IOPSYS_EU_TEST.1.FailureReasons"; + ctx->in_param = "Device.X_IOWRT_EU_TEST.1.FailureReasons"; ctx->in_value = "LowRate,Other"; fault = bbf_entry_method(ctx, BBF_SET_VALUE); assert_int_equal(fault, 0); // get value ==> expected "0" error - ctx->in_param = "Device.X_IOPSYS_EU_TEST.1.FailureReasons"; + ctx->in_param = "Device.X_IOWRT_EU_TEST.1.FailureReasons"; fault = bbf_entry_method(ctx, BBF_GET_VALUE); assert_int_equal(fault, 0); // validate parameter after setting to true: name, type, value - validate_parameter(ctx, "Device.X_IOPSYS_EU_TEST.1.FailureReasons", "LowRate,Other", "xsd:string"); + validate_parameter(ctx, "Device.X_IOWRT_EU_TEST.1.FailureReasons", "LowRate,Other", "xsd:string"); // Set Wrong Value ==> expected "9007" error - ctx->in_param = "Device.X_IOPSYS_EU_TEST.1.SupportedOperatingChannelBandwidths"; + ctx->in_param = "Device.X_IOWRT_EU_TEST.1.SupportedOperatingChannelBandwidths"; ctx->in_value = "200MHz,10MHz"; fault = bbf_entry_method(ctx, BBF_SET_VALUE); assert_int_equal(fault, FAULT_9007); // Set Wrong Value ==> expected "9007" error - ctx->in_param = "Device.X_IOPSYS_EU_TEST.1.SupportedOperatingChannelBandwidths"; + ctx->in_param = "Device.X_IOWRT_EU_TEST.1.SupportedOperatingChannelBandwidths"; ctx->in_value = "ExcessiveDelay,InsufficientBuffers"; fault = bbf_entry_method(ctx, BBF_SET_VALUE); assert_int_equal(fault, FAULT_9007); // set value ==> expected "0" error - ctx->in_param = "Device.X_IOPSYS_EU_TEST.1.SupportedOperatingChannelBandwidths"; + ctx->in_param = "Device.X_IOWRT_EU_TEST.1.SupportedOperatingChannelBandwidths"; ctx->in_value = "40MHz,80+80MHz"; fault = bbf_entry_method(ctx, BBF_SET_VALUE); assert_int_equal(fault, 0); // get value ==> expected "0" error - ctx->in_param = "Device.X_IOPSYS_EU_TEST.1.SupportedOperatingChannelBandwidths"; + ctx->in_param = "Device.X_IOWRT_EU_TEST.1.SupportedOperatingChannelBandwidths"; ctx->in_value = ""; fault = bbf_entry_method(ctx, BBF_GET_VALUE); assert_int_equal(fault, 0); // validate parameter after setting to true: name, type, value ctx->in_param = ""; - validate_parameter(ctx, "Device.X_IOPSYS_EU_TEST.1.SupportedOperatingChannelBandwidths", "40MHz,80+80MHz", "xsd:string"); + validate_parameter(ctx, "Device.X_IOWRT_EU_TEST.1.SupportedOperatingChannelBandwidths", "40MHz,80+80MHz", "xsd:string"); /* * Validate list int parameters */ // Set Wrong Value ==> expected "9007" error - ctx->in_param = "Device.X_IOPSYS_EU_TEST.1.TransmitPowerSupported"; + ctx->in_param = "Device.X_IOWRT_EU_TEST.1.TransmitPowerSupported"; ctx->in_value = "-5,-3,99,120"; fault = bbf_entry_method(ctx, BBF_SET_VALUE); assert_int_equal(fault, FAULT_9007); // Set Wrong Value ==> expected "9007" error - ctx->in_param = "Device.X_IOPSYS_EU_TEST.1.TransmitPowerSupported"; + ctx->in_param = "Device.X_IOWRT_EU_TEST.1.TransmitPowerSupported"; ctx->in_value = "-1,9,990"; fault = bbf_entry_method(ctx, BBF_SET_VALUE); assert_int_equal(fault, FAULT_9007); // set value ==> expected "0" error - ctx->in_param = "Device.X_IOPSYS_EU_TEST.1.TransmitPowerSupported"; + ctx->in_param = "Device.X_IOWRT_EU_TEST.1.TransmitPowerSupported"; ctx->in_value = "-1,9,100"; fault = bbf_entry_method(ctx, BBF_SET_VALUE); assert_int_equal(fault, 0); // get value ==> expected "0" error - ctx->in_param = "Device.X_IOPSYS_EU_TEST.1.TransmitPowerSupported"; + ctx->in_param = "Device.X_IOWRT_EU_TEST.1.TransmitPowerSupported"; fault = bbf_entry_method(ctx, BBF_GET_VALUE); assert_int_equal(fault, 0); // validate parameter after setting to true: name, type, value - validate_parameter(ctx, "Device.X_IOPSYS_EU_TEST.1.TransmitPowerSupported", "-1,9,100", "xsd:string"); + validate_parameter(ctx, "Device.X_IOWRT_EU_TEST.1.TransmitPowerSupported", "-1,9,100", "xsd:string"); /* * Validate list unsignedInt parameters */ // Set Wrong Value ==> expected "9007" error - ctx->in_param = "Device.X_IOPSYS_EU_TEST.1.PriorityRegeneration"; + ctx->in_param = "Device.X_IOWRT_EU_TEST.1.PriorityRegeneration"; ctx->in_value = "8,1,2,3"; fault = bbf_entry_method(ctx, BBF_SET_VALUE); assert_int_equal(fault, FAULT_9007); // Set Wrong Value ==> expected "9007" error - ctx->in_param = "Device.X_IOPSYS_EU_TEST.1.PriorityRegeneration"; + ctx->in_param = "Device.X_IOWRT_EU_TEST.1.PriorityRegeneration"; ctx->in_value = "1,2,3,4,5,6,7,8"; fault = bbf_entry_method(ctx, BBF_SET_VALUE); assert_int_equal(fault, FAULT_9007); // set value ==> expected "0" error - ctx->in_param = "Device.X_IOPSYS_EU_TEST.1.PriorityRegeneration"; + ctx->in_param = "Device.X_IOWRT_EU_TEST.1.PriorityRegeneration"; ctx->in_value = "0,1,2,3,4,5,6,7"; fault = bbf_entry_method(ctx, BBF_SET_VALUE); assert_int_equal(fault, 0); // get value ==> expected "0" error - ctx->in_param = "Device.X_IOPSYS_EU_TEST.1.PriorityRegeneration"; + ctx->in_param = "Device.X_IOWRT_EU_TEST.1.PriorityRegeneration"; fault = bbf_entry_method(ctx, BBF_GET_VALUE); assert_int_equal(fault, 0); // validate parameter after setting to true: name, type, value - validate_parameter(ctx, "Device.X_IOPSYS_EU_TEST.1.PriorityRegeneration", "0,1,2,3,4,5,6,7", "xsd:string"); + validate_parameter(ctx, "Device.X_IOWRT_EU_TEST.1.PriorityRegeneration", "0,1,2,3,4,5,6,7", "xsd:string"); } static void test_api_bbfdm_add_del_standard_object(void **state) @@ -1059,13 +1059,13 @@ static void test_api_bbfdm_add_del_json_object(void **state) int fault = 0; // Get name object ==> expected "0" error - ctx->in_param = "Device.X_IOPSYS_EU_Dropbear."; + ctx->in_param = "Device.X_IOWRT_EU_Dropbear."; ctx->nextlevel = true; fault = bbf_entry_method(ctx, BBF_GET_NAME); assert_int_equal(fault, 0); // add object ==> expected "0" error - ctx->in_param = "Device.X_IOPSYS_EU_Dropbear."; + ctx->in_param = "Device.X_IOWRT_EU_Dropbear."; fault = bbf_entry_method(ctx, BBF_ADD_OBJECT); assert_int_equal(fault, 0); @@ -1074,18 +1074,18 @@ static void test_api_bbfdm_add_del_json_object(void **state) assert_string_equal(ctx->addobj_instance, "2"); // delete object ==> expected "0" error - ctx->in_param = "Device.X_IOPSYS_EU_Dropbear.2."; + ctx->in_param = "Device.X_IOWRT_EU_Dropbear.2."; fault = bbf_entry_method(ctx, BBF_DEL_OBJECT); assert_int_equal(fault, 0); // Get name object after deleting instance 2 ==> expected "9005" error - ctx->in_param = "Device.X_IOPSYS_EU_Dropbear.2."; + ctx->in_param = "Device.X_IOWRT_EU_Dropbear.2."; ctx->nextlevel = true; fault = bbf_entry_method(ctx, BBF_GET_NAME); assert_int_equal(fault, FAULT_9005); // delete all object ==> expected "9005" error - ctx->in_param = "Device.X_IOPSYS_EU_Dropbear."; + ctx->in_param = "Device.X_IOWRT_EU_Dropbear."; fault = bbf_entry_method(ctx, BBF_DEL_OBJECT); assert_int_equal(fault, FAULT_9005); } @@ -1341,7 +1341,7 @@ static void test_api_bbfdm_valid_library_operate(void **state) size_t rem = 0; int fault = 0; - ctx->in_param = "Device.X_IOPSYS_EU_PingTEST.Run()"; + ctx->in_param = "Device.X_IOWRT_EU_PingTEST.Run()"; ctx->in_value = "{\"Host\":\"iopsys.eu\"}"; fault = bbf_entry_method(ctx, BBF_OPERATE); @@ -1399,14 +1399,14 @@ static void test_api_bbfdm_valid_library_list_operate(void **state) struct blob_attr *command_in = tb[3]; struct blob_attr *command_out = tb[4]; - if (DM_STRCMP(name, "Device.X_IOPSYS_EU_Reboot()") == 0) { + if (DM_STRCMP(name, "Device.X_IOWRT_EU_Reboot()") == 0) { assert_string_equal(type, "xsd:command"); assert_string_equal(data, "sync"); assert_null(command_in); assert_null(command_out); } - if (DM_STRCMP(name, "Device.X_IOPSYS_EU_PingTEST.Run()") == 0) { + if (DM_STRCMP(name, "Device.X_IOWRT_EU_PingTEST.Run()") == 0) { assert_string_equal(type, "xsd:command"); assert_string_equal(data, "async"); assert_non_null(command_in); @@ -1460,7 +1460,7 @@ static void test_api_bbfdm_valid_json_operate(void **state) size_t rem = 0; int fault = 0; - ctx->in_param = "Device.X_IOPSYS_EU_TEST.1.Status()"; + ctx->in_param = "Device.X_IOWRT_EU_TEST.1.Status()"; fault = bbf_entry_method(ctx, BBF_OPERATE); assert_int_equal(fault, 0); @@ -1520,7 +1520,7 @@ static void test_api_bbfdm_valid_json_list_operate(void **state) struct blob_attr *command_in = tb[3]; struct blob_attr *command_out = tb[4]; - if (DM_STRCMP(name, "Device.X_IOPSYS_EU_TEST.{i}.Status()") == 0) { + if (DM_STRCMP(name, "Device.X_IOWRT_EU_TEST.{i}.Status()") == 0) { assert_string_equal(type, "xsd:command"); assert_string_equal(data, "async"); assert_non_null(command_in); @@ -1708,12 +1708,12 @@ static void test_api_bbfdm_valid_library_event(void **state) char *type = blobmsg_get_string(tb[2]); struct blob_attr *event_in = tb[3]; - if (DM_STRCMP(name, "Device.X_IOPSYS_EU_WakeUp!") == 0) { + if (DM_STRCMP(name, "Device.X_IOWRT_EU_WakeUp!") == 0) { assert_string_equal(type, "xsd:event"); assert_null(data); } - if (DM_STRCMP(name, "Device.X_IOPSYS_EU_Boot!") == 0) { + if (DM_STRCMP(name, "Device.X_IOWRT_EU_Boot!") == 0) { assert_string_equal(type, "xsd:event"); assert_non_null(event_in); @@ -1781,12 +1781,12 @@ static void test_api_bbfdm_valid_json_event(void **state) char *type = blobmsg_get_string(tb[2]); struct blob_attr *event_in = tb[3]; - if (DM_STRCMP(name, "Device.X_IOPSYS_EU_TEST.{i}.Periodic!") == 0) { + if (DM_STRCMP(name, "Device.X_IOWRT_EU_TEST.{i}.Periodic!") == 0) { assert_string_equal(type, "xsd:event"); assert_null(data); } - if (DM_STRCMP(name, "Device.X_IOPSYS_EU_TEST.{i}.Push!") == 0) { + if (DM_STRCMP(name, "Device.X_IOWRT_EU_TEST.{i}.Push!") == 0) { assert_string_equal(type, "xsd:event"); assert_non_null(event_in); diff --git a/test/cmocka/unit_test_bbfd.c b/test/cmocka/unit_test_bbfd.c index cef3ad25..5ebbcbb7 100644 --- a/test/cmocka/unit_test_bbfd.c +++ b/test/cmocka/unit_test_bbfd.c @@ -82,7 +82,7 @@ static void test_api_bbfdm_get_value_parameter(void **state) struct dmctx *ctx = (struct dmctx *) *state; int fault = 0; - ctx->in_param = "Device.X_IOPSYS_EU_Dropbear.1.Alias"; + ctx->in_param = "Device.X_IOWRT_EU_Dropbear.1.Alias"; fault = bbf_entry_method(ctx, BBF_GET_VALUE); assert_int_equal(fault, 0); @@ -148,7 +148,7 @@ static void test_api_bbfdm_get_name_parameter(void **state) struct dmctx *ctx = (struct dmctx *) *state; int fault = 0; - ctx->in_param = "Device.X_IOPSYS_EU_Dropbear.1.Verbose"; + ctx->in_param = "Device.X_IOWRT_EU_Dropbear.1.Verbose"; ctx->nextlevel = false; fault = bbf_entry_method(ctx, BBF_GET_NAME); @@ -190,7 +190,7 @@ static void test_api_bbfdm_set_value_object(void **state) struct dmctx *ctx = (struct dmctx *) *state; int fault = 0; - ctx->in_param = "Device.X_IOPSYS_EU_Dropbear."; + ctx->in_param = "Device.X_IOWRT_EU_Dropbear."; ctx->in_value = "test"; fault = bbf_entry_method(ctx, BBF_SET_VALUE); @@ -202,7 +202,7 @@ static void test_api_bbfdm_set_value_parameter(void **state) struct dmctx *ctx = (struct dmctx *) *state; int fault = 0; - ctx->in_param = "Device.X_IOPSYS_EU_Dropbear.1.BannerFile"; + ctx->in_param = "Device.X_IOWRT_EU_Dropbear.1.BannerFile"; ctx->in_value = "test"; fault = bbf_entry_method(ctx, BBF_SET_VALUE); @@ -226,7 +226,7 @@ static void test_api_bbfdm_set_value_wrong_parameter_path(void **state) struct dmctx *ctx = (struct dmctx *) *state; int fault = 0; - ctx->in_param = "Device.X_IOPSYS_EU_Dropbear.Port"; + ctx->in_param = "Device.X_IOWRT_EU_Dropbear.Port"; ctx->in_value = "test"; fault = bbf_entry_method(ctx, BBF_SET_VALUE); @@ -250,7 +250,7 @@ static void test_api_bbfdm_set_value_parameter_wrong_value(void **state) struct dmctx *ctx = (struct dmctx *) *state; int fault = 0; - ctx->in_param = "Device.X_IOPSYS_EU_Dropbear.1.RootLogin"; + ctx->in_param = "Device.X_IOWRT_EU_Dropbear.1.RootLogin"; ctx->in_value = "truee"; fault = bbf_entry_method(ctx, BBF_SET_VALUE); @@ -262,7 +262,7 @@ static void test_api_bbfdm_add_object(void **state) struct dmctx *ctx = (struct dmctx *) *state; int fault = 0; - ctx->in_param = "Device.X_IOPSYS_EU_Dropbear."; + ctx->in_param = "Device.X_IOWRT_EU_Dropbear."; fault = bbf_entry_method(ctx, BBF_ADD_OBJECT); assert_int_equal(fault, 0); @@ -276,7 +276,7 @@ static void test_api_bbfdm_add_wrong_object(void **state) struct dmctx *ctx = (struct dmctx *) *state; int fault = 0; - ctx->in_param = "Device.X_IOPSYS_EU_Dropbear.Users."; + ctx->in_param = "Device.X_IOWRT_EU_Dropbear.Users."; fault = bbf_entry_method(ctx, BBF_ADD_OBJECT); assert_int_equal(fault, FAULT_9005); @@ -315,7 +315,7 @@ static void test_api_bbfdm_delete_object(void **state) struct dmctx *ctx = (struct dmctx *) *state; int fault = 0; - ctx->in_param = "Device.X_IOPSYS_EU_Dropbear.1."; + ctx->in_param = "Device.X_IOWRT_EU_Dropbear.1."; fault = bbf_entry_method(ctx, BBF_DEL_OBJECT); assert_int_equal(fault, 0); @@ -326,7 +326,7 @@ static void test_api_bbfdm_delete_object_all_instances(void **state) struct dmctx *ctx = (struct dmctx *) *state; int fault = 0; - ctx->in_param = "Device.X_IOPSYS_EU_Dropbear."; + ctx->in_param = "Device.X_IOWRT_EU_Dropbear."; fault = bbf_entry_method(ctx, BBF_DEL_OBJECT); assert_int_equal(fault, FAULT_9005); @@ -337,7 +337,7 @@ static void test_api_bbfdm_delete_wrong_object(void **state) struct dmctx *ctx = (struct dmctx *) *state; int fault = 0; - ctx->in_param = "Device.X_IOPSYS_EU_Dropbear"; + ctx->in_param = "Device.X_IOWRT_EU_Dropbear"; fault = bbf_entry_method(ctx, BBF_DEL_OBJECT); assert_int_equal(fault, FAULT_9005); @@ -371,7 +371,7 @@ static void test_api_bbfdm_valid_operate(void **state) int fault = 0; ctx->dm_type = BBFDM_USP; - ctx->in_param = "Device.X_IOPSYS_EU_Reboot()"; + ctx->in_param = "Device.X_IOWRT_EU_Reboot()"; fault = bbf_entry_method(ctx, BBF_OPERATE); assert_int_equal(fault, 0); @@ -476,7 +476,7 @@ static void test_api_bbfdm_get_instances_without_next_level(void **state) struct dmctx *ctx = (struct dmctx *) *state; int fault = 0; - ctx->in_param = "Device.X_IOPSYS_EU_Dropbear."; + ctx->in_param = "Device.X_IOWRT_EU_Dropbear."; ctx->nextlevel = false; fault = bbf_entry_method(ctx, BBF_INSTANCES); @@ -493,7 +493,7 @@ static void test_api_bbfdm_json_get_value(void **state) /* * Test of JSON Object Path */ - ctx->in_param = "Device.X_IOPSYS_EU_Dropbear."; + ctx->in_param = "Device.X_IOWRT_EU_Dropbear."; fault = bbf_entry_method(ctx, BBF_GET_VALUE); assert_int_equal(fault, 0); @@ -505,7 +505,7 @@ static void test_api_bbfdm_json_get_value(void **state) /* * Test of JSON Parameter Path */ - ctx->in_param = "Device.X_IOPSYS_EU_Dropbear.1.Alias"; + ctx->in_param = "Device.X_IOWRT_EU_Dropbear.1.Alias"; fault = bbf_entry_method(ctx, BBF_GET_VALUE); assert_int_equal(fault, 0); @@ -517,7 +517,7 @@ static void test_api_bbfdm_json_add_object(void **state) struct dmctx *ctx = (struct dmctx *) *state; int fault = 0; - ctx->in_param = "Device.X_IOPSYS_EU_Dropbear."; + ctx->in_param = "Device.X_IOWRT_EU_Dropbear."; fault = bbf_entry_method(ctx, BBF_ADD_OBJECT); assert_int_equal(fault, 0); @@ -531,12 +531,12 @@ static void test_api_bbfdm_json_delete_object(void **state) struct dmctx *ctx = (struct dmctx *) *state; int fault = 0; - ctx->in_param = "Device.X_IOPSYS_EU_Dropbear.1."; + ctx->in_param = "Device.X_IOWRT_EU_Dropbear.1."; fault = bbf_entry_method(ctx, BBF_DEL_OBJECT); assert_int_equal(fault, 0); - ctx->in_param = "Device.X_IOPSYS_EU_Dropbear."; + ctx->in_param = "Device.X_IOWRT_EU_Dropbear."; fault = bbf_entry_method(ctx, BBF_DEL_OBJECT); assert_int_equal(fault, FAULT_9005); @@ -547,7 +547,7 @@ static void test_api_bbfdm_library_get_value(void **state) struct dmctx *ctx = (struct dmctx *) *state; int fault = 0; - ctx->in_param = "Device.X_IOPSYS_EU_TEST."; + ctx->in_param = "Device.X_IOWRT_EU_TEST."; fault = bbf_entry_method(ctx, BBF_GET_VALUE); assert_int_equal(fault, 0); @@ -570,7 +570,7 @@ static void test_api_bbfdm_library_add_object(void **state) struct dmctx *ctx = (struct dmctx *) *state; int fault = 0; - ctx->in_param = "Device.X_IOPSYS_EU_TEST."; + ctx->in_param = "Device.X_IOWRT_EU_TEST."; fault = bbf_entry_method(ctx, BBF_ADD_OBJECT); assert_int_equal(fault, 0); @@ -584,12 +584,12 @@ static void test_api_bbfdm_library_delete_object(void **state) struct dmctx *ctx = (struct dmctx *) *state; int fault = 0; - ctx->in_param = "Device.X_IOPSYS_EU_TEST.2."; + ctx->in_param = "Device.X_IOWRT_EU_TEST.2."; fault = bbf_entry_method(ctx, BBF_DEL_OBJECT); assert_int_equal(fault, 0); - ctx->in_param = "Device.X_IOPSYS_EU_TEST."; + ctx->in_param = "Device.X_IOWRT_EU_TEST."; fault = bbf_entry_method(ctx, BBF_DEL_OBJECT); assert_int_equal(fault, FAULT_9005); diff --git a/test/files/usr/share/bbfdm/micro_services/core/X_IOPSYS_EU_Dropbear.json b/test/files/usr/share/bbfdm/micro_services/core/Dropbear_extn.json similarity index 100% rename from test/files/usr/share/bbfdm/micro_services/core/X_IOPSYS_EU_Dropbear.json rename to test/files/usr/share/bbfdm/micro_services/core/Dropbear_extn.json diff --git a/test/files/usr/share/bbfdm/micro_services/core/X_IOPSYS_EU_JSON_TEST_V1.json b/test/files/usr/share/bbfdm/micro_services/core/JSON_TEST_V1.json similarity index 100% rename from test/files/usr/share/bbfdm/micro_services/core/X_IOPSYS_EU_JSON_TEST_V1.json rename to test/files/usr/share/bbfdm/micro_services/core/JSON_TEST_V1.json diff --git a/test/files/usr/share/bbfdm/micro_services/core/X_IOPSYS_EU_TEST.json b/test/files/usr/share/bbfdm/micro_services/core/TEST.json similarity index 100% rename from test/files/usr/share/bbfdm/micro_services/core/X_IOPSYS_EU_TEST.json rename to test/files/usr/share/bbfdm/micro_services/core/TEST.json diff --git a/test/files/usr/share/bbfdm/micro_services/core/X_IOPSYS_EU_WiFi.json b/test/files/usr/share/bbfdm/micro_services/core/WiFi_extn.json similarity index 100% rename from test/files/usr/share/bbfdm/micro_services/core/X_IOPSYS_EU_WiFi.json rename to test/files/usr/share/bbfdm/micro_services/core/WiFi_extn.json diff --git a/test/vendor_test/device.c b/test/vendor_test/device.c index 54548005..0531406a 100644 --- a/test/vendor_test/device.c +++ b/test/vendor_test/device.c @@ -15,6 +15,6 @@ DMOBJ tTEST_DeviceObj[] = { /* OBJ, permission, addobj, delobj, checkdep, browseinstobj, nextdynamicobj, dynamicleaf, nextobj, leaf, linker, bbfdm_type, uniqueKeys*/ {"USB", &DMREAD, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, BBFDM_NONE}, -{"X_IOPSYS_EU_Dropbear", &DMWRITE, add_dropbear_instance, delete_dropbear_instance, "file:/etc/config/dropbear", browse_dropbear_instance, NULL, NULL, NULL, X_TEST_COM_DropbearParams, NULL, BBFDM_BOTH}, +{"X_IOWRT_EU_Dropbear", &DMWRITE, add_dropbear_instance, delete_dropbear_instance, "file:/etc/config/dropbear", browse_dropbear_instance, NULL, NULL, NULL, X_TEST_COM_DropbearParams, NULL, BBFDM_BOTH}, {0} }; diff --git a/test/vendor_test/extension.c b/test/vendor_test/extension.c index 2360eea5..9296072a 100644 --- a/test/vendor_test/extension.c +++ b/test/vendor_test/extension.c @@ -40,7 +40,7 @@ DMLEAF tTEST_EthernetRMONStatsParams[] = { DM_MAP_OBJ tDynamicObj[] = { /* parentobj, nextobject, parameter */ -{"Device.", tTEST_DeviceObj, NULL}, // Overwrite 'X_IOPSYS_EU_Dropbear' && Exclude 'USB' +{"Device.", tTEST_DeviceObj, NULL}, // Overwrite 'X_IOWRT_EU_Dropbear' && Exclude 'USB' {"Device.Firewall.Chain.{i}.Rule.{i}.", tTEST_FirewallChainRuleObj, tTEST_FirewallChainRuleParams}, // Extend 'X_TEST_COM_TimeSpan', etc.. && Overwrite 'ExpiryDate' {"Device.DeviceInfo.", tTEST_DeviceInfoObj, tTEST_DeviceInfoParams}, // Overwrite 'Manufacturer' && Exclude 'VendorConfigFile' from the tree {"Device.DSL.Channel.{i}.", tTEST_DSLChannelObj, NULL}, // Exclude 'Stats' from the tree diff --git a/tools/README.md b/tools/README.md index 1fc5c46d..4efb4524 100644 --- a/tools/README.md +++ b/tools/README.md @@ -92,7 +92,7 @@ Examples: This tool helps in validating the json schema, which is very helpful in the development of a JSON based plugins. ```bash -$ ./tools/validate_json_plugin.py test/files/etc/bbfdm/json/X_IOPSYS_EU_TEST.json +$ ./tools/validate_json_plugin.py test/files/etc/bbfdm/json/TEST.json $ ./tools/validate_json_plugin.py tools/datamodel.json ``` @@ -136,7 +136,7 @@ The parameters/keys used in tools_input.json file are mostly self-explanatory bu | model_name | The model name, e.g., "DG400PRIME-A" | | software_version | The software version, e.g., "1.2.3.4" | | dm_json_files | This should contain the list of json file path, where each file contains the definition of DM objects/parameters | -| vendor_prefix | The prefix used by vendor for vendor extension in DM objects/parameters, e.g., "X_IOPSYS_EU_" | +| vendor_prefix | The prefix used by vendor for vendor extension in DM objects/parameters, e.g., "X_IOWRT_EU_" | | plugins | A list of plugins with associated repositories and data model files | | | repo: The path of the plugin repository. Could be 'URL' or 'folder_path' | | | proto: The protocol of the plugin repository. Could be 'git' or 'local' | @@ -168,7 +168,7 @@ The input json file should be defined as follow: "dm_json_files": [ "tools/datamodel.json" ] - "vendor_prefix": "X_IOPSYS_EU_", + "vendor_prefix": "X_IOWRT_EU_", "plugins": [ { "repo": "https://dev.iopsys.eu/bbf/mydatamodel.git", diff --git a/tools/bbf_common.py b/tools/bbf_common.py index 7fc9e946..2bbc9262 100755 --- a/tools/bbf_common.py +++ b/tools/bbf_common.py @@ -159,7 +159,7 @@ def generate_shared_library(dm_name, source_files, vendor_prefix, if vendor_prefix is not None: VENDOR_PREFIX = vendor_prefix else: - VENDOR_PREFIX = "X_IOPSYS_EU_" + VENDOR_PREFIX = "X_IOWRT_EU_" # Ensure that the source files exist for source_file in source_files: @@ -191,7 +191,7 @@ def build_and_install_bbfdm(vendor_prefix): if vendor_prefix is not None: VENDOR_PREFIX = vendor_prefix else: - VENDOR_PREFIX = "X_IOPSYS_EU_" + VENDOR_PREFIX = "X_IOWRT_EU_" # Build and install bbfdm cmake_command = [ diff --git a/tools/generate_dm_excel.py b/tools/generate_dm_excel.py index d0ec7cc7..8c3bbdce 100755 --- a/tools/generate_dm_excel.py +++ b/tools/generate_dm_excel.py @@ -198,8 +198,8 @@ if __name__ == '__main__': parser.add_argument( '-p', '--vendor-prefix', - default = 'X_IOPSYS_EU_', - metavar = 'X_IOPSYS_EU_', + default = 'X_IOWRT_EU_', + metavar = 'X_IOWRT_EU_', help = 'Generate data model tree using provided vendor prefix for vendor defined objects' ) diff --git a/tools/generate_dm_xml.py b/tools/generate_dm_xml.py index eb2680bb..0df49e09 100755 --- a/tools/generate_dm_xml.py +++ b/tools/generate_dm_xml.py @@ -114,8 +114,8 @@ def get_info_from_json(data, dm_json_files=None): if i != (len(list_data) - 1) and list_data[i + 1] == list_data[i] + "{i}.": continue try: - if str(list_data[i]).find("X_IOPSYS_EU_") != -1: - param = str(list_data[i]).replace("X_IOPSYS_EU_", "{BBF_VENDOR_PREFIX}") + if str(list_data[i]).find("X_IOWRT_EU_") != -1: + param = str(list_data[i]).replace("X_IOWRT_EU_", "{BBF_VENDOR_PREFIX}") else: param = str(list_data[i]) @@ -392,8 +392,8 @@ if __name__ == '__main__': parser.add_argument( '-p', '--vendor-prefix', - default = 'X_IOPSYS_EU_', - metavar = 'X_IOPSYS_EU_', + default = 'X_IOWRT_EU_', + metavar = 'X_IOWRT_EU_', help = 'Generate data model tree using provided vendor prefix for vendor defined objects.' ) diff --git a/tools/tools_input.json b/tools/tools_input.json index aa3032f0..eb7f3549 100644 --- a/tools/tools_input.json +++ b/tools/tools_input.json @@ -25,7 +25,7 @@ "-DSYSMNGR_NETWORK_PROPERTIES", "-DSYSMNGR_VENDOR_EXTENSIONS", "-DSYSMNGR_TEMPERATURE_STATUS", - "-DCUSTOM_PREFIX=\\\"X_IOPSYS_EU_\\\"" + "-DCUSTOM_PREFIX=\\\"X_IOWRT_EU_\\\"" ], "dm_files": [ "src/deviceinfo.c", @@ -170,7 +170,7 @@ "version": "devel", "extra_dependencies": [ "-DHAS_VENDOR_EXT", - "-DCUSTOM_PREFIX=\\\"X_IOPSYS_EU_\\\"" + "-DCUSTOM_PREFIX=\\\"X_IOWRT_EU_\\\"" ], "dm_files": [ "src/bbf_plugin/hosts_ext.c"