Gorelo understands the need of multiple variable values at different level either policy or device. We now provide the user with the ability to set different values to script-level variables at runtime. The variable values can be updated at script level, policy level and device level. The priority of these values depends on from where the script is run through.
β¨ Define Script variable at Script Level
To define a variable and its value, go to Scripts
Create a new script or go in any existing one and expand Settings from right side.
Now add and provide a value to a script variable. This value since added and saved through scripts is known to be script level.
Run script on device at Script Level
To execute this script on a device with the saved value, be on Add/Update Script screen.
Select a device from the Device dropdown menu and click the Run button.
When the script variable is triggered, it will use the value you previously saved in the script.
β¨ Script Variable at Policy level
At the policy level, you may execute the script on multiple devices simultaneously, either using the same value as the script variable or by changing the value. To do so, follow these steps:
Go to Policies.
Choose a policy from the list where you wish to add this script.
Hover over the Add icon and select the Script option.
From the list of scripts, choose your desired script that has a defined script variable.
A popup will appear fetching the variable value saved at script level.
Run script on device(s) at Policy Level
The script will auto run as per your saved frequency. Whenever this variable is called during the execution of the script the system will then follow the policy level value.
β¨ Script Variable at Device level
If you have a specific device whose variable needs a different value than others, you may modify it at the device level. This action overrides the values set at the policy level and/or script level. To do so follow below steps:
Go to a Device detail page
Go to Policy section
Click Edit button with the script.
If the script is not already in the policy then hover over the Add icon and select the Script option to select your desired script with a script variable.
Once you select your script, a popup will appear fetching the variable value saved at policy level.
Run script on device at Device Level
The script will auto run as per your saved frequency. Whenever this variable is called during the execution of the script the system will then follow the device level value.
Revert Variable value
In the popup displayed at both the policy and device levels, where you can set the frequency of the script run and the variable value, there is a revert or undo button available next to the variable field box. This button reverts the value to the previous level's value.
Note:
The undo button clicked at device level will revert value from device to policy.
The undo button clicked at policy level will revert value from policy to script.
Variable value usage priority
When the script is run as per the schedule saved in the policy then the priority of the variable value usage at the time of script execution is as follows:
Device level value
Policy level value
Script level value