clearing device config

Dan Morphis dan at milkcarton.com
Tue Mar 7 19:26:45 EST 2017


Update to the latest code. This issue was fixed late last week.

On Tue, Mar 7, 2017 at 11:25 AM, Marc Priebee <Marc.Priebee at spark.co.nz>
wrote:

> 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.
>
>
> _______________________________________________
> Users mailing list
> Users at lists.genieacs.com
> http://lists.genieacs.com/mailman/listinfo/users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.genieacs.com/pipermail/users/attachments/20170307/52f97858/attachment.html>


More information about the Users mailing list