I have read the docs and I thought that I had it correct using .addVariable but every variable is null when it calls the cli script.
The vlanID is defined in velocity via a string in the ui that the user puts in. When executing the flow and clicking on preview the vlanID is set properly, it just doesn't pass it to the cli script the way that I thought it would.
If I use the exact same velocity code in the cli script (with no control script) it works fine. I just can't get the variable (value) for vlanID passed to the cli script
Here is the code:
Code: Select all
#set ( $myScript = $alCtrl.defineCliScriptInvoker('VLAN - CliScript') ) $myScript.addVariable('string','$vlanID4Switch, $vlanID) $myScript.invokeScript('10.10.10.180')