clearing device config

Marc Priebee Marc.Priebee at spark.co.nz
Tue Mar 7 15:25:50 EST 2017


Hi,

I'm trying to set up a provision script to run only on bootstrap. This works fine, if there is no entry for the in the genie DB.
How-ever, the second time we receive a bootstrap for the same device, the provision script runs, but genie does not set any device parameters. I presume this is because the values in the DB are the same as the values I want to set.

So I tried adding a clear("InternetGatewayDevice", Date.now()); statement as per the documentation. The next time we receive
a bootstrap, I get an error..
Channel has faulted; channel="default" retries=0 faultCode="script.ReferenceError" faultMessage="maxRevision is not defined"
And subsequent bootstraps the provision does not run at all

My provision script looks like this;
let serial = declare("InternetGatewayDevice.DeviceInfo.SerialNumber", {value: 1});
log("provision with "+serial.value[0]);
let resp = ext("testext", "getSIP", serial.value[0]);
log("provision back from extension with "+resp.username);
clear("InternetGatewayDevice", Date.now());
declare("InternetGatewayDevice.ManagementServer.Username", null,
  {value: resp.username});
declare("InternetGatewayDevice.ManagementServer.Password", null,
  {value: resp.password});
declare("InternetGatewayDevice.ManagementServer.PeriodicInformEnable", null,
  {value: true});
declare("InternetGatewayDevice.ManagementServer.PeriodicInformInterval", null,
  {value: 300});

Marc


This communication, including any attachments, is confidential. If you are not the intended recipient, you should not read it - please contact me immediately, destroy it, and do not copy or use any part of this communication or disclose anything about it. Thank you. Please note that this communication does not designate an information system for the purposes of the Electronic Transactions Act 2002.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.genieacs.com/pipermail/users/attachments/20170307/836528eb/attachment-0001.html>


More information about the Users mailing list