Hello everyone, I am struggling with creating instances through provision scripts. I have tried many many posts and solution that is present on this forum but I can not make it work. any help would be appreciated.
This is the last one I tried:
declare("InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANIPConnection.1.PortMapping.[]", null, {path: 0});
declare("InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANIPConnection.1.PortMapping.[ExternalPort:555,ExternalPortEndRange:555,InternalClient:192.168.1.111,InternalPort:55,InternalPortEndRange:55,PortMappingDescription:test]", {path: now}, {path: 1});
On this I get too many commits
error.
I also tried this:
let d = declare('InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANIPConnection.1.PortMapping.*', null, {path: 1});
for (let instance of d) {
declare(instance.path + '.ExternalPort', null, {value: 555});
declare(instance.path + '.ExternalPortEndRange', null, {value: 555});
declare(instance.path + '.InternalClient', null, {value: '192.168.1.111'});
declare(instance.path + '.InternalPort', null, {value: 55});
declare(instance.path + '.InternalPortEndRange', null, {value: 55});
declare(instance.path + '.PortMappingDescription', null, {value: 'test'});
}
I get internal error
and invalid parameters
error.
Either I get too many commits error
or Invalid Parameters
error and also the issue is that it is always starting from second instance and first one is not visible at all
Also it always starts with second instance not first and I dont understand why it happens like that.
I am using 1.2.8