|
For each Command Set, there will be an associated Data Set, which contains all the data definitions needed for the corresponding commands. These data definitions are in the form of an XML with file extension dat.
The Data Set contains instances of the commands in the Command Set.
The table given below is a list of parameters grouped under the DATA-SET tag, with a brief description.
| Tag | Description |
|---|---|
|
STR-DATA-SET
|
It includes a list of data values in a data set file. |
|
CMDDATA |
It includes a list of commands in a command set file. It contains the NAME attribute for identifying the command in the command set to which the data belongs. |
|
DATA |
It has a list of data instances for a particular command. |
|
OBJECT |
It is similar to that in the Command Set except that it represents the value (data) for the object. It has a NAME attribute to identify the object. |
|
PARAM |
It contains all the values of the parameters in the command. It has the following attributes:
|
|
OPTIONS |
It denotes the various options that command can append. It contains the following elements :
|
The following examples illustrate the usage of forming a Data Set corresponding to a Command Set.
Listing a directory in UNIX operating systems.
Show Command to get the details of Cisco devices.
Example 1: Listing a directory in UNIX operating systems.
|
<CMDDATA CMDNAME="ls"> <DATA NAME="ls"> <OPTIONS> <SIMPLE_OPTS OPT_VAL="l" /> <SIMPLE_OPTS OPT_VAL="a" /> <SIMPLE_OPTS OPT_VAL="d" /> <SIMPLE_OPTS OPT_VAL="f" /> <LONG_OPT_ARGS OPT_NAME="time" OPT_ARG="=status" /> </OPTIONS> </DATA> </CMDDATA> |
The above example command template is defined for listing directories on UNIX systems. It contains the actual command name ls with different simple options that have to be sent to the device. The above data instance is for the command ls in UNIX systems. With the long listing format, it can be noticed that the above definition contains only data for the previously defined command template and it is almost similar to the command template.
Please refer to unixcmds.dat file available in <CLI Home>/conf directory for complete details.
Example 2: Show command to get the details of Cisco devices.
|
<CMDDATA CMDNAME="show"> <DATA NAME="dataname"> <OBJECT NAME="ip" VALUE="ip"> <OBJECT NAME="access-list" VALUE="access-list"> <OBJECT NAME="compiled" VALUE="compiled"/> <PARAM NAME="access-list-number" VALUE="101"/> <PARAM NAME="name" VALUE="name"/> </OBJECT> </OBJECT> </DATA> </CMDDATA> |
The above example command template is defined to send the actual show commands to devices to display detailed system and protocol information of Cisco devices. The command consists of an object, which has parameters that have to be sent to the device.
Please refer to showcmds.dat file available in <CLI Home>/conf directory for complete details.
|