Olof hagsand
55f9b7cab0
Added CLIgen tab-modes in config option CLICON_CLI_TAB_MODE, which means you can control the behaviour of <tab> in the CLI.
2019-05-29 20:11:31 +02:00
Olof Hagsand
2ae9529a3e
added regexp free routines, replaced regexp mode string with symbol
2019-05-29 14:17:30 +00:00
Olof hagsand
5706703ab4
Added support for inverted regexps
2019-05-29 14:39:36 +02:00
Olof hagsand
2fe185d683
* Support for multiple patterns as described in RFC7950 Section 9.4.7
...
* Added regex cache to type resolution
* Added compiled regexp parameter as part of internal yang type resolution functions
* All internal `ys_populate_*()` functions (except ys_populate()) have switched parameters: `clicon_handle, yang_stmt *)`
2019-05-29 11:39:09 +02:00
Olof hagsand
5b39b63698
Added --with-libxml2 to configure
2019-05-24 10:04:29 +02:00
Olof hagsand
e55a27bcac
Check for libxml2 include files, not lib in code
2019-05-23 22:55:46 +02:00
Olof hagsand
a804e05375
* Added clicon_handle as parameter to all validate functions
...
* Added libxml2 XSD regexp mode as alternative to posix translation
* Added `CLICON_YANG_REGEXP` option with possible values libxml2 and posix
2019-05-23 22:48:33 +02:00
Olof Hagsand
a7af7e7593
memleaks
2019-05-22 18:27:53 +00:00
Olof hagsand
7e109d1d4b
Startup transactions did not mark added tree with XML_FLAG_ADD as it should
2019-05-21 10:55:16 +02:00
Olof hagsand
bc54f2d04c
* Regexp improvements
...
* Added check for libxml in configure';
* Added clixon_util_regexp utility function
* Yang state get improvements
* Integrated state and config into same tree on retrieval, not separate trees
* Added cli functions `cli_show_config_state()` and `cli_show_auto_state()` for showing combined config and state info.
* Added integrated state in the main example: `interface/oper-state`.
* Added performance tests for getting state, see [test/test_perf_state.sh].
2019-05-20 16:03:29 +02:00
Olof hagsand
c17784cfe9
Removed O(n^2) in cli expand/completion code
2019-05-16 20:08:25 +02:00
Olof hagsand
47889a9b0a
Check restconf PUT different keys for leaf-list
2019-05-15 18:35:28 +02:00
Olof hagsand
712d8a6ff1
Restconf PUT different keys detected (thanks @dcornejo) and fixed
2019-05-15 17:38:52 +02:00
Olof hagsand
6f294fe67a
Yang Enumeration including space did not generate working CLIgen code, see [Choice with space is not working in CLIgen code]( https://github.com/olofhagsand/cligen/issues/24 )
2019-05-15 11:12:23 +02:00
Olof hagsand
b103599a1a
* Clixon transaction mechanism has changed which may affect your backend plugin callbacks:
...
* Validate-only transactions are terminated by an `end` or `abort` callback.
* If a commit user callback fails, a new `revert` callback will be made to plugins that have made a succesful commit.
2019-05-10 14:45:23 +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
c529847790
* Yang "min-element" and "max-element" feature supported
...
* New Clixon Yang RPC: ping. To check if backup is running.
* Fixed support for multiple datanodes in a choice/case statement.
2019-05-07 11:47:30 +02:00
Olof hagsand
6bf2a74e24
* Restconf with startup feature will now copy all edit changes to startup db (as it should according to RFC 8040)
...
* See [Restconf does not handle startup datastore according to the RFC](https://github.com/clicon/clixon/issues/74 )
* Netconf Startup feature is no longer hardcoded, you need to explicitly enable it (See RFC 6241, Section 8.7)
* Enable in config file with: `<CLICON_FEATURE>ietf-netconf:startup</CLICON_FEATURE>`, or use `*:*`
2019-04-26 12:12:55 +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
728c97ab6d
Failure in startup - modified to handle memory exhaustion when loading file
2019-04-18 15:38:15 +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
cef0dc5a22
* Added yang access functions
...
* Change all y->ys_parent to yang_parent_get(y)
* Change all y->ys_keyword to yang_keyword_get(y)
* Change all y->ys_argument to yang_argument_get(y)
* Change all y->ys_cv to yang_cv_get(y)
* Change all y->ys_cvec to yang_cvec_get(y)
2019-04-11 15:53:25 +02:00
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
4a1e0f2cbc
xmldb_get cache bug
2019-04-10 15:58:21 +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
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
4de15343c9
optimize
2019-04-02 11:46:28 +02:00
Olof hagsand
c1b489c8db
Merge branch 'develop'
2019-03-31 20:54:44 +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
c07577b42b
startup diff vector should be children of config root, not root itself
2019-03-29 15:31:00 +01:00
Olof hagsand
60cb87f998
Removed argc/argv parameters from ca_start plugin API function. You may need to change signatures of your startup in your plugins
2019-03-28 17:11:55 +01:00
Olof hagsand
cdbce7645e
Changed hash API for better error handling
2019-03-28 13:16:44 +01:00
Olof Hagsand
7ee4a151cf
guard CLICON_CLI_HIST_SIZE with CLIgen default
2019-03-28 09:19:43 +01:00
Olof hagsand
4902f7cf1d
Merge branch 'develop'
2019-03-27 16:32: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
7b9edd7112
ret error
2019-03-25 14:31:21 +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
69dcc721a9
* Added CLICON_NACM_MODE "internal-rpc" which is for RPC functionality only
2019-03-22 17:09:05 +01:00
Olof Hagsand
0898870e68
Re-inserted cli_output_reset for what was erroneuos thought to be an obsole\
...
te function
2019-03-22 16:13:51 +01:00
Olof Hagsand
9d64ddd305
handle null
2019-03-21 20:51:57 +01:00
Olof Hagsand
10d45bcee3
Memory leaks and errors
2019-03-21 20:36:47 +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