Categorygithub.com/patrickcping/davinci-pingcli
modulepackage
0.0.2
Repository: https://github.com/patrickcping/davinci-pingcli.git
Documentation: pkg.go.dev

# README

davinci-pingcli

Install

Only Homebrew is supported initially, for other methods of install please raise an issue.

Homebrew

brew tap patrickcping/davinci-pingcli
brew install davinci-pingcli

Test the installation with:

davinci-pingcli --help

Using --help

Help can found by using the --help / -h parameter for any command.

Examples:

davinci-pingcli flows list --help

Return Codes

The davinci-pingcli flows list ... command will return the following return status codes along with a text description of the validation issues:

  • 0 - Successful command, no warnings
  • 1 - Unsuccessful (errored) command

Logging

The logging level can be set using the DAVINCI_PINGCLI_LOG environment variable. The possible values that can be set are DEBUG, INFO, WARN, ERROR and NOLEVEL. By default, extra log output is disabled.

A log file can be created using the DAVINCI_PINGCLI_PATH environment variable. This redirects the log output to a file of choice. If not set, the debug output will be printed alongside the command output (stdout).

The following example logs debug output to the file called davinci-pingcli.log:

DAVINCI_PINGCLI_LOG=DEBUG DAVINCI_PINGCLI_PATH=`pwd`/davinci-pingcli.log davinci-pingcli flows list

Configuration File

The parameters described above can be configured in a static configuration file, expected to be named .davinci-pingcli.yaml in the same directory that the CLI tool is run. The following describe the properties that can be set, and an example can be found at ./davinci-pingcli.example

General Properties

The following are configuration file settings for the commands.

Config File PropertyEnvironment VariableTypeEquivalent ParameterPurpose
usernamePINGCLI_DAVINCI_USERNAMEstring--username / -uThe admin username used to connect to DaVinci.
passwordPINGCLI_DAVINCI_PASSWORDstring--password / -pThe admin password used to connect to DaVinci.
adminEnvironmentIdPINGCLI_DAVINCI_ADMIN_ENVIRONMENT_IDUUID--admin-environment-id / -eThe PingOne environment ID that contains the admin user.
environmentIdPINGCLI_DAVINCI_ENVIRONMENT_IDUUID--environment-id / -tThe PingOne environment ID to control configuration for.
regionPINGCLI_DAVINCI_REGIONstring--region / -rThe region where the PingOne environment is located. Options are AsiaPacific, Canada, Europe and NorthAmerica.

# Packages

No description provided by the author