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
6d46087109
Documented bug [Yang identityref XML encoding is not general #90 ]( https://github.com/clicon/clixon/issues/90 )
2019-07-11 12:11:45 +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
bb04f778ab
documentation
2019-07-09 13:15:25 +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
1f8c759f3d
Merge branch 'master' of https://github.com/clicon/clixon .
...
Added new API function `xpath_parse()` to split parsing and xml evaluation.
2019-07-08 14:47:18 +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
fe35e181fd
identityref errmsg memory error
2019-06-20 15:56:02 +02:00
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
008agent
bf2a9bfdfc
Update clixon_xml_map.c
2019-06-19 23:00:30 +03:00
Vladimir Ratnikov
631b1d4558
api_path2xml_vec strict mode check on list key length mismatch
2019-06-19 15:52:20 -04:00
Olof hagsand
e5a1c821e9
making USE_XML_INSERT permanent
2019-06-15 11:48:20 +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
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
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
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
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
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
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
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
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
a5e955c95f
Fixed an ordering problem showing up in validate/commit callbacks. If two new items following each order (yang-wise), only the first showed up in the new-list. Thanks achernavin!
2019-04-30 15:46:40 +02:00
Olof hagsand
16de5f47ba
Merge branch 'master' of https://github.com/clicon/clixon
2019-04-24 15:35:57 +02:00
Olof hagsand
65c809b1c3
Removed external direct access to the yang_stmt struct.
2019-04-24 15:13:19 +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
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
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
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
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
a529546c88
Merge branch 'master' of https://github.com/clicon/clixon
2019-02-28 13:11:22 +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
057f4835db
Did not check for missing list keys in validate. [Key of a list isn't mandatory]( https://github.com/clicon/clixon/issues/73 )
2019-02-13 18:19:33 +01:00
Olof hagsand
ea8c84a372
Added new log function: clicon_log_xml() for logging XML tree
2019-02-13 11:35:49 +01:00
Olof hagsand
ffecebf32a
* NACM Data node READ access module support (RFC8341 3.4.5)
...
* Access control points added for `get` and `get-config` in addition to incoming rpc.
* RFC 8341 Example A.2 implemented, see: [test/test_nacm_module.sh]
* Added `username` argument on `xmldb_put()` datastore function for NACM data-node write checks
* Added `xml_rootchild_node()` lib function as variant of `xml_rootchild()`
2019-01-27 13:26:15 +01:00
Olof hagsand
0267afcb21
* Added -o "<option>=<value>" command-line option to all programs: backend, cli, netconf, restconf.
...
* Added -p <dir> command-line option to all programs: backend, cli, netconf, restconf.
* Moved and updated all standard ietf and iana yang files from example and yang/ to `yang/standard`.
* Renamed example yang from example.yang -> clixon-example.yang
2019-01-13 17:34:15 +01:00
Olof hagsand
207858e20d
* Support of yangmodels supported, see test_yangmodels.sh
...
* Added -o "<option>=<value>" command-line option to all programs: backend, cli, netconf, restconf.
* Ignore CR(\r) in yang files for DOS files
2019-01-10 20:52:19 +01:00
Olof hagsand
c7e847cd24
Keyword "min" (not only "max") can be used in built-in types "range" and "length" statements.
2019-01-06 22:11:59 +01:00
Olof hagsand
5b6af82e29
Validation of mandatory choice and recursive mandatory containers.
2019-01-05 11:08:16 +01:00