I am working on a config change template for a SonicWall device, I need quotes around a specific name, however, the variables in use fail because of the quotes
So here is where I call out variables in the script:
// Template to add SDWAN for SW
/*
.PARAMETER_LABEL @ContextNode
NCM Node
.PARAMETER_DESCRIPTION @ContextNode
The node the template will operate on. All templates require this by default. The target node is selected during the first part of the wizard so it will not be available for selection when defining values of variables.
.PARAMETER_LABEL @STORENUM
Store number
.PARAMETER_DESCRIPTION @STORENUM
Enter the number here.
I have filtered out some of the parameter labels because they are unnecessary for this question.
*/
script AddVPNSDWAN(
NCM.Nodes @ContextNode,
string @STORENUM,
string @STORENET,
string @VPNKEY,
string @VPNGW1,
string @VPNGW2 )
string @TUNNEL1NAME = @STORENUM
@TUNNEL1NAME = @TUNNEL1NAME + '-VPN-1'
string @TUNNEL2NAME = @STORENUM
@TUNNEL2NAME = @TUNNEL2NAME + '-VPN-2'
CLI
{
This issue is:
path-selection-profile @STORENUM <---works fine
name @STORENUM <- works fine
sdwan-group @STORENUM <---works fine
performance-probe "VPN Probe - @STORENUM" <---causes script to fail validation saying it does not know about @STORENUM"
exit
exit
The performance probe name section is required to be in "" but Solarwinds reads it as @STORENUM" instead of just @STORENUM
I have even tried to edit the strings up towards the top with
then edit my script to be
performance-probe @PROBENAMEbut again is fails to pass validation with
Validation Failed: An error occurred during script parsing. Position: Line 41, Character 50 Error message: no viable alternative at character '"' Please check script syntax.
So how would I call out quotes in the script, and pull the needed variable? Any help would be much appreciated,