Pagination updated
* Pagination is updated to new drafts: * [https://datatracker.ietf.org/doc/html/draft-wwlh-netconf-list-pagination-00>] * [https://datatracker.ietf.org/doc/html/draft-wwlh-netconf-list-pagination-nc-02] * [https://datatracker.ietf.org/doc/html/draft-wwlh-netconf-list-pagination-rc-02] * See also updated [https://clixon-docs.readthedocs.io/en/latest/pagination.html] * Added IETF RFC:s (included by pagination): * ietf-netconf-nmda@2019-01-07.yang * ietf-origin@2018-02-14.yang * ietf-netconf-with-defaults@2011-06-01.yang * Dropped pcvec parameter to many restconf api functions
This commit is contained in:
parent
baa6e821a8
commit
a4b4dc97ce
28 changed files with 1011 additions and 527 deletions
|
|
@ -519,7 +519,7 @@ get_list_pagination(clicon_handle h,
|
|||
}
|
||||
}
|
||||
/* sort */
|
||||
if (ret && (x = xml_find_type(xe, NULL, "sort", CX_ELMNT)) != NULL)
|
||||
if (ret && (x = xml_find_type(xe, NULL, "sort-by", CX_ELMNT)) != NULL)
|
||||
sort = xml_body(x);
|
||||
if (sort) {
|
||||
/* XXX: nothing yet */
|
||||
|
|
@ -721,12 +721,9 @@ get_common(clicon_handle h,
|
|||
char *xpath0;
|
||||
cbuf *cbreason = NULL;
|
||||
int list_pagination = 0;
|
||||
char *valstr;
|
||||
cxobj *x;
|
||||
#if 1
|
||||
cxobj **xvec = NULL;
|
||||
size_t xlen;
|
||||
#endif
|
||||
cxobj **xvec = NULL;
|
||||
size_t xlen;
|
||||
cxobj *xlistpag;
|
||||
|
||||
clicon_debug(1, "%s", __FUNCTION__);
|
||||
username = clicon_username_get(h);
|
||||
|
|
@ -767,15 +764,15 @@ get_common(clicon_handle h,
|
|||
}
|
||||
}
|
||||
/* Check if list pagination */
|
||||
if ((x = xml_find_type(xe, NULL, "list-pagination", CX_ELMNT)) != NULL &&
|
||||
(valstr = xml_body(x)) != NULL &&
|
||||
strcmp(valstr,"true")==0)
|
||||
if ((xlistpag = xml_find_type(xe, NULL, "list-pagination", CX_ELMNT)) != NULL)
|
||||
list_pagination = 1;
|
||||
/* Sanity check for list pagination: path must be a list/leaf-list, if it is,
|
||||
* check config/state
|
||||
*/
|
||||
if (list_pagination){
|
||||
if (get_list_pagination(h, ce, xe, content, db,
|
||||
if (get_list_pagination(h, ce,
|
||||
xlistpag,
|
||||
content, db,
|
||||
depth, yspec, xpath, nsc, username,
|
||||
cbret) < 0)
|
||||
goto done;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue