<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Mar 8, 2017 at 10:16 AM, Zaid Abdulla <span dir="ltr"><<a href="mailto:zaid@genieacs.com" target="_blank">zaid@genieacs.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail-"><br>
> Second, is there an easier way of declaring values on an instance<br>
> than the approach I'm using?<br>
> //Ensure we have a WANPPPConnection instance<br>
> declare("<wbr>InternetGatewayDevice.<wbr>WANDevice.1.<wbr>WANConnectionDevice.1.WANP<br>
> PPConnection.*", null, {path: 1});<br>
> //Set the connection values<br>
> declare("<wbr>InternetGatewayDevice.<wbr>WANDevice.1.<wbr>WANConnectionDevice.1.WANP<br>
> PPConnection.*.Name", {value: now}, {value: "Internet"});<br>
> declare("<wbr>InternetGatewayDevice.<wbr>WANDevice.1.<wbr>WANConnectionDevice.1.WANP<br>
> PPConnection.*.ConnectionType"<wbr>, {value: now}, {value: "IP_Routed"});<br>
> declare("<wbr>InternetGatewayDevice.<wbr>WANDevice.1.<wbr>WANConnectionDevice.1.WANP<br>
> PPConnection.*.X_BROADCOM_COM_<wbr>IfName", {value: now}, {value:<br>
> "ppp0.1"});<br>
> declare("<wbr>InternetGatewayDevice.<wbr>WANDevice.1.<wbr>WANConnectionDevice.1.WANP<br>
> PPConnection.*.NATEnabled", {value: now}, {value: true});<br>
> declare("<wbr>InternetGatewayDevice.<wbr>WANDevice.1.<wbr>WANConnectionDevice.1.WANP<br>
</span>> PPConnection.*.X_BROADCOM_COM_<wbr>FirewallEnabled", {value: now}, {value:<br>
> true});<br>
> declare("<wbr>InternetGatewayDevice.<wbr>WANDevice.1.<wbr>WANConnectionDevice.1.WANP<br>
> PPConnection.*.Enable", {value: now}, {value: true});<br>
> declare("<wbr>InternetGatewayDevice.<wbr>WANDevice.1.<wbr>WANConnectionDevice.1.WANP<br>
<span class="gmail-">> PPConnection.*.<wbr>PPPoEServiceName", {value: now}, {value:<br>
> "broadband"});<br>
<br>
</span>No, sorry :) I don't see how it can be made easier. Do you have<br>
something in mind?<br>
<span class="gmail-HOEnZb"><font color="#888888"><br></font></span></blockquote><div>How about something like this:</div><div> let instance = declare("<wbr>InternetGatewayDevice.<wbr>WANDevice.1.<wbr>WANConnectionDevice.1.WANPPPConnection.*", null, {path: 1});</div><div>instance.Name = {value: "Internet", _timestamp: Date.now()};</div><div>instance.NATEnabled = {value: true, _timestamp: Date.now()};<br></div><div>...</div></div></div></div>