How to create objects with specific parameters using provision scripts

Dan Morphis dan at milkcarton.com
Tue Apr 25 12:50:58 EDT 2017


I wanted to create something that looks like this using a provisioning
script:

InternetGatewayDevice.X_BROADCOM_COM_IPAddrAccCtrl.X_BROADCOM_COM_IPAddrAccCtrlListCfg.1.SourceNetMask
 255.255.255.0
InternetGatewayDevice.X_BROADCOM_COM_IPAddrAccCtrl.X_BROADCOM_COM_IPAddrAccCtrlListCfg.1.SourceIPAddress
192.168.1.0
InternetGatewayDevice.X_BROADCOM_COM_IPAddrAccCtrl.X_BROADCOM_COM_IPAddrAccCtrlListCfg.2.SourceNetMask
 255.255.255.255
InternetGatewayDevice.X_BROADCOM_COM_IPAddrAccCtrl.X_BROADCOM_COM_IPAddrAccCtrlListCfg.2.SourceIPAddress
172.24.77.3

After some fumbling around, I figured out the magical incantation.

let now = Date.now();
declare('
InternetGatewayDevice.X_BROADCOM_COM_IPAddrAccCtrl.X_BROADCOM_COM_IPAddrAccCtrlListCfg.[SourceIPAddress:192.168.1.0].SourceIpAddress',
{value: now}, {value: '192.168.1.0'});
declare('
InternetGatewayDevice.X_BROADCOM_COM_IPAddrAccCtrl.X_BROADCOM_COM_IPAddrAccCtrlListCfg.[SourceIPAddress:192.168.1.0].SourceNetMask',
{value: now}, {value: '255.255.255.0'});

declare('
InternetGatewayDevice.X_BROADCOM_COM_IPAddrAccCtrl.X_BROADCOM_COM_IPAddrAccCtrlListCfg.[SourceIPAddress:172.24.77.3].SourceIpAddress',
{value: now}, {value: '172.24.77.3'});
declare('
InternetGatewayDevice.X_BROADCOM_COM_IPAddrAccCtrl.X_BROADCOM_COM_IPAddrAccCtrlListCfg.[SourceIPAddress:172.24.77.3].SourceNetMask',
{value: now}, {value: '255.255.255.255'});
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.genieacs.com/pipermail/users/attachments/20170425/3abbe355/attachment.html>


More information about the Users mailing list