diff --git a/CHANGELOG.md b/CHANGELOG.md index d1dddc2b..27cb1f34 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # 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.8.0](#580) 28 July 2022 * [5.7.0](#570) 17 May 2022 @@ -38,7 +38,21 @@ * [3.3.1](#331) June 7 2017 ## 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 @@ -103,6 +117,9 @@ Users may have to change how they access the system 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 * For details of updated API, see https://clixon-docs.readthedocs.io/en/latest/cli.html#show-commands * Changed `cli_show_auto()` diff --git a/apps/cli/cli_show.c b/apps/cli/cli_show.c index 1b0e794f..4004ab3f 100644 --- a/apps/cli/cli_show.c +++ b/apps/cli/cli_show.c @@ -1187,7 +1187,8 @@ cli_pagination(clicon_handle h, for (i = 0;; i++){ if (clicon_rpc_get_pageable_list(h, "running", xpath, nsc, CONTENT_ALL, - -1, /* depth */ + -1, /* depth */ + NULL, /* with-default */ limit*i, /* offset */ limit, /* limit */ NULL, NULL, NULL, /* nyi */ diff --git a/apps/restconf/restconf_methods_get.c b/apps/restconf/restconf_methods_get.c index e24aaff4..a82e11dd 100644 --- a/apps/restconf/restconf_methods_get.c +++ b/apps/restconf/restconf_methods_get.c @@ -486,7 +486,7 @@ api_data_pagination(clicon_handle h, sort = cvec_find_str(qvec, "sort-by"); where = cvec_find_str(qvec, "where"); 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){ if (netconf_operation_failed_xml(&xerr, "protocol", clicon_err_reason) < 0) goto done; diff --git a/lib/clixon/clixon_proto_client.h b/lib/clixon/clixon_proto_client.h index c021ff02..76ff0fb9 100644 --- a/lib/clixon/clixon_proto_client.h +++ b/lib/clixon/clixon_proto_client.h @@ -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_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, - cvec *nsc, netconf_content content, int32_t depth, + cvec *nsc, netconf_content content, int32_t depth, char *defaults, uint32_t offset, uint32_t limit, char *direction, char *sort, char *where, cxobj **xt); diff --git a/lib/src/clixon_proto_client.c b/lib/src/clixon_proto_client.c index 0781eaa9..06afc117 100644 --- a/lib/src/clixon_proto_client.c +++ b/lib/src/clixon_proto_client.c @@ -982,6 +982,7 @@ clicon_rpc_get(clicon_handle h, * @param[in] nsc Namespace context for filter * @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] defaults Value of the with-defaults mode, rfc6243, or NULL * @param[in] offset uint32, 0 means none * @param[in] limit uint32, 0 means unbounded * @param[in] direction Collection/clixon extension @@ -1002,6 +1003,7 @@ clicon_rpc_get_pageable_list(clicon_handle h, cvec *nsc, /* namespace context for xpath */ netconf_content content, int32_t depth, + char *defaults, uint32_t offset, uint32_t limit, char *direction, @@ -1053,6 +1055,10 @@ clicon_rpc_get_pageable_list(clicon_handle h, goto done; cprintf(cb, "/>"); } + if (defaults != NULL) + cprintf(cb, "%s", + IETF_NETCONF_WITH_DEFAULTS_YANG_NAMESPACE, + defaults); /* Explicit use of list-pagination */ cprintf(cb, "", IETF_PAGINATON_NC_NAMESPACE); if (offset != 0) diff --git a/test/cicd/coverage.sh b/test/cicd/coverage.sh index c054c530..264fe1f1 100755 --- a/test/cicd/coverage.sh +++ b/test/cicd/coverage.sh @@ -36,7 +36,7 @@ find . -name "*.gcda" | xargs sudo chmod 777 (cd test; clixon_restconf="clixon_restconf -r" ./sum.sh) # 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) find . -name "*.gcda" | xargs rm