Added error message for each CLICON_YANG_UNKNOWN_ANYDATA occasion

This commit is contained in:
Vladimir Isaev 2020-07-20 12:54:37 +03:00
parent b56c0220c9
commit cc8e727f85
3 changed files with 17 additions and 1 deletions

View file

@ -1093,8 +1093,12 @@ xml_yang_validate_all(clicon_handle h,
and !Node has a config sub-statement and it is false */
ys=xml_spec(xt);
if (ys==NULL){
if (clicon_option_bool(h, "CLICON_YANG_UNKNOWN_ANYDATA") == 1)
if (clicon_option_bool(h, "CLICON_YANG_UNKNOWN_ANYDATA") == 1) {
clicon_log(LOG_WARNING,
"%s: %d: No YANG spec for %s, validation skipped",
__FUNCTION__, __LINE__, xml_name(xt));
goto ok;
}
if ((cb = cbuf_new()) == NULL){
clicon_err(OE_UNIX, errno, "cbuf_new");
goto done;