More precisely, I can also access a WANDevice using a "condition" if possible. For example, I need to reset InternetGatewayDevice.WANDevice.X.WANConnectionDevice.1.WANPPPConnection.1.Username if and only if InternetGatewayDevice.WANDevice.X.WANConnectionDevice.1.WANPPPConnection.1.Username = "test"
Is there some way to do this? This kind of operation is better than using last index on WANDevice in my case. Thank you, Marco 2017-09-06 8:51 GMT+02:00 Marco Marino <[email protected]>: > 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 <[email protected]>: > >> 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. >> WANPPPConnection.*", {value: Date.now()}, {path: 1}); // path: 1 says >> only one value >> >> Then you set the values: >> declare("InternetGatewayDevice.WANDevice.3.WANConnectionDevi >> ce.1.WANPPPConnection.*.Username", {value: Date.now()}, {value: >> "someUsername"}); >> declare("InternetGatewayDevice.WANDevice.3.WANConnectionDevi >> ce.1.WANPPPConnection.*.Password", {value: Date.now()}, {value: >> "somePassword"}); >> >> >> >> On Tue, Sep 5, 2017 at 6:12 AM, Marco Marino <[email protected]> >> 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 >>> [email protected] >>> http://lists.genieacs.com/mailman/listinfo/users >>> >>> >> >> _______________________________________________ >> Users mailing list >> [email protected] >> http://lists.genieacs.com/mailman/listinfo/users >> >> >
_______________________________________________ Users mailing list [email protected] http://lists.genieacs.com/mailman/listinfo/users
