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 }}
OK. This works for one peice. It will work for waiting on content, such as waiting for a module to come up or a command to finish "executing". I still have the main issue that is causing the most problems. I need this delay when prompted for a password. Example: When I scp a NX-OS from a scp server, I get prompted for a password for the scp account. The password cannot be sent with the request (I tried) as done in IOS.
Do you know a way to add delay in a NCM config change template when prompted for a password? The template is basically skipping the password that I am sending in the NCM config change template. I also have the issue of NCM not knowing that there is a different prompt. I can't add multiple prompts, such as... "Password:", "Do you and to continue..Type 'yes' or 'no' ", "Please enter password:", etc.
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