Implementing a set-before-get-behaviour with presets

Oliver Kraitschy okraits at arcor.de
Fri Mar 18 09:40:30 EDT 2016


Hello,

i'm trying to achieve a get-before-set behaviour with genieacs v1.0.6.

I commented out line 214 in cwmp.coffee so no refreshObject task gets
created upon device registration.

I want to achieve the following 2-step process upon device registration:

1. Device gets registered at the ACS, the device configuration is set by a
preset. => Tag "configured"

2. After that, all device parameters are refreshed/submitted to the ACS.
=> Tag "refreshed"

Therefor, i created two presets which should implement this behaviour with
the help of two tags for the different states, configured and refreshed.
However, the second preset never gets executed:

{
  "weight":1,
  "precondition": "{\"_tags\": {\"$ne\":\"configured\"}}",
  "configurations":
    [
      {"type":"add_tag","tag":"configured"}
    ],
  "_id":"1-SetConfiguration"
},

{
  "weight":1,
  "precondition": "{\"_tags\":\"configured\"}",
  "configurations":
    [
      {"type":"age","name":"InternetGatewayDevice.DeviceInfo.SerialNumber","age":"0"},
      {"type":"add_tag","tag":"refreshed"}
    ],
  "_id":"2-RefreshObject"
}

Why doesn't get the second preset executed?

- How are tags supposed to be used in preconditions? Can i use several tags
in one precondition? Like: Tags = "configured,refreshed"? Do i need a
separate precondition for each tag?
- How is weight evaluated and used? Does it determine an order of execution
or a precedence of execution?
- If i add a refresh configuration with an interval (age) of 0 seconds,
does that mean it's executed only once?
- If i don't enter an interval for a refresh configuration, the cwmp worker
dies.
When is a preset executed? After the inform of a device?

Any explanations are greatly appreciated.

Greetings,

Oliver


More information about the Users mailing list