YANG keywords "action" and "belongs-to" implemented by syntactically by parser (but not proper semantics).

This commit is contained in:
Olof hagsand 2018-11-04 18:36:55 +01:00
parent 270bf78e1f
commit 366cf041bd
8 changed files with 41 additions and 9 deletions

View file

@ -78,10 +78,11 @@ main(int argc, char **argv)
usage(argv[0]);
return -1;
}
clicon_log_init("clixon_util_yang", LOG_INFO, CLICON_LOG_STDERR);
if ((yspec = yspec_new()) == NULL)
goto done;
if (yang_parse_file(0, "yang test", yspec) < 0){
fprintf(stderr, "xml parse error %s\n", clicon_err_reason);
if (yang_parse_file(0, "yang test", yspec) == NULL){
fprintf(stderr, "yang parse error %s\n", clicon_err_reason);
return -1;
}
yang_print(stdout, (yang_node*)yspec);