* Added clicon_handle as parameter to all validate functions
* Added libxml2 XSD regexp mode as alternative to posix translation * Added `CLICON_YANG_REGEXP` option with possible values libxml2 and posix
This commit is contained in:
parent
69f2eb30f1
commit
a804e05375
27 changed files with 501 additions and 289 deletions
|
|
@ -1513,7 +1513,7 @@ api_operations_post_output(clicon_handle h,
|
|||
if ((ret = xml_yang_validate_all(xoutput, cbret)) < 0)
|
||||
goto done;
|
||||
if (ret == 1 &&
|
||||
(ret = xml_yang_validate_add(xoutput, cbret)) < 0)
|
||||
(ret = xml_yang_validate_add(h, xoutput, cbret)) < 0)
|
||||
goto done;
|
||||
if (ret == 0){ /* validation failed */
|
||||
if (xml_parse_string(cbuf_get(cbret), yspec, &xerr) < 0)
|
||||
|
|
@ -1749,7 +1749,7 @@ api_operations_post(clicon_handle h,
|
|||
/* 6. Validate incoming RPC and fill in defaults */
|
||||
if (xml_spec_populate_rpc(h, xtop, yspec) < 0) /* */
|
||||
goto done;
|
||||
if ((ret = xml_yang_validate_rpc(xtop, cbret)) < 0)
|
||||
if ((ret = xml_yang_validate_rpc(h, xtop, cbret)) < 0)
|
||||
goto done;
|
||||
if (ret == 0){
|
||||
if (xml_parse_string(cbuf_get(cbret), NULL, &xret) < 0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue