Update mappings of some parameters

This commit is contained in:
Amin Ben Ramdhane 2020-04-20 16:21:31 +01:00
parent f462f1f54e
commit 6c89f78545
4 changed files with 93 additions and 102 deletions

View file

@ -2,7 +2,7 @@
#include <libbbf_api/dmcommon.h>
/*#Device.DeviceInfo.Manufacturer!UCI:cwmp/cwmp,cpe/manufacturer*/
/*#Device.DeviceInfo.Manufacturer!UCI:cwmp/cpe,cpe/manufacturer*/
char * os__get_deviceid_manufacturer()
{
char *v;
@ -14,7 +14,7 @@ char * os__get_deviceid_manufacturer()
return v;
}
/*#Device.DeviceInfo.ProductClass!UCI:cwmp/cwmp,cpe/product_class*/
/*#Device.DeviceInfo.ProductClass!UCI:cwmp/cpe,cpe/product_class*/
char * os__get_deviceid_productclass()
{
char *v;
@ -46,7 +46,7 @@ int os__get_device_hardwareversion(char *refparam, struct dmctx *ctx, void *data
return 0;
}
/*#Device.DeviceInfo.ManufacturerOUI!UCI:cwmp/cwmp,cpe/model_name*/
/*#Device.DeviceInfo.ModelName!UCI:cwmp/cpe,cpe/model_name*/
int os__get_device_routermodel(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
{
dmuci_get_option_value_string("cwmp", "cpe", "model_name", value);
@ -55,7 +55,7 @@ int os__get_device_routermodel(char *refparam, struct dmctx *ctx, void *data, ch
return 0;
}
/*#Device.DeviceInfo.ManufacturerOUI!UCI:cwmp/cwmp,cpe/manufacturer_oui*/
/*#Device.DeviceInfo.ManufacturerOUI!UCI:cwmp/cpe,cpe/manufacturer_oui*/
char * os__get_deviceid_manufactureroui()
{
char *v, *mac = NULL, str[16];

View file

@ -96,7 +96,7 @@ static int get_device_info_uptime(char *refparam, struct dmctx *ctx, void *data,
return 0;
}
/*#Device.DeviceInfo.ProvisioningCode!UCI:cwmp/cwmp,cpe/provisioning_code*/
/*#Device.DeviceInfo.ProvisioningCode!UCI:cwmp/cpe,cpe/provisioning_code*/
static int get_device_provisioningcode(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
{
dmuci_get_option_value_string("cwmp", "cpe", "provisioning_code", value);

View file

@ -12,7 +12,7 @@
#include "managementserver.h"
/*#Device.ManagementServer.URL!UCI:cwmp/cwmp,acs/url*/
/*#Device.ManagementServer.URL!UCI:cwmp/acs,acs/url*/
static int get_management_server_url(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
{
char *dhcp = NULL, *url = NULL, *provisioning_value = NULL;
@ -46,7 +46,7 @@ static int set_management_server_url(char *refparam, struct dmctx *ctx, void *da
return 0;
}
/*#Device.ManagementServer.Username!UCI:cwmp/cwmp,acs/userid*/
/*#Device.ManagementServer.Username!UCI:cwmp/acs,acs/userid*/
static int get_management_server_username(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
{
dmuci_get_option_value_string("cwmp", "acs", "userid", value);
@ -68,7 +68,7 @@ static int set_management_server_username(char *refparam, struct dmctx *ctx, voi
return 0;
}
/*#Device.ManagementServer.Password!UCI:cwmp/cwmp,acs/passwd*/
/*#Device.ManagementServer.Password!UCI:cwmp/acs,acs/passwd*/
static int set_management_server_passwd(char *refparam, struct dmctx *ctx, void *data, char *instance, char *value, int action)
{
switch (action) {
@ -84,14 +84,14 @@ static int set_management_server_passwd(char *refparam, struct dmctx *ctx, void
return 0;
}
/*#Device.ManagementServer.ParameterKey!UCI:cwmp/cwmp,acs/ParameterKey*/
/*#Device.ManagementServer.ParameterKey!UCI:cwmp/acs,acs/ParameterKey*/
static int get_management_server_key(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
{
dmuci_get_option_value_string("cwmp", "acs", "ParameterKey", value);
return 0;
}
/*#Device.ManagementServer.PeriodicInformEnable!UCI:cwmp/cwmp,acs/periodic_inform_enable*/
/*#Device.ManagementServer.PeriodicInformEnable!UCI:cwmp/acs,acs/periodic_inform_enable*/
static int get_management_server_periodic_inform_enable(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
{
dmuci_get_option_value_string("cwmp", "acs", "periodic_inform_enable", value);
@ -116,7 +116,7 @@ static int set_management_server_periodic_inform_enable(char *refparam, struct d
return 0;
}
/*#Device.ManagementServer.PeriodicInformInterval!UCI:cwmp/cwmp,acs/periodic_inform_interval*/
/*#Device.ManagementServer.PeriodicInformInterval!UCI:cwmp/acs,acs/periodic_inform_interval*/
static int get_management_server_periodic_inform_interval(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
{
dmuci_get_option_value_string("cwmp", "acs", "periodic_inform_interval", value);
@ -138,7 +138,7 @@ static int set_management_server_periodic_inform_interval(char *refparam, struct
return 0;
}
/*#Device.ManagementServer.PeriodicInformTime!UCI:cwmp/cwmp,acs/periodic_inform_time*/
/*#Device.ManagementServer.PeriodicInformTime!UCI:cwmp/acs,acs/periodic_inform_time*/
static int get_management_server_periodic_inform_time(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
{
time_t time_value;
@ -175,7 +175,7 @@ static int set_management_server_periodic_inform_time(char *refparam, struct dmc
return 0;
}
/*#Device.ManagementServer.ConnectionRequestURL!UCI:cwmp/cwmp,cpe/port*/
/*#Device.ManagementServer.ConnectionRequestURL!UCI:cwmp/cpe,cpe/port*/
static int get_management_server_connection_request_url(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
{
char *ip, *port, *iface;
@ -191,7 +191,7 @@ static int get_management_server_connection_request_url(char *refparam, struct d
return 0;
}
/*#Device.ManagementServer.ConnectionRequestUsername!UCI:cwmp/cwmp,cpe/userid*/
/*#Device.ManagementServer.ConnectionRequestUsername!UCI:cwmp/cpe,cpe/userid*/
static int get_management_server_connection_request_username(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
{
dmuci_get_option_value_string("cwmp", "cpe", "userid", value);
@ -213,7 +213,7 @@ static int set_management_server_connection_request_username(char *refparam, str
return 0;
}
/*#Device.ManagementServer.ConnectionRequestPassword!UCI:cwmp/cwmp,cpe/passwd*/
/*#Device.ManagementServer.ConnectionRequestPassword!UCI:cwmp/cpe,cpe/passwd*/
static int set_management_server_connection_request_passwd(char *refparam, struct dmctx *ctx, void *data, char *instance, char *value, int action)
{
switch (action) {
@ -235,7 +235,7 @@ static int get_lwn_protocol_supported(char *refparam, struct dmctx *ctx, void *d
return 0;
}
/*#Device.ManagementServer.LightweightNotificationProtocolsUsed!UCI:cwmp/cwmp,lwn/enable*/
/*#Device.ManagementServer.LightweightNotificationProtocolsUsed!UCI:cwmp/lwn,lwn/enable*/
static int get_lwn_protocol_used(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
{
bool b;
@ -265,7 +265,7 @@ static int set_lwn_protocol_used(char *refparam, struct dmctx *ctx, void *data,
return 0;
}
/*#Device.ManagementServer.UDPLightweightNotificationHost!UCI:cwmp/cwmp,lwn/hostname*/
/*#Device.ManagementServer.UDPLightweightNotificationHost!UCI:cwmp/lwn,lwn/hostname*/
static int get_lwn_host(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
{
dmuci_get_option_value_string("cwmp", "lwn", "hostname", value);
@ -287,7 +287,7 @@ static int set_lwn_host(char *refparam, struct dmctx *ctx, void *data, char *ins
return 0;
}
/*#Device.ManagementServer.UDPLightweightNotificationPort!UCI:cwmp/cwmp,lwn/port*/
/*#Device.ManagementServer.UDPLightweightNotificationPort!UCI:cwmp/lwn,lwn/port*/
static int get_lwn_port(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
{
dmuci_get_option_value_string("cwmp", "lwn", "port", value);
@ -315,7 +315,7 @@ static int get_management_server_http_compression_supportted(char *refparam, str
return 0;
}
/*#Device.ManagementServer.HTTPCompression!UCI:cwmp/cwmp,acs/compression*/
/*#Device.ManagementServer.HTTPCompression!UCI:cwmp/acs,acs/compression*/
static int get_management_server_http_compression(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
{
dmuci_get_option_value_string("cwmp", "acs", "compression", value);
@ -339,7 +339,7 @@ static int set_management_server_http_compression(char *refparam, struct dmctx *
return 0;
}
/*#Device.ManagementServer.CWMPRetryMinimumWaitInterval!UCI:cwmp/cwmp,acs/retry_min_wait_interval*/
/*#Device.ManagementServer.CWMPRetryMinimumWaitInterval!UCI:cwmp/acs,acs/retry_min_wait_interval*/
static int get_management_server_retry_min_wait_interval(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
{
dmuci_get_option_value_string("cwmp", "acs", "retry_min_wait_interval", value);
@ -361,7 +361,7 @@ static int set_management_server_retry_min_wait_interval(char *refparam, struct
return 0;
}
/*#Device.ManagementServer.CWMPRetryIntervalMultiplier!UCI:cwmp/cwmp,acs/retry_interval_multiplier*/
/*#Device.ManagementServer.CWMPRetryIntervalMultiplier!UCI:cwmp/acs,acs/retry_interval_multiplier*/
static int get_management_server_retry_interval_multiplier(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
{
dmuci_get_option_value_string("cwmp", "acs", "retry_interval_multiplier", value);
@ -383,7 +383,7 @@ static int set_management_server_retry_interval_multiplier(char *refparam, struc
return 0;
}
/*#Device.ManagementServer.AliasBasedAddressing!UCI:cwmp/cwmp,cpe/amd_version*/
/*#Device.ManagementServer.AliasBasedAddressing!UCI:cwmp/cpe,cpe/amd_version*/
static int get_alias_based_addressing(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
{
dmuci_get_option_value_string("cwmp", "cpe", "amd_version", value);
@ -394,7 +394,7 @@ static int get_alias_based_addressing(char *refparam, struct dmctx *ctx, void *d
return 0;
}
/*#Device.ManagementServer.InstanceMode!UCI:cwmp/cwmp,cpe/instance_mode*/
/*#Device.ManagementServer.InstanceMode!UCI:cwmp/cpe,cpe/instance_mode*/
static int get_instance_mode(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
{
dmuci_get_option_value_string("cwmp", "cpe", "instance_mode", value);

View file

@ -301,7 +301,7 @@
"uci": {
"file": "cwmp",
"section": {
"type": "cwmp",
"type": "cpe",
"name": "cpe"
},
"option": {
@ -335,7 +335,7 @@
"uci": {
"file": "cwmp",
"section": {
"type": "cwmp",
"type": "cpe",
"name": "cpe"
},
"option": {
@ -367,6 +367,21 @@
{
"max": 64
}
],
"mapping": [
{
"type": "uci",
"uci": {
"file": "cwmp",
"section": {
"type": "cpe",
"name": "cpe"
},
"option": {
"name": "model_name"
}
}
}
]
},
"ModelNumber": {
@ -382,21 +397,6 @@
{
"max": 64
}
],
"mapping": [
{
"type": "uci",
"uci": {
"file": "cwmp",
"section": {
"type": "cwmp",
"name": "cpe"
},
"option": {
"name": "model_name"
}
}
}
]
},
"Description": {
@ -434,7 +434,7 @@
"uci": {
"file": "cwmp",
"section": {
"type": "cwmp",
"type": "cpe",
"name": "cpe"
},
"option": {
@ -555,7 +555,7 @@
"uci": {
"file": "cwmp",
"section": {
"type": "cwmp",
"type": "cpe",
"name": "cpe"
},
"option": {
@ -2074,7 +2074,7 @@
"uci": {
"file": "cwmp",
"section": {
"type": "cwmp",
"type": "acs",
"name": "acs"
},
"option": {
@ -2103,7 +2103,7 @@
"uci": {
"file": "cwmp",
"section": {
"type": "cwmp",
"type": "acs",
"name": "acs"
},
"option": {
@ -2132,7 +2132,7 @@
"uci": {
"file": "cwmp",
"section": {
"type": "cwmp",
"type": "acs",
"name": "acs"
},
"option": {
@ -2180,7 +2180,7 @@
"uci": {
"file": "cwmp",
"section": {
"type": "cwmp",
"type": "acs",
"name": "acs"
},
"option": {
@ -2210,7 +2210,7 @@
"uci": {
"file": "cwmp",
"section": {
"type": "cwmp",
"type": "acs",
"name": "acs"
},
"option": {
@ -2234,7 +2234,7 @@
"uci": {
"file": "cwmp",
"section": {
"type": "cwmp",
"type": "acs",
"name": "acs"
},
"option": {
@ -2263,7 +2263,7 @@
"uci": {
"file": "cwmp",
"section": {
"type": "cwmp",
"type": "acs",
"name": "acs"
},
"option": {
@ -2292,7 +2292,7 @@
"uci": {
"file": "cwmp",
"section": {
"type": "cwmp",
"type": "cpe",
"name": "cpe"
},
"option": {
@ -2321,7 +2321,7 @@
"uci": {
"file": "cwmp",
"section": {
"type": "cwmp",
"type": "cpe",
"name": "cpe"
},
"option": {
@ -2350,7 +2350,7 @@
"uci": {
"file": "cwmp",
"section": {
"type": "cwmp",
"type": "cpe",
"name": "cpe"
},
"option": {
@ -2428,7 +2428,7 @@
"uci": {
"file": "cwmp",
"section": {
"type": "cwmp",
"type": "acs",
"name": "acs"
},
"option": {
@ -2458,7 +2458,7 @@
"uci": {
"file": "cwmp",
"section": {
"type": "cwmp",
"type": "acs",
"name": "acs"
},
"option": {
@ -2725,7 +2725,7 @@
"uci": {
"file": "cwmp",
"section": {
"type": "cwmp",
"type": "cpe",
"name": "cpe"
},
"option": {
@ -2753,7 +2753,7 @@
"uci": {
"file": "cwmp",
"section": {
"type": "cwmp",
"type": "cpe",
"name": "cpe"
},
"option": {
@ -2906,7 +2906,7 @@
"uci": {
"file": "cwmp",
"section": {
"type": "cwmp",
"type": "acs",
"name": "acs"
},
"option": {
@ -2946,7 +2946,7 @@
"uci": {
"file": "cwmp",
"section": {
"type": "cwmp",
"type": "lwn",
"name": "lwn"
},
"option": {
@ -2999,7 +2999,7 @@
"uci": {
"file": "cwmp",
"section": {
"type": "cwmp",
"type": "lwn",
"name": "lwn"
},
"option": {
@ -3023,7 +3023,7 @@
"uci": {
"file": "cwmp",
"section": {
"type": "cwmp",
"type": "lwn",
"name": "lwn"
},
"option": {
@ -17213,19 +17213,6 @@
"NotPresent",
"LowerLayerDown",
"Error"
],
"mapping": [
{
"type": "ubus",
"ubus": {
"object": "network.device",
"method": "status",
"args": {
"name": "@Name"
},
"key": "carrier"
}
}
]
},
"Alias": {
@ -18023,7 +18010,7 @@
"uci": {
"file": "network",
"section": {
"type": "interface"
"type": "device"
},
"dmmapfile": "dmmap_network"
}
@ -18138,6 +18125,21 @@
"min": 1,
"max": 4094
}
],
"mapping": [
{
"type": "uci",
"uci": {
"file": "network",
"section": {
"type": "device",
"index": "@i-1"
},
"option": {
"name": "vid"
}
}
}
]
},
"TPID": {
@ -30372,7 +30374,7 @@
{
"type": "ubus",
"ubus": {
"object": "network.device",
"object": "network.device",
"method": "status",
"args": {
"name": "@Name"
@ -35166,20 +35168,7 @@
"cwmp",
"usp"
],
"datatype": "boolean",
"mapping": [
{
"type": "ubus",
"ubus": {
"object": "network.device",
"method": "status",
"args": {
"name": "@Name"
},
"key": "speed"
}
}
]
"datatype": "boolean"
},
"Status": {
"type": "string",
@ -35198,19 +35187,6 @@
"NotPresent",
"LowerLayerDown",
"Error"
],
"mapping": [
{
"type": "ubus",
"ubus": {
"object": "network.device",
"method": "status",
"args": {
"name": "@Name"
},
"key": "speed"
}
}
]
},
"Alias": {
@ -51376,6 +51352,21 @@
{
"min": 1
}
],
"mapping": [
{
"type": "uci",
"uci": {
"file": "qos",
"section": {
"type": "queue",
"index": "@i-1"
},
"option": {
"name": "precedence"
}
}
}
]
},
"REDThreshold": {