I would like to be able to make custom calls in configuration templates for logic performed many times.
Example: Validate IP address entered from a user prompt.
Example: Change /CIDR to mask.
Example: Lookup CDP on a port.
Call would look as it does in VB, Powershell, ETC. Does not matter to me.
Example of what I use now:
***Create a call that gets the first vlan in the list entered and set to native.
//Grab Native VLAN Infro from Array String @WAPVLAN, **** A Loop that counts :_) **** You can recreate arrays this way if needed.
foreach (@itemnum in @WAPVLAN)
{
if (@dNValue == 0)
{
@WAPNativeVLANID = @itemnum
@WAPVLANIDs = @itemnum
}
if (@dNValue >= 1)
{
@WAPVLANIDs = (@WAPVLANIDs+','+@itemnum)
}
@dNValue = @dNValue+1
}
***Create a call to grab ip and mask from entered info.
//Setup IP Network and Mask from @iV700Address
{
@dlength = strlength(@v700IPAddress)
@dSlashIndex = indexof(@v700IPAddress,@dsearch)
@dMaskLength = (@dlength - @dSlashIndex)+1
@dNetMask = substring(@v700IPAddress,@dSlashIndex,@dMaskLength)
@dIPNetworkLength = @dSlashIndex - 1
@dIPNetwork = substring(@v700IPAddress,1,@dIPNetworkLength)
@dNetwork = @dIPNetwork
}
*** Create a call to finalize networks and IP addressing.
//Finalize IP Address
string @ipOCT2 = getoctet (@dNetwork,2)
string @ipOCT3 = getoctet (@dNetwork,3)
string @ipOCT4 = getoctet (@dNetwork,4)
@V700NET=@ipOCT2+'.'+@ipOCT3
** Create a call to Convert the Mask
//Set Subnet Mask from CIDR Entry from Array String @v700IPAddress
if (@dNetMask == '/30')
@NetworkMask = '255.255.255.252'
if (@dNetMask == '/29')
@NetworkMask = '255.255.255.248'
if (@dNetMask == '/28')
@NetworkMask = '255.255.255.240'
if (@dNetMask == '/27')
@NetworkMask = '255.255.255.224'
if (@dNetMask == '/26')
@NetworkMask = '255.255.255.192'
if (@dNetMask == '/25')
@NetworkMask = '255.255.255.128'
if (@dNetMask == '/24')
@NetworkMask = '255.255.255.0'
if (@dNetMask == '/23')
@NetworkMask = '255.255.254.0'
if (@dNetMask == '/22')
@NetworkMask = '255.255.252.0'
if (@dNetMask == '/21')
@NetworkMask = '255.255.248.0'
if (@dNetMask == '/20')
@NetworkMask = '255.255.240.0'
if (@dNetMask == '/19')
@NetworkMask = '255.255.224.0'
if (@dNetMask == '/18')
@NetworkMask = '255.255.192.0'
if (@dNetMask == '/17')
@NetworkMask = '255.255.128.0'
if (@dNetMask == '/16')
@NetworkMask = '255.255.0.0'
if (@dNetMask == '/8')
@NetworkMask = '255.0.0.0'
@V700Mask=@NetworkMask
I would like remediation scripts to have logic.
Example: select * from device.config where line begins with logging and does not end with 1.2.
Make remediation script "no $aboveResult" for each line to remove.
believe the only way to do this is via TCL if you want automated. I am new at SolarWinds so I am still researching.
I would like a built in call to verify the validity of the entered IP address. I don't think many people make mistakes but a 10.2.4.4.2/26 is no good. 399.220.33.21 is no good either. I know we can do this via script but I don't like having the extra code.
I would like to be able to return errors to interactive windows as people enter information. Much like sw does now if you leave a field unanswered.
If I have a yes no question that relates to another field and the field is left no I would like sw not to prompt to enter information.
Example: If a template has wap ports and there are no waps and the user selects no for waps then the interface selection should not even appear. Conditional user input.
I would like to be able to default fields that are selectable or require text.. For example we choose access ports. I want to default select all current access ports. This can further automate and assist in preventing mistakes.
I would like the addition of using case statements in the templates.
I would like to add and subtract in Hex.
I would like to have TCL supported in the template and remediation scripts. "Supported is a loose term."
Lastly I would like all the string manipulators found in .Net added to the script engine.