Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

Unimus supports declaring per-device variables, which can be used in Config Push for more automation flexibility.

Please note variables are available starting in Unimus 2.2.0.

Defining device variables

Device variables can be defined for device(s) in the "Devices" screen. You will find a "Variables" button here, which opens the variable edit window.

Please note the Variable edit window has 2 separate modes:

  • single device variable editing mode
  • bulk (multi-device) variable editing mode

If you open the Variables window WITHOUT any device being currently selected, you will enter into the bulk edit mode. If you open the window when multiple devices are selected, you will enter the bulk edit mode with data pre-filled for devices which were selected. Finally, if a single device is selected, you will enter into single device variable edit.

Single device variable edit

In this mode, you can set variables for the specific device which was selected when you opened the variable edit window. You can simple specify variables in a "key=value" format. Here is an example:

variable_name = variable_value
foo = bar
hostname = router

Bulk (multi-device) variable edit

In bulk mode, you need to specify for which device you wish to set variables. Each device is specified as a section, and after opening a section for a specific device, you can set its variables. You can then move on to another device by opening another section. Here is an example:

[device_address_1 @ Z1]
variable_name = variable_value
foo = bar

[192.168.1.1 @ Z2]
hostname = router

In the example above, we set variables for 2 devices:

  • device "device_address_1" in a Zone with ZoneID "Z1"
  • device "192.168.1.1" in a Zone ZoneID "Z2"

As mentioned in a previous section, if you open the variable edit window without any devices selected, it will be in an empty bulk-edit mode. Please note you don't need to manually write out the device sections.You can select multiple devices in the Device table, and open the variable edit window to have the devices pre-filled for you, including their existing variables.

Please note that when saving devices in bulk edit mode, omitting variables for devices which already have variables present will remove those variables. To simplify - if you save variables for a device in bulk edit mode, all existing variables will be removed, and then variables will be set to the device as provided from the new configuration.

Using variables in Config Push

# TODO

  • No labels