This commit is contained in:
Olof hagsand 2020-07-25 16:14:42 +02:00
commit ab2f7cbbb4
3 changed files with 17 additions and 1 deletions

View file

@ -578,6 +578,9 @@ text_modify(clicon_handle h,
if ((yc = yang_anydata_add(y0, x1cname)) < 0)
goto done;
xml_spec_set(x1c, yc);
clicon_log(LOG_WARNING,
"%s: %d: No YANG spec for %s, anydata used",
__FUNCTION__, __LINE__, x1cname);
}
else{
if (netconf_unknown_element(cbret, "application", x1cname, "Unassigned yang spec") < 0)
@ -783,6 +786,9 @@ text_modify_top(clicon_handle h,
if ((yc = yang_anydata_add(ymod, x1cname)) < 0)
goto done;
xml_spec_set(x1c, yc);
clicon_log(LOG_WARNING,
"%s: %d: No YANG spec for %s, anydata used",
__FUNCTION__, __LINE__, x1cname);
}
else{
if (netconf_unknown_element(cbret, "application", x1cname, "Unassigned yang spec") < 0)

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;

View file

@ -173,6 +173,9 @@ populate_self_parent(cxobj *xt,
goto done;
xml_spec_set(xt, y);
retval = 2; /* treat as anydata */
clicon_log(LOG_WARNING,
"%s: %d: No YANG spec for %s, anydata used",
__FUNCTION__, __LINE__, name);
goto done;
}
if ((cb = cbuf_new()) == NULL){
@ -278,6 +281,9 @@ populate_self_top(cxobj *xt,
goto done;
xml_spec_set(xt, y);
retval = 2; /* treat as anydata */
clicon_log(LOG_WARNING,
"%s: %d: No YANG spec for %s, anydata used",
__FUNCTION__, __LINE__, name);
goto done;
}
if ((cb = cbuf_new()) == NULL){