* Yang Support of submodule, include and belongs-to.

* Improved unknown handling
* Configure option `CLICON_YANG_DIR` is changed from a single directory to a path of directories
    * Note CLIXON_DATADIR (=/usr/local/share/clixon) need to be in the list
This commit is contained in:
Olof hagsand 2018-12-01 18:17:42 +01:00
parent 56da97cb5b
commit 39a5086218
47 changed files with 977 additions and 469 deletions

View file

@ -193,7 +193,8 @@ yang_cardinality(clicon_handle h,
pk = yt->ys_keyword;
/* 0) Find parent sub-parts of cardinality vector */
ycplist = ycard_find(pk, 0, yclist, 0);
if ((ycplist = ycard_find(pk, 0, yclist, 0)) == NULL)
goto ok; /* skip */
/* 1) For all children, if neither in 0..n, 0..1, 1 or 1..n ->ERROR */
i = 0;
while (i<yt->ys_len){
@ -231,14 +232,15 @@ yang_cardinality(clicon_handle h,
}
if (0) { /* Notyet */
/* 4) Recurse */
i = 0;
while (i<yt->ys_len){ /* Note, children may be removed */
ys = yt->ys_stmt[i++];
if (yang_cardinality(h, ys, modname) < 0)
goto done;
}
/* 4) Recurse */
i = 0;
while (i<yt->ys_len){ /* Note, children may be removed */
ys = yt->ys_stmt[i++];
if (yang_cardinality(h, ys, modname) < 0)
goto done;
}
}
ok:
retval = 0;
done:
return retval;