* 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:
Olof hagsand 2019-05-23 22:48:33 +02:00
parent 69f2eb30f1
commit a804e05375
27 changed files with 501 additions and 289 deletions

View file

@ -470,7 +470,7 @@ from_client_edit_config(clicon_handle h,
goto ok;
}
/* xmldb_put (difflist handling) requires list keys */
if ((ret = xml_yang_validate_list_key_only(xc, cbret)) < 0)
if ((ret = xml_yang_validate_list_key_only(h, xc, cbret)) < 0)
goto done;
if (ret == 0)
goto ok;
@ -1147,7 +1147,7 @@ from_client_msg(clicon_handle h,
* maybe not necessary since it should be */
if (xml_spec_populate_rpc(h, x, yspec) < 0)
goto done;
if ((ret = xml_yang_validate_rpc(x, cbret)) < 0)
if ((ret = xml_yang_validate_rpc(h, x, cbret)) < 0)
goto done;
if (ret == 0)
goto reply;