diff --git a/apps/backend/backend_get.c b/apps/backend/backend_get.c index 55c74162..179ebf56 100644 --- a/apps/backend/backend_get.c +++ b/apps/backend/backend_get.c @@ -853,6 +853,9 @@ get_common(clicon_handle h, /* Remove default configuration nodes from XML */ if (xml_tree_prune_flags(xret, XML_FLAG_DEFAULT, XML_FLAG_MARK|XML_FLAG_DEFAULT) < 0) goto done; + /* Restore marked nodes */ + if (xml_apply(xret, CX_ELMNT, (xml_applyfn_t*)xml_flag_reset, (void*)XML_FLAG_MARK) < 0) + goto done; } else if (strcmp(with_defaults, "report-all") == 0) { /* Accept mode, do nothing */ @@ -864,7 +867,7 @@ get_common(clicon_handle h, goto done; } cprintf(cbmsg, "with-defaults retrieval mode \"%s\" is not supported", with_defaults); - if (netconf_operation_failed(cbret, "application", cbuf_get(cbmsg)) < 0) + if (netconf_operation_not_supported(cbret, "application", cbuf_get(cbmsg)) < 0) goto done; goto ok; } diff --git a/test/test_yang_with_defaults.sh b/test/test_yang_with_defaults.sh index 4896f21a..fbb94bef 100755 --- a/test/test_yang_with_defaults.sh +++ b/test/test_yang_with_defaults.sh @@ -176,7 +176,7 @@ expecteof_netconf "$clixon_netconf -qf $cfg" 0 "$DEFAULTHELLO" \ "\ trim" \ "" \ -"applicationoperation-failed\ +"applicationoperation-not-supported\ error\ with-defaults retrieval mode \"trim\" is not supported" @@ -197,7 +197,7 @@ expecteof_netconf "$clixon_netconf -qf $cfg" 0 "$DEFAULTHELLO" \ "\ report-all-tagged" \ "" \ -"applicationoperation-failed\ +"applicationoperation-not-supported\ error\ with-defaults retrieval mode \"report-all-tagged\" is not supported"