Olof hagsand
c31b1c471b
* Changed first parameter from int fd to FILE *f in the following functions:
...
* clixon_xml_parse_file(), clixon_json_parse_file(), yang_parse_file()
* See [Bytewise read() of files is slow #146 ](https://github.com/clicon/clixon/issues/146 )
2020-11-04 22:21:42 +01:00
Olof hagsand
7a0838da3a
* Restconf configuration has a new configure model: clixon-restconf.yang enabling restconf daemon configuration from datastore instead of from config file.
2020-11-03 21:26:34 +01:00
Olof hagsand
1df420255e
Fixed [Clixon backend generates wrong XML on empty string value #144 ]( https://github.com/clicon/clixon/issues/144 )
2020-10-28 14:28:34 +01:00
Olof hagsand
fab261cb53
* Added XPATH functions position
2020-10-27 09:40:45 +01:00
Jonathan Ben-Avraham
f274a77414
Updated @retval doxygen specs for all functions
...
Updated the @retval doxygen specs for clixon_datastore_read.c
functions to match 4.8.0 API
2020-10-23 10:22:46 +03:00
Olof hagsand
1614bcd19c
Cleanup master for 4.9.0.PRE
2020-10-19 20:06:20 +02:00
Olof hagsand
a77cd27abb
* Fixed: [namespace prefix nc is not supported]( https://github.com/clicon/clixon/issues/143 )
...
* Added more sanity checks on incoming top-level rpc and hello messages, including verifying top-level namespace
2020-10-17 18:04:46 +02:00
Olof hagsand
46bee9e358
Crash seen with startup mode as running with the XML_DB format being set to JSON. [clixon : 4.7.0] #138
2020-10-17 10:01:04 +02:00
Olof hagsand
4d35ace95f
fix of performance enhancement commit for unique constraint
2020-10-16 15:43:37 +02:00
Olof hagsand
3d1ac2692d
Fixed: Performance enhancement of unique list check (of duplicate keys)
2020-10-16 12:48:51 +02:00
Olof hagsand
0b3391836f
* Fixed: Validate/commit error with false positive yang choice changes detected in validation found in ietf-ipfix-psamp.yang.
2020-10-15 21:35:14 +02:00
Olof hagsand
6465022f57
Find non-config nodes and mark/return error with better error message
2020-10-15 13:55:44 +02:00
Olof hagsand
6e81db18bb
removed debug printf:s
2020-10-14 22:48:30 +02:00
Olof hagsand
fec6fbbd49
removed debug printf:s
2020-10-14 22:24:39 +02:00
Olof hagsand
a41bd8aed3
Merge branch 'master' of https://github.com/clicon/clixon
2020-10-14 11:23:59 +02:00
Olof hagsand
2d56c9674a
* New YANG generated auto-cli feature with syntax modes
...
* The existing autocli does not support modes, complete paths must be given, eg: `set a b c d 42`.
* In the new auto-cli, automatic modes are present at each YANG syntax node level, eg the above can be given as: `edit a b c; set d 4; top`
* The existing CLI API remains, the new API is as follows: `cli_auto_edit()`, `cli_auto_up()`, `cli_auto_top()`, `cli_auto_show()`, `cli_auto_set()`, `cli_auto_merge()`, `cli_auto_create()`, `cli_auto_del()`.
* See `test/test_cli_auto.sh` for an example of the new API, and `apps/cli/cli_auto.c` for the source code of the new callback API.
* Documentation will be appear and full integration with the main example.
* Added inline state field to clixon-example.yang
* Added new clicon_data_cvec_*() API for generic cvec structs
2020-10-14 10:54:10 +02:00
Olof hagsand
f9cc26582a
minor: strncpy -> strcpy and formatting
2020-10-10 15:32:19 +02:00
Olof hagsand
f8ac8cc14b
typo on list check
2020-10-08 16:04:31 +02:00
Olof hagsand
5c67bcd364
validation of list keys rearrangement of code
2020-10-08 15:32:23 +02:00
Olof hagsand
469cbe0d64
Fixed: Accepted added subtrees containing lists with duplicate keys
2020-10-08 15:15:22 +02:00
Olof hagsand
8ae647c32b
* More explanatory validation error messages for when and augments error messages.
...
* Example: error-message: `Mandatory variable` -> `Mandatory variable of edit-config in module ietf-netconf`.
2020-10-07 20:57:49 +02:00
Olof hagsand
1db43ca45b
yang augment sanity checks
2020-10-05 15:49:22 +02:00
Olof hagsand
4d91bcd810
GET xpath on modstate was broken
2020-10-01 22:22:36 +02:00
Olof hagsand
09d33acd45
cli show options. doc and testing
2020-10-01 11:07:57 +02:00
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
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
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
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
658fffb931
mem leak in yang filename function
2020-09-07 10:19:38 +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
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