* Added defaults parameter to clicon_rpc_get_pageable_list()
* Test: Replaced bash coverage script with binary
This commit is contained in:
parent
e3f3d772c7
commit
bae92488e9
6 changed files with 30 additions and 6 deletions
21
CHANGELOG.md
21
CHANGELOG.md
|
|
@ -1,6 +1,6 @@
|
||||||
# Clixon Changelog
|
# Clixon Changelog
|
||||||
|
|
||||||
* [6.0.0](#600) Expected: November 2022
|
* [6.0.0](#600) Expected: End of 2022
|
||||||
* [5.9.0](#590) 24 September 2022
|
* [5.9.0](#590) 24 September 2022
|
||||||
* [5.8.0](#580) 28 July 2022
|
* [5.8.0](#580) 28 July 2022
|
||||||
* [5.7.0](#570) 17 May 2022
|
* [5.7.0](#570) 17 May 2022
|
||||||
|
|
@ -38,7 +38,21 @@
|
||||||
* [3.3.1](#331) June 7 2017
|
* [3.3.1](#331) June 7 2017
|
||||||
|
|
||||||
## 6.0.0
|
## 6.0.0
|
||||||
Expected: November 2022
|
Expected: End of 2022
|
||||||
|
|
||||||
|
### API changes on existing protocol/config features
|
||||||
|
|
||||||
|
Users may have to change how they access the system
|
||||||
|
|
||||||
|
* NETCONF: Removed `message-id` from hello protocol following RFC 6241
|
||||||
|
* See [message-id present on netconf app "hello"](https://github.com/clicon/clixon/issues/369)
|
||||||
|
|
||||||
|
### C/CLI-API changes on existing features
|
||||||
|
|
||||||
|
Developers may need to change their code
|
||||||
|
|
||||||
|
* C API changes
|
||||||
|
* Added `defaults` parameter to `clicon_rpc_get_pageable_list()`
|
||||||
|
|
||||||
### Corrected Bugs
|
### Corrected Bugs
|
||||||
|
|
||||||
|
|
@ -103,6 +117,9 @@ Users may have to change how they access the system
|
||||||
|
|
||||||
Developers may need to change their code
|
Developers may need to change their code
|
||||||
|
|
||||||
|
* C API changes
|
||||||
|
* Added `defaults` parameter to `clicon_rpc_get()` and `clicon_rpc_get_config()`
|
||||||
|
* For upgrade, add new sixth parameter and set it to `NULL`.
|
||||||
* CLISPEC changes of cli show functions
|
* CLISPEC changes of cli show functions
|
||||||
* For details of updated API, see https://clixon-docs.readthedocs.io/en/latest/cli.html#show-commands
|
* For details of updated API, see https://clixon-docs.readthedocs.io/en/latest/cli.html#show-commands
|
||||||
* Changed `cli_show_auto()`
|
* Changed `cli_show_auto()`
|
||||||
|
|
|
||||||
|
|
@ -1187,7 +1187,8 @@ cli_pagination(clicon_handle h,
|
||||||
for (i = 0;; i++){
|
for (i = 0;; i++){
|
||||||
if (clicon_rpc_get_pageable_list(h, "running", xpath, nsc,
|
if (clicon_rpc_get_pageable_list(h, "running", xpath, nsc,
|
||||||
CONTENT_ALL,
|
CONTENT_ALL,
|
||||||
-1, /* depth */
|
-1, /* depth */
|
||||||
|
NULL, /* with-default */
|
||||||
limit*i, /* offset */
|
limit*i, /* offset */
|
||||||
limit, /* limit */
|
limit, /* limit */
|
||||||
NULL, NULL, NULL, /* nyi */
|
NULL, NULL, NULL, /* nyi */
|
||||||
|
|
|
||||||
|
|
@ -486,7 +486,7 @@ api_data_pagination(clicon_handle h,
|
||||||
sort = cvec_find_str(qvec, "sort-by");
|
sort = cvec_find_str(qvec, "sort-by");
|
||||||
where = cvec_find_str(qvec, "where");
|
where = cvec_find_str(qvec, "where");
|
||||||
if (clicon_rpc_get_pageable_list(h, "running", xpath, nsc, content,
|
if (clicon_rpc_get_pageable_list(h, "running", xpath, nsc, content,
|
||||||
depth, offset, limit, direction, sort, where,
|
depth, NULL, offset, limit, direction, sort, where,
|
||||||
&xret) < 0){
|
&xret) < 0){
|
||||||
if (netconf_operation_failed_xml(&xerr, "protocol", clicon_err_reason) < 0)
|
if (netconf_operation_failed_xml(&xerr, "protocol", clicon_err_reason) < 0)
|
||||||
goto done;
|
goto done;
|
||||||
|
|
|
||||||
|
|
@ -56,7 +56,7 @@ int clicon_rpc_lock(clicon_handle h, char *db);
|
||||||
int clicon_rpc_unlock(clicon_handle h, char *db);
|
int clicon_rpc_unlock(clicon_handle h, char *db);
|
||||||
int clicon_rpc_get(clicon_handle h, char *xpath, cvec *nsc, netconf_content content, int32_t depth, char *defaults, cxobj **xret);
|
int clicon_rpc_get(clicon_handle h, char *xpath, cvec *nsc, netconf_content content, int32_t depth, char *defaults, cxobj **xret);
|
||||||
int clicon_rpc_get_pageable_list(clicon_handle h, char *datastore, char *xpath,
|
int clicon_rpc_get_pageable_list(clicon_handle h, char *datastore, char *xpath,
|
||||||
cvec *nsc, netconf_content content, int32_t depth,
|
cvec *nsc, netconf_content content, int32_t depth, char *defaults,
|
||||||
uint32_t offset, uint32_t limit,
|
uint32_t offset, uint32_t limit,
|
||||||
char *direction, char *sort, char *where,
|
char *direction, char *sort, char *where,
|
||||||
cxobj **xt);
|
cxobj **xt);
|
||||||
|
|
|
||||||
|
|
@ -982,6 +982,7 @@ clicon_rpc_get(clicon_handle h,
|
||||||
* @param[in] nsc Namespace context for filter
|
* @param[in] nsc Namespace context for filter
|
||||||
* @param[in] content Clixon extension: all, config, noconfig. -1 means all
|
* @param[in] content Clixon extension: all, config, noconfig. -1 means all
|
||||||
* @param[in] depth Nr of XML levels to get, -1 is all, 0 is none
|
* @param[in] depth Nr of XML levels to get, -1 is all, 0 is none
|
||||||
|
* @param[in] defaults Value of the with-defaults mode, rfc6243, or NULL
|
||||||
* @param[in] offset uint32, 0 means none
|
* @param[in] offset uint32, 0 means none
|
||||||
* @param[in] limit uint32, 0 means unbounded
|
* @param[in] limit uint32, 0 means unbounded
|
||||||
* @param[in] direction Collection/clixon extension
|
* @param[in] direction Collection/clixon extension
|
||||||
|
|
@ -1002,6 +1003,7 @@ clicon_rpc_get_pageable_list(clicon_handle h,
|
||||||
cvec *nsc, /* namespace context for xpath */
|
cvec *nsc, /* namespace context for xpath */
|
||||||
netconf_content content,
|
netconf_content content,
|
||||||
int32_t depth,
|
int32_t depth,
|
||||||
|
char *defaults,
|
||||||
uint32_t offset,
|
uint32_t offset,
|
||||||
uint32_t limit,
|
uint32_t limit,
|
||||||
char *direction,
|
char *direction,
|
||||||
|
|
@ -1053,6 +1055,10 @@ clicon_rpc_get_pageable_list(clicon_handle h,
|
||||||
goto done;
|
goto done;
|
||||||
cprintf(cb, "/>");
|
cprintf(cb, "/>");
|
||||||
}
|
}
|
||||||
|
if (defaults != NULL)
|
||||||
|
cprintf(cb, "<with-defaults xmlns=\"%s\">%s</with-defaults>",
|
||||||
|
IETF_NETCONF_WITH_DEFAULTS_YANG_NAMESPACE,
|
||||||
|
defaults);
|
||||||
/* Explicit use of list-pagination */
|
/* Explicit use of list-pagination */
|
||||||
cprintf(cb, "<list-pagination xmlns=\"%s\">", IETF_PAGINATON_NC_NAMESPACE);
|
cprintf(cb, "<list-pagination xmlns=\"%s\">", IETF_PAGINATON_NC_NAMESPACE);
|
||||||
if (offset != 0)
|
if (offset != 0)
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ find . -name "*.gcda" | xargs sudo chmod 777
|
||||||
(cd test; clixon_restconf="clixon_restconf -r" ./sum.sh)
|
(cd test; clixon_restconf="clixon_restconf -r" ./sum.sh)
|
||||||
|
|
||||||
# Push coverage
|
# Push coverage
|
||||||
bash <(curl -s https://codecov.io/bash) -t ${TOKEN}
|
codecov -t ${CODECOV_TOKEN} -g -f *.gcda -r clicon/clixon.git
|
||||||
|
|
||||||
# Remove all coverage files (after gcov push)
|
# Remove all coverage files (after gcov push)
|
||||||
find . -name "*.gcda" | xargs rm
|
find . -name "*.gcda" | xargs rm
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue