loosen yang check of keys in lists to not do it in rpc declarations

This commit is contained in:
Olof hagsand 2020-03-27 15:44:05 +01:00
parent 8131bd1834
commit 0fd71ec372
3 changed files with 39 additions and 6 deletions

View file

@ -923,10 +923,16 @@ ys_list_check(clicon_handle h,
yang_stmt *ymod;
yang_stmt *yc = NULL;
enum rfc_6020 keyw;
yang_stmt *yroot;
/* This node is state, not config */
if (yang_config_ancestor(ys) == 0)
goto ok;
/* Find root, examine if this node is part of a rpc declaration */
if ((yroot = yang_myroot(ys)) != NULL &&
yang_keyword_get(yroot) == Y_RPC)
goto ok;
/* This node has config false */
if (yang_config(ys) == 0)
return 0;
keyw = yang_keyword_get(ys);
/* Check if list and if keys do not exist */
if (keyw == Y_LIST &&
@ -963,7 +969,7 @@ ys_list_check(clicon_handle h,
goto done;
}
}
ok:
retval = 0;
done:
return retval;