Template Variable
You can define template variables in the Template Variable pane of the RBT (Runbook Template). These variables serve the following purposes:
- Assign values in batches to each node in the runbook.
- Predefine values for associated input dialogs when creating a runbook from the RBT.
Defining Template Variables:
You can configure each template variable in a Runbook Template (RBT) with the following steps:
- Specify a variable name.
-
Type: The supported variable data types are:
- String, float, int, bool,
- Device, device interface, front server,
- Table via ADT, manual table, and CSV file.
- Set a value appropriate to the selected type.
- Enable the Input Dialog option to allow users to enter a variable value during runbook creation. By default, this option is disabled. When enabled, the variable will appear in the input dialog and accept a user-defined value.
Defining Table Variable: Table variables can be defined using one of the following methods:
- Table Via ADT: This method allows you to define a table whose column values are referenced from an ADT column.
- Select an ADT.
-
Add column: Click +Add Column and define the column name and type. Alternatively, click Copy from ADT Column to import an existing ADT column.
-
Set Values: Select candidate values from ADT columns or define dependencies using device/interface properties. The rules here are consistent with defining candidate values in the input dialog.
Current Variable Type ‘Set Value’ Method Device - ADT Column
- <Map Devices>
- Select Devices
- Select Device by Device Group
Interface - ADT Column
- Device Properties
String/Int/Float - ADT Column
- Interface Properties
- Device Properties
-
Manual Table: In this method, you define the table structure and manually input data row by row when creating a runbook.
-
No additional parameters are needed in the input dialog.
-
When creating a runbook, you can add rows and enter the values, or directly import the data from a CSV file.
-
No additional parameters are needed in the input dialog.
-
CSV File: This method allows you to pass the CSV data to a runbook intent node using a file path as a string. Selecting a CSV file as a sample CSV is optional.
-
If a CSV file is selected, you can click the
icon to preview and download its content.
-
The input dialog varies depending on whether a sample CSV file is defined:
-
When creating a Runbook:
The CSV file is passed as a single-value string variable (i.e., the file path) at the node level.
-
If a CSV file is selected, you can click the
When creating a Runbook from an RBT, the UI for selecting table variables in the input dialog dynamically filters options based on dependencies.
For example: After selecting a value in the first column (e.g., Device), the second column (e.g., Interface) uses column 1 (Device) as the key and will only show the rows of matched devices.