Added "canonical" global namespace context: nsctx_global

This commit is contained in:
Olof hagsand 2019-11-15 17:04:13 +01:00
parent 06c2793e79
commit 52629d7b35
11 changed files with 149 additions and 14 deletions

View file

@ -589,6 +589,7 @@ main(int argc,
char *str;
clixon_plugin *cp = NULL;
uint32_t id = 0;
cvec *nsctx_global = NULL; /* Global namespace context */
/* In the startup, logs to stderr & debug flag set later */
clicon_log_init(__PROGRAM__, LOG_INFO, logdst);
@ -760,6 +761,14 @@ main(int argc,
yang_spec_parse_module(h, "clixon-rfc5277", NULL, yspec)< 0)
goto done;
/* Here all modules are loaded
* Compute and set canonical namespace context
*/
if (xml_nsctx_yangspec(yspec, &nsctx_global) < 0)
goto done;
if (clicon_nsctx_global_set(h, nsctx_global) < 0)
goto done;
/* Dump configuration options on debug */
if (debug)
clicon_option_dump(h, debug);