CLI¶
The CLI is installed with the SDK. To install the SDK, refer to the Getting Started section. You can also use a CLI Configuration File to set default values for CLI command options.
Help¶
Every command has a -h
flag including the CLI itself. This will print the help menu.
Examples¶
Get the CLI's help menu.
$ dvp -h
Usage: dvp [OPTIONS] COMMAND [ARGS]...
The tools of the Delphix Virtualization SDK that help develop, build, and
upload a plugin.
Options:
--version Show the version and exit.
-v, --verbose Enable verbose mode. Can be repeated up to three times for
increased verbosity.
-q, --quiet Enable quiet mode. Can be repeated up to three times for
increased suppression.
-h, --help Show this message and exit.
Commands:
build Build the plugin code and generate upload artifact file...
download-logs Download plugin logs from a target Delphix Engine to a...
init Create a plugin in the root directory.
upload Upload the generated upload artifact (the plugin JSON
file)...
Get the build
command's help menu.
$ dvp build -h
Usage: dvp build [OPTIONS]
Build the plugin code and generate upload artifact file using the
configuration provided in the plugin config file.
Options:
-c, --plugin-config FILE Set the path to plugin config file.This file
contains the configuration required to build the
plugin. [default: plugin_config.yml]
-a, --upload-artifact FILE Set the upload artifact.The upload artifact file
generated by build process will be writtento
this file and later used by upload command.
[default: artifact.json]
-g, --generate-only Only generate the Python classes from the schema
definitions. Do not do a full build or create an
upload artifact. [default: False]
-h, --help Show this message and exit.
Verbosity¶
To change the verbosity level of the CLI you can specify up to three -v
(to increase) or -q
(to decrease) the amount that is printed to the console. This is an option on the CLI itself and can be used with any command.
Option | Output |
---|---|
-qqq | None |
Critical | |
-q | Error |
-v | Info |
-vv | Debug |
-vvv | All |
Examples¶
Print everything to the console.
$ dvp -vvv build
Print nothing to the console.
$ dvp -qqq build
Commands¶
init¶
Description¶
Create a plugin in the root directory. The plugin will be valid but have no functionality.
Options¶
Option | Description | Required | Default |
---|---|---|---|
-r, --root-dir DIRECTORY |
Set the plugin root directory. | N | os.cwd() |
-n, --plugin-name TEXT |
Set the name of the plugin that will be used to identify it. | N | id |
-s, --ingestion-strategy [DIRECT|STAGED] |
Set the ingestion strategy of the plugin. A "direct" plugin ingests without a staging server while a "staged" plugin requires a staging server. | N | DIRECT |
-t, --host-type [UNIX|WINDOWS] |
Set the host platform supported by the plugin. | N | UNIX |
Examples¶
Create a UNIX
plugin in the current working directory with the DIRECT
ingestion strategy. Here the name of the plugin will be equal to the id that is generated.
$ dvp init
Create a UNIX
plugin in the current working directory with the DIRECT
ingestion strategy and use postgres
as the display name.
$ dvp init -n postgres
Create a UNIX
plugin called mongodb
in a custom location with the STAGED
ingestion strategy.
$ dvp init -n mongodb -s STAGED -r /our/plugin/directory
Create a WINDOWS
plugin called mssql
in the current working directory with the DIRECT
ingestion strategy.
$ dvp init -n mssql -t WINDOWS
build¶
Description¶
Build the plugin code and generate upload artifact file using the configuration provided in the plugin config file.
Options¶
Option | Description | Required | Default |
---|---|---|---|
-c, --plugin-config FILE |
Set the path to plugin config file.This file contains the configuration required to build the plugin. | N | plugin_config.yml |
-a, --upload-artifact FILE |
Set the upload artifact.The upload artifact file generated by build process will be written to this file and later used by upload command. | N | artifact.json |
-g, --generate-only |
Only generate the Python classes from the schema definitions. Do not do a full build or create an upload artifact. | N | False |
Examples¶
Do a full build of the plugin and write the upload artifact to ./artifact.json
.
This assumes current working directory contains a plugin config file named plugin_config.yml
.
$ dvp build
Do a partial build and just generate the Python classes from the schema definitions.
This assumes current working directory contains ad plugin config file named plugin_config.yml
.
$ dvp build -g
Do a full build of a plugin and write the artifact file to a custom location.
$ dvp build -c config.yml -a build/artifact.json
upload¶
Description¶
Upload the generated upload artifact (the plugin JSON file) that was built to a target Delphix Engine. Note that the upload artifact should be the file created after running the build command and will fail if it's not readable or valid.
Options¶
Option | Description | Required | Default |
---|---|---|---|
-e, --delphix-engine TEXT |
Upload plugin to the provided engine. This should be either the hostname or IP address. | Y | None |
-u, --user TEXT |
Authenticate to the Delphix Engine with the provided user. | Y | None |
-a, --upload-artifact FILE |
Path to the upload artifact that was generated through build. | N | artifact.json |
--wait | Block and wait for the upload job to finish on the Delphix Engine. | N | None |
--password TEXT |
Authenticate using the provided password. If ommitted, the password will be requested through a secure prompt. | N | None |
Examples¶
Upload artifact build/artifact.json
to engine.example.com
using the user admin
. Since the password option is ommitted, a secure password prompt is used instead.
$ dvp upload -a build/artifact -e engine.example.com -u admin
Password:
download-logs¶
Description¶
Download plugin logs from a Delphix Engine to a local directory.
Options¶
Option | Description | Required | Default |
---|---|---|---|
-e, --delphix-engine TEXT |
Download plugin logs from the provided Delphix engine. This should be either the hostname or IP address. | Y | None |
-c, --plugin-config FILE |
Set the path to plugin config file. This file contains the plugin name to download logs for. | N | plugin_config.yml |
-u, --user TEXT |
Authenticate to the Delphix Engine with the provided user. | Y | None |
-d, --directory DIRECTORY |
Specify the directory of where to download the plugin logs. | N | os.cwd() |
--password TEXT |
Authenticate using the provided password. If ommitted, the password will be requested through a secure prompt. | N | None |
Examples¶
Download plugin logs from engine.example.com
using the user admin
. Since the password option is ommitted, a secure password prompt is used instead.
$ dvp download-logs -e engine.example.com -u admin
Password: