* New XML parsing API:
* `clixon_xml_parse_string()` * `clixon_xml_parse_file()` * New JSON parsing API, with same signature as XML parsing: * `clixon_json_parse_string()` * `clixon_xml_parse_file()` * XML YANG binding API have been rearranged as follows: * `xml_bind_yang_rpc()` * `xml_bind_yang_rpc_reply()` * `xml_bind_yang()` * `xml_bind_yang0()`
This commit is contained in:
parent
c4b0491754
commit
09a2e09848
54 changed files with 590 additions and 711 deletions
|
|
@ -232,7 +232,9 @@ api_root(clicon_handle h,
|
|||
FCGX_FPrintF(r->out, "Content-Type: %s\r\n", restconf_media_int2str(media_out));
|
||||
FCGX_FPrintF(r->out, "\r\n");
|
||||
|
||||
if (xml_parse_string("<restconf xmlns=\"urn:ietf:params:xml:ns:yang:ietf-restconf\"><data/><operations/><yang-library-version>2016-06-21</yang-library-version></restconf>", yspec, &xt) < 0)
|
||||
if (clixon_xml_parse_string("<restconf xmlns=\"urn:ietf:params:xml:ns:yang:ietf-restconf\"><data/>"
|
||||
"<operations/><yang-library-version>2016-06-21</yang-library-version></restconf>",
|
||||
YB_MODULE, yspec, &xt, NULL) < 0)
|
||||
goto done;
|
||||
if ((cb = cbuf_new()) == NULL){
|
||||
clicon_err(OE_XML, errno, "cbuf_new");
|
||||
|
|
@ -283,7 +285,9 @@ api_yang_library_version(clicon_handle h,
|
|||
FCGX_FPrintF(r->out, "Cache-Control: no-cache\r\n");
|
||||
FCGX_FPrintF(r->out, "Content-Type: %s\r\n", restconf_media_int2str(media_out));
|
||||
FCGX_FPrintF(r->out, "\r\n");
|
||||
if (xml_parse_va(&xt, NULL, "<yang-library-version>%s</yang-library-version>", ietf_yang_library_revision) < 0)
|
||||
if (clixon_xml_parse_va(YB_NONE, NULL, &xt, NULL,
|
||||
"<yang-library-version>%s</yang-library-version>",
|
||||
ietf_yang_library_revision) < 0)
|
||||
goto done;
|
||||
if (xml_rootchild(xt, 0, &xt) < 0)
|
||||
goto done;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue