Olof hagsand
c90aa8371c
* Fixed [identityref validation fails when using typedef #87 ]( https://github.com/clicon/clixon/issues/87 )
2019-06-20 15:35:57 +02:00
Olof hagsand
97529a20a4
* Error messages for invalid number ranges and string lengths have been uniformed and changed.
...
* Error messages for invalid ranges are now on the form:
```
Number 23 out of range: 1-10
String length 23 out of range: 1-10
```
2019-06-20 13:59:55 +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
daa01b3a5e
Print CLICON_YANG_DIR and CLICON_FEATURE lists on startup with debug flag
2019-06-13 10:36:37 +02:00
Olof hagsand
98cc62eace
Fixed a problem with some netconf error messages caused restconf daemon to exit due to no XML encoding
2019-06-12 18:15:44 +02:00
Olof hagsand
de15b2bf80
* RESTCONF strict namespace validation of data in POST and PUT.
...
* Accepted:
```
curl -X PUT http://localhost/restconf/data/mod:a -d {"mod:a":"x"}
```
* Not accepted (must prefix "a" with module):
```
curl -X PUT http://localhost/restconf/data/mod:a -d {"a":"x"}
```
* Undefine `RESTCONF_NS_DATA_CHECK` in include/clixon_custom.h to disable strict check.
2019-06-10 16:15:02 +02:00
Olof hagsand
40f3d48f2b
Restconf uri with mismatching keys problem
2019-06-10 13:56:06 +02:00
Olof hagsand
fc78824110
Many validation functions have changed error parameter from cbuf to xml tree.
2019-06-10 12:49:40 +02:00
Olof hagsand
dfa3970ab2
RESTCONF PUT list key problems
2019-06-08 16:32:56 +02:00
Olof hagsand
97079b0a88
Fixed side-effect of RESTCONF PUT key-match patch
2019-06-08 10:17:56 +02:00
Olof hagsand
519fac186c
Extended util/clixon_util_xml with yang and validate functionality so it can be used as a stand-alone utility for validating XML/JSON files
2019-06-07 10:16:03 +02:00
Olof Hagsand
42a974bf78
mem problem in refine/augment code
2019-06-05 09:54:13 +00: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
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
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
f7771d86c2
* Better compliance with XSD regexps (when transforming to Posix regexps)
...
* Added `\p{L}` and `\p{N}`
* Added escaping of `$`
* Added regexp [test/test_pattern.sh]
2019-05-22 20:21:48 +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
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
b4f860b5ef
Merge branch 'master' of https://github.com/clicon/clixon
2019-05-15 11:16:43 +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
0b0fef12cc
Merge branch 'master' of https://github.com/clicon/clixon
2019-05-14 14:11:43 +02:00
Olof hagsand
d775eb5374
* Improved submodule implementation, as part of [Yang submodule import prefix restrictions #60 ]( https://github.com/clicon/clixon/issues/60 ).
2019-05-14 14:09:02 +02:00
Olof hagsand
e68a5ffa97
cli history file long string test
2019-05-10 16:49:00 +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
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
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
2fc37d2470
Yang "unique" feature supported according to RFC 7950 7.8.3
2019-05-03 14:03:10 +02:00
Olof hagsand
220a872188
Fixed a problem caused by recent sorting patches that made "ordered-by user" lists fail in some cases, causing multiple list entries with same keys. NACM being one example. Thanks vratnikov!
2019-04-29 16:31:38 +02:00
Olof hagsand
4e23864acd
Merge branch 'master' of https://github.com/clicon/clixon
2019-04-26 13:41:14 +02:00
Olof hagsand
50ca7b7845
New XMLDB_FORMAT added: tree. An experimental record-based tree database for direct access of records.
2019-04-26 13:38:55 +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
e4239496a8
Yang access function. Mem leak in USE_XML_INSERT
2019-04-25 13:46:23 +02:00
Olof hagsand
77ad42f1ce
startup measurements: test, plot and report
2019-04-23 11:57:18 +02:00
Olof hagsand
6a0628141a
More performance tweaks
2019-04-21 17:29:11 +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
c3d9b392dd
Scaling large lists report
2019-04-17 15:50:38 +02:00
Olof hagsand
d46ca41c8b
Further optimizions and bugfixing of that
2019-04-16 12:09:21 +02:00
Olof hagsand
71da2ac6cb
Merge branch 'master' of https://github.com/clicon/clixon
2019-04-14 14:43:20 +02:00
Olof hagsand
c79baf1b1f
* Optimized validation of large lists
...
* New xmldb_get1() returning actual cache - not a copy. This has lead to some householding instead of just deleting the copy
* xml_diff rewritten to work linearly instead of O(2)
* New xml_insert function using tree search. The new code uses this in insertion xmldb_put and defaults. (Note previous xml_insert renamed to xml_wrap_all)
2019-04-14 14:36:41 +02:00
Olof hagsand
0a951899c8
test_type run twice with/without dbcache
2019-04-11 13:22:37 +02:00
Olof hagsand
cf7675dfac
Experimental customized error output strings, see [lib/clixon/clixon_err_string.h]
2019-04-11 12:45:31 +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
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