Please forgive me if this makes no sense, because I am still trying to understand the problem.
Could you work on an exported XML configuration file, then reload it? If, for example, you have a standard configuration that you want to apply to a bunch of routers, with customization of names, IP addresses, etc., you might configure the standard configuration via the GUI, download it, then modify it with an XML tool like XSLT or XQuery. If you were just changing names, it should not be too bad. If you are changing the number of interfaces, it would be a little trickier, because you would have to generate new XML code in the right place.
BTW, on of the coolest products (I don't remember what it was) had an XML configuration, and if the had an upgrade that changed the configuration files in not-backward-compatible ways, they would ship an XML stylesheet (XSLT) with the update to upgrade the old configuration file.
The FreeBSD way is that configuration is done view files (usually rc.conf), rather than commands. Even sysctl, which modifies tuning variables view the sysctl command, has a sysctl.conf that sets up the initial sysctl commands.
I am thinking about how this concept could apply to OPNsense. It is a little trickier with an XML file, because the nature of rc.conf is that stuff can pretty much be in any order, and you can use the sysrc command to add stuff to the bottom of the file. Since XML files have structure, you can't just insert lines any old place.
Perhaps I just need to go to bed.
Could you work on an exported XML configuration file, then reload it? If, for example, you have a standard configuration that you want to apply to a bunch of routers, with customization of names, IP addresses, etc., you might configure the standard configuration via the GUI, download it, then modify it with an XML tool like XSLT or XQuery. If you were just changing names, it should not be too bad. If you are changing the number of interfaces, it would be a little trickier, because you would have to generate new XML code in the right place.
BTW, on of the coolest products (I don't remember what it was) had an XML configuration, and if the had an upgrade that changed the configuration files in not-backward-compatible ways, they would ship an XML stylesheet (XSLT) with the update to upgrade the old configuration file.
The FreeBSD way is that configuration is done view files (usually rc.conf), rather than commands. Even sysctl, which modifies tuning variables view the sysctl command, has a sysctl.conf that sets up the initial sysctl commands.
I am thinking about how this concept could apply to OPNsense. It is a little trickier with an XML file, because the nature of rc.conf is that stuff can pretty much be in any order, and you can use the sysrc command to add stuff to the bottom of the file. Since XML files have structure, you can't just insert lines any old place.
Perhaps I just need to go to bed.
"