How to create objects with specific parameters using provision scripts

Dan Morphis dan at milkcarton.com
Wed Apr 26 03:01:16 EDT 2017


I can Oliver! I'm not sure why I didn't think to do that. I'll update the wiki in the morning. 

-dan

> On Apr 25, 2017, at 10:48 PM, Oliver Kraitschy <oliver at okraits.de> wrote:
> 
> Hello Dan,
> 
> could you please add a description of this to the wiki?
> 
> Thank you in advance!
> 
> Greetings,
> Oliver
> 
> Am 25.04.2017 18:50, schrieb Dan Morphis:
>> 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'});
>> _______________________________________________
>> 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


More information about the Users mailing list