Commit graph

112 commits

Author SHA1 Message Date
Olof hagsand
3a336838f7 Fixed a cornercase of RFC 7950 Sec 7.9, a choice witout case with sub-containers 2022-05-16 13:12:59 +02:00
Olof hagsand
60e6477be2 Clixon 5.6.0 Release 2022-03-08 10:40:34 +01:00
Olof hagsand
2291275fae Fixed: [Restconf PATCH method request failed on item defined by submodule #306](https://github.com/clicon/clixon/issues/306) 2022-02-23 11:20:52 +01:00
Olof hagsand
fd2f9b549f Clixon 5.5.0 CHANGELOG and README update 2022-01-20 17:42:40 +01:00
Olof hagsand
6d955160ed Clixon 5.5.0 2022-01-20 15:18:46 +01:00
Olof hagsand
b67fae4d61 Started Clixon 5.5.0.PRE and removed optional YANGs (already disabled in 5.4.0) 2021-12-05 12:03:10 +01:00
Olof hagsand
716d0cb15f * Preparations for Clixon 5.4 release, docs, readme:s, etc 2021-11-29 13:52:52 +01:00
Olof hagsand
8ede8a87b2 Moved fuzz dir to test/fuzz
Extended contributing document to testing and licensing
2021-10-10 18:05:45 +02:00
Olof hagsand
51278d5901 Fixed static linking for coverage and fuzzing
Preparations for Clixon 5.3 release
2021-09-27 12:26:53 +02:00
Olof hagsand
ef131cf407 * 5.2.0 preparations
* Restconf native openssl - ifdef SSL_get0_next_proto_negotiated
2021-07-01 16:34:38 +02:00
Olof hagsand
89f843f919 * Fixed: [uses oc-if:interface-ref error with openconfig #233](https://github.com/clicon/clixon/issues/233) 2021-07-01 11:55:45 +02:00
Olof hagsand
113f92ab41 Move clixon CI from travis to github actions 2021-06-16 13:06:21 +02:00
Olof hagsand
551dc707f1 slack invite, travis docker passwords 2021-05-24 13:27:03 +02:00
Olof hagsand
2ce8d9b488 Added codecov config file 2021-04-21 19:23:17 +02:00
Olof Hagsand
33347f0939
Update README.md 2021-04-19 19:37:37 +02:00
Olof hagsand
8ad6c487ef codecov badge 2021-04-19 19:29:55 +02:00
Olof hagsand
307378227d preparing for 5.1.0 2021-04-15 14:26:57 +02:00
Olof hagsand
477059f33d Fixed again: [backend start resconf failed due to path string truncated #192](https://github.com/clicon/clixon/issues/192) 2021-03-24 12:23:00 +01:00
Olof hagsand
92a3898c46 TSL->TLS, updated slack link, callhome docs 2021-02-09 21:36:01 +01:00
Olof hagsand
2b820e153a * [Delete and show config are oblivious to the leaf value #157](https://github.com/clicon/clixon/issues/157)
* Added equality of values necessary condition in edit-config delete/remove of leafs
2020-12-16 16:03:57 +01:00
Olof hagsand
09d33acd45 cli show options. doc and testing 2020-10-01 11:07:57 +02:00
Olof hagsand
21ac47915b More XPath function support
* `count`, `name`, `contains`, `not`, as defined in [xpath 1.0](https://www.w3.org/TR/xpath-10)
  * `deref`, `derived-from` and `derived-from-or-self` from RFC7950 Section 10.
    * in particular in augment/when statements
  * Improved error handling
    * Verification of XPath functions is done at startup when yang modules are loaded, not when XPaths are evaluated.
    * Separation of "not found" and "not implemented" XPath functions
    * Both give a fatal error (backend does not start).
2020-09-25 11:52:06 +02:00
Olof hagsand
89fddd4cca variables in docker start 2020-08-18 17:26:39 +02:00
Olof hagsand
e1d86ca3b5 Clixon 4.6 2020-08-14 10:47:37 +02:00
Olof hagsand
25245a12d2 code documentation 2020-07-12 10:59:12 +02:00
Olof hagsand
1a1aa58249 CLIgen pt_expand API change and mem problems 2020-05-20 12:00:52 +02:00
Olof hagsand
48dfc1201f Bumped version to 4.6.0.PRE 2020-05-14 14:14:14 +02:00
Olof hagsand
0e94937ccf Sanity check of mandatory key statement for Yang LISTs.
* If fails, exit with error message, eg: `Yang error: Sanity check failed: LIST vsDataContainer lacks key statement which MUST be present (See RFC 7950 Sec 7.8.2)`
  * Can be disabled by setting `CLICON_CLICON_YANG_LIST_CHECK` to `false`
2020-03-09 15:48:33 +01:00
Olof hagsand
0f54899ae4 * Added option: CLICON_CLI_BUF_START and CLICON_CLI_BUF_THRESHOLD so you can change the start and
threshold of quadratic and linear growth of CLIgen buffers (cbuf:s)
* Memory footprint
  * Do not autopopulate namespace cache, instead use on-demand, see `xml2ns()`.
  * Set CBUF start level to 256 (`CLICON_CLI_BUF_START` option)
  * Reduced xml child vector default size from 4 to 1 with quadratic growoth to 64K then linear
2020-03-04 11:27:43 +01:00
Olof hagsand
250ead517c CHanged back xvec API to use cxobj ** instead if clixon_xvec since it may be easier for the an end-user. 2020-03-02 10:59:46 +01:00
Olof hagsand
de3853a126 readnme buttons 2020-02-23 17:17:28 +01:00
Olof hagsand
e16ef2daff Logo 2020-02-23 17:12:59 +01:00
Olof hagsand
3806f7652e Hello netconf candidate capability misspelled, mentioned in [Can clixon_netconf receive netconf packets as a server? #93](https://github.com/clicon/clixon/issues/93) 2019-09-04 14:56:17 +02:00
Olof hagsand
6bcaea259c documentation 2019-09-01 19:45:54 +02:00
Olof hagsand
a8906fd0bd 4.1.0 docs 2019-08-18 16:22:46 +02:00
Olof hagsand
ee329ee382 * RESTCONF "depth" query parameter supported
* C API change: Added `depth` parameter to function `clicon_xml2cbuf`, default is -1.
2019-08-17 10:54:13 +02:00
Olof hagsand
48022e57b9 fixed CHANGELOG, restconf memleak, with-defaults test 2019-08-09 17:35:45 +02:00
Olof hagsand
df9e4734f9 Bugfix: multiple key cli bug, ambiguous commands in expand_dbvar 2019-08-04 17:07:11 +02:00
Olof hagsand
b73348e0cd * Revised RESTCONF->NETCONF insert/point translation
* Netconf edit-config "operation" attribute namespace check is enforced
2019-08-02 17:04:27 +02:00
Olof hagsand
2d9d204f69 * RESTCONF "insert" and "point" query parameters supported
* Yang Netconf leaf/leaf-list insert support
  * For "ordered-by user" leafs and leaf-lists, the insert and value/key attributes are supported according to RFC7950 Sections 7.7.9 and 7.8.6

* Fixed RESTCONF api-path leaf-list selection was not made properly
2019-07-31 14:04:27 +02:00
Olof hagsand
c1bae276ff * RESTCONF PUT/POST erroneously returned 200 OK. Instead restconf now returns:
* `201 Created` for created resources
  * `204 No Content` for replaced resources.
  * See [RESTCONF: HTTP return codes are not according to RFC 8040](https://github.com/clicon/clixon/issues/56)

* HTTP `Location:` fields added in RESTCONF POST replies
2019-07-25 13:15:31 +02:00
Olof hagsand
e7b60619da * Pushed tag to 4.0.1.PRE
* Restconf RFC 8040 increased feature compliance
  * Cache-Control: no-cache added in HTTP responses (RFC Section 5.5)
  * Restconf monitoring capabilities (RFC Section 9.1)
* Added support for Yang extensions
  * New plugin callback: ca_extension
  * Main backend example includes example code on how to implement a Yang extension in a plugin.
* JSON changes
  * Non-pretty-print output removed all extra spaces.
    * Example: `{"nacm-example:x": 42}` --> {"nacm-example:x":42}`
  * Empty JSON container changed from `null` to `{}`.
    * Empty list and leafs remain as `null`
* Removed unnecessary configure dependencies
  * libnsl, libcrypt, libm, if_vlan,...
* pseudo-plugin added, to enable callbacks also for main programs. Useful for extensions
* Yang Unique statements with multiple schema identifiers did not work on some platforms due to memory error.
2019-07-23 22:11:14 +02:00
Olof hagsand
e44685a100 Replaced strchr with nodeid_split
Experimental code for replacing identityref lists with module:id instead of prefix:id
2019-07-10 17:18:34 +02:00
Olof hagsand
40d5b99d3b Reverted some of the nsc xpath API changes. In the revert, xpath_first() and xpath_vec() retain their old syntax with nsc==NULL.
The reason is to be conservative with the API. However, less used functions, such as xpath_vec_bool(), xpath_vec_ctx() and xpath_vec_flag()  are changed with a new `nsc`parameter, which should be set to NULL in most cases.
2019-07-09 12:19:03 +02:00
Olof hagsand
67b8685bab The Clixon API has been extended with namespaces, or namespace contexts in the following cases:
* CLIspec functions have added namespace parameter:
    * `cli_show_config <db> <format> <xpath>` --> `cli_show_config <db> <format> <xpath> <namespace>`
    * `cli_copy_config <db> <xpath> ...` --> `cli_copy_config <db> <xpath> <namespace> ...`
  * Xpath API
    * `xpath_first(x, format, ...)` --> `xpath_first(x, nsc, format, ...)`
    * `xpath_vec(x, format, vec, veclen, ...)` --> `xpath_vec(x, nsc, format, vec, veclen, ...)`
    * `xpath_vec_flag(x, format, flags, vec, veclen, ...)` --> `xpath_vec_flag(x, format, flags, vec, veclen, ...)`
    * `xpath_vec_bool(x, format, ...)` --> `xpath_vec_bool(x, nsc, format, ...)`
    * `xpath_vec_ctx(x, xpath, xp)` --> `xpath_vec_ctx(x, nsc, xpath, xp)`
  * xmldb_get0 has an added `nsc` parameter:
    * `xmldb_get0(h, db, xpath, copy, xret, msd)` --> `xmldb_get0(h, db, nsc, xpath, copy, xret, msd)`
  * The plugin statedata callback (ca_statedata) has been extended with an nsc parameter:
    * `int example_statedata(clicon_handle h, cvec *nsc, char *xpath, cxobj *xstate);`
  * rpc get and get-config api function has an added namespace argument:
    * `clicon_rpc_get_config(clicon_handle h, char *db, char *xpath, char *namespace, cxobj **xt);`
    * `int clicon_rpc_get(clicon_handle h, char *xpath, char *namespace, cxobj **xt);`
2019-07-08 10:36:37 +02:00
Olof hagsand
73d8e97a01 added template doc/INSTALL.md 2019-06-18 10:07:17 +02:00
Olof hagsand
daa01b3a5e Print CLICON_YANG_DIR and CLICON_FEATURE lists on startup with debug flag 2019-06-13 10:36:37 +02:00
Olof hagsand
dc45600074 Yang 'refine' feature supported, According to RFC 7950 7.13.2 2019-06-05 10:23:49 +02:00
Olof hagsand
2aeb925521 * JSON parse and print improvements
* Integrated parsing with namespace translation and yang spec lookup
2019-06-03 16:40:54 +02:00
Olof hagsand
5706703ab4 Added support for inverted regexps 2019-05-29 14:39:36 +02:00