* Stricter handling of multi-namespace handling
* This occurs in cases where there are more than one XML namespaces in a config tree, such as `augment`:ed trees. * Affects all parts of the system, including datastore, backend, restconf and cli. * Invalid api-path syntax (eg non-matching yang) error changed from 412 operation-failed to 400 Bad request invalid-value, or unknown-element.
This commit is contained in:
parent
a547b3f31d
commit
d9136c8972
22 changed files with 777 additions and 236 deletions
|
|
@ -70,7 +70,6 @@
|
|||
#include "backend_commit.h"
|
||||
#include "backend_startup.h"
|
||||
|
||||
|
||||
/*! Merge db1 into db2 without commit
|
||||
* @retval -1 Error
|
||||
* @retval 0 Validation failed (with cbret set)
|
||||
|
|
@ -166,9 +165,10 @@ load_extraxml(clicon_handle h,
|
|||
const char *db,
|
||||
cbuf *cbret)
|
||||
{
|
||||
int retval = -1;
|
||||
cxobj *xt = NULL;
|
||||
int fd = -1;
|
||||
int retval = -1;
|
||||
cxobj *xt = NULL;
|
||||
int fd = -1;
|
||||
yang_stmt *yspec = NULL;
|
||||
|
||||
if (filename == NULL)
|
||||
return 1;
|
||||
|
|
@ -176,7 +176,8 @@ load_extraxml(clicon_handle h,
|
|||
clicon_err(OE_UNIX, errno, "open(%s)", filename);
|
||||
goto done;
|
||||
}
|
||||
if (xml_parse_file(fd, "</config>", NULL, &xt) < 0)
|
||||
yspec = clicon_dbspec_yang(h);
|
||||
if (xml_parse_file(fd, "</config>", yspec, &xt) < 0)
|
||||
goto done;
|
||||
/* Replace parent w first child */
|
||||
if (xml_rootchild(xt, 0, &xt) < 0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue