TT#8405 Enable YML schema validation on 'ngcpcfg check/build/apply'

Corrupted YML schema is the popular way for time spending on debug
mystery behaviour on NGCP. We have validation schema since mr4.5
and it coverts all YML files nowadays. Let's enable it by default,
since in field testing shows good results.

In case of the inconsistent schema, apply is still possible with
ngcpcfg option '--no-validate':

> root@sp1:~# ngcpcfg --no-validate apply 'some changes with inconsistent schema'
> 2018-08-29 13:12:27: Error: Invalid schema detected for /etc/ngcp-config/config.yml
> /etc/ngcp-config/config.yml#0: INVALID
>  - [/apps] Expected required key 'malicious_call'
>
> DANGEROUS ZONE: invalid configs detected, continue anyway due to option '--no-validate'
> Checking state of local storage:
> ...

Change-Id: Ifa51c9e0c2fd396696f73760d89eadcbe9763456
changes/09/23109/1
Alexander Lutay 8 years ago
parent bc8ae9e795
commit 84e3367d69

@ -37,5 +37,5 @@ RUN_DIR='/var/run'
STATE_FILES_DIR='/var/lib/ngcpcfg/state/'
# validate configs using kwalify schema
VALIDATE_SCHEMA="false"
VALIDATE_SCHEMA="true"
## END OF FILE #################################################################

Loading…
Cancel
Save