Using DCLI with Variables
You can predefine a set of variables in the environment where you run DCLI commands so you do not have to pass the options every time you run a command. The following environment variables are supported.
Variables Supported by DCLI
Variable | Description |
---|---|
DCLI_VMC_SERVER | Set this variable to pass the VMware Cloud on AWS server IP address. |
DCLI_NSX_SERVER |
Set this variable to pass the NSX-T server IP address. Passing the nsx-server option on the command line overrides this variable. |
DCLI_SERVER |
Set this variable to pass the vCenter Server system IP address. Passing the server option on the command line overrides this variable. |
DCLI_ORG_ID | Set this variable to specify the default value for the +org-id option. |
DCLI_SDDC_ID | Set this variable to specify the default value for the +sddc-id option. |
DCLI_CACERTFILE |
Set this variable to pass the path of a CA certificate file. Passing the cacert-file option on the command line overrides this variable. |
DCLI_USERNAME |
Set this variable to pass the user name required for authentication. Passing the username option on the command line overrides this variable. |
DCLI_CREDFILE |
Set this variable to point to a DCLI credential store file. Default value is ~/.dcli/.dcli_credstore. Passing the credstore-file option on the command line overrides this variable. |
DCLI_HISTFILE | Set this variable to point to a DCLI interactive shell history file path. Default value is ~/.dcli/.dcli_history. |
DCLI_LOGFILE | Set this variable to specify the log file for DCLI. |
DCLI_CACERTS_BUNDLE | Set this variable to specify the path to a trust store. By default, DCLI includes a trust store from Certifi. |
DCLI_VMC_CSP_URL | Set this variable to specify the URL to the CSP service for authentication token retrieval from a given refresh token. The default URL is https://console.cloud.vmware.com. |
DCLI_VMC_METADATA_URL | Set this variable to specify metadata URL location. By default, DCLI receives metadata from VMware Cloud on AWS for API specifics such as available commands. |
DCLI_VMC_METADATA_FILE | Set this variable to specify metadata file location. If set, DCLI retrieves metadata from the specified file. |
DCLI_NSX_METADATA_URL | Set this variable to specify metadata URL location used for connections to NSX-T. By default, DCLI receives metadata from a location relative to the provided NSX-T URL for API specifics such as available commands. |
DCLI_NSX_METADATA_FILE | Set this variable to specify metadata file location to use when connecting to NSX-T. If set, DCLI retrieves NSX-T specific metadata from the specified file. |
DCLI_COLOR_THEME | Set
this variable to change the color output of DCLI. The possible values are
monokai ,
bw ,
paradiso-dark ,
autumn . The default color theme is
bw . |
DCLI_COLORS_ENABLED | Set this variable to enable DCLI colorization. |
DCLI_COLORED_INPUT | Set this variable to enable DCLI input colorization. |
DCLI_COLORED_OUTPUT | Set this variable to enable DCLI output colorization. |
DCLI_CONFIGFILE | Set this variable to specify a custom configuration file. |