Universal Command - Command References
Overview
A command reference is a file residing on the system Universal Command (UCMD) Server installed that contains a pre-defined command or script to be executed at the request of a Universal Command Manager.
The UCMD Manager requests execution of a command reference by specifying:
The name of the command reference with the COMMAND option.
The command type as a command reference with the COMMAND_TYPE option.
The UCMD Server finds the command references in the configured command reference location, as specified in the UCMD Server CMD_REFERENCE_DIRECTORY option. If the command reference is found, the UCMD Server executes the command or script defined in the command reference.
The UCMD Manager does not provide its own command or script to execute. It only provides the name of a command reference. This provides the ability to precisely control what UCMD Managers can execute on the server. The UCMD Manager does not have the ability to specify the commands executed on the system. It can only reference a pre-defined command reference that has been defined by the UCMD administrator for the system.
A command reference also can specify that the command or script accepts options or command line arguments from the UCMD Manager.
Command Reference Sections
A command reference is a sequential file containing two sections:
The sections are separate with a logical end-of-file marker. The logical end-of-file market is the string <eof>.
The Options section contains #Command Reference Options that define the command reference and specify operational characteristics. It also can contain comments.
Syntax Rules
Syntax rules for the Options section are:
1 | Lines starting with a hash character (#) are comments. |
|---|---|
2 | Blank lines are ignored. |
3 | Options are specified with a Name followed by a Value. |
4 | Names are prefixed with a hyphen (-). |
5 | Names are case-insensitive. |
6 | Values are case-insensitive. |
7 | One or more spaces must separate the Name and Value. |
8 | Options section is ended with <eof> at the start of a line. |
The following table provides a description and values for all command reference options.
Name | Description | Values |
|---|---|---|
-format | Format of the Command Section. | Valid values are:
|
-type | Type of command or script in the Command Section. | Values depend on the UCMD Server operating system. |
-allow_options | Specification for whether or not the command or script accepts user-provided options or command line arguments from the UCMD Manager. | Valid values are:
|
The Command section contains the command or script (as specified by the -format command reference option) to be executed.
Commands are single commands that are executed based on the -type option.
The command may span multiple lines. No line continuation characters are required. All lines will be concatenated together to form one command line.
Scripts are read verbatim and placed into a temporary file. The temporary file is passed to the script processor for the appropriate script type, as specified by the -type option.
The following figure is an example command reference that executes a Windows DIR command. The two sections are separated with a logical end-of-file marker, <eof>.