acs_ex v0.3.8 ACS.Session.Script.Vendor.Helpers

Summary

Functions

args must be a map with keys: “object_name” where the object name ends with

Sends a GetOptions request info the session

Sends a ChangeDUState request info the session

args must be a map with keys: “object_name” where the object name ends with

Sends a Download request info the session

Extracts the Parameters from an inform. Returns a map with parameters and values

Sends a FactoryReset request info the session

Sends an GetAllQueuedTransfers request info the session

Sends a GetOptions request info the session

args will be a list of string with paramter names for which you want to retrieve attributes

args will be a maps with keys “parameter_path” and “next_level”

args will be a list of names for the actual cwmp request

Sends a GetQueuedTransfers request info the session

GetRPCMethods, no args

Determines if an EventStruct of an Inform contains a specific event

call the session server with the script_commmand: reboot

Sends a ScheduleDownload request info the session

Sends a ScheduleInform request info the session

Get the current list of ACS messages, i.e. TransferComplete aso from the session

args will be a list of maps each with keys “name”, “notification_change”, “notification”, “accesslist_change” and “accesslist”

args must be a list of maps with “name”, “type”, “value”

Sends a SetVouchers request info the session

Sends an Upload request info the session

Functions

addObject(session, args)

args must be a map with keys: “object_name” where the object name ends with .

cancelTransfer(session, args)

Sends a GetOptions request info the session.

Args is a commandkey, just a string

changeDUState(session, args)

Sends a ChangeDUState request info the session.

args is a map containing the keys needed to generate at CWMP.Protocol.Messages.ChangeDUState structure. This means that the elements in the operations list need to be one (or more) of the struct types: %CWMP.Protocol.Messages.InstallOpStruct{url: url, uuid: uuid, username: user, password: pass, execution_env_ref: eer} %CWMP.Protocol.Messages.UpdateOpStruct{url: url, uuid: uuid, username: user, password: pass, version: ver} %CWMP.Protocol.Messages.UninstallOpStruct{url: url, uuid: uuid, execution_env_ref: eer}

For example:

  commandkey (May be "")
  operations: [
    %CWMP.Protocol.Messages.InstallOpStruct{
      url
      uuid
      username (May be "")
      password (May be "")
      execution_env_ref
    }]
deleteObject(session, args)

args must be a map with keys: “object_name” where the object name ends with .

An optional parameter_key can be given

Returns a CWMP.Protocol.Messages.AddObjectResponse

download(session, args)

Sends a Download request info the session.

args is a map containing the keys needed to generate at CWMP.Protocol.Messages.Download structure. i.e. “url”, “filetype”, “filesize” at least.

extract_params(inform)

Extracts the Parameters from an inform. Returns a map with parameters and values.

factoryReset(session)

Sends a FactoryReset request info the session.

getAllQueuedTransfers(session)

Sends an GetAllQueuedTransfers request info the session.

getOptions(session, args)

Sends a GetOptions request info the session.

Args is the option name, just a string

getParameterAttributes(session, args)

args will be a list of string with paramter names for which you want to retrieve attributes.

Return value will be a CWMP.Protocol.Messages.GetParameterAttributesResponse struct

getParameterNames(session, args)

args will be a maps with keys “parameter_path” and “next_level”

getParameterValues(session, args)

args will be a list of names for the actual cwmp request.

getQueuedTransfers(session)

Sends a GetQueuedTransfers request info the session.

getRPCMethods(session)

GetRPCMethods, no args

has_event?(inform, eventname)

Determines if an EventStruct of an Inform contains a specific event.

reboot(session)

call the session server with the script_commmand: reboot

scheduleDownload(session, args)

Sends a ScheduleDownload request info the session.

args is a map containing the keys needed to generate at CWMP.Protocol.Messages.ScheduleDownload structure. i.e.

  commandkey (May be empty)
  filetype
  url
  username (Optional)
  password (Optional)
  filesize
  target_filename (Optional)
  timewindowlist [%{
    window_start
    window_end
    window_mode
    user_message (May be "")
    max_retries}]
scheduleInform(session, args)

Sends a ScheduleInform request info the session.

session_call(session, command)
session_messages(session)

Get the current list of ACS messages, i.e. TransferComplete aso from the session.

setParameterAttributes(session, args)

args will be a list of maps each with keys “name”, “notification_change”, “notification”, “accesslist_change” and “accesslist”.

setParameterValues(session, args)

args must be a list of maps with “name”, “type”, “value”

setVouchers(session, args)

Sends a SetVouchers request info the session.

upload(session, args)

Sends an Upload request info the session.

Args is a map containing at least commandkey, filetype and url out of the following possible keys, here listed with defaults:

      commandkey: "",
      filetype: nil,
      url: nil,
      username: "",
      password: "",
      delay_seconds: 0