All commands executed through templates are always in the config t mode. Therefore, you do not have to specify the enable or config t commands explicitly in the template.
Day-0 templates do not support special keywords.
Enable Mode Commands
Specify the #MODE_ENABLE command if you want to execute any commands outside of the config t command.
Use this syntax to add enable mode commands to your CLI templates:
#MODE_ENABLE
<<commands>>
#MODE_END_ENABLE
Interactive Commands
Specify #INTERACTIVE if you want to execute a command where a user input is required.
An interactive command contains the input that you must enter following the execution of a command. To enter an interactive
command in the CLI Content area, use the following syntax:
CLI Command<IQ>interactive question 1 <R> command response 1 <IQ>interactive question 2<R>command response 2
Where <IQ> and <R> tags evaluate the text provided against what is seen on the device.
The Interactive question uses regular expressions to validate if the text received from the device is similar to the text
entered. If the regular expressions entered in the <IQ><R> tags are found, then the interactive question passes and a part of the output text appears. This means that you need to enter
a part of the question and not the entire question. Entering Yes or No between the <IQ> and <R> tags is sufficient but you must make sure that the text Yes or No appears in the question output from the device. The best
way to do this is by running the command on the device and observing the output. In addition, you need to ensure that any
regular expression metacharacters or newlines entered are used appropriately or avoided completely. The common regular expression
metacharacters are . ( ) [ ] { } | * + ? \ $ ^ : &.
For example, the following command has output that includes metacharacters and newlines.
Switch(config)# no crypto pki trustpoint DNAC-CA
% Removing an enrolled trustpoint will destroy all certificates received from the related Certificate Authority
Are you sure you want to do this? [yes/no]:
To enter this in a template, you need to select a portion that does not have any metacharacters or newlines. Here are a few
examples of what could be used.
#INTERACTIVE
no crypto pki trustpoint DNAC-CA<IQ>yes/no<R>yes
#ENDS_INTERACTIVE
#INTERACTIVE
no crypto pki trustpoint DNAC-CA<IQ>Removing an enrolled<R>yes
#ENDS_INTERACTIVE
#INTERACTIVE
no crypto pki trustpoint DNAC-CA<IQ>Are you sure you want to do this<R>yes
#ENDS_INTERACTIVE
#INTERACTIVE
crypto key generate rsa general-keys <IQ>yes/no<R> no
#ENDS_INTERACTIVE
Where <IQ> and <R> tags are case-sensitive and must be entered in uppercase.

Note
|
In response to the interactive question after providing a response, if the newline character is not required, you must enter
the <SF> tag. Include one space before the <SF> tag. When you enter the <SF> tag, the </SF> tag pops up automatically. You can delete the </SF> tag because it is not needed.
For example:
#INTERACTIVE
config advanced timers ap-fast-heartbeat local enable 20 <SF><IQ>Apply(y/n)?<R>y
#ENDS_INTERACTIVE
|
Combining Interactive Enable Mode Commands
Use this syntax to combine interactive Enable Mode commands:
#MODE_ENABLE
#INTERACTIVE
commands<IQ>interactive question<R> response
#ENDS_INTERACTIVE
#ENDS_END_ENABLE
#MODE_ENABLE
#INTERACTIVE
mkdir <IQ>Create directory<R>xyz
#ENDS_INTERACTIVE
#MODE_END_ENABLE
Multiline Commands
If you want multiple lines in the CLI template to wrap, use the MLTCMD tags. Otherwise, the command is sent line by line to the device. To enter multiline commands in the CLI Content area, use
the following syntax:
<MLTCMD>first line of multiline command
second line of multiline command
...
...
last line of multiline command</MLTCMD>
-
Where <MLTCMD> and </MLTCMD> are case-sensitive and must be in uppercase.
-
The multiline commands must be inserted between the <MLTCMD> and </MLTCMD> tags.
-
The tags cannot start with a space.
-
The <MLTCMD> and </MLTCMD> tags cannot be used in a single line.