For 2.4, we are planning to rework how behavior modifiers work in Mass Config Push. This relates to the current way modifiers work, and improves upon the current syntax. We are also introducing a new concept of "actions", which will replace how control sequences are sent currently.
We would love your feedback on the changes. Here is our current plan:
All available macros:
Code: Select all
$() - modifiers and actions
${} - variables
Modifiers: Modifiers are two-word macros and must always be at the end of a line. Multiple consecutive modifiers are allowed. A single modifier can only be declared once.
Code: Select all
Allowed modifiers:
wait-echo, wait-reply, enter, fail-on-error
example: $(enter yes)
valid usage: show version$(enter no)
invalid usage: show $(wait-reply no) version
Code: Select all
Allowed actions:
delay, send
example: $(delay 100), $(send 0x01)
Constants are single-word macros and can be placed at any position in a line. Only available pre-defined constants can be used. Constants are device's properties, hence a relevant constant will always contain the requested data for each device.
Code: Select all
Available constants:
address, description, vendor, type, model, zone-name, zone-description, zone-id
Variables are single-word macros and can be placed at any position in a line. Any variable name (single-word, without space) can be used, and you defines these in GUI (Devices > Variables).
Code: Select all
example: ${foo}, ${bar}
usage example:
interface vlan ${vlan-id}
set description ${vlan-description}
If a variable is declared in Push commands, it's value can come from a built-in constant, or a user-defined variable. User-defined variables always have MORE priority during variable substitution than built-in constants. For example, if you define a user variable "${address}", when you use "${address}" in a preset, on devices which have this user-variable defined, it will be used instead of a constant.
Constant overriding:
As described above, built-in constants can be overridden by the user (you) just by defining a user-defined variable of the same name on the device. In short, when evaluating variables, Unimus will try to use user-defined variables, and if that fails, try to use built-in constants. If the declared variable name is not available in either, the Push will fail.