# Clixon Changelog ## 3.9.0 (Preliminary Target: Mid-January 2019) ### Planned new features * [Roadmap](ROADMAP.md) ### Major New features * Correct XML namespace handling * XML multiple modules was based on non-strict semantics so that yang modules were found by iterating thorugh namespaces until a match was made. This did not adhere to proper [XML namespace handling](https://www.w3.org/TR/2009/REC-xml-names-20091208) as well as strict Netconf and Restconf namespace handling, which causes problems with overlapping names and false positives, and most importantly, with standard conformance. * There are still the following non-strict namespace handling: * Everything in ietf-netconf base syntax with namespace `urn:ietf:params:xml:ns:netconf:base:1.0` is default and need not be explicitly given * edit-config xpath select statement does not support namespaces * notifications do not support namespaces. * Below see netconf old (but wrong) netconf RPC: ``` ipv4 ``` This is the currently correct Netconf RPC: ``` # xmlns may be ommitted ipv4 ``` * Another example for restconf rpc with new correct syntax. Note that while Netconf uses xmlns attribute syntax, Restconf uses module name prefix. First the request: ``` POST http://localhost/restconf/operations/example:example) Content-Type: application/yang-data+json { "example:input":{ "x":0 } } ``` then the reply: ``` HTTP/1.1 200 OK { "example:output": { "x": "0", "y": "42" } } ``` * To keep previous non-strict namespace handling (backwards compatible), set CLICON_XML_NS_STRICT to false. * See https://github.com/clicon/clixon/issues/49 * Yang code upgrade (RFC7950) * YANG parser cardinality checked (https://github.com/clicon/clixon/issues/48) * See https://github.com/clicon/clixon/issues/84 * RPC method input parameters validated * see https://github.com/clicon/clixon/issues/47 * Support of submodule, include and belongs-to. * Parsing of standard yang files supported, such as: * https://github.com/openconfig/public - except [https://github.com/clicon/clixon/issues/60]. * See [test/test_openconfig.sh] * https://github.com/YangModels/yang - except vendor-specific specs * See [test/test_yangmodels.sh] * Improved "unknown" handling * More precise Yang validation and better error messages * Example: adding bad-, missing-, or unknown-element error messages, instead of operation-failed. * Validation of mandatory choice and recursive mandatory containers * Yang load file configure options changed * `CLICON_YANG_DIR` is changed from a single directory to a path of directories * Note CLIXON_DATADIR (=/usr/local/share/clixon) need to be in the list * CLICON_YANG_MAIN_FILE Provides a filename with a single module filename. * CLICON_YANG_MAIN_DIR Provides a directory where all yang modules should be loaded. * NACM (RFC8341) * Experimental support, no performance enhancements and need further testing * Incoming RPC Message validation is supported (3.4.4) * Data Node Access validation is supported (3.4.5), except: * rule-type data-node path is not supported * Outgoing noitification aithorization is _not_ supported (3.4.6) * RPC:s are supported _except_: * `copy-config`for other src/target combinations than running/startup (3.2.6) * `commit` - NACM is applied to candidate and running operations only (3.2.8) * Client-side RPC:s are _not_ supported. * Recovery user "_nacm_recovery" added. ### API changes on existing features (you may need to change your code) * Added `username` argument on `xmldb_put()` datastore function for NACM data-node write checks * Rearranged yang files * Moved and updated all standard ietf and iana yang files from example and yang/ to `yang/standard`. * Moved clixon yang files from yang to `yang/clixon` * New configure option to disable standard yang files: `./configure --disable-stdyangs` * This is to make it easier to use standard IETF/IANA yang files in separate directory * Renamed example yang from example.yang -> clixon-example.yang * clixon_cli -p (printspec) changed semantics to add new yang path dir (see minor changes). * Date-and-time type now properly uses ISO 8601 UTC timezone designators. * Eg 2008-09-21T18:57:21.003456 is changed to 2008-09-21T18:57:21.003456Z * Renamed yang file `ietf-netconf-notification@2008-07-01.yang` to `clixon-rfc5277`. * Fixed validation problems, see [https://github.com/clicon/clixon/issues/62] * Name confusion, the file is manually constructed from the rfc. * Changed prefix to `ncevent` * Stricter YANG choice validation leads to enforcement of structures like: `choice c{ mandatory true; leaf x` statements. `x` was not previously enforced. * Many hand-crafted validation messages have been removed and replaced with generic validations, which may lead to changed rpc-error messages. * CLICON_XML_SORT option (in clixon-config.yang) has been removed and set to true permanently. Unsorted XML lists leads to slower performance and old obsolete code can be removed. * Strict namespace setting can be a problem when upgrading existing database files, such as startup-db or persistent running-db, or any other saved XML file. * Removed `delete-config` support for candidate db since it is not supported in RFC6241. * Switched the order of `error-type` and `error-tag` in all netconf and restconf error messages to comply to RFC order. * Yang parser is stricter (see above) which may break parsing of existing yang specs. * XML namespace handling is corrected (see above) * For backward compatibility set config option CLICON_XML_NS_LOOSE * Yang parser functions have changed signatures. Please check the source if you call these functions. * Add `/usr/local/share/clixon` to your configuration file, or corresponding CLICON_DATADIR directory for Clixon system yang files. * Change all @datamodel:tree to @datamodel in all CLI specification files * If you generate CLI code from the model (CLIXON_CLI_GENMODEL). * For backward compatibility, define CLICON_CLI_MODEL_TREENAME_PATCH in clixon_custom.h ### Minor changes * Added make test from top-level * Added `xml_rootchild_node()` lib function as variant of `xml_rootchild()` * Added -o "