<div dir="ltr"><div><div><div><div>More precisely, I can also access a WANDevice using a "condition" if possible. For example, I need to reset <br><span class="gmail-long-text gmail-param-path">InternetGatewayDevice.WANDevice.X.WANConnectionDevice.1.WANPPPConnection.1.Username<br></span></div><div><span class="gmail-long-text gmail-param-path">if and only if<br></span></div><span class="gmail-long-text gmail-param-path"></span><span class="gmail-long-text gmail-param-path">InternetGatewayDevice.WANDevice.X.WANConnectionDevice.1.WANPPPConnection.1.Username = "test"<br><br></span></div><span class="gmail-long-text gmail-param-path">Is there some way to do this? This kind of operation is better than using last index on WANDevice in my case.<br></span></div><span class="gmail-long-text gmail-param-path">Thank you,<br></span></div><span class="gmail-long-text gmail-param-path">Marco<br></span><div><span class="gmail-long-text gmail-param-path"><br></span><div><span class="gmail-long-text gmail-param-path"><br></span></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">2017-09-06 8:51 GMT+02:00 Marco Marino <span dir="ltr"><<a href="mailto:marino.mrc@gmail.com" target="_blank">marino.mrc@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hi Dan, Thank you for your answer. But the problem is the index = 3 (InternetGatewayDevice.<wbr>WANDevice.3   !!!) how can I select only last WANDevice ?? Obviously I don't know a priori how many WANDevices are configured on the device.<br></div>Thank you<br><div><br></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">2017-09-05 19:05 GMT+02:00 Dan Morphis <span dir="ltr"><<a href="mailto:dan@milkcarton.com" target="_blank">dan@milkcarton.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Why only the last PPP connection? Why would you want to have more than one PPP connection?</div><div><br></div><div>Here is how I do it:</div><div><br></div>First tell Genie you only want one item:<div>declare("InternetGatewayDevice<wbr>.WANDevice.3.WANConnectionDevi<wbr>ce.1.<span style="font-size:12.8px">WANPPPConnection</span>.*", {value: Date.now()}, {path: 1}); // path: 1 says only one value<br></div><div><br></div><div>Then you set the values:</div><div><div>declare("InternetGatewayDevice<wbr>.WANDevice.3.WANConnectionDevi<wbr>ce.1.WANPPPConnection.*.<wbr>Username", {value: Date.now()}, {value: "someUsername"});</div><div>declare("InternetGatewayDevice<wbr>.WANDevice.3.WANConnectionDevi<wbr>ce.1.WANPPPConnection.*.<wbr>Password", {value: Date.now()}, {value: "somePassword"});</div></div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="m_9073304773867829316h5">On Tue, Sep 5, 2017 at 6:12 AM, Marco Marino <span dir="ltr"><<a href="mailto:marino.mrc@gmail.com" target="_blank">marino.mrc@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="m_9073304773867829316h5"><div dir="ltr"><div><div><div><div><span class="m_9073304773867829316m_2009764845098077046m_8645007323070785789gmail-long-text m_9073304773867829316m_2009764845098077046m_8645007323070785789gmail-param-path">Hi, I need to set the following parameter:<br>InternetGatewayDevice.WANDevic<wbr>e.3.WANConnectionDevice.1.WANP<wbr>PPConnection.1.Username<br></span></div><span class="m_9073304773867829316m_2009764845098077046m_8645007323070785789gmail-long-text m_9073304773867829316m_2009764845098077046m_8645007323070785789gmail-param-path">The problem is that I don't know a priori the index of InternetGatewayDevice.WANDevic<wbr>e.X<br></span></div><span class="m_9073304773867829316m_2009764845098077046m_8645007323070785789gmail-long-text m_9073304773867829316m_2009764845098077046m_8645007323070785789gmail-param-path">Is there a way using a provision script to set *last* index of WANDevice ??<br><br></span></div><span class="m_9073304773867829316m_2009764845098077046m_8645007323070785789gmail-long-text m_9073304773867829316m_2009764845098077046m_8645007323070785789gmail-param-path">Thank you,<br></span></div><span class="m_9073304773867829316m_2009764845098077046m_8645007323070785789gmail-long-text m_9073304773867829316m_2009764845098077046m_8645007323070785789gmail-param-path">Marco<br></span></div>
<br></div></div>______________________________<wbr>_________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.genieacs.com" target="_blank">Users@lists.genieacs.com</a><br>
<a href="http://lists.genieacs.com/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.genieacs.com/mail<wbr>man/listinfo/users</a><br>
<br></blockquote></div><br></div>
<br>______________________________<wbr>_________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.genieacs.com" target="_blank">Users@lists.genieacs.com</a><br>
<a href="http://lists.genieacs.com/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.genieacs.com/mail<wbr>man/listinfo/users</a><br>
<br></blockquote></div><br></div>
</div></div></blockquote></div><br></div>