Commit graph

23 commits

Author SHA1 Message Date
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
2a766c5adf zerocopy memleak 2019-07-13 13:40:14 +00: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
3bad8bc874 * startup_extraxml triggers unnecessary validation
* Renamed startup_db_reset -> xmldb_db_reset (its a general function)
  * In startup_extraxml(), check if reset callbacks or extraxml file actually makes and changes to the tmp db.
2019-06-14 22:01:30 +02:00
Olof hagsand
3dba0b5370 Restore xmldb_get() to original (but removed one parameter
Moved all zero-copy xmldb_get functions to xmldb_get0.
Clarified CHANGELOG for xmldb_get changes
2019-06-04 11:14:03 +02:00
Olof hagsand
99b7a1fe5b Clixon config option CLICON_XMLDB_CACHE renamed to CLICON_DATASTORE_CACHE and changed type from boolean to datastore_cache 2019-05-09 14:25:16 +02:00
Olof hagsand
70221742f7 Merge branch 'master' of https://github.com/clicon/clixon 2019-05-08 13:05:51 +02:00
Olof hagsand
06e6ef80d1 Non-key list now not accepted in edit-config (before only on validation) 2019-05-08 12:51:10 +02:00
Olof hagsand
1cfb190ea9 * Changed return values in internal functions: netconf_trymerge, startup_module_state, yang_modules_state_get 2019-05-07 13:26:34 +02:00
Olof hagsand
6a0628141a More performance tweaks 2019-04-21 17:29:11 +02:00
Olof hagsand
8c36083e16 * A yang type regex cache added, this helps the performance by avoiding re-running the regcomp command on every iteration.
* An XML namespace cache added (see `xml2ns()`)
* Better performance of XML whitespace parsing/scanning.
2019-04-19 16:01:39 +02:00
Olof hagsand
b714eff077 Failure in startup with -m startup or running left running_db cleared. 2019-04-18 12:20:31 +02:00
Olof hagsand
e29cd7cfb9 * Optimized validation by making xml_diff work on raw cache tree (not copies)
* xmldb_get() removed unnecessary config option
2019-04-07 15:55:53 +02:00
Olof hagsand
b5f1f7346e Structural C-code change: Merged yang_spec and yang_node types into yang_stmt 2019-04-02 12:27:33 +02:00
Olof Hagsand
1d2a001597 memleak 2019-03-31 20:38:33 +02:00
Olof hagsand
98a5ebc76e * Structural change: removed datastore plugin and directory, and merged into regulat clixon lib code.
* Moved out code from clixon_options.[ch] into a new file: clixon_data.[ch]
2019-03-31 18:17:40 +02:00
Olof hagsand
6ff36a2894 * Added xml_wrap function that adds an XML node above a node as a wrapper
* also renamed `xml_insert` to `xml_wrap_all`.
* Added `clicon_argv_get()` function to get the user command-line options, ie the args in `-- <args>`. This is an alternative to using them passed to `plugin_start()`.
2019-03-27 16:04:14 +01:00
Olof hagsand
b9df1ed5b3 mem-leak 2019-03-25 11:26:57 +01:00
Olof hagsand
a0abf8436e XML chanelog revision 2019-03-25 10:42:27 +01:00
Olof hagsand
932ca2e8ce Changed (startup) running mode so that startup_db is not overwritten.
This changes the upgrade semantics for running mode which will have to
be accounted for later.
2019-03-12 09:56:09 +01:00
Olof hagsand
4d3c61735c Ensure non-modstate enabled backends ignore the modstate 2019-02-28 16:03:23 +01:00
Olof hagsand
2394c6f46e Merge branch 'modules-state' 2019-02-26 16:53:59 +01:00
Olof hagsand
560110b4e8 * New backend startup and upgrade support, see [doc/startup.md] for details
* Datastore files contain RFC7895 module-state information
2019-02-26 15:48:15 +01:00