Setting parameters with unknow index

Marco Marino marino.mrc at gmail.com
Wed Sep 6 02:51:06 EDT 2017


Hi Dan, Thank you for your answer. But the problem is the index = 3
(InternetGatewayDevice.WANDevice.3   !!!) how can I select only last
WANDevice ?? Obviously I don't know a priori how many WANDevices are
configured on the device.
Thank you


2017-09-05 19:05 GMT+02:00 Dan Morphis <dan at milkcarton.com>:

> Why only the last PPP connection? Why would you want to have more than one
> PPP connection?
>
> Here is how I do it:
>
> First tell Genie you only want one item:
> declare("InternetGatewayDevice.WANDevice.3.WANConnectionDevice.1.WANPPPCo
> nnection.*", {value: Date.now()}, {path: 1}); // path: 1 says only one
> value
>
> Then you set the values:
> declare("InternetGatewayDevice.WANDevice.3.WANConnectionDevice.1.WANPPPConnection.*.Username",
> {value: Date.now()}, {value: "someUsername"});
> declare("InternetGatewayDevice.WANDevice.3.WANConnectionDevice.1.WANPPPConnection.*.Password",
> {value: Date.now()}, {value: "somePassword"});
>
>
>
> On Tue, Sep 5, 2017 at 6:12 AM, Marco Marino <marino.mrc at gmail.com> wrote:
>
>> Hi, I need to set the following parameter:
>> InternetGatewayDevice.WANDevice.3.WANConnectionDevice.1.WANP
>> PPConnection.1.Username
>> The problem is that I don't know a priori the index of
>> InternetGatewayDevice.WANDevice.X
>> Is there a way using a provision script to set *last* index of WANDevice
>> ??
>>
>> Thank you,
>> Marco
>>
>> _______________________________________________
>> Users mailing list
>> Users at lists.genieacs.com
>> http://lists.genieacs.com/mailman/listinfo/users
>>
>>
>
> _______________________________________________
> 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/20170906/cb8b772a/attachment.html>


More information about the Users mailing list