Commit graph

1274 commits

Author SHA1 Message Date
Olof hagsand
6f2c4a076d * Configuration directory
* A new configuration option `CLICON_CONFIGDIR` has been added for loading of extra config files
  * If not given, only the main configfile is loaded.
  * If given, and if the directory exists, the files in this directory will be loaded alphabetically AFTER the main config file in the following way:
    * leaf values are overwritten
    * leaf-list values are appended
  * You can override file setting with `-E <dir>` command-line option.
* New clixon-config@2020-10-01.yang revision
  * Added option for configuration directory: `CLICON_CONFIGDIR`
2020-10-01 11:04:25 +02:00
Olof hagsand
b3545871c0 * Added stricter check on schema-node identifier checking, such as for augments.
* These checks are now made at YANG loading time
2020-09-29 20:53:24 +02:00
Olof hagsand
101a8cb6e0 minor fixes 2020-09-27 17:15:36 +02:00
Olof hagsand
9984cfa1c8 Fixed: [default state data returned with get-config](https://github.com/clicon/clixon/issues/140)
* Generalized default code for both config and state
2020-09-27 17:14:28 +02:00
Olof hagsand
da54dae396 Added sanity check that a yang module name matches the filename 2020-09-25 13:39:13 +02:00
Olof hagsand
21ac47915b More XPath function support
* `count`, `name`, `contains`, `not`, as defined in [xpath 1.0](https://www.w3.org/TR/xpath-10)
  * `deref`, `derived-from` and `derived-from-or-self` from RFC7950 Section 10.
    * in particular in augment/when statements
  * Improved error handling
    * Verification of XPath functions is done at startup when yang modules are loaded, not when XPaths are evaluated.
    * Separation of "not found" and "not implemented" XPath functions
    * Both give a fatal error (backend does not start).
2020-09-25 11:52:06 +02:00
Olof hagsand
2994d2f9a9 comments and typos 2020-09-22 22:41:59 +02:00
Olof hagsand
c616aa1569 Added support for XPATH functions:
* `contains`,
  * `derived-from` and `derived-from-or-self`
    * in particular in augment/when statements as shown in eg RFC 7950.
2020-09-22 22:40:42 +02:00
Olof hagsand
6d7b76550f Merge branch 'shmuelnatan-master' 2020-09-15 14:23:41 +02:00
Olof hagsand
9a76899482 Fixed cli show conflicts for https://github.com/clicon/clixon/pull/137 2020-09-15 14:22:40 +02:00
Olof hagsand
41ef682bdd 4.8.0.PRE 2020-09-15 12:12:26 +02:00
Olof hagsand
bf102ca575 4.7.0 2020-09-14 11:48:51 +02:00
Olof hagsand
70bdaf83bd clixon 4.7.0 2020-09-14 11:30:39 +02:00
Olof hagsand
1d333e39d1 4.7 preparations 2020-09-14 09:21:54 +02:00
Olof hagsand
6c22935463 code comments 2020-09-12 13:04:59 +02:00
Olof hagsand
bc96a86b0f Changed semantics of to "disable NACM if there is no _NACM_ configuration", instead of "disable NACM if there is no _configuration_". 2020-09-12 12:42:17 +02:00
Olof hagsand
27bb0a1d2b * Fixed: Restconf failed put/post could leave residue in candidate causing errors in next put/post
* Added -v option for backend plugins to generate validation error
2020-09-10 18:09:17 +02:00
Olof hagsand
a61bdffbab evhtp mem leak, debug 1->2 2020-09-10 18:06:44 +02:00
Olof hagsand
804b329301 rearranged default code to be outside of copying in xml_get inner loop, and that no defaults are computed if no yang binding is made 2020-09-09 15:52:54 +02:00
Olof hagsand
8f8b49331f Debug messages
* Added cli command debug printf on debug level 1
  * Moved all parse debug printfs to level 3
2020-09-09 11:12:14 +02:00
Olof hagsand
5b5dce7e39 Fixed: [clixon_netconf does not respond to hello #136](https://github.com/clicon/clixon/issues/136)
* The error showed only when CLICON_MODULE_LIBRARY_RFC7895 was disabled.
2020-09-08 15:59:12 +02:00
Olof hagsand
1ef3c0db7a Fixed: Do not check min/max constraints on state data in config validate code 2020-09-08 13:25:28 +02:00
Olof hagsand
2c96cf71ea Changed main example: removed translate yang and replaced testcases w table/parameter 2020-09-08 11:39:55 +02:00
Olof hagsand
06855f2ea7 Merge branch 'master' of https://github.com/clicon/clixon 2020-09-08 10:49:43 +02:00
Olof hagsand
a61da8715d Fixed: [min-elements attribute prevents from deleting list entries #133](https://github.com/clicon/clixon/issues/133) 2020-09-08 10:47:43 +02:00
Olof Hagsand
afe64cbd5e cicd tests 2020-09-07 16:15:12 +00:00
Olof hagsand
1db969d3a7 Main example: remove translate cli line, changed 'startup' to 'copy running startup' 2020-09-07 15:12:20 +02:00
Olof hagsand
5ee6283526 Fixed: [xmldb_get0 returns invalid candidate on startup transaction callbacks #126](https://github.com/clicon/clixon/issues/126). Always clear candidate-db before db initialization. 2020-09-07 15:09:19 +02:00
Olof hagsand
658fffb931 mem leak in yang filename function 2020-09-07 10:19:38 +02:00
Olof hagsand
ee057d5244 * Added -r command-line option to restconf daemon to NOT lower privileges to wwwuser if started from root. 2020-09-04 16:25:49 +02:00
Olof hagsand
f524a89b2d * Fixed: YANG uses statements in sub-modules did not search for grouping statements in other submodules of the module it belongs to. 2020-09-04 16:23:18 +02:00
Olof hagsand
b8955c81d8 * Changed CLI help strings behaviour on query (?) for long and multi-line help strings.
* If multiple strings (eg "\n" in text), indent before each new line
  * Primarily for auto-cli where long help strings are generated from YANG descriptions, but applies as well for manual long/multi-line help strings
  * New config option: `CLICON_CLI_HELPSTRING_TRUNCATE`: Truncate help string on right margin mode
  * New config option: `CLICON_CLI_HELPSTRING_LINES`: Limit of number of help strings to show
2020-09-04 13:15:53 +02:00
Olof hagsand
81fc7f742b * Netconf as default namespace has been disabled by default.
* Only requests on the form: `<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"><edit-config>...` will be accepted
  * All replies will be on the form: `<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">...`
  * Requests such as: `<rpc><edit-config>...` will not  be accepted.
  * You can revert this behaviour (to clixon pre-4.6 behaviour) by enabling `CLICON_NAMESPACE_NETCONF_DEFAULT`
  * This API change is a consequence of: [copy-config's RPC cxobj parameter does not contain namespace #131](https://github.com/clicon/clixon/issues/131)
2020-09-02 15:44:10 +02:00
Olof hagsand
a01fe04613 Fixed: [CLI crash if error-info is empty #134](https://github.com/clicon/clixon/issues/134) 2020-09-01 16:19:58 +02:00
Olof hagsand
41ac192362 Fixed: [Cannot create or modify NACM data node access rule with path using JSON encoding #129](https://github.com/clicon/clixon/issues/129). The evaluation of NACM datanode rule path is assumed to be canonical namespace and cannot be overruled with xmlns rules. 2020-08-30 17:03:49 +02:00
Olof hagsand
043acb6a54 Remove default sets in init cache 2020-08-28 09:51:14 +02:00
Olof hagsand
558abb1f9b Corrected error message for list min/max-value to comply to RFC 7950: a proper path is now returned, peviously only the list symbol. it is also exposed in the CLI correctly.
* Example: `<error-path>/c/a1</error-path>`
2020-08-27 15:52:31 +02:00
Olof hagsand
a3e80080e2 added error-app-tag to netconf error textual message 2020-08-27 13:15:16 +02:00
Olof hagsand
96a8192cd2 Fixed: [Yang modules skipped if the name is a proper prefix of other module name](https://github.com/clicon/clixon/issues/130) 2020-08-27 11:55:42 +02:00
Olof hagsand
576533ed82 Changed singnature of ys_real_module and improved error handling 2020-08-27 11:01:09 +02:00
Olof hagsand
1a2e074539 - Added newline after restconf evhtp GET reply 2020-08-24 22:31:12 +02:00
Olof hagsand
3e054fedc3 Fixed an error in global default values. Global default values were not written to datastore after startup, but AFTER an edit/commit. 2020-08-24 22:26:31 +02:00
Olof hagsand
61bdab7bf0 enabled dropped privileges agaon (disabled by prev commit) 2020-08-22 18:05:52 +02:00
Olof hagsand
2e23856676 fixed memory leaks in restconf evhtp module 2020-08-22 18:02:08 +02:00
Olof hagsand
6be4b18391 Fixed: [Type / Endianism problem in yang_parse_file #128](https://github.com/clicon/clixon/issues/128) 2020-08-21 13:33:38 +02:00
Olof hagsand
0e4df0e8fc Added options for Restconf evhtp setting default bind socket address and ports CLICON_RESTCONF_IPV4_ADDR, CLICON_RESTCONF_IPV6_ADDR, CLICON_RESTCONF_HTTP_PORT, CLICON_RESTCONF_HTTPS_PORT 2020-08-21 13:13:20 +02:00
Olof hagsand
25f67d1eb9 Fixed: [(CLI) the description of a used grouping is shown instead of the encapsulating container #124](https://github.com/clicon/clixon/issues/124) 2020-08-19 15:55:55 +02:00
Olof hagsand
3c36300e74 Merge branch 'master' of https://github.com/clicon/clixon 2020-08-18 17:26:44 +02:00
Olof hagsand
89fddd4cca variables in docker start 2020-08-18 17:26:39 +02:00
Olof Hagsand
11d1788370 docker base use evhtp 2020-08-18 15:24:50 +00:00