The
cmdparser(<target-function>, <syntax>, <msg>)
function creates commands that you can use in your vShell instance.
As indicated in
Implementation flow for vShell extensions,
cmdparser( )
requires a target function.
<target-function>
Specifies the name of the function called by
cmdparser( )
.
<syntax> = "<vSLX-command-name>:<keyword>|<argument>:<keyword>|<argument>: ..."
Enclose the
<syntax>
element in quotes ("). The first word of the
<syntax>
element is the name of the vShell command you are creating, followed by the required keywords and arguments.
There is no special format for keywords. For each argument, you specify a type symbol, as follows:
Data type |
Type symbol |
---|---|
String |
%s |
Integer |
%d |
IP address |
%i |
MAC address |
%m or %M |
Interface port |
%I |
create link
command is
"create:link:%s:%I%s:%I"
. The elements of this command are as follows:
create
link
%s:%I%s:%I
create link rt1 0/1 rt2 0/1
<msg>
Specifies the CLI Help displayed when a user types ?.
<msg>
element in quotes (").
"Creates a link between two entities."