Olof hagsand
3748eefb8e
datastore repair test branch
2020-02-11 20:17:15 +01:00
Olof hagsand
76a4d31c4b
Fixed: Enabling modstate (CLICON_XMLDB_MODSTATE), changing a revision on a yang, and restarting made the backend daemon exit at start (thanks Matt).
...
* Also: ensure to load `ietf-yang-library.yang ` if CLICON_XMLDB_MODSTATE is set
2020-02-10 20:23:48 +01:00
Olof hagsand
5831c053fa
clixon_util_path did not sort XML properly
2020-02-08 17:00:47 +01:00
Olof hagsand
a674af6f2c
Cleaning up code for xml insignificant whitespace removal
...
Experimenal explicit index search code
2020-02-07 14:59:57 +01:00
Olof hagsand
61e03690ca
Fixed: Pretty-printed XML using prefixes not parsed correctly.
...
* eg `<a:x> <y/></a:x>` could lead to errors, wheras (`<x> <y/></x>`) works fine.
2020-02-06 18:02:14 +01:00
Olof hagsand
a2b1674708
XML namespace merge bug fixed. Example: two xmlns attributes could both survive a merge whereas one should replace the other.
2020-02-05 19:49:23 +01:00
Olof hagsand
3d5c2cc678
* Session-id CLI functionality delayed: "lazy evaluation"
...
* From a cli perspective this is a revert to 4.1 behaviour, where the cli does not immediately exit on start if the backend is not running, but with the new session-id function
2020-02-05 16:09:26 +01:00
Olof hagsand
c7d6f69a85
* Session-id CLI functionality delayed: "lazy evaluation"
...
* From a cli perspective this is a revert to 4.1 behaviour, where the cli does not immediately exit on start if the backend is not running, but with the new session-id function
2020-02-05 15:37:25 +01:00
Olof hagsand
39e7f387f8
XML namespace merge bug fixed. Example: two xmlns attributes could both survive a merge whereas one should replace the other.
2020-02-05 12:08:20 +01:00
Olof hagsand
e68753655b
Obsoleted and removed XMLDB format "tree". This function did not work. Only xml and json allowed.
2020-02-02 19:15:39 +01:00
Olof hagsand
51e17671a8
cicd tests
2020-02-02 18:46:18 +01:00
Olof hagsand
7350ec1624
warnings in travis
2020-02-02 17:07:46 +01:00
Olof hagsand
7bcd6aed08
added instance_id parse files
2020-02-02 16:05:10 +01:00
Olof hagsand
5fc9fa0b8d
typos
2020-02-02 15:59:26 +01:00
Olof hagsand
19e21be0bc
Very large commit for upcoming 4.4 release
...
Major New features
* New and updated search functions using xpath, api-path and instance-id
* New search functions using api-path and instance_id:
* C search functions: `clixon_find_instance_id()` and `clixon_find_api_path()`
* Binary search optimization in lists for indexed leafs in all three formats.
* This improves search performance to O(logN) which is drastical improvements for large lists.
* You can also register explicit indexes for making binary search (not only list keys)
* For more info, see docs at [paths](https://clixon-docs.readthedocs.io/en/latest/paths.html ) and
[search](https://clixon-docs.readthedocs.io/en/latest/xml.html#searching-in-xml )
API changes on existing features (you may need to change your code)
* On failed validation of leafrefs, error message changed from: `No such leaf` to `No leaf <name> matching path <path>`.
* CLI Error message (clicon_rpc_generate_error()) changed when backend returns netconf error to be more descriptive:
* Original: `Config error: Validate failed. Edit and try again or discard changes: Invalid argument`
* New (example): `Netconf error: application operation-failed Identityref validation failed, undefined not derived from acl-base . Validate failed. Edit and try again or discard changes"
Minor changes
* Test framework
* Added `-- -S <file>` command-line to main example to be able to return any state to main example.
* Added `test/cicd` test scripts for running on a set of other hosts
* C-code restructuring
* clixon_yang.c partitioned and moved code into clixon_yang_parse_lib.c and clixon_yang_module.c and move back some code from clixon_yang_type.c.
* partly to reduce size, but most important to limit code that accesses internal yang structures, only clixon_yang.c does this now.
2020-02-02 15:52:30 +01:00
Olof hagsand
ba2d18417a
4.3.1 release
2020-02-02 08:50:44 +01:00
Olof hagsand
a58f1872ad
Restructure of get state/config code to enable all combinations of filtering config/state for both <get> and <get-config>
2020-02-01 20:16:11 +01:00
Olof hagsand
b7f1d72c28
read whole running config when reading state data
2020-01-31 16:13:50 +01:00
Olof hagsand
20d28b4796
Compile option VALIDATE_STATE_XML introduced in include/custom.h to control whether code for state data validation is compiled or not.
2020-01-29 21:56:50 +01:00
Olof hagsand
f5209b1fab
* Fixed: Validation of user state data led to wrong validation, if state relied on config data, eg leafref/must/when etc.
...
* Fixed: No revision in yang module led to errors in validation of state data
2020-01-27 22:11:35 +01:00
Olof hagsand
64f73771d9
Fixed: Leafref validation did not cover case of when the "path" statement is declared within a typedef, only if it was declared in the data part directly under leaf.
2020-01-26 22:16:12 +01:00
Olof hagsand
6384fb89f1
Fixed: Yang xpath statements containing prefixes stopped working due to namespace context updates
2020-01-23 22:53:19 +01:00
Olof hagsand
e8ae628d06
4.3.0 commit
2020-01-01 12:16:32 +01:00
Olof hagsand
c1903916f9
* Created two sub-files (clixon_validate.c and clixon_api_path.c) from large lib/src/clixon_xml_map.c source file.
2020-01-01 11:12:54 +01:00
Olof hagsand
50420cb262
Merge branch 'master' of https://github.com/clicon/clixon
2019-12-31 13:30:52 +01:00
Olof hagsand
b340c36f79
Experimental optimized XPath, multiple keys
2019-12-31 13:29:25 +01:00
Olof Hagsand
a87e9cb246
clang warnings
2019-12-23 14:03:42 +00:00
Olof hagsand
7fb452f96e
nacm external mem leak
2019-12-22 18:00:46 +01:00
Olof hagsand
67da95c468
Test error message.
2019-12-21 21:15:42 +01:00
Olof hagsand
b78054e7cf
State callback error message changed to include namespace and use proper <bad-element>
2019-12-21 20:50:55 +01:00
Olof hagsand
7ad16bd84b
* C-API: Added xpath_first_localonly() as an xpath function that skips prefix and namespace checks.
...
* Added experimental code for optizing XPath search using binary search.
* Enable with XPATH_LIST_OPTIMIZE
* Changed `clicon_rpc_generate_error(msg, xerr)` to `clicon_rpc_generate_error(xerr, msg, arg)`
2019-12-20 18:21:46 +01:00
Olof hagsand
ab46ce9820
XML parser failed on ]]]> termination of CDATA.
2019-12-19 21:43:03 +01:00
Olof hagsand
241ae26e55
Merge branch 'master' of https://github.com/clicon/clixon
2019-12-18 23:27:52 +01:00
Olof hagsand
02c461b84f
Fixed CLI error messages on wrong cli_set/merge xml-key
2019-12-18 23:27:19 +01:00
Olof hagsand
05ce6f38a3
test kill valgrind process after run
2019-12-09 21:12:39 +01:00
Olof hagsand
d68a829862
* Added namespace-context parameter nsc to xpath_first and xpath_vec, (xpath_vec_nsc and xpath_first_nsc` are removed).
2019-12-07 20:46:13 +01:00
Olof hagsand
ba2f40728b
[filter in netconf - one specific entry #100 ]( https://github.com/clicon/clixon/issues/100 )
2019-12-07 18:10:19 +01:00
Olof hagsand
46552066d1
Added nsc parameter to xmldb_get()
2019-12-02 20:55:28 +01:00
Olof hagsand
08b128f4d7
moved config yang spec from main functions to options_main function
2019-12-01 17:42:34 +01:00
Olof hagsand
c4954f5c43
memerror in uid-get. reinsert save config yang spec (removed for wrong reasons previously causing memleaks)
2019-12-01 16:48:45 +01:00
Olof hagsand
69b27f3280
Added clicon_handle as parameter to all functions to get better error message
2019-11-30 22:19:23 +01:00
Olof hagsand
6fc8a69dff
Fixed: [xpath_tree2cbuf() changes integers into floating point representations #99 ]( https://github.com/clicon/clixon/issues/99 )
2019-11-27 22:02:39 +01:00
Olof hagsand
9090fe6484
Merge branch 'master' of https://github.com/clicon/clixon
2019-11-26 21:52:08 +01:00
Olof hagsand
0d22a8b6d0
Yang files reorganized into three classes: clixon, mandatory, optional
2019-11-26 21:51:28 +01:00
Olof Hagsand
1927060384
Merge pull request #97 from atoy40/patch-1
...
Update xml root element
2019-11-20 21:29:26 +01:00
Anthony Hinsinger
ba472bf15f
Update xml root element
2019-11-19 14:40:48 +01:00
Olof hagsand
9575d10887
use cbuf for xml value code
2019-11-18 21:16:12 +01:00
Olof hagsand
f2cad01fc6
Updated openconfig and yangmodels repos lead to some changed in testscript and a minor parsing lapsus
2019-11-16 17:34:18 +01:00
Olof hagsand
d0e97ee338
Removed obsolete config yang handler
...
Added base netconf as default namespace in canonical nsctx
2019-11-16 16:49:40 +01:00
Olof hagsand
52629d7b35
Added "canonical" global namespace context: nsctx_global
2019-11-15 17:04:13 +01:00