icwmp/scripts/functions/management_server

937 lines
28 KiB
Bash

#!/bin/sh
# Copyright (C) 2011-2012 Luka Perkov <freecwmp@lukaperkov.net>
# Copyright (C) 2013 Inteno Broadband Technology AB
# Author Ahmed Zribi <ahmed.zribi@pivasoftware.com>
get_management_server_url() {
local tmp=${FLAGS_value}
FLAGS_value=${FLAGS_TRUE}
FLAGS_value=$tmp
local val=""
local permissions=""
local parm="InternetGatewayDevice.ManagementServer.URL"
case "$action" in
get_value)
val=`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q get cwmp.acs.url 2> /dev/null`
;;
get_name)
permissions="1"
;;
get_notification)
freecwmp_get_parameter_notification "val" "$parm"
;;
esac
freecwmp_output "$parm" "$val" "$permissions"
}
set_management_server_url() {
local parm="InternetGatewayDevice.ManagementServer.URL"
local type="xsd:string"
case "$action" in
set_value)
local url=$1
/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q set cwmp.acs.url="$url"
ubus ${UBUS_SOCKET:+-s $UBUS_SOCKET} call tr069 command '{ "command": "reload_end_session" }' &> /dev/null &
freecwmp_notify "$parm" "$url" "$type"
;;
set_notification)
local val=$1
freecwmp_set_parameter_notification "$parm" "$val"
;;
esac
}
get_management_server_username() {
local val=""
local permissions=""
local parm="InternetGatewayDevice.ManagementServer.Username"
case "$action" in
get_value)
val=`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q get cwmp.acs.userid 2> /dev/null`
;;
get_name)
permissions="1"
;;
get_notification)
freecwmp_get_parameter_notification "val" "$parm"
;;
esac
freecwmp_output "$parm" "$val" "$permissions"
}
set_management_server_username() {
local val=$1
local parm="InternetGatewayDevice.ManagementServer.Username"
case "$action" in
set_value)
/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q set cwmp.acs.userid="$val"
ubus ${UBUS_SOCKET:+-s $UBUS_SOCKET} call tr069 command '{ "command": "reload_end_session" }' &> /dev/null &
;;
set_notification)
freecwmp_set_parameter_notification "$parm" "$val"
;;
esac
}
get_management_server_password() {
local val=""
local permissions=""
local parm="InternetGatewayDevice.ManagementServer.Password"
case "$action" in
get_value)
# returned value must be empty
val=""
;;
get_name)
permissions="1"
;;
get_notification)
freecwmp_get_parameter_notification "val" "$parm"
;;
esac
freecwmp_output "$parm" "$val" "$permissions"
}
set_management_server_password() {
local val=$1
local parm="InternetGatewayDevice.ManagementServer.Password"
case "$action" in
set_value)
/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q set cwmp.acs.passwd="$val"
ubus ${UBUS_SOCKET:+-s $UBUS_SOCKET} call tr069 command '{ "command": "reload_end_session" }' &> /dev/null &
;;
set_notification)
freecwmp_set_parameter_notification "$parm" "$val"
;;
esac
}
get_management_server_parameter_key() {
local val=""
local permissions=""
local parm="InternetGatewayDevice.ManagementServer.ParameterKey"
case "$action" in
get_value)
val=`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q get cwmp.acs.ParameterKey 2> /dev/null`
;;
get_name)
permissions="1"
;;
get_notification)
freecwmp_get_parameter_notification "val" "$parm"
;;
esac
freecwmp_output "$parm" "$val" "$permissions"
}
set_management_server_parameter_key() {
local parm="InternetGatewayDevice.ManagementServer.ParameterKey"
local type="xsd:string"
local val="$1"
case "$action" in
set_value)
/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q set cwmp.acs.ParameterKey="$val"
ubus ${UBUS_SOCKET:+-s $UBUS_SOCKET} call tr069 command '{ "command": "reload_end_session" }' &> /dev/null &
freecwmp_notify "$parm" "$val" "$type"
;;
set_notification)
freecwmp_set_parameter_notification "$parm" "$val"
;;
esac
}
get_management_server_periodic_inform_enable() {
local val=""
local type="xsd:boolean"
local parm="InternetGatewayDevice.ManagementServer.PeriodicInformEnable"
local permissions=""
case "$action" in
get_value)
val=`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q get cwmp.acs.periodic_inform_enable`
;;
get_name)
permissions="1"
;;
get_notification)
freecwmp_get_parameter_notification "val" "$parm"
;;
esac
freecwmp_output "$parm" "$val" "$permissions" "$type"
}
set_management_server_periodic_inform_enable() {
local val=$1
local parm="InternetGatewayDevice.ManagementServer.PeriodicInformEnable"
case "$action" in
set_value)
/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q set cwmp.acs.periodic_inform_enable="$val"
ubus ${UBUS_SOCKET:+-s $UBUS_SOCKET} call tr069 command '{ "command": "reload_end_session" }' &> /dev/null &
;;
set_notification)
freecwmp_set_parameter_notification "$parm" "$val"
;;
esac
}
get_management_server_periodic_inform_interval() {
local val=""
local type="xsd:unsignedInt"
local parm="InternetGatewayDevice.ManagementServer.PeriodicInformInterval"
local permissions=""
case "$action" in
get_value)
val=`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q get cwmp.acs.periodic_inform_interval 2> /dev/null`
;;
get_name)
permissions="1"
;;
get_notification)
freecwmp_get_parameter_notification "val" "$parm"
;;
esac
freecwmp_output "$parm" "$val" "$permissions" "$type"
}
set_management_server_periodic_inform_interval() {
local val=$1
local parm="InternetGatewayDevice.ManagementServer.PeriodicInformInterval"
case "$action" in
set_value)
/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q set cwmp.acs.periodic_inform_interval="$val"
ubus ${UBUS_SOCKET:+-s $UBUS_SOCKET} call tr069 command '{ "command": "reload_end_session" }' &> /dev/null &
;;
set_notification)
freecwmp_set_parameter_notification "$parm" "$val"
;;
esac
}
get_management_server_connection_request_url() {
local val
local parm="InternetGatewayDevice.ManagementServer.ConnectionRequestURL"
local permissions=""
case "$action" in
get_value)
if [ -z "$default_management_server_connection_request_url" ]; then
local tmp_value=${FLAGS_value}
FLAGS_value=${FLAGS_TRUE}
local tmp_json=${FLAGS_json}
FLAGS_json=${FLAGS_FALSE}
local ip=`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q -P /var/state get cwmp.cpe.ip`
local port=`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q get cwmp.cpe.port`
FLAGS_value=$tmp_value
FLAGS_json=$tmp_json
if [ -n "$ip" -a -n "$port" ]; then
val="http://$ip:$port/"
fi
else
val=$default_management_server_connection_request_url
fi
;;
get_name)
permissions="0"
;;
get_notification)
freecwmp_get_parameter_notification "val" "$parm"
;;
esac
freecwmp_output "$parm" "$val" "$permissions"
}
get_management_server_connection_request_username() {
local val=""
local parm="InternetGatewayDevice.ManagementServer.ConnectionRequestUsername"
local permissions=""
case "$action" in
get_value)
val=`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q get cwmp.cpe.userid 2> /dev/null`
;;
get_name)
permissions="1"
;;
get_notification)
freecwmp_get_parameter_notification "val" "$parm"
;;
esac
freecwmp_output "$parm" "$val" "$permissions"
}
set_management_server_connection_request_username() {
local val=$1
local parm="InternetGatewayDevice.ManagementServer.ConnectionRequestUsername"
case "$action" in
set_value)
/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q set cwmp.cpe.userid="$val"
ubus ${UBUS_SOCKET:+-s $UBUS_SOCKET} call tr069 command '{ "command": "reload_end_session" }' &> /dev/null &
;;
set_notification)
freecwmp_set_parameter_notification "$parm" "$val"
;;
esac
}
get_management_server_connection_request_password() {
local val=""
local parm="InternetGatewayDevice.ManagementServer.ConnectionRequestPassword"
local permissions=""
case "$action" in
get_value)
# returned value must be empty
val=""
;;
get_name)
permissions="1"
;;
get_notification)
freecwmp_get_parameter_notification "val" "$parm"
;;
esac
freecwmp_output "$parm" "$val" "$permissions"
}
set_management_server_connection_request_password() {
local val=$1
local parm="InternetGatewayDevice.ManagementServer.ConnectionRequestPassword"
case "$action" in
set_value)
/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q set cwmp.cpe.passwd="$val"
ubus ${UBUS_SOCKET:+-s $UBUS_SOCKET} call tr069 command '{ "command": "reload_end_session" }' &> /dev/null &
;;
set_notification)
freecwmp_set_parameter_notification "$parm" "$val"
;;
esac
}
# TODO: InternetGatewayDevice.ManagementServer.PeriodicInformTime
get_management_server_periodic_inform_time() {
local val=""
local type="xsd:dateTime"
local parm="InternetGatewayDevice.ManagementServer.PeriodicInformTime"
local permissions=""
case "$action" in
get_value)
val=`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q get cwmp.acs.periodic_inform_time`
if [ "$val" != "0" -a "$val" != "" ];then
val=`date -d @$val +"%Y-%m-%dT%H:%M:%S.000Z"`
else
val="0001-01-01T00:00:00Z"
fi
;;
get_name)
permissions="1"
;;
get_notification)
freecwmp_get_parameter_notification "val" "$parm"
;;
esac
freecwmp_output "$parm" "$val" "$permissions" "$type"
}
set_management_server_periodic_inform_time() {
local val=$1
local parm="InternetGatewayDevice.ManagementServer.PeriodicInformTime"
case "$action" in
set_value)
if [ "$val" != "0001-01-01T00:00:00Z" ];then
val=`echo $val|sed 's/Z//g'`
val=`echo $val|sed 's/T/ /g'`
val=${val%%.*}
val=`date -d "$val" "+%s"`
else
val=0
fi
/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q set cwmp.acs.periodic_inform_time="$val"
ubus ${UBUS_SOCKET:+-s $UBUS_SOCKET} call tr069 command '{ "command": "reload_end_session" }' &> /dev/null &
;;
set_notification)
freecwmp_set_parameter_notification "$parm" "$val"
;;
esac
}
get_management_server_x_freecwmp_org__acs_scheme() {
local val=""
local permissions=""
local parm="InternetGatewayDevice.ManagementServer.X_freecwmp_org__ACS_Scheme"
case "$action" in
get_value)
val=`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q get cwmp.@acs[0].scheme 2> /dev/null`
;;
get_name)
permissions="1"
;;
get_notification)
freecwmp_get_parameter_notification "val" "$parm"
;;
esac
freecwmp_output "$parm" "$val" "$permissions"
}
set_management_server_x_freecwmp_org__acs_scheme() {
local val=$1
local parm="InternetGatewayDevice.ManagementServer.X_freecwmp_org__ACS_Scheme"
case "$action" in
set_value)
/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q set cwmp.@acs[0].scheme="$val"
;;
set_notification)
freecwmp_set_parameter_notification "$parm" "$val"
;;
esac
}
get_management_server_x_freecwmp_org__acs_hostname() {
local val=""
local parm="InternetGatewayDevice.ManagementServer.X_freecwmp_org__ACS_Hostname"
local permissions=""
case "$action" in
get_value)
val=`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q get cwmp.@acs[0].hostname 2> /dev/null`
;;
get_name)
permissions="1"
;;
get_notification)
freecwmp_get_parameter_notification "val" "$parm"
;;
esac
freecwmp_output "$parm" "$val" "$permissions"
}
set_management_server_x_freecwmp_org__acs_hostname() {
local val=$1
local parm="InternetGatewayDevice.ManagementServer.X_freecwmp_org__ACS_Hostname"
case "$action" in
set_value)
if [ -z "$default_management_server_acs_hostname" ]; then
/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q set cwmp.@acs[0].hostname="$val"
else
/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q set cwmp.@acs[0].hostname="$default_management_server_acs_hostname"
fi
;;
set_notification)
freecwmp_set_parameter_notification "$parm" "$val"
;;
esac
}
get_management_server_x_freecwmp_org__acs_port() {
local val=""
local parm="InternetGatewayDevice.ManagementServer.X_freecwmp_org__ACS_Port"
local permissions=""
case "$action" in
get_value)
val=`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q get cwmp.@acs[0].port 2> /dev/null`
;;
get_name)
permissions="1"
;;
get_notification)
freecwmp_get_parameter_notification "val" "$parm"
;;
esac
freecwmp_output "$parm" "$val" "$permissions"
}
set_management_server_x_freecwmp_org__acs_port() {
local val=$1
local parm="InternetGatewayDevice.ManagementServer.X_freecwmp_org__ACS_Port"
case "$action" in
set_value)
/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q set cwmp.@acs[0].port="$val"
;;
set_notification)
freecwmp_set_parameter_notification "$parm" "$val"
;;
esac
}
get_management_server_x_freecwmp_org__acs_path() {
local val=""
local parm="InternetGatewayDevice.ManagementServer.X_freecwmp_org__ACS_Path"
local permissions=""
case "$action" in
get_value)
val=`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q get cwmp.@acs[0].path 2> /dev/null`
;;
get_name)
permissions="1"
;;
get_notification)
freecwmp_get_parameter_notification "val" "$parm"
;;
esac
freecwmp_output "$parm" "$val" "$permissions"
}
set_management_server_x_freecwmp_org__acs_path() {
local val=$1
local parm="InternetGatewayDevice.ManagementServer.X_freecwmp_org__ACS_Path"
case "$action" in
set_value)
/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q set cwmp.@acs[0].path="$val"
;;
set_notification)
freecwmp_set_parameter_notification "$parm" "$val"
;;
esac
}
get_management_server_x_freecwmp_org__connection_request_port() {
local val=""
local parm="InternetGatewayDevice.ManagementServer.X_freecwmp_org__Connection_Request_Port"
local permissions=""
case "$action" in
get_value)
val=`/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q get cwmp.@local[0].port 2> /dev/null`
;;
get_name)
permissions="1"
;;
get_notification)
freecwmp_get_parameter_notification "val" "$parm"
;;
esac
freecwmp_output "$parm" "$val" "$permissions"
}
set_management_server_x_freecwmp_org__connection_request_port() {
local val=$1
local parm="InternetGatewayDevice.ManagementServer.X_freecwmp_org__Connection_Request_Port"
case "$action" in
set_value)
/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q set cwmp.@local[0].port="$val"
;;
set_notification)
freecwmp_set_parameter_notification "$parm" "$val"
;;
esac
}
get_management_server() {
case "$1" in
InternetGatewayDevice.)
get_management_server_url
get_management_server_username
get_management_server_password
get_management_server_periodic_inform_enable
get_management_server_periodic_inform_interval
get_management_server_periodic_inform_time
get_management_server_connection_request_url
get_management_server_connection_request_username
get_management_server_connection_request_password
get_management_server_parameter_key
return $FAULT_CPE_NO_FAULT
;;
InternetGatewayDevice.ManagementServer.)
get_management_server_url
get_management_server_username
get_management_server_password
get_management_server_periodic_inform_enable
get_management_server_periodic_inform_interval
get_management_server_periodic_inform_time
get_management_server_connection_request_url
get_management_server_connection_request_username
get_management_server_connection_request_password
get_management_server_parameter_key
return $FAULT_CPE_NO_FAULT
;;
InternetGatewayDevice.ManagementServer.URL)
get_management_server_url
return $FAULT_CPE_NO_FAULT
;;
InternetGatewayDevice.ManagementServer.Username)
get_management_server_username
return $FAULT_CPE_NO_FAULT
;;
InternetGatewayDevice.ManagementServer.Password)
get_management_server_password
return $FAULT_CPE_NO_FAULT
;;
InternetGatewayDevice.ManagementServer.PeriodicInformEnable)
get_management_server_periodic_inform_enable
return $FAULT_CPE_NO_FAULT
;;
InternetGatewayDevice.ManagementServer.PeriodicInformInterval)
get_management_server_periodic_inform_interval
return $FAULT_CPE_NO_FAULT
;;
InternetGatewayDevice.ManagementServer.PeriodicInformTime)
get_management_server_periodic_inform_time
return $FAULT_CPE_NO_FAULT
;;
InternetGatewayDevice.ManagementServer.ConnectionRequestURL)
get_management_server_connection_request_url
return $FAULT_CPE_NO_FAULT
;;
InternetGatewayDevice.ManagementServer.ConnectionRequestUsername)
get_management_server_connection_request_username
return $FAULT_CPE_NO_FAULT
;;
InternetGatewayDevice.ManagementServer.ConnectionRequestPassword)
get_management_server_connection_request_password
return $FAULT_CPE_NO_FAULT
;;
InternetGatewayDevice.ManagementServer.ParameterKey)
get_management_server_parameter_key
return $FAULT_CPE_NO_FAULT
;;
esac
return $FAULT_CPE_INVALID_PARAMETER_NAME
}
get_management_server_name() {
case "$1" in
InternetGatewayDevice.)
freecwmp_output "InternetGatewayDevice.ManagementServer." "" "0"
if [ "$2" = "0" ]; then
get_management_server_url
get_management_server_username
get_management_server_password
get_management_server_periodic_inform_enable
get_management_server_periodic_inform_interval
get_management_server_periodic_inform_time
get_management_server_connection_request_url
get_management_server_connection_request_username
get_management_server_connection_request_password
get_management_server_parameter_key
fi
return $FAULT_CPE_NO_FAULT
;;
InternetGatewayDevice.ManagementServer.)
freecwmp_output "InternetGatewayDevice.ManagementServer." "" "0"
get_management_server_url
get_management_server_username
get_management_server_password
get_management_server_periodic_inform_enable
get_management_server_periodic_inform_interval
get_management_server_periodic_inform_time
get_management_server_connection_request_url
get_management_server_connection_request_username
get_management_server_connection_request_password
get_management_server_parameter_key
return $FAULT_CPE_NO_FAULT
;;
InternetGatewayDevice.ManagementServer.URL)
if [ "$2" = "1" ]; then
return $FAULT_CPE_INVALID_ARGUMENTS
fi
get_management_server_url
return $FAULT_CPE_NO_FAULT
;;
InternetGatewayDevice.ManagementServer.Username)
if [ "$2" = "1" ]; then
return $FAULT_CPE_INVALID_ARGUMENTS
fi
get_management_server_username
return $FAULT_CPE_NO_FAULT
;;
InternetGatewayDevice.ManagementServer.Password)
if [ "$2" = "1" ]; then
return $FAULT_CPE_INVALID_ARGUMENTS
fi
get_management_server_password
return $FAULT_CPE_NO_FAULT
;;
InternetGatewayDevice.ManagementServer.PeriodicInformEnable)
if [ "$2" = "1" ]; then
return $FAULT_CPE_INVALID_ARGUMENTS
fi
get_management_server_periodic_inform_enable
return $FAULT_CPE_NO_FAULT
;;
InternetGatewayDevice.ManagementServer.PeriodicInformInterval)
if [ "$2" = "1" ]; then
return $FAULT_CPE_INVALID_ARGUMENTS
fi
get_management_server_periodic_inform_interval
return $FAULT_CPE_NO_FAULT
;;
InternetGatewayDevice.ManagementServer.PeriodicInformTime)
if [ "$2" = "1" ]; then
return $FAULT_CPE_INVALID_ARGUMENTS
fi
get_management_server_periodic_inform_time
return $FAULT_CPE_NO_FAULT
;;
InternetGatewayDevice.ManagementServer.ConnectionRequestURL)
if [ "$2" = "1" ]; then
return $FAULT_CPE_INVALID_ARGUMENTS
fi
get_management_server_connection_request_url
return $FAULT_CPE_NO_FAULT
;;
InternetGatewayDevice.ManagementServer.ConnectionRequestUsername)
if [ "$2" = "1" ]; then
return $FAULT_CPE_INVALID_ARGUMENTS
fi
get_management_server_connection_request_username
return $FAULT_CPE_NO_FAULT
;;
InternetGatewayDevice.ManagementServer.ConnectionRequestPassword)
if [ "$2" = "1" ]; then
return $FAULT_CPE_INVALID_ARGUMENTS
fi
get_management_server_connection_request_password
return $FAULT_CPE_NO_FAULT
;;
InternetGatewayDevice.ManagementServer.ParameterKey)
if [ "$2" = "1" ]; then
return $FAULT_CPE_INVALID_ARGUMENTS
fi
get_management_server_parameter_key
return $FAULT_CPE_NO_FAULT
;;
esac
return $FAULT_CPE_INVALID_PARAMETER_NAME
}
get_management_server_notification() {
case "$1" in
InternetGatewayDevice.)
get_management_server_url
get_management_server_username
get_management_server_password
get_management_server_periodic_inform_enable
get_management_server_periodic_inform_interval
get_management_server_periodic_inform_time
get_management_server_connection_request_url
get_management_server_connection_request_username
get_management_server_connection_request_password
get_management_server_parameter_key
return $FAULT_CPE_NO_FAULT
;;
InternetGatewayDevice.ManagementServer.)
get_management_server_url
get_management_server_username
get_management_server_password
get_management_server_periodic_inform_enable
get_management_server_periodic_inform_interval
get_management_server_periodic_inform_time
get_management_server_connection_request_url
get_management_server_connection_request_username
get_management_server_connection_request_password
get_management_server_parameter_key
return $FAULT_CPE_NO_FAULT
;;
InternetGatewayDevice.ManagementServer.URL)
get_management_server_url
return $FAULT_CPE_NO_FAULT
;;
InternetGatewayDevice.ManagementServer.Username)
get_management_server_username
return $FAULT_CPE_NO_FAULT
;;
InternetGatewayDevice.ManagementServer.Password)
get_management_server_password
return $FAULT_CPE_NO_FAULT
;;
InternetGatewayDevice.ManagementServer.PeriodicInformEnable)
get_management_server_periodic_inform_enable
return $FAULT_CPE_NO_FAULT
;;
InternetGatewayDevice.ManagementServer.PeriodicInformInterval)
get_management_server_periodic_inform_interval
return $FAULT_CPE_NO_FAULT
;;
InternetGatewayDevice.ManagementServer.PeriodicInformTime)
get_management_server_periodic_inform_time
return $FAULT_CPE_NO_FAULT
;;
InternetGatewayDevice.ManagementServer.ConnectionRequestURL)
get_management_server_connection_request_url
return $FAULT_CPE_NO_FAULT
;;
InternetGatewayDevice.ManagementServer.ConnectionRequestUsername)
get_management_server_connection_request_username
return $FAULT_CPE_NO_FAULT
;;
InternetGatewayDevice.ManagementServer.ConnectionRequestPassword)
get_management_server_connection_request_password
return $FAULT_CPE_NO_FAULT
;;
InternetGatewayDevice.ManagementServer.ParameterKey)
get_management_server_parameter_key
return $FAULT_CPE_NO_FAULT
;;
esac
return $FAULT_CPE_INVALID_PARAMETER_NAME
}
set_management_server() {
case "$1" in
InternetGatewayDevice.ManagementServer.URL)
set_management_server_url "$2"
return $FAULT_CPE_NO_FAULT
;;
InternetGatewayDevice.ManagementServer.Username)
set_management_server_username "$2"
return $FAULT_CPE_NO_FAULT
;;
InternetGatewayDevice.ManagementServer.Password)
set_management_server_password "$2"
return $FAULT_CPE_NO_FAULT
;;
InternetGatewayDevice.ManagementServer.PeriodicInformEnable)
set_management_server_periodic_inform_enable "$2"
return $FAULT_CPE_NO_FAULT
;;
InternetGatewayDevice.ManagementServer.PeriodicInformInterval)
set_management_server_periodic_inform_interval "$2"
return $FAULT_CPE_NO_FAULT
;;
InternetGatewayDevice.ManagementServer.PeriodicInformTime)
set_management_server_periodic_inform_time "$2"
return $FAULT_CPE_NO_FAULT
;;
InternetGatewayDevice.ManagementServer.ConnectionRequestURL)
set_management_server_connection_request_url "$2"
return $FAULT_CPE_NO_FAULT
;;
InternetGatewayDevice.ManagementServer.ConnectionRequestUsername)
set_management_server_connection_request_username "$2"
return $FAULT_CPE_NO_FAULT
;;
InternetGatewayDevice.ManagementServer.ConnectionRequestPassword)
set_management_server_connection_request_password "$2"
return $FAULT_CPE_NO_FAULT
;;
InternetGatewayDevice.ManagementServer.ParameterKey)
set_management_server_parameter_key "$2"
return $FAULT_CPE_NO_FAULT
;;
esac
return $FAULT_CPE_INVALID_PARAMETER_NAME
}
set_management_server_notification() {
case "$1" in
InternetGatewayDevice.)
freecwmp_set_parameter_notification "InternetGatewayDevice.ManagementServer.URL" "0"
freecwmp_set_parameter_notification "InternetGatewayDevice.ManagementServer.Username" "0"
freecwmp_set_parameter_notification "InternetGatewayDevice.ManagementServer.Password" "0"
freecwmp_set_parameter_notification "InternetGatewayDevice.ManagementServer.PeriodicInformEnable" "0"
freecwmp_set_parameter_notification "InternetGatewayDevice.ManagementServer.PeriodicInformInterval" "0"
freecwmp_set_parameter_notification "InternetGatewayDevice.ManagementServer.PeriodicInformTime" "0"
freecwmp_set_parameter_notification "InternetGatewayDevice.ManagementServer.ConnectionRequestURL" "0"
freecwmp_set_parameter_notification "InternetGatewayDevice.ManagementServer.ConnectionRequestUsername" "0"
freecwmp_set_parameter_notification "InternetGatewayDevice.ManagementServer.ConnectionRequestPassword" "0"
freecwmp_set_parameter_notification "InternetGatewayDevice.ManagementServer.ParameterKey" "0"
return $FAULT_CPE_NO_FAULT
;;
InternetGatewayDevice.ManagementServer.)
freecwmp_set_parameter_notification "InternetGatewayDevice.ManagementServer.URL" "0"
freecwmp_set_parameter_notification "InternetGatewayDevice.ManagementServer.Username" "0"
freecwmp_set_parameter_notification "InternetGatewayDevice.ManagementServer.Password" "0"
freecwmp_set_parameter_notification "InternetGatewayDevice.ManagementServer.PeriodicInformEnable" "0"
freecwmp_set_parameter_notification "InternetGatewayDevice.ManagementServer.PeriodicInformInterval" "0"
freecwmp_set_parameter_notification "InternetGatewayDevice.ManagementServer.PeriodicInformTime" "0"
freecwmp_set_parameter_notification "InternetGatewayDevice.ManagementServer.ConnectionRequestURL" "0"
freecwmp_set_parameter_notification "InternetGatewayDevice.ManagementServer.ConnectionRequestUsername" "0"
freecwmp_set_parameter_notification "InternetGatewayDevice.ManagementServer.ConnectionRequestPassword" "0"
freecwmp_set_parameter_notification "InternetGatewayDevice.ManagementServer.ParameterKey" "0"
freecwmp_set_parameter_notification "$1" "$2"
return $FAULT_CPE_NO_FAULT
;;
InternetGatewayDevice.ManagementServer.URL)
set_management_server_url "$2"
return $FAULT_CPE_NO_FAULT
;;
InternetGatewayDevice.ManagementServer.Username)
set_management_server_username "$2"
return $FAULT_CPE_NO_FAULT
;;
InternetGatewayDevice.ManagementServer.Password)
set_management_server_password "$2"
return $FAULT_CPE_NO_FAULT
;;
InternetGatewayDevice.ManagementServer.PeriodicInformEnable)
set_management_server_periodic_inform_enable "$2"
return $FAULT_CPE_NO_FAULT
;;
InternetGatewayDevice.ManagementServer.PeriodicInformInterval)
set_management_server_periodic_inform_interval "$2"
return $FAULT_CPE_NO_FAULT
;;
InternetGatewayDevice.ManagementServer.PeriodicInformTime)
set_management_server_periodic_inform_time "$2"
return $FAULT_CPE_NO_FAULT
;;
InternetGatewayDevice.ManagementServer.ConnectionRequestURL)
set_management_server_connection_request_url "$2"
return $FAULT_CPE_NO_FAULT
;;
InternetGatewayDevice.ManagementServer.ConnectionRequestUsername)
set_management_server_connection_request_username "$2"
return $FAULT_CPE_NO_FAULT
;;
InternetGatewayDevice.ManagementServer.ConnectionRequestPassword)
set_management_server_connection_request_password "$2"
return $FAULT_CPE_NO_FAULT
;;
InternetGatewayDevice.ManagementServer.ParameterKey)
set_management_server_parameter_key "$2"
return $FAULT_CPE_NO_FAULT
;;
esac
return $FAULT_CPE_INVALID_PARAMETER_NAME
}
check_parameter_management_server_generic() {
case "$1" in
InternetGatewayDevice.ManagementServer.UpgradesManaged)
return 0
;;
esac
return 1
}
get_management_server_generic() {
check_parameter_management_server_generic "$1" ; _tmp=$? ; if [ "$_tmp" -eq 1 ]; then return $FAULT_CPE_INVALID_PARAMETER_NAME; fi
freecwmp_get_parameter_value "val" "$1"
freecwmp_output "$1" "$val"
return $FAULT_CPE_NO_FAULT
}
get_management_server_generic_name() {
check_parameter_management_server_generic "$1" ; _tmp=$? ; if [ "$_tmp" -eq 1 ]; then return $FAULT_CPE_INVALID_PARAMETER_NAME; fi
local permissions="1"
freecwmp_output "$1" "" "$permissions"
return $FAULT_CPE_NO_FAULT
}
get_management_server_generic_notification() {
check_parameter_management_server_generic "$1" ; _tmp=$? ; if [ "$_tmp" -eq 1 ]; then return $FAULT_CPE_INVALID_PARAMETER_NAME; fi
local val
freecwmp_get_parameter_notification "val" "$1"
freecwmp_output "$1" "$val"
return $FAULT_CPE_NO_FAULT
}
set_management_server_generic() {
check_parameter_management_server_generic "$1" ; _tmp=$? ; if [ "$_tmp" -eq 1 ]; then return $FAULT_CPE_INVALID_PARAMETER_NAME; fi
freecwmp_set_parameter_value "$1" "$2"
return $FAULT_CPE_NO_FAULT
}
set_management_server_generic_notification() {
check_parameter_management_server_generic "$1" ; _tmp=$? ; if [ "$_tmp" -eq 1 ]; then return $FAULT_CPE_INVALID_PARAMETER_NAME; fi
freecwmp_set_parameter_notification "$1" "$2"
return $FAULT_CPE_NO_FAULT
}
add_management_server() { return $FAULT_CPE_INVALID_PARAMETER_NAME; }
delete_management_server() { return $FAULT_CPE_INVALID_PARAMETER_NAME; }
add_management_server_generic() { return $FAULT_CPE_INVALID_PARAMETER_NAME; }
delete_management_server_generic() { return $FAULT_CPE_INVALID_PARAMETER_NAME; }