* Replaced separate autocli trees with a single @basemodel tree by using filter labels

* Added lastkey argument to yang_key_match()
* Fixed segv in process-sigchld
* Added ietf-yang-library to CLICON_CLI_AUTOCLI_EXCLUDE default value
* Added yang_spec_print() function
This commit is contained in:
Olof hagsand 2021-12-15 14:23:05 +01:00
parent 87d243d7e5
commit f8f34e3571
17 changed files with 666 additions and 192 deletions

View file

@ -323,7 +323,7 @@ yang2api_path_fmt_1(yang_stmt *ys,
*/
if (yang_keyword_get(ys) == Y_LEAF && yp &&
yang_keyword_get(yp) == Y_LIST &&
yang_key_match(yp, ys->ys_argument) == 1)
yang_key_match(yp, ys->ys_argument, NULL) == 1)
;
else
#endif
@ -347,7 +347,7 @@ yang2api_path_fmt_1(yang_stmt *ys,
else{
if (yang_keyword_get(ys) == Y_LEAF && yp &&
yang_keyword_get(yp) == Y_LIST){
if (yang_key_match(yp, yang_argument_get(ys)) == 0)
if (yang_key_match(yp, yang_argument_get(ys), NULL) == 0)
cprintf(cb, "%s", yang_argument_get(ys)); /* Not if leaf and key */
}
else
@ -477,7 +477,10 @@ api_path_fmt2api_path(const char *api_path_fmt,
if (j == cvec_len(cvv)) /* last element */
;
else{
cv = cvec_i(cvv, j++);
if ((cv = cvec_i(cvv, j++)) == NULL){
clicon_err(OE_XML, 0, "Number of elements in cvv does not match api_path_fmt string");
goto done;
}
if ((str = cv2str_dup(cv)) == NULL){
clicon_err(OE_UNIX, errno, "cv2str_dup");
goto done;