Validations Framework Command Line Interface (CLI)¶
Global Options¶
Validations Framework Command Line Interface (CLI)
validation [--version] [-v | -q] [--log-file LOG_FILE] [--debug]
- --version¶
show program’s version number and exit
- -v, --verbose¶
Increase verbosity of output. Can be repeated.
- -q, --quiet¶
Suppress output except warnings and errors.
- --log-file <LOG_FILE>¶
Specify a file to log output. Disabled by default.
- --debug¶
Show tracebacks on errors.
Command Options¶
file¶
Include and exclude validations by name(s), group(s), category(ies) or by product(s) and run them from File
validation file [--config CONFIG] [--junitxml JUNITXML] path_to_file
- --config <CONFIG>¶
Config file path for Validation Framework.
- --junitxml <JUNITXML>¶
Path where the run result in JUnitXML format will be stored.
- path_to_file¶
The path where the YAML file is stored.
This command is provided by the validations-libs plugin.
history get¶
Display details about a specific Validation execution
validation history get
[--config CONFIG]
[--full]
[--validation-log-dir VALIDATION_LOG_DIR]
<uuid>
- --config <CONFIG>¶
Config file path for Validation Framework.
- --full¶
Show full details of the validation run
- --validation-log-dir <VALIDATION_LOG_DIR>¶
Path where the log files and artifacts are located.
- uuid¶
Validation UUID Run
This command is provided by the validations-libs plugin.
history list¶
Display Validations execution history
validation history list
[-f {csv,json,table,value,yaml}]
[-c COLUMN]
[--quote {all,minimal,none,nonnumeric}]
[--noindent]
[--max-width <integer>]
[--fit-width]
[--print-empty]
[--sort-column SORT_COLUMN]
[--sort-ascending]
[--sort-descending]
[--config CONFIG]
[--validation <validation_id>]
[--limit HISTORY_LIMIT]
[--validation-log-dir VALIDATION_LOG_DIR]
- -f <FORMATTER>, --format <FORMATTER>¶
the output format, defaults to table
- -c COLUMN, --column COLUMN¶
specify the column(s) to include, can be repeated to show multiple columns
- --quote <QUOTE_MODE>¶
when to include quotes, defaults to nonnumeric
- --noindent¶
whether to disable indenting the JSON
- --max-width <integer>¶
Maximum display width, <1 to disable. You can also use the CLIFF_MAX_TERM_WIDTH environment variable, but the parameter takes precedence.
- --fit-width¶
Fit the table to the display width. Implied if –max-width greater than 0. Set the environment variable CLIFF_FIT_WIDTH=1 to always enable
- --print-empty¶
Print empty table if there is no data to show.
- --sort-column SORT_COLUMN¶
specify the column(s) to sort the data (columns specified first have a priority, non-existing columns are ignored), can be repeated
- --sort-ascending¶
sort the column(s) in ascending order
- --sort-descending¶
sort the column(s) in descending order
- --config <CONFIG>¶
Config file path for Validation Framework.
- --validation <validation_id>¶
Display execution history for a validation
- --limit <HISTORY_LIMIT>¶
Display <n> most recent runs of the selected <validation>. <n> must be > 0 The default display limit is set to 15.
- --validation-log-dir <VALIDATION_LOG_DIR>¶
Path where the log files and artifacts are located.
This command is provided by the validations-libs plugin.
init¶
Initialize Community Validation Skeleton
validation init
[--config CONFIG]
[--validation-dir VALIDATION_DIR]
[--ansible-base-dir ANSIBLE_BASE_DIR]
<validation_name>
- --config <CONFIG>¶
Config file path for Validation Framework.
- --validation-dir <VALIDATION_DIR>¶
Path where the validation playbooks is located.
- --ansible-base-dir <ANSIBLE_BASE_DIR>¶
Path where the ansible roles, library and plugins are located.
- validation_name¶
The name of the Community Validation: Validation name is limited to contain only lowercase alphanumeric characters, plus ‘_’ or ‘-’ and starts with an alpha character. Ex: my-val, my_val2. This will generate an Ansible role and a playbook in /home/zuul/src/opendev.org/openstack/validations-libs/.tox/docs/community-validations. Note that the structure of this directory will be created at the first use.
This command is provided by the validations-libs plugin.
list¶
List the Validations Catalog
validation list
[-f {csv,json,table,value,yaml}]
[-c COLUMN]
[--quote {all,minimal,none,nonnumeric}]
[--noindent]
[--max-width <integer>]
[--fit-width]
[--print-empty]
[--sort-column SORT_COLUMN]
[--sort-ascending]
[--sort-descending]
[--config CONFIG]
[--group <group_id>[,<group_id>,...]]
[--category <category_id>[,<category_id>,...]]
[--product <product_id>[,<product_id>,...]]
[--validation-dir VALIDATION_DIR]
- -f <FORMATTER>, --format <FORMATTER>¶
the output format, defaults to table
- -c COLUMN, --column COLUMN¶
specify the column(s) to include, can be repeated to show multiple columns
- --quote <QUOTE_MODE>¶
when to include quotes, defaults to nonnumeric
- --noindent¶
whether to disable indenting the JSON
- --max-width <integer>¶
Maximum display width, <1 to disable. You can also use the CLIFF_MAX_TERM_WIDTH environment variable, but the parameter takes precedence.
- --fit-width¶
Fit the table to the display width. Implied if –max-width greater than 0. Set the environment variable CLIFF_FIT_WIDTH=1 to always enable
- --print-empty¶
Print empty table if there is no data to show.
- --sort-column SORT_COLUMN¶
specify the column(s) to sort the data (columns specified first have a priority, non-existing columns are ignored), can be repeated
- --sort-ascending¶
sort the column(s) in ascending order
- --sort-descending¶
sort the column(s) in descending order
- --config <CONFIG>¶
Config file path for Validation Framework.
- --group <group_id>[,<group_id>,...], -g <group_id>[,<group_id>,...]¶
List specific group of validations, if more than one group is required separate the group names with commas.
- --category <category_id>[,<category_id>,...]¶
List specific category of validations, if more than one category is required separate the category names with commas.
- --product <product_id>[,<product_id>,...]¶
List specific product of validations, if more than one product is required separate the product names with commas.
- --validation-dir <VALIDATION_DIR>¶
Path where validation playbooks are located.
This command is provided by the validations-libs plugin.
run¶
Run Validations by name(s), group(s), category(ies) or by product(s)
validation run
[--config CONFIG]
[--limit <host1>[,<host2>,<host3>,...]]
[--ssh-user SSH_USER]
[--validation-dir VALIDATION_DIR]
[--ansible-base-dir ANSIBLE_BASE_DIR]
[--validation-log-dir VALIDATION_LOG_DIR]
[--inventory INVENTORY]
[--output-log OUTPUT_LOG]
[--junitxml JUNITXML]
[--python-interpreter --python-interpreter <PYTHON_INTERPRETER_PATH>]
[--extra-env-vars key1=<val1> [--extra-env-vars key2=<val2>]]
[--skiplist SKIP_LIST]
[--extra-vars key1=<val1> [--extra-vars key2=<val2>]
|
--extra-vars-file
/tmp/my_vars_file.[json|yaml]]
(--validation <validation_id>[,<validation_id>,...] | --group <group_id>[,<group_id>,...] | --category <category_id>[,<category_id>,...] | --product <product_id>[,<product_id>,...])
- --config <CONFIG>¶
Config file path for Validation Framework.
- --limit <host1>[,<host2>,<host3>,...]¶
A string that identifies a single node or comma-separated list of nodes to be validated in this run invocation.
- --ssh-user <SSH_USER>¶
SSH user name for the Ansible ssh connection.
- --validation-dir <VALIDATION_DIR>¶
Path where validation playbooks are located.
- --ansible-base-dir <ANSIBLE_BASE_DIR>¶
Path where the ansible roles, library and plugins are located.
- --validation-log-dir <VALIDATION_LOG_DIR>¶
Path where the log files and artifacts are located.
- --inventory <INVENTORY>, -i <INVENTORY>¶
Path of the Ansible inventory.
- --output-log <OUTPUT_LOG>¶
Path where the run result will be stored.
- --junitxml <JUNITXML>¶
Path where the run result in JUnitXML format will be stored.
- --python-interpreter --python-interpreter <PYTHON_INTERPRETER_PATH>¶
Python interpreter for Ansible execution.
- --extra-env-vars key1=<val1> [--extra-env-vars key2=<val2>]¶
Add extra environment variables you may need to provide to your Ansible execution as KEY=VALUE pairs. Note that if you pass the same KEY multiple times, the last given VALUE for that same KEY will override the other(s).
- --skiplist <SKIP_LIST>¶
Path where the skip list is stored. An example of the skiplist format could be found at the root of the validations-libs repository.
- --extra-vars key1=<val1> [--extra-vars key2=<val2>]¶
Add Ansible extra variables to the validation(s) execution as KEY=VALUE pair(s). Note that if you pass the same KEY multiple times, the last given VALUE for that same KEY will override the other(s).
- --extra-vars-file /tmp/my_vars_file.[json|yaml]¶
Absolute or relative Path to a JSON/YAML file containing extra variable(s) to pass to one or multiple validation(s) execution.
- --validation <validation_id>[,<validation_id>,...]¶
Run specific validations, if more than one validation is required separate the names with commas.
- --group <group_id>[,<group_id>,...], -g <group_id>[,<group_id>,...]¶
Run specific validations by group, if more than one group is required separate the group names with commas.
- --category <category_id>[,<category_id>,...]¶
Run specific validations by category, if more than one category is required separate the category names with commas.
- --product <product_id>[,<product_id>,...]¶
Run specific validations by product, if more than one product is required separate the product names with commas.
This command is provided by the validations-libs plugin.
show¶
Show detailed informations about a Validation
validation show
[-f {json,shell,table,value,yaml}]
[-c COLUMN]
[--noindent]
[--prefix PREFIX]
[--max-width <integer>]
[--fit-width]
[--print-empty]
[--config CONFIG]
[--validation-dir VALIDATION_DIR]
<validation>
- -f <FORMATTER>, --format <FORMATTER>¶
the output format, defaults to table
- -c COLUMN, --column COLUMN¶
specify the column(s) to include, can be repeated to show multiple columns
- --noindent¶
whether to disable indenting the JSON
- --prefix <PREFIX>¶
add a prefix to all variable names
- --max-width <integer>¶
Maximum display width, <1 to disable. You can also use the CLIFF_MAX_TERM_WIDTH environment variable, but the parameter takes precedence.
- --fit-width¶
Fit the table to the display width. Implied if –max-width greater than 0. Set the environment variable CLIFF_FIT_WIDTH=1 to always enable
- --print-empty¶
Print empty table if there is no data to show.
- --config <CONFIG>¶
Config file path for Validation Framework.
- --validation-dir <VALIDATION_DIR>¶
Path where validation playbooks are located.
- validation¶
Show a specific validation.
This command is provided by the validations-libs plugin.
show group¶
Show detailed informations about Validation Groups
validation show group
[-f {csv,json,table,value,yaml}]
[-c COLUMN]
[--quote {all,minimal,none,nonnumeric}]
[--noindent]
[--max-width <integer>]
[--fit-width]
[--print-empty]
[--sort-column SORT_COLUMN]
[--sort-ascending]
[--sort-descending]
[--config CONFIG]
[--validation-dir VALIDATION_DIR]
- -f <FORMATTER>, --format <FORMATTER>¶
the output format, defaults to table
- -c COLUMN, --column COLUMN¶
specify the column(s) to include, can be repeated to show multiple columns
- --quote <QUOTE_MODE>¶
when to include quotes, defaults to nonnumeric
- --noindent¶
whether to disable indenting the JSON
- --max-width <integer>¶
Maximum display width, <1 to disable. You can also use the CLIFF_MAX_TERM_WIDTH environment variable, but the parameter takes precedence.
- --fit-width¶
Fit the table to the display width. Implied if –max-width greater than 0. Set the environment variable CLIFF_FIT_WIDTH=1 to always enable
- --print-empty¶
Print empty table if there is no data to show.
- --sort-column SORT_COLUMN¶
specify the column(s) to sort the data (columns specified first have a priority, non-existing columns are ignored), can be repeated
- --sort-ascending¶
sort the column(s) in ascending order
- --sort-descending¶
sort the column(s) in descending order
- --config <CONFIG>¶
Config file path for Validation Framework.
- --validation-dir <VALIDATION_DIR>¶
Path where validation playbooks are located.
This command is provided by the validations-libs plugin.
show parameter¶
Show Validation(s) parameter(s)
Display Validation(s) Parameter(s) which could be overriden during an execution. It could be filtered by validation_id, group(s), category(ies) or by products.
validation show parameter
[-f {json,shell,table,value,yaml}]
[-c COLUMN]
[--noindent]
[--prefix PREFIX]
[--max-width <integer>]
[--fit-width]
[--print-empty]
[--config CONFIG]
[--validation-dir VALIDATION_DIR]
[--validation <validation_id>[,<validation_id>,...]
|
--group <group_id>
[,<group_id>,...]
|
--category <category_id>
[,<category_id>,...]
|
--product <product_id>
[,<product_id>,...]]
[--download DOWNLOAD]
[--format-output <format_output>]
- -f <FORMATTER>, --format <FORMATTER>¶
the output format, defaults to table
- -c COLUMN, --column COLUMN¶
specify the column(s) to include, can be repeated to show multiple columns
- --noindent¶
whether to disable indenting the JSON
- --prefix <PREFIX>¶
add a prefix to all variable names
- --max-width <integer>¶
Maximum display width, <1 to disable. You can also use the CLIFF_MAX_TERM_WIDTH environment variable, but the parameter takes precedence.
- --fit-width¶
Fit the table to the display width. Implied if –max-width greater than 0. Set the environment variable CLIFF_FIT_WIDTH=1 to always enable
- --print-empty¶
Print empty table if there is no data to show.
- --config <CONFIG>¶
Config file path for Validation Framework.
- --validation-dir <VALIDATION_DIR>¶
Path where validation playbooks are located.
- --validation <validation_id>[,<validation_id>,...]¶
List specific validations, if more than one validation is required separate the names with commas.
- --group <group_id>[,<group_id>,...], -g <group_id>[,<group_id>,...]¶
List specific group of validations, if more than one group is required separate the group names with commas.
- --category <category_id>[,<category_id>,...]¶
List specific category of validations, if more than one category is required separate the category names with commas.
- --product <product_id>[,<product_id>,...]¶
List specific product of validations, if more than one product is required separate the product names with commas.
- --download <DOWNLOAD>¶
Create a json or a yaml file containing all the variables available for the validations: /tmp/myvars
- --format-output <format_output>¶
Print representation of the validation. The choices of the output format is json,yaml.
This command is provided by the validations-libs plugin.