Code: Select all
/system/reset-configuration run-after-reset=...
Code: Select all
...
/ip dhcp-client
add interface=bridge
...
So I next turned my attention to how I could build this functionality by comparing an /export to a desired configuration and performing some kind of diff to construct a series of commands to converge the current state to the desired state. But I've run into a number of hurdles in attempting to do this as well. First, the exact syntax (and most specifically the subset which might be produced by /export) isn't really fully laid out anywhere I've been able to find. This is something that can be mostly overcome (at least to a satisfactory degree) by what documentation I have found and trial and error. What has caused me more trouble is the inconsistencies in how the various commands work. For example, under /ip/settings, there is only the set command, no reset or unset, and unsetting using ! as described here (https://wiki.mikrotik.com/wiki/Manual:S ... n_commands) also doesn't work. Then there's things like /ip/dhcp-client where there's a set, reset and unset, and while unset only works specifically for dhcp-options, though actually using unset on dhcp-options (or setting dhcp-options using the ! mentioned before) doesn't appear to actually change anything. There's also the script field which does not appear in even the verbose export if it's at the default of empty. These oddities/differences in behavior make it very hard to reason about how to properly (in an automated fashion) construct a set of commands to go from one state to another.
Has anyone else run into these kinds of issues? Or am I the only one trying to configure things declaratively like this?