MT#19571 Add ngcpcfg option to force validation

Mainly nobody validate the schema in trunk right now
as it requires manual changes for ngcpcfg.cfg.

Also having force validation will allow us to add
validation in ngcp-upgrade and Jenkins nightly builds.

Change-Id: Ia48a778ecf7dae30b26bdff0c5dd5b9000c9d089
changes/59/5959/3
Alexander Lutay 10 years ago
parent c300a8ebbb
commit 2317a9039c

@ -198,6 +198,10 @@ Note: This option is available in the High Availability setup only.
Ignore schema validation results for YAML files (syntax check is still performed).
**--validate** <action> [<further_options>]::
Force schema validation for YAML files even if validation is disabled in config.
**--version**::
Display ngcpcfg version and exit.

@ -118,6 +118,7 @@ case ${1:-} in
--no-db-sync) export NO_DB_SYNC=1 ; shift ; "$0" "$@" ;;
--no-validate) export NO_VALIDATE=1; shift ; "$0" "$@" ;;
--no-action-failure) export NO_ACTION_FAILURE=1; shift ; "$0" "$@" ;;
--validate) export VALIDATE=1; shift ; "$0" "$@" ;;
-h|--help|help) usage ; exit 0;;
-v|--version|version) version ; exit 0;;
*) usage 1; exit 1;;

@ -144,7 +144,7 @@ fi
check_branch
check_configs
if "${VALIDATE_SCHEMA:-false}" ; then
if "${VALIDATE_SCHEMA:-false}" || [ "${VALIDATE:-0}" = "1" ] ; then
validate_config
fi
check_configs_conflicts

Loading…
Cancel
Save