N1 Grid Service Provisioning System 5.0 Command-Line Interface Reference Manual

Getting Command-Line Help

To get general help about the CLI, type the following:


cr_cli -help

To get help for a specific command, type the following:


cr_cli -cmd command -h

The command descriptions use the following notation to indicate whether an argument is required or optional:

[O]

The argument is optional.

[R]

The argument is required.

[O/R]

The argument is usually optional, but might be required in some cases.

In such situations, the help indicates when the argument is required.

The following is the help information for the hdb.h.add command:


-u [O/R]: The user username for authentication: String
-p [O/R]: The user password for authentication: String
-s [O/R]: The session ID for authentication: SessionID
-name: The host name: String
-desc [O]: The host description: String
-tID: The ID of the host type: HostTypeID
-attr [O/R]: The host attributes; required if the host type requires
  them: Hashtable

In this example, the only required arguments are -name, -tID, and the authentication arguments: either -u and -p, or -s. If the host type of the new host requires that host attributes be specified, the -attr argument is also required.

Note that help you get by using the -h does not use the [R] notation to identify required arguments. Required arguments are shown without any notation.

Listing the CLI Commands

To list all of the available commands, type the following:


cr_cli -cmd -l

To list all of the commands that have the same command prefix, use the wildcard character * after the prefix. You might need to escape the * with a backslash (\) or by enclosing it in double quotes. For example, the following command lists all of the hdb commands:


cr_cli -cmd -l "hdb.*"

The CLI commands are grouped in the following categories: