* Added new startup-mode: running-startup: First try running db, if it is empty try startup db.

* See [Can startup mode to be extended to support running-startup mode? #234](https://github.com/clicon/clixon/issues/234)
* Improved error message on failed MUST condition
This commit is contained in:
Olof hagsand 2021-05-27 11:34:50 +02:00
parent 69af2884d0
commit e0c3f5467c
7 changed files with 34 additions and 10 deletions

View file

@ -1218,8 +1218,14 @@ xml_yang_validate_all(clicon_handle h,
goto done;
if (!nr){
ye = yang_find(yc, Y_ERROR_MESSAGE, NULL);
if ((cb = cbuf_new()) == NULL){
clicon_err(OE_UNIX, errno, "cbuf_new");
goto done;
}
cprintf(cb, "Failed MUST xpath '%s' of '%s' in module %s",
xpath, xml_name(xt), yang_argument_get(ys_module(ys)));
if (netconf_operation_failed_xml(xret, "application",
ye?yang_argument_get(ye):"must xpath validation failed") < 0)
ye?yang_argument_get(ye):cbuf_get(cb)) < 0)
goto done;
goto fail;
}