Requested e.g. here:
We need this.
I am hoping this will be added to config change templates as well as the execution of scripts.
Agree, this is essential if you want to add some verification commands at the end of a script to view in the script results. Some processes such as routing neighbours etc. can take a few seconds to come up, so the delay is necessary here before running the commands.
As a workaround, if you are using Cisco devices and they support it, you can use the tcl after command to insert a delay (in ms): I had to use the tclquit command and not the exit command to come out of the tcl shell otherwise the script terminated for some reason.
// Pause for 10 seconds before verification CLI { tclsh after 10000 tclquit }
// Verification commands CLI { show xxxxxxx show xxxxxxxx }}
FYI, this is a capability in config change templates. I beat my head against a wall for about 30 minutes trying to figure out how to implement the ${Delay:15} variable, so maybe I'll be saving someone else some precious time in the future . Here is a change script that I created that includes a 15 second pause between issuing commands:
script BaseChangeTemplate(
NCM.Nodes @ContextNode)
{
//Issue commands to the device
string @Pause=';${Delay:15}'
CLI
configure terminal
interface range switchport 0/1 - 48
shutdown
}
@Pause
no shutdown
exit