* Added clicon_handle as parameter to all validate functions

* Added libxml2 XSD regexp mode as alternative to posix translation
* Added `CLICON_YANG_REGEXP` option with possible values libxml2 and posix
This commit is contained in:
Olof hagsand 2019-05-23 22:48:33 +02:00
parent 69f2eb30f1
commit a804e05375
27 changed files with 501 additions and 289 deletions

View file

@ -446,6 +446,16 @@ main(int argc, char **argv)
if (help)
usage(h, argv[0]);
if (strcmp(clicon_yang_regexp(h), "libxml2")==0){
#ifdef HAVE_LIBXML2
/* Enable XSD libxml2 */
cligen_regex_set(cli_cligen(h), 1);
#else
clicon_err(OE_FATAL, 0, "CLICON_YANG_REGEXP set to libxml2, but HAVE_LIBXM2 not set (Either change CLICON_YANG_REGEXP to posix, or install libxml2?))");
goto done;
#endif
}
/* Setup signal handlers */
cli_signal_init(h);