diff --git a/docs/api/ubus/usp.md b/docs/api/ubus/usp.md index cf9ae38aaf08e11a481f9be407d59fd5614d0329..0a357f10e0e15f61d2f77001f9d18981b0f4f859 100644 --- a/docs/api/ubus/usp.md +++ b/docs/api/ubus/usp.md @@ -144,7 +144,7 @@ The value of this property **must** be equal to one of the [known values below]( ### Ubus CLI Example ``` -ubus call usp add_object {"path":"in dolore nul","proto":"usp","key":"enim in Ut consectetur amet","instance_mode":1} +ubus call usp add_object {"path":"in dolore nul","proto":"usp","instance_mode":1} ``` ### JSONRPC Example @@ -158,7 +158,7 @@ ubus call usp add_object {"path":"in dolore nul","proto":"usp","key":"enim in Ut "<SID>", "usp", "add_object", - { "path": "in dolore nul", "proto": "usp", "key": "enim in Ut consectetur amet", "instance_mode": 1 } + { "path": "in dolore nul", "proto": "usp", "instance_mode": 1 } ] } ``` @@ -411,7 +411,7 @@ The value of this property **must** be equal to one of the [known values below]( ### Ubus CLI Example ``` -ubus call usp del_object {"path":"ea amet qui et culp","proto":"usp","key":"dolor aliqua anim ip","instance_mode":0} +ubus call usp del_object {"path":"ea amet qui et culp","proto":"usp",instance_mode":0} ``` ### JSONRPC Example @@ -425,7 +425,7 @@ ubus call usp del_object {"path":"ea amet qui et culp","proto":"usp","key":"dolo "<SID>", "usp", "del_object", - { "path": "ea amet qui et culp", "proto": "usp", "key": "dolor aliqua anim ip", "instance_mode": 0 } + { "path": "ea amet qui et culp", "proto": "usp", "instance_mode": 0 } ] } ``` @@ -2727,7 +2727,7 @@ To set multiple values at once, path should be relative to object elements ### Ubus CLI Example ``` -ubus call usp set {"path":"magna voluptate labore","value":"cupidatat","proto":"usp","values":{},"key":"quis","instance_mode":1} +ubus call usp set {"path":"magna voluptate labore","value":"cupidatat","proto":"usp","values":{},"instance_mode":1} ``` ### JSONRPC Example diff --git a/docs/api/ubus/usp.raw.md b/docs/api/ubus/usp.raw.md index 120f1eeb5cbc8187a8db2865a42b84185a56c5ac..5b401fb881186260c70cb418dba7d0a722d2f311 100644 --- a/docs/api/ubus/usp.raw.md +++ b/docs/api/ubus/usp.raw.md @@ -168,7 +168,7 @@ The value of this property **must** be equal to one of the [known values below]( ### Ubus CLI Example ``` -ubus call usp.raw add_object {"path":"eu sit","transaction_id":13511822,"proto":"both","key":"ut non in qui cupidatat","instance_mode":1} +ubus call usp.raw add_object {"path":"eu sit","transaction_id":13511822,"proto":"both","instance_mode":1} ``` ### JSONRPC Example @@ -407,7 +407,7 @@ The value of this property **must** be equal to one of the [known values below]( ### Ubus CLI Example ``` -ubus call usp.raw del_object {"path":"ut adipisicing ut nisi","transaction_id":8573124,"proto":"cwmp","key":"tempor consectetur veniam laborum","instance_mode":1} +ubus call usp.raw del_object {"path":"ut adipisicing ut nisi","transaction_id":8573124,"proto":"cwmp","instance_mode":1} ``` ### JSONRPC Example @@ -3392,7 +3392,7 @@ To set multiple values at once, path should be relative to object elements ### Ubus CLI Example ``` -ubus call usp.raw set {"path":"anim ullamco","value":"officia nostrud dolor ad tempor","transaction_id":47775846,"proto":"usp","values":{},"key":"dolore aliquip quis nostrud","instance_mode":1} +ubus call usp.raw set {"path":"anim ullamco","value":"officia nostrud dolor ad tempor","transaction_id":47775846,"proto":"usp","values":{},"instance_mode":1} ``` ### JSONRPC Example @@ -3752,7 +3752,7 @@ All items must be of the type: Unknown type ``. ### Ubus CLI Example ``` -ubus call usp.raw setm_values {"pv_tuple":[{"path":"exmagna incididunt qui labore","value":"cillum occaecat aliquip anim id","key":"adipisicing reprehenderit"}],"transaction_id":54841604,"proto":"both","key":"ad","instance_mode":0} +ubus call usp.raw setm_values {"pv_tuple":[{"path":"exmagna incididunt qui labore","value":"cillum occaecat aliquip anim id"}],"transaction_id":54841604,"proto":"both","instance_mode":0} ``` ### JSONRPC Example diff --git a/docs/guide/data_model_integration.md b/docs/guide/data_model_integration.md index fff0dc22bc382241c92a359c0317e098d0ea75f4..237c12b7dacf1e13b9cfd977f4e0fa4de0b35090 100644 --- a/docs/guide/data_model_integration.md +++ b/docs/guide/data_model_integration.md @@ -122,7 +122,7 @@ return This method is called to apply the changes done to data model. used with set_value ``` -int dm_entry_apply(struct dmctx *ctx, int cmd, char *arg1) +int dm_entry_apply(struct dmctx *ctx, int cmd) inputs struct dmctx *ctx diff --git a/docs/guide/ubus_methods.md b/docs/guide/ubus_methods.md index 02d138795aece5c7569609bc61a16ddcbfd6e52d..8306d1ac1838271a7cbb52cc8fe30c0c322ec092 100644 --- a/docs/guide/ubus_methods.md +++ b/docs/guide/ubus_methods.md @@ -26,10 +26,10 @@ root@iopsys:~# ubus -v list usp "object_names":{"path":"String","proto":"String","maxdepth":"Integer","next-level":"Boolean","instance_mode":"Integer"} "instances":{"path":"String","proto":"String","maxdepth":"Integer","next-level":"Boolean","instance_mode":"Integer"} "validate":{"path":"String","proto":"String","maxdepth":"Integer","next-level":"Boolean","instance_mode":"Integer"} - "set":{"path":"String","value":"String","values":"Table","proto":"String","key":"String","instance_mode":"Integer"} + "set":{"path":"String","value":"String","values":"Table","proto":"String","instance_mode":"Integer"} "operate":{"path":"String","action":"String","input":"Table","proto":"String","instance_mode":"Integer"} - "add_object":{"path":"String","proto":"String","key":"String","instance_mode":"Integer"} - "del_object":{"path":"String","proto":"String","key":"String","instance_mode":"Integer"} + "add_object":{"path":"String","proto":"String","instance_mode":"Integer"} + "del_object":{"path":"String","proto":"String","instance_mode":"Integer"} root@iopsys:~# root@iopsys:~# ubus -v list usp.raw 'usp.raw' @08a13407 @@ -43,11 +43,11 @@ root@iopsys:~# ubus -v list usp.raw "instances":{"path":"String","proto":"String","maxdepth":"Integer","next-level":"Boolean","instance_mode":"Integer"} "validate":{"path":"String","proto":"String","maxdepth":"Integer","next-level":"Boolean","instance_mode":"Integer"} "transaction_start":{"app":"String","max_timeout":"Integer"} - "set":{"path":"String","value":"String","values":"Table","proto":"String","key":"String","instance_mode":"Integer","transaction_id":"Integer"} + "set":{"path":"String","value":"String","values":"Table","proto":"String","instance_mode":"Integer","transaction_id":"Integer"} "operate":{"path":"String","action":"String","input":"Table","proto":"String","instance_mode":"Integer"} - "add_object":{"path":"String","proto":"String","key":"String","instance_mode":"Integer","transaction_id":"Integer"} - "del_object":{"path":"String","proto":"String","key":"String","instance_mode":"Integer","transaction_id":"Integer"} - "setm_values":{"pv_tuple":"Array","proto":"String","instance_mode":"Integer","key":"String","transaction_id":"Integer"} + "add_object":{"path":"String","proto":"String","instance_mode":"Integer","transaction_id":"Integer"} + "del_object":{"path":"String","proto":"String","instance_mode":"Integer","transaction_id":"Integer"} + "setm_values":{"pv_tuple":"Array","proto":"String","instance_mode":"Integer","transaction_id":"Integer"} "transaction_commit":{"transaction_id":"Integer"} "transaction_abort":{"transaction_id":"Integer"} "transaction_status":{"transaction_id":"Integer"} @@ -114,10 +114,10 @@ root@iopsys:~# ubus -v list usp.Device.WiFi. "object_names":{"path":"String","proto":"String","maxdepth":"Integer","next-level":"Boolean","instance_mode":"Integer"} "instances":{"path":"String","proto":"String","maxdepth":"Integer","next-level":"Boolean","instance_mode":"Integer"} "validate":{"path":"String","proto":"String","maxdepth":"Integer","next-level":"Boolean","instance_mode":"Integer"} - "set":{"path":"String","value":"String","values":"Table","proto":"String","key":"String","instance_mode":"Integer"} + "set":{"path":"String","value":"String","values":"Table","proto":"String","instance_mode":"Integer"} "operate":{"path":"String","action":"String","input":"Table","proto":"String","instance_mode":"Integer"} - "add_object":{"path":"String","proto":"String","key":"String","instance_mode":"Integer"} - "del_object":{"path":"String","proto":"String","key":"String","instance_mode":"Integer"} + "add_object":{"path":"String","proto":"String","instance_mode":"Integer"} + "del_object":{"path":"String","proto":"String","instance_mode":"Integer"} root@iopsys:~# ``` diff --git a/docs/spec/functionspec.md b/docs/spec/functionspec.md index d6901c4439d54afa569fc4096ef838d7374c2391..ed3bb3b0f75ce217b0b53f58d3bfc83a73f5e849 100644 --- a/docs/spec/functionspec.md +++ b/docs/spec/functionspec.md @@ -11,10 +11,10 @@ root@iopsys:~# ubus -v list usp "object_names":{"path":"String","proto":"String","maxdepth":"Integer","next-level":"Boolean","instance_mode":"Integer"} "instances":{"path":"String","proto":"String","maxdepth":"Integer","next-level":"Boolean","instance_mode":"Integer"} "validate":{"path":"String","proto":"String","maxdepth":"Integer","next-level":"Boolean","instance_mode":"Integer"} - "set":{"path":"String","value":"String","values":"Table","proto":"String","key":"String","instance_mode":"Integer"} + "set":{"path":"String","value":"String","values":"Table","proto":"String","instance_mode":"Integer"} "operate":{"path":"String","action":"String","input":"Table","proto":"String","instance_mode":"Integer"} - "add_object":{"path":"String","proto":"String","key":"String","instance_mode":"Integer"} - "del_object":{"path":"String","proto":"String","key":"String","instance_mode":"Integer"} + "add_object":{"path":"String","proto":"String","instance_mode":"Integer"} + "del_object":{"path":"String","proto":"String","instance_mode":"Integer"} root@iopsys:~# root@iopsys:~# ubus -v list usp.raw @@ -30,11 +30,11 @@ root@iopsys:~# ubus -v list usp.raw "instances":{"path":"String","proto":"String","maxdepth":"Integer","next-level":"Boolean","instance_mode":"Integer"} "validate":{"path":"String","proto":"String","maxdepth":"Integer","next-level":"Boolean","instance_mode":"Integer"} "transaction_start":{"app":"String"} - "set":{"path":"String","value":"String","values":"Table","proto":"String","key":"String","instance_mode":"Integer","transaction_id":"Integer"} + "set":{"path":"String","value":"String","values":"Table","proto":"String","instance_mode":"Integer","transaction_id":"Integer"} "operate":{"path":"String","action":"String","input":"Table","proto":"String","instance_mode":"Integer"} - "add_object":{"path":"String","proto":"String","key":"String","instance_mode":"Integer","transaction_id":"Integer"} - "del_object":{"path":"String","proto":"String","key":"String","instance_mode":"Integer","transaction_id":"Integer"} - "setm_values":{"pv_tuple":"Array","proto":"String","instance_mode":"Integer","key":"String","transaction_id":"Integer"} + "add_object":{"path":"String","proto":"String","instance_mode":"Integer","transaction_id":"Integer"} + "del_object":{"path":"String","proto":"String","instance_mode":"Integer","transaction_id":"Integer"} + "setm_values":{"pv_tuple":"Array","proto":"String","instance_mode":"Integer","transaction_id":"Integer"} "transaction_commit":{"transaction_id":"Integer","restart_services":"Boolean"} "transaction_abort":{"transaction_id":"Integer"} "transaction_status":{"transaction_id":"Integer"} @@ -64,10 +64,10 @@ An object that publishes device information. "object_names":{"path":"String","proto":"String","maxdepth":"Integer","next-level":"Boolean","instance_mode":"Integer"} "instances":{"path":"String","proto":"String","maxdepth":"Integer","next-level":"Boolean","instance_mode":"Integer"} "validate":{"path":"String","proto":"String","maxdepth":"Integer","next-level":"Boolean","instance_mode":"Integer"} - "set":{"path":"String","value":"String","values":"Table","proto":"String","key":"String","instance_mode":"Integer"} + "set":{"path":"String","value":"String","values":"Table","proto":"String","instance_mode":"Integer"} "operate":{"path":"String","action":"String","input":"Table","proto":"String","instance_mode":"Integer"} - "add_object":{"path":"String","proto":"String","key":"String","instance_mode":"Integer"} - "del_object":{"path":"String","proto":"String","key":"String","instance_mode":"Integer"} + "add_object":{"path":"String","proto":"String","instance_mode":"Integer"} + "del_object":{"path":"String","proto":"String","instance_mode":"Integer"} ```` | Method |Function ID | @@ -168,11 +168,11 @@ ubus. "instances":{"path":"String","proto":"String","maxdepth":"Integer","next-level":"Boolean","instance_mode":"Integer"} "validate":{"path":"String","proto":"String","maxdepth":"Integer","next-level":"Boolean","instance_mode":"Integer"} "transaction_start":{"app":"String"} - "set":{"path":"String","value":"String","values":"Table","proto":"String","key":"String","instance_mode":"Integer","transaction_id":"Integer"} + "set":{"path":"String","value":"String","values":"Table","proto":"String","instance_mode":"Integer","transaction_id":"Integer"} "operate":{"path":"String","action":"String","input":"Table","proto":"String","instance_mode":"Integer"} - "add_object":{"path":"String","proto":"String","key":"String","instance_mode":"Integer","transaction_id":"Integer"} - "del_object":{"path":"String","proto":"String","key":"String","instance_mode":"Integer","transaction_id":"Integer"} - "setm_values":{"pv_tuple":"Array","proto":"String","instance_mode":"Integer","key":"String","transaction_id":"Integer"} + "add_object":{"path":"String","proto":"String","instance_mode":"Integer","transaction_id":"Integer"} + "del_object":{"path":"String","proto":"String","instance_mode":"Integer","transaction_id":"Integer"} + "setm_values":{"pv_tuple":"Array","proto":"String","instance_mode":"Integer","transaction_id":"Integer"} "transaction_commit":{"transaction_id":"Integer","restart_services":"Boolean"} "transaction_abort":{"transaction_id":"Integer"} "transaction_status":{"transaction_id":"Integer"} diff --git a/schemas/ubus/usp.json b/schemas/ubus/usp.json index f09627ec82ca1e44797b79d66bd543b00739edca..d19d502706ab8346134da6d1107d35f7abf48666 100644 --- a/schemas/ubus/usp.json +++ b/schemas/ubus/usp.json @@ -338,9 +338,6 @@ "type": "object", "properties": {} }, - "key": { - "type": "string" - }, "instance_mode": { "type": "integer", "minimum": 0, @@ -408,9 +405,6 @@ "proto": { "$ref": "#/definitions/proto_t" }, - "key": { - "type": "string" - }, "instance_mode": { "type": "integer", "minimum": 0, @@ -473,9 +467,6 @@ "proto": { "$ref": "#/definitions/proto_t" }, - "key": { - "type": "string" - }, "instance_mode": { "type": "integer", "minimum": 0, diff --git a/schemas/ubus/usp.raw.json b/schemas/ubus/usp.raw.json index 6973fd11d15dcb492a1620f0d59a6fa24af72dfd..3393e1b629ffd3bd79e5bdd6fbb3a33694de6855 100644 --- a/schemas/ubus/usp.raw.json +++ b/schemas/ubus/usp.raw.json @@ -833,9 +833,6 @@ "type": "integer", "minimum": 1 }, - "key": { - "type": "string" - }, "instance_mode": { "type": "integer", "minimum": 0, @@ -906,9 +903,6 @@ "type": "integer", "minimum": 1 }, - "key": { - "type": "string" - }, "instance_mode": { "type": "integer", "minimum": 0, @@ -990,9 +984,6 @@ "type": "object", "properties": {} }, - "key": { - "type": "string" - }, "instance_mode": { "type": "integer", "minimum": 0, @@ -1342,9 +1333,6 @@ "value": { "type": "string" }, - "key": { - "type": "string" - } } } ] @@ -1352,9 +1340,6 @@ "proto": { "$ref": "#/definitions/proto_t" }, - "key": { - "type": "string" - }, "instance_mode": { "type": "integer", "minimum": 0, diff --git a/src/add_delete.h b/src/add_delete.h index c071f7c51e0f5128740ffe9f2471afef9266c794..f4fba2629b0d170607dfa5dd94e28b9e424200eb 100644 --- a/src/add_delete.h +++ b/src/add_delete.h @@ -6,7 +6,6 @@ enum { DM_ADD_PATH, DM_ADD_PROTO, - DM_ADD_PARAMETER_KEY, DM_ADD_INSTANCE, __DM_ADD_MAX }; @@ -14,7 +13,6 @@ enum { enum { DM_RAW_ADD_PATH, DM_RAW_ADD_PROTO, - DM_RAW_ADD_PARAMETER_KEY, DM_RAW_ADD_INSTANCE, DM_RAW_ADD_TRANS_ID, __DM_RAW_ADD_MAX diff --git a/src/get_helper.c b/src/get_helper.c index dfb9c8a05c06182a55f312549e9f59c98bb917b6..e8ab249ee17eae29de74c8b8a5dabd3d3745c44a 100644 --- a/src/get_helper.c +++ b/src/get_helper.c @@ -1402,13 +1402,13 @@ static int usp_dm_exec(struct dmctx *bbf_ctx, int cmd, char *path, char *arg1, c return fault; } -int usp_dm_exec_apply(struct dmctx *bbf_ctx, int cmd, char *arg1) +int usp_dm_exec_apply(struct dmctx *bbf_ctx, int cmd) { int fault = 0; if (sigsetjmp(gs_jump_location, 1) == 0) { gs_jump_called_by_bbf = true; - fault = dm_entry_apply(bbf_ctx, cmd, arg1); + fault = dm_entry_apply(bbf_ctx, cmd); } else { ERR("PID [%ld]::Exception on [%d] apply", getpid(), cmd); print_last_dm_object(); diff --git a/src/get_helper.h b/src/get_helper.h index e7b39c9b67352c3aa86be8e769b237e77fe10147..6b965e60542b8efa83ca235786cb6b4532bbdf8a 100644 --- a/src/get_helper.h +++ b/src/get_helper.h @@ -83,6 +83,6 @@ int transaction_abort(int trans_id); int configure_transaction_timeout(int timeout); void handle_pending_signal(int); void print_last_dm_object(void); -int usp_dm_exec_apply(struct dmctx *bbf_ctx, int cmd, char *arg1); +int usp_dm_exec_apply(struct dmctx *bbf_ctx, int cmd); #endif /* GET_HELPER_H */ diff --git a/src/set.c b/src/set.c index c3f1c37569777651969f9ae53695b47c30b22d95..e64222de83ac90eb5cfa721f8c7e30fe36dfc269 100644 --- a/src/set.c +++ b/src/set.c @@ -29,7 +29,6 @@ static const struct blobmsg_policy dm_setm_value_policy[] = { [DM_SET_V_PATH] = { .name = "path", .type = BLOBMSG_TYPE_STRING }, [DM_SET_V_VALUE] = { .name = "value", .type = BLOBMSG_TYPE_STRING }, - [DM_SET_V_KEY] = { .name = "key", .type = BLOBMSG_TYPE_STRING }, }; int usp_set_value(usp_data_t *data) @@ -59,7 +58,7 @@ int usp_set_value(usp_data_t *data) list_for_each_entry(pv, data->pv_list, list) { fault = usp_dm_set(&bbf_ctx, pv->param, pv->val); if (fault == 0) - fault = usp_dm_exec_apply(&bbf_ctx, CMD_SET_VALUE, data->set_key); + fault = usp_dm_exec_apply(&bbf_ctx, CMD_SET_VALUE); if (fault) { if (fault_occured == false) { @@ -184,9 +183,6 @@ int fill_pvlist_from_tuple(struct blob_attr *blob, struct list_head *pv_list) path = blobmsg_get_string(tb[DM_SET_V_PATH]); value = blobmsg_get_string(tb[DM_SET_V_VALUE]); - if (tb[DM_SET_V_KEY]) - key = blobmsg_get_string(tb[DM_SET_V_KEY]); - add_pv_node(path, value, key, pv_list); } diff --git a/src/set.h b/src/set.h index 61b0329b9ec76c4107bc5be9e0868b5c92e3ec3d..c149d3dbb12ce7bc2b64bbdefc76a76f84e13222 100644 --- a/src/set.h +++ b/src/set.h @@ -23,7 +23,6 @@ enum { DM_SET_VALUE, DM_SET_VALUE_TABLE, DM_SET_PROTO, - DM_SET_PARAMETER_KEY, DM_SET_INSTANCE, __DM_SET_MAX, }; @@ -33,7 +32,6 @@ enum { DM_RAW_SET_VALUE, DM_RAW_SET_VALUE_TABLE, DM_RAW_SET_PROTO, - DM_RAW_SET_PARAMETER_KEY, DM_RAW_SET_INSTANCE, DM_RAW_SET_TRANS_ID, __DM_RAW_SET_MAX, @@ -42,7 +40,6 @@ enum { enum { DM_SET_V_PATH, DM_SET_V_VALUE, - DM_SET_V_KEY, __DM_SET_V_MAX }; @@ -50,7 +47,6 @@ enum { DM_SET_MULTI_TUPLE, DM_SET_MULTI_PROTO, DM_SET_MULTI_INSTANCE, - DM_SET_MULTI_KEY, DM_SET_MULTI_TRANS_ID, __DM_SET_MULTI_MAX }; diff --git a/src/usp.c b/src/usp.c index a4ed100dd1fcfaba6554fbf8d7bed7660aabb446..7737af292c464aa52fa656114abafc85674fd167 100644 --- a/src/usp.c +++ b/src/usp.c @@ -259,7 +259,6 @@ static void broadcast_add_del_event(struct usp_context *u) static const struct blobmsg_policy dm_add_policy[] = { [DM_ADD_PATH] = { .name = "path", .type = BLOBMSG_TYPE_STRING }, [DM_ADD_PROTO] = { .name = "proto", .type = BLOBMSG_TYPE_STRING }, - [DM_ADD_PARAMETER_KEY] = { .name = "key", .type = BLOBMSG_TYPE_STRING }, [DM_ADD_INSTANCE] = { .name = "instance_mode", .type = BLOBMSG_TYPE_INT32 }, }; @@ -293,9 +292,6 @@ int usp_add_del_handler(struct ubus_context *ctx, struct ubus_object *obj, INFO("ubus method|%s|, name|%s|, path(%s)", method, obj->name, path); - if (tb[DM_ADD_PARAMETER_KEY]) - data.set_key = blobmsg_get_string(tb[DM_ADD_PARAMETER_KEY]); - data.instance = get_instance_mode(tb[DM_ADD_INSTANCE]); memset(&bb, 0, sizeof(struct blob_buf)); blob_buf_init(&bb, 0); @@ -324,7 +320,6 @@ int usp_add_del_handler(struct ubus_context *ctx, struct ubus_object *obj, static const struct blobmsg_policy dm_raw_add_policy[] = { [DM_RAW_ADD_PATH] = { .name = "path", .type = BLOBMSG_TYPE_STRING }, [DM_RAW_ADD_PROTO] = { .name = "proto", .type = BLOBMSG_TYPE_STRING }, - [DM_RAW_ADD_PARAMETER_KEY] = { .name = "key", .type = BLOBMSG_TYPE_STRING }, [DM_RAW_ADD_INSTANCE] = { .name = "instance_mode", .type = BLOBMSG_TYPE_INT32 }, [DM_RAW_ADD_TRANS_ID] = { .name = "transaction_id", .type = BLOBMSG_TYPE_INT32 }, }; @@ -385,9 +380,6 @@ int usp_raw_add_del_handler(struct ubus_context *ctx, struct ubus_object *obj, data.qpath = path; - if (tb[DM_RAW_ADD_PARAMETER_KEY]) - data.set_key = blobmsg_get_string(tb[DM_RAW_ADD_PARAMETER_KEY]); - data.instance = get_instance_mode(tb[DM_RAW_ADD_INSTANCE]); blob_buf_init(&bb, 0); @@ -496,7 +488,6 @@ static const struct blobmsg_policy dm_set_policy[] = { [DM_SET_VALUE] = { .name = "value", .type = BLOBMSG_TYPE_STRING }, [DM_SET_VALUE_TABLE] = { .name = "values", .type = BLOBMSG_TYPE_TABLE }, [DM_SET_PROTO] = { .name = "proto", .type = BLOBMSG_TYPE_STRING }, - [DM_SET_PARAMETER_KEY] = { .name = "key", .type = BLOBMSG_TYPE_STRING }, [DM_SET_INSTANCE] = { .name = "instance_mode", .type = BLOBMSG_TYPE_INT32 }, }; @@ -528,9 +519,6 @@ int usp_set(struct ubus_context *ctx, struct ubus_object *obj, if (!tb[DM_SET_VALUE] && !tb[DM_SET_VALUE_TABLE]) return UBUS_STATUS_INVALID_ARGUMENT; - if (tb[DM_SET_PARAMETER_KEY]) - data.set_key = blobmsg_get_string(tb[DM_SET_PARAMETER_KEY]); - get_path_from_gran_obj(path, obj->name, tb[DM_SET_PATH]); data.proto = get_bbf_proto_type(tb[DM_SET_PROTO]); data.instance = get_instance_mode(tb[DM_SET_INSTANCE]); @@ -586,7 +574,6 @@ static const struct blobmsg_policy dm_raw_set_policy[] = { [DM_RAW_SET_VALUE] = { .name = "value", .type = BLOBMSG_TYPE_STRING }, [DM_RAW_SET_VALUE_TABLE] = { .name = "values", .type = BLOBMSG_TYPE_TABLE }, [DM_RAW_SET_PROTO] = { .name = "proto", .type = BLOBMSG_TYPE_STRING }, - [DM_RAW_SET_PARAMETER_KEY] = { .name = "key", .type = BLOBMSG_TYPE_STRING }, [DM_RAW_SET_INSTANCE] = { .name = "instance_mode", .type = BLOBMSG_TYPE_INT32 }, [DM_RAW_SET_TRANS_ID] = { .name = "transaction_id", .type = BLOBMSG_TYPE_INT32 }, }; @@ -617,9 +604,6 @@ int usp_raw_set(struct ubus_context *ctx, struct ubus_object *obj, if (!tb[DM_RAW_SET_VALUE] && !tb[DM_RAW_SET_VALUE_TABLE]) return UBUS_STATUS_INVALID_ARGUMENT; - if (tb[DM_RAW_SET_PARAMETER_KEY]) - data.set_key = blobmsg_get_string(tb[DM_RAW_SET_PARAMETER_KEY]); - get_path_from_gran_obj(path, obj->name, tb[DM_RAW_SET_PATH]); INFO("ubus method|%s|, name|%s|, path(%s)", method, obj->name, path); @@ -967,7 +951,6 @@ static const struct blobmsg_policy dm_set_multi_policy[] = { [DM_SET_MULTI_TUPLE] = { .name = "pv_tuple", .type = BLOBMSG_TYPE_ARRAY }, [DM_SET_MULTI_PROTO] = { .name = "proto", .type = BLOBMSG_TYPE_STRING }, [DM_SET_MULTI_INSTANCE] = { .name = "instance_mode", .type = BLOBMSG_TYPE_INT32 }, - [DM_SET_MULTI_KEY] = { .name = "key", .type = BLOBMSG_TYPE_STRING }, [DM_SET_MULTI_TRANS_ID] = { .name = "transaction_id", .type = BLOBMSG_TYPE_INT32 }, }; @@ -1012,7 +995,6 @@ int handle_set_multi_value(struct ubus_context *ctx, struct ubus_object *obj, data.ctx = ctx; data.req = req; - data.set_key = blobmsg_get_string(tb[DM_SET_MULTI_KEY]); data.is_raw = is_str_eq(obj->name, USPRAW); data.instance = get_instance_mode(tb[DM_SET_MULTI_INSTANCE]); data.pv_list = &pv_list; diff --git a/test/funl/schema/usp.raw_test_negative.json b/test/funl/schema/usp.raw_test_negative.json index d68d64b5a07ff55eaee163dc4581f9bbac3883b6..df34d8b3ac03cc4242f22efab66a6f757a4d063f 100644 --- a/test/funl/schema/usp.raw_test_negative.json +++ b/test/funl/schema/usp.raw_test_negative.json @@ -663,9 +663,6 @@ "type": "integer", "minimum": 1 }, - "key": { - "type": "string" - }, "instance_mode": { "type": "integer", "minimum": 0, @@ -735,9 +732,6 @@ "type": "integer", "minimum": 1 }, - "key": { - "type": "string" - }, "instance_mode": { "type": "integer", "minimum": 0, @@ -808,9 +802,6 @@ "type": "object", "properties": {} }, - "key": { - "type": "string" - }, "instance_mode": { "type": "integer", "minimum": 0, @@ -1104,9 +1095,6 @@ }, "value": { "type": "string" - }, - "key": { - "type": "string" } } } @@ -1115,9 +1103,6 @@ "proto": { "$ref": "#/definitions/proto_t" }, - "key": { - "type": "string" - }, "instance_mode": { "type": "integer", "minimum": 0, diff --git a/test/funl/schema/usp.raw_test_positive.json b/test/funl/schema/usp.raw_test_positive.json index 2affbae25085247590ec0650f9df6d8c33589fd5..adf51e5f57055d5c4d5be84e0ea04fed3b174284 100644 --- a/test/funl/schema/usp.raw_test_positive.json +++ b/test/funl/schema/usp.raw_test_positive.json @@ -780,9 +780,6 @@ "type": "integer", "minimum": 1 }, - "key": { - "type": "string" - }, "instance_mode": { "type": "integer", "minimum": 0, @@ -863,9 +860,6 @@ "type": "integer", "minimum": 1 }, - "key": { - "type": "string" - }, "instance_mode": { "type": "integer", "minimum": 0, @@ -957,9 +951,6 @@ "type": "object", "properties": {} }, - "key": { - "type": "string" - }, "instance_mode": { "type": "integer", "minimum": 0, @@ -1305,9 +1296,6 @@ "value": { "type": "string" }, - "key": { - "type": "string" - } } } ] @@ -1315,9 +1303,6 @@ "proto": { "$ref": "#/definitions/proto_t" }, - "key": { - "type": "string" - }, "instance_mode": { "type": "integer", "minimum": 0, diff --git a/test/funl/schema/usp_test_negative.json b/test/funl/schema/usp_test_negative.json index 7e7cfb411d89889af4fa9a18bd5912b8b1a943dd..47eb026104f06cec65f0b6ddf72a9249d893b172 100644 --- a/test/funl/schema/usp_test_negative.json +++ b/test/funl/schema/usp_test_negative.json @@ -176,9 +176,6 @@ "type": "object", "properties": {} }, - "key": { - "type": "string" - }, "instance_mode": { "type": "integer", "minimum": 0, @@ -239,9 +236,6 @@ "proto": { "$ref": "#/definitions/proto_t" }, - "key": { - "type": "string" - }, "instance_mode": { "type": "integer", "minimum": 0, @@ -302,9 +296,6 @@ "proto": { "$ref": "#/definitions/proto_t" }, - "key": { - "type": "string" - }, "instance_mode": { "type": "integer", "minimum": 0, diff --git a/test/funl/schema/usp_test_positive.json b/test/funl/schema/usp_test_positive.json index 0a82e15211d93c11f7104b82c1b6b70bbc0c8638..5f87794cbd6b70126c171915075051d12357c600 100644 --- a/test/funl/schema/usp_test_positive.json +++ b/test/funl/schema/usp_test_positive.json @@ -174,9 +174,6 @@ "type": "object", "properties": {} }, - "key": { - "type": "string" - }, "instance_mode": { "type": "integer", "minimum": 0, @@ -218,9 +215,6 @@ "proto": { "$ref": "#/definitions/proto_t" }, - "key": { - "type": "string" - }, "instance_mode": { "type": "integer", "minimum": 0, @@ -281,9 +275,6 @@ "proto": { "$ref": "#/definitions/proto_t" }, - "key": { - "type": "string" - }, "instance_mode": { "type": "integer", "minimum": 0,