Commit graph

1517 commits

Author SHA1 Message Date
Olof hagsand
56f32371ce * Backend plugin returning NULL was still installed - is now logged and skipped.
* [Parent list key is not validated if not provided via RESTCONF #83](https://github.com/clicon/clixon/issues/83), thanks achernavin22.
2019-04-11 11:25:42 +02:00
Olof hagsand
881dd56ee1 Empty leaf values, eg <a></a> are now checked at vlidation. 2019-04-10 17:35:36 +02:00
Olof hagsand
6bfa510ea3 [Invalid JSON if GET /operations via RESTCONF #82](https://github.com/clicon/clixon/issues/82), thanks achernavin22 2019-04-09 16:32:17 +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
473d82a8a3 NACM read default rule did not work properly if nacm was enabled AND no group\
s were defined
2019-04-07 15:49:19 +02:00
Olof Hagsand
24181a2933 Adaptions for ARMv7 2019-04-07 15:49:19 +02:00
Olof hagsand
ed62c33a79 xpath parser scan strings instead of characters 2019-04-02 11:01:01 +02:00
Olof hagsand
a68174897d leaf-list default; yangmodels/junos models 2019-04-01 16:04:02 +02:00
Olof hagsand
c1b489c8db Merge branch 'develop' 2019-03-31 20:54:44 +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
5123dbb3ac memtest fixes 2019-03-29 16:48:51 +01:00
Olof Hagsand
38991084a5 mem.sh with more than one target 2019-03-28 21:57:28 +01:00
Olof hagsand
b10c3c5727 more upgrade-interfaces test cases 2019-03-28 10:56:53 +01:00
Olof hagsand
be59bd48d8 upgrade example and test 2019-03-27 18:04:01 +01: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
8624be0a67 xml changelog next iteration 2019-03-26 12:04:51 +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
3f68cca06c * New yang changelog experimental feature for automatic upgrade
* Added modules-state diff parameter to xmldb_get datastore function for startup scenarios.
* Allowed Yang extended Xpath functions (syntax only):
  * re-match, deref, derived-from, derived-from-or-self, enum-value, bit-is-set
* XSD regular expression handling of dash(`-`)
  *: Translate XDS `[xxx\-yyy]` to POSIX `[xxxyyy-]`.
* YANG Anydata treated same as Anyxml
2019-03-21 18:05:55 +01:00
Olof hagsand
e8983a4be5 Upgrade repair test and docs 2019-03-19 10:04:16 +01:00
Olof hagsand
7b30b7a9e0 ordering problems 2019-03-18 21:59:41 +01:00
Olof hagsand
789732c613 xml sort adjust to different yang models
global yang ordering for top-level xml symbols
2019-03-18 19:15:21 +01:00
Olof hagsand
606245ef02 * Added flags to example backend to control its behaviour:
* Start with `-- -r` to run the reset plugin
  * Start with `-- -s` to run the state callback
* Rewrote yang dir load algorithm to follow the algorithm in [FAQ](FAQ(doc/FAQ.md#how-are-yang-files-found) with more precise timestamp checks, etc.
2019-03-18 16:31:34 +01:00
Olof hagsand
8f656da15b Bugfix: [Nodes from more than one of the choice's branches exist at the same time](https://github.com/clicon/clixon/issues/81) 2019-03-14 16:33:10 +01:00
Olof hagsand
b3cd48468d Cleaned up after regression tests. New upgrade running docs. 2019-03-13 13:26:04 +01:00
Olof hagsand
29535d5997 Bugfix: Default NACM policies applied even if NACM is disabled 2019-03-13 11:35:11 +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
b03f8332e1 * CLI history: [Preserve CLI command history across sessions. The up/down arrows](https://github.com/clicon/clixon/issues/79)
* The design is similar to bash history:
      * The CLI loads/saves its complete history to a file on entry and exit, respectively
      * The size (number of lines) of the file is the same as the history in memory
      * Only the latest session dumping its history will survive (bash merges multiple session history).
      * Tilde-expansion is supported
      * Files not found or without appropriate access will not cause an exit but will be logged at debug level
  * New config options: CLICON_CLI_HIST_FILE with default value `~/.clixon_cli_history`
  * New config options: CLICON_CLI_HIST_SIZE with default value 300.
2019-03-08 11:26:07 +01:00
Olof hagsand
5602d3e987 forgot exit in testcase 2019-03-06 10:37:01 +01:00
Olof hagsand
8cfd72c2c5 Merge branch 'develop' 2019-03-06 09:44:43 +01:00
Olof hagsand
98fb6eceef * Clixon configuration file top-level symbols has changed to clixon-configand namespace check is enforced.
* clixon-config YAML file has new revision: 2019-03-05.
  * New URN and changed top-level symbol to `clixon-config`
* Removed obsolete `_CLICON_XML_NS_STRICT` variable and `CLICON_XML_NS_STRICT` config option.
2019-03-06 09:42:55 +01:00
Olof hagsand
01c8b0b836 * [Identityref inside augment statement](https://github.com/clicon/clixon/issues/77)
* Yang-stmt enhanced with "shortcut" to original module
2019-03-05 22:42:13 +01:00
Olof hagsand
4b17af0278 * Strict XML Prefixed namespace check
* Yang augment created multiple augmented children (no side-effect)
* XML prefixed attribute names were not copied into the datastore
2019-03-04 19:15:23 +01:00
Olof hagsand
b182e8666f [yang type range statement does not support multiple values](https://github.com/clicon/clixon/issues/59)
[Multiple ranges support](https://github.com/clicon/clixon/issues/78)
Restructured "cb" parameter in cli_generate.c
2019-03-04 14:36:43 +01:00
Olof hagsand
fc93051b87 Fixed numeric ordering of lists (again) [https://github.com/clicon/clixon/issues/64] It was previously just fixed for leaf-lists. 2019-02-28 17:07:24 +01:00
Olof hagsand
4d3c61735c Ensure non-modstate enabled backends ignore the modstate 2019-02-28 16:03:23 +01:00
Olof Hagsand
00335452fa Added long.sh test for continuous restconf test 2019-02-28 13:13:39 +01:00
Olof Hagsand
3dd67474e0 Merge branch 'master' of https://github.com/clicon/clixon 2019-02-28 13:12:06 +01:00
Olof Hagsand
a529546c88 Merge branch 'master' of https://github.com/clicon/clixon 2019-02-28 13:11:22 +01:00
Olof Hagsand
ceb5df2050 * New xml_isancestor xml function
* Fixed memleak test for upgrade
2019-02-27 16:33:51 +01:00
Olof Hagsand
f035c3ca23 * Removed all dependency on strverscmp
* Added libgen.h for baseline()
2019-02-27 10:46:05 +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
Olof hagsand
83edd29678 Revert "Revert "* Added valgrind memory leak tests in testmem.sh for restconf""
This reverts commit a73d2bd242.
2019-02-20 16:25:42 +01:00
Olof hagsand
a73d2bd242 Revert "* Added valgrind memory leak tests in testmem.sh for restconf"
String error
This reverts commit 6e63f0a77b.
2019-02-20 16:19:07 +01:00
Olof Hagsand
6e63f0a77b * Added valgrind memory leak tests in testmem.sh for restconf
* Added clicon_socket_set() and clicon_socket_get() functions for cleaning up backend server and restconf FCGI socket on termination.
* Removed obsolete `-x` command-line option to clixon_cli.
2019-02-20 13:06:18 +01:00
Olof hagsand
28bd698968 [Issue with bare axis names](https://github.com/clicon/clixon/issues/54) 2019-02-19 22:56:18 +01:00
Olof hagsand
7e4cce0000 test docs 2019-02-19 13:32:03 +01:00
Olof hagsand
4c0b412e9f Added valgrind memory leak tests for backend. Fixed some minor leaks and file descriptor closes. 2019-02-19 13:16:59 +01:00
Olof hagsand
286c2ec04f Added valgrind memory leak tests in testmem.sh for cli and netconf 2019-02-18 16:05:51 +01:00