From 84e3367d69f9c75742186bf149153777683e3180 Mon Sep 17 00:00:00 2001 From: Alexander Lutay Date: Wed, 29 Aug 2018 13:08:52 +0200 Subject: [PATCH] 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 --- etc/ngcp-config/ngcpcfg.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etc/ngcp-config/ngcpcfg.cfg b/etc/ngcp-config/ngcpcfg.cfg index d2181c85..5226cbde 100644 --- a/etc/ngcp-config/ngcpcfg.cfg +++ b/etc/ngcp-config/ngcpcfg.cfg @@ -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 #################################################################