Overview of Running DCLI Commands
You can run DCLI commands interactively or in scripts in several ways.
DCLI Syntax
Each DCLI command uses the same syntax.
The command name is followed by DCLI connection and formatting options, each preceded by a + sign. After the DCLI options come the name space, the command, and the command options, as in the following example:
dcli +[DCLI options] <namespace> [<namespace> ...] <cmd> --[cmd option] [option value]
DCLI options. Predefined options for connection information and formatting options. Always preceded by a + sign.
Not required when you run the command on the local host at the Windows command prompt or the vCenter Server Appliance shell.
namespace. Groups DCLI commands. Namespaces correspond to the vCloud Suite SDK name spaces.
command. Reports on or modifies state on the system.
option and value. Command option and value pairs preceded by minus minus (--).
Example
$dcli +server my_remote_vc +username user42 com vmware cis tagging tag list
DCLI Options
You can run each DCLI command with connection or formatting options preceded by a +.
For many of the options, you can instead use variables, discussed in Variables Supported by DCLI.
dcli [+server SERVER_IP]
[+interactive]
[+prompt PROMPT]
[+ssl-cert-file SSL_CERT_FILE]
[+ssl-key-file SSL_KEY_FILE]
[+cacert-file CACERT_FILE]
[+more]
[+formatter {simple,table,xml,json,html,csv}]
[+loglevel {debug, info, warning, error}]
[+username USERNAME] [+password]
[+credstore-file CREDSTORE_FILE]
[+credstore-add | +credstore-remove | +credstore-list]
[+session-manager SESSION_MANAGER] [args [args ...]]
These options allow you to provide the following information. If you are entering options interactively, tab completion is supported on Linux systems. In all cases, you can specify a partial option as long as the option is not ambiguous. For example, +i indicates interactive, but you have to specify, at a minimum, +credstore-a to disambiguate that option.
By default, the credential store file is in the .dcli\.dcli_credstore directory inside the home directory.
dcli directory inside the home directory.
Use this option if you use the credstore-remove option the same user name and password are stored through multiple session managers. Not usually required.