Also, v parameters aren’t writable at this time. -dan
> On Apr 14, 2018, at 11:28 PM, George Chelidze <[email protected]> > wrote: > > Hi Dan, > > Please see my comments below. > >> The 10 entries aren’t actually deleted. Genie tracks the desired >> state, sees that there is no change to the 10 entries, doesn’t mess >> with them. It will only create the new entry. > Hm, Can you explain how the following declare won't delete everything > under the basePath? > > declare(basePath + ".[]", null, {path: 0}); // Tell Genie we want to > delete everything, this won't actually happen unless the instances don't > match up (i.e. an instance was deleted) > >> Genie doesn’t have that capability yet. So I fake it :). I create a >> tag on the device called NeedsPortMappings. Then I have a preset with >> the trigger being said tag name which initiates the provision script. >> Then to get the preset to fire I initiate a connection request to the >> CPE. Not ideal, but it works. > Makes sense as far as it works. > >> Look in the parameters.yml file in the GUI. It does the same type of >> thing for device hosts. Remember to restart the GUI after making >> changes to the file. > Do you mean the following example in summary_parameters.yml? > > Hosts: > _object: InternetGatewayDevice.LANDevice.1.Hosts.Host > Host name: HostName > IP: IPAddress > MAC: MACAddress > > If yes, then it's a bad example as it contains a particular instance {1} > of LANDevice. What I am looking for is something like this: > > _object: InternetGatewayDevice.LANDevice.*.Hosts.Host > > or > > _object: InternetGatewayDevice.LANDevice.[0-9]+.Hosts.Host > > Then I could adapt it for PortMapping path: > InternetGatewayDevice.WANDevice.{i}.WANConnectionDevice.{i}.WANIPConnection.{i}.PortMappingas > we have no idea that instances will be used on one particular device. > > I agree that my original approach is complicated and it might not be > following the Genie's style of doing things, but I still wonder whether > it's possible or not to define virtual parameter which is a writable table. > > Best regards, > > George Chelidze > _______________________________________________ > Users mailing list > [email protected] > http://lists.genieacs.com/mailman/listinfo/users _______________________________________________ Users mailing list [email protected] http://lists.genieacs.com/mailman/listinfo/users
