Commit graph

623 commits

Author SHA1 Message Date
Olof hagsand
32ea957a52 CLICON_XML_SORT option (in clixon-config.yang) has been removed and set to true permanently since setting it to false is obsolete. 2019-01-02 17:43:58 +01:00
Olof hagsand
0103d58994 2019 2019-01-02 15:48:30 +01:00
Olof hagsand
0baebc93fd * 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.
* For backward compatibility, load of startup and running set CLICON_XML_NS_STRICT to false temporarily.
* Added three-valued return values for several validate functions where -1 is fatal error, 0 is validation failed and 1 is validation OK.
  * This includes: `xmldb_put`, `xml_yang_validate_all`, `xml_yang_validate_add`, `xml_yang_validate_rpc`, `api_path2xml`, `api_path2xpath`
* Added new xml functions for specific types: `xml_child_nr_notype`, `xml_child_nr_notype`, `xml_child_i_type`, `xml_find_type`.
2019-01-02 15:18:29 +01:00
Olof hagsand
861300d6c0 netconf error handling and test summary script 2018-12-21 14:44:59 +01:00
Olof hagsand
f872c7e295 * More precise Yang validation and better error messages
* For Example, adding bad-, missing-, or unknown-element error messages, etc instead of operation-failed
* 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.
* Added example_rpc RPC to example backend
* Renamed xml_namespace[_set]() to xml_prefix[_set]()
* Some restconf error messages contained "rpc-reply" or "rpc-error" which have now been removed.
* Netconf/Restconf RPC extra input arguments are ignored (https://github.com/clicon/clixon/issues/47)
2018-12-21 01:33:41 +01:00
Olof hagsand
03e618b1e5 Merge branch 'nacm' into develop 2018-12-16 19:53:46 +01:00
Olof hagsand
ae1af8da9e * NACM extension (RFC8341)
* NACM module support (RFC8341 A1+A2)
   * Recovery user "_nacm_recovery" added.
     * Example use is restconf PUT when NACM edit-config is permitted, then automatic commit and discard are permitted using recovery user.
   * Example user changed adm1 to andy to comply with RFC8341 example

 * Yang code upgrade (RFC7950)
   * RPC method input parameters validated
     * see https://github.com/clicon/clixon/issues/4
* Correct XML namespace handling
   * XML multiple modules was based on "loose" 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), and causes problems with overlapping names and false positives. Below see XML accepted (but wrong), and correct namespace declaration:
```
      <rpc><my-own-method></rpc> # Wrong but accepted
      <rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> # Correct
        <my-own-method xmlns="http://example.net/me/my-own/1.0">
      </rpc>
```
   * To keep old loose semantics set config option CLICON_XML_NS_ITERATE (true by default)
   * XML to JSON translator support for mapping xmlns attribute to module name prefix.
   * Default namespace is still "urn:ietf:params:xml:ns:netconf:base:1.0"
   * See https://github.com/clicon/clixon/issues/49
* Changed all make tags --> make TAGS
* Keyvalue datastore removed (it has been disabled since 3.3.3)
* debug rpc added in example application (should be in clixon-config).
2018-12-16 19:49:19 +01:00
Olof hagsand
f071e0b332 prioritized roadmap 2018-12-08 18:13:27 +01:00
Olof hagsand
e5c0b06cf9 Move NACM files from backend to lib src dir 2018-12-08 11:22:26 +01:00
Olof hagsand
66ce941ac4 minor cardinality patch 2018-12-06 10:06:13 +01:00
Olof hagsand
7d5bfe5c81 YANG parser cardinality checked (https://github.com/clicon/clixon/issues/48) 2018-12-05 22:18:28 +01:00
Olof hagsand
9377986c81 testing of yang load ocnfig options 2018-12-04 20:04:16 +01:00
Olof hagsand
ac1aa44fc4 * Yang 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.
* 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
* Removed return value ymodp from yang parse functions (eg yang_parse()).
* New config option: CLICON_CLI_MODEL_TREENAME defining name of generated syntax tree if CLIXON_CLI_GENMODEL is set.
2018-12-03 21:16:35 +01:00
Olof hagsand
d09a8c08aa getopt return value changed from char to int (https://github.com/clicon/clixon/issues/58) 2018-12-01 18:34:52 +01:00
Olof hagsand
39a5086218 * Yang Support of submodule, include and belongs-to.
* Improved unknown handling
* Configure option `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
2018-12-01 18:17:42 +01:00
Olof hagsand
56da97cb5b Openconfig yang specs parsed: https://github.com/openconfig/public 2018-11-25 18:24:13 +01:00
Olof hagsand
4303406957 clixon_yang_cardinality files added 2018-11-18 20:58:18 +01:00
Olof hagsand
a8f0aad411 * Yang parser is stricter (see cardinality below) which may break parsing of slack yang specs.
* YANG parser cardinality checked (only modules level yet)
  * See https://github.com/clicon/clixon/issues/48
2018-11-18 20:55:57 +01:00
Olof hagsand
9c57902b96 * XML parser conformance to W3 spec
* Names lexically correct (NCName)
  * Syntactically Correct handling of '<?' (processing instructions) and '<?xml' (XML declaration)
  * XML prolog syntax for 'well-formed' XML
  * <!DOCTYPE (ie DTD) is not supported.
2018-11-18 13:22:08 +01:00
Olof hagsand
9bd0dc42c6 3.9 develop branch 2018-11-11 12:20:51 +01:00
Olof hagsand
9881fe7a92 Merge branch 'master' into develop 2018-11-11 11:53:39 +01:00
Olof hagsand
9bd67b21e6 3.8.0 version number 2018-11-11 11:52:52 +01:00
Olof hagsand
845bc875c2 Merge branch 'master' into develop 2018-11-11 11:47:00 +01:00
Olof hagsand
7ac57283f0 roadmap 2018-11-07 23:15:20 +01:00
Olof hagsand
33c8a3a25d roadmap 2018-11-07 23:10:26 +01:00
Olof hagsand
b92050686a Release 3.8.0 2018-11-06 22:44:00 +01:00
Olof hagsand
3fa04215d4 3.8.0 2018-11-06 22:41:48 +01:00
Olof hagsand
452844423e XPATH axis issue 2018-11-06 15:46:27 +01:00
Olof hagsand
e343ad6454 Mem leakage and test update for valgrind 2018-11-06 14:41:43 +01:00
Olof Hagsand
d5390fc808 docker master 2018-11-05 21:16:12 +00:00
Olof hagsand
a49c007800 3.8 delayed to Nov 8 2018-11-04 22:59:15 +01:00
Olof hagsand
40fac27c2e Merge branch 'develop' for 3.8 release 2018-11-04 22:45:42 +01:00
Olof Hagsand
02ce0f204b @ problem 2018-11-04 21:19:39 +00:00
Olof Hagsand
f1d56d05ec echo problem 2018-11-04 21:12:45 +00:00
Olof Hagsand
a097f87f21 @echo problem 2018-11-04 21:11:35 +00:00
Olof Hagsand
bd05950d44 cp xml in xml stream notify 2018-11-04 21:05:51 +00:00
Olof hagsand
5aad2e5383 Merge branch 'develop' of https://github.com/clicon/clixon into develop 2018-11-04 19:47:33 +01:00
Olof hagsand
c1b8921766 readme 2018-11-04 19:47:14 +01:00
Olof Hagsand
5eaba6fcbf Merge branch 'develop' of https://github.com/clicon/clixon into develop 2018-11-04 19:44:32 +01:00
Olof Hagsand
3038efdab0 readme 2018-11-04 19:44:03 +01:00
Olof hagsand
366cf041bd YANG keywords "action" and "belongs-to" implemented by syntactically by parser (but not proper semantics). 2018-11-04 18:36:55 +01:00
Olof Hagsand
270bf78e1f Backward compatible testing w streams. Nchan manual tests. 2018-11-04 16:56:56 +01:00
Olof hagsand
fdfbbcdb9e Restconf stream debugging and README 2018-11-04 15:59:16 +01:00
Olof Hagsand
09e2e767fe nchan stream tests 2018-11-04 15:39:02 +01:00
Olof hagsand
f2810e849f Fork fcgi handler for streams 2018-11-04 14:46:15 +01:00
Olof hagsand
911e6e6ed3 stream debugging 2018-11-01 21:34:27 +01:00
Olof hagsand
e0e2e355d7 stream debug and test 2018-10-30 22:54:19 +01:00
Olof hagsand
fa9b9c7e2e Stream debug and tests 2018-10-30 22:28:24 +01:00
Olof hagsand
e4adec413a test stream util function 2018-10-29 22:38:34 +01:00
Olof hagsand
7450eae046 * No space after ampersand escaped characters in XML https://github.com/clicon/clixon/issues/52
* Thanks @SCadilhac
2018-10-29 21:41:16 +01:00