Merge pull request #121 from VVIsaev/master
Added error message for each CLICON_YANG_UNKNOWN_ANYDATA occasion
This commit is contained in:
commit
4572d94ab1
3 changed files with 17 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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){
|
||||
|
|
@ -267,6 +270,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){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue