Olof hagsand
baa6e821a8
Fixed [yang in CLICON_YANG_MAIN_DIR can't import module's in CLICON_YANG_DIR recursively]( https://github.com/clicon/clixon/issues/286 )
...
Which was a PR for [Recursive search CLIXON_YANG_DIR](https://github.com/clicon/clixon/issues/284 )
2021-11-10 18:32:17 +01:00
Kristofer Hallin
057abe56e0
Fix for issue #284 , do recursive lookup when reading YANG files from directory.
2021-11-08 20:09:19 +01:00
Olof hagsand
b70e22096e
- Pagination: enabled LIST_PAGINATION and remobved constant
...
- Changed logic on how to find clixon_restconf in pseudo plugin
- Removed ==== in constants to avoid conflict with git merge
- Remove assert
- Added fuzzing for netconf
2021-09-23 13:33:26 +02:00
Olof hagsand
77bacc93bb
- Updated code to clixon 5.2 status
...
- Added LIST_PAGINATION clixon_custom constant
- Fix: leafs added as augments on rpc input/output lacked cv:s
2021-09-21 11:22:40 +02:00
Olof hagsand
9aad253f1e
Move Yang patterns: \n match from yang parse to regex compile stage
2021-08-05 12:53:26 +02:00
Olof hagsand
dcaeb581a1
* Fixed: Yang patterns: \n and other non-printable characters were broken
...
* Example: Clixon interpereted them two characters: `\\ n` instead of ascii 10
2021-08-05 09:59:20 +02:00
Olof hagsand
00645ee52b
* Added linenumbers to all YANG symbols for better debug and errors
...
* Improved error messages for YANG identityref:s and leafref:s by adding original line numbers
2021-08-03 12:53:37 +02:00
Olof hagsand
e0ee365958
* Fixed: RFC 8040 yang-data extension allows non-key lists
...
* Added YANG_FLAG_NOKEY as exception to mandatory key lists
2021-07-19 11:15:49 +02:00
Olof hagsand
6bb6faadc9
* Fixed: mandatory leaf in a uses statement caused abort
...
* Occurence was in ietf-yang-patch.yang
2021-07-19 08:14:10 +02:00
Olof hagsand
ed1d5698e8
fix the belongs-to test
2021-07-08 16:53:45 +02:00
Olof hagsand
1925ac68cd
* Fixed: [RESTConf GET for a specific list instance retrieves data from other submodules that have same list name and key value #244 ]( https://github.com/clicon/clixon/issues/244 )
...
* Fixed: Double clixon error messages in yang2cli code
* Sanity checks for submodule belongs-to
2021-07-08 16:26:39 +02:00
Olof hagsand
783b0a4857
* YANG when statement in conjunction with grouping/uses/augment
...
* Several cases were not implemented fully according to RFC 7950
* Do not extend default values if when statements evaluate to false
* Do not allow edit-config of nodes if when statements evaluate to false (Sec 8.3.2)
* If a key leaf is defined in a grouping that is used in a list, the "uses" statement MUST NOT have a "when" statement. (See 7.21.5)
* See [yang uses's substatement when has no effect #218 ](https://github.com/clicon/clixon/issues/2$
2021-05-13 14:26:02 +02:00
Olof hagsand
0225488c39
- Moved deviation actions to include grouped/uses statements. See https://github.com/clicon/clixon/issues/211
2021-05-06 16:23:50 +02:00
Olof hagsand
5a72626aa4
- Yang deviation [deviation statement not yet support #211 ]( https://github.com/clicon/clixon/issues/211 )
...
- Added "depth" parameter to yang_apply
- Added extra API function to yang_cardinality to check individual relation
2021-05-03 14:34:35 +02:00
Olof hagsand
c43e216d67
- Restconf bind: continue with other sockets if bind fails, print address on log
...
- Multi-yang: Look in CLICON_YANG_MAIN_DIR, not only CLICON_MAIN_DIRs for old yangs
- Backend -q quit option enhanced for multi-yang case
2021-04-13 18:00:27 +02:00
Olof hagsand
8469a0962e
* Add multiple yang support also for obsolete versions
...
* This means that files and datastores supporting modstate also looks for deleted or updated yang modules.
* A stricter binding which gives error if loading outdated YANG file does not exist.
* Stricter yang checks: you cannot do get-config on datastores that have obsolete YANG
* Added xerr output parameter to `xmldb_get0()`
2021-04-12 12:42:26 +02:00
Olof hagsand
9840e248c6
* Augment target node check strict, instead of printing a warning, it will terminate with error.
...
* Fixed: [Augment that reference a submodule as target node fails #178 ](https://github.com/clicon/clixon/issues/178 )
* Fixed a memory error that was reported in slack by Pawel Maslanka
* The crash printout was: `realloc(): invalid next size Aborted`
2021-02-19 15:46:55 +01:00
Olof hagsand
0b1e4ab0e9
Fixed: unknown nodes (for extenstions) did not work when placed directly under a grouping clause
2021-01-28 09:02:29 +01:00
Olof hagsand
96b50b88e8
Copyright 2021
2021-01-13 14:40:34 +01:00
Olof hagsand
b8641f30bd
* More YANG extension functionality,
...
* See [Augment auto-cli for hiding/modifying cli syntax #156 ](https://github.com/clicon/clixon/issues/156 ) and [hiding auto-generated CLI entries #153 ](https://github.com/clicon/clixon/issues/153 )
* Extensions can be used in augmentations
* Extension `autocli-op` has been added to add "hidden" commands in the autocli
* Documentation: https://clixon-docs.readthedocs.io/en/latest/misc.html#extensions
2020-12-08 17:21:37 +01:00
Olof hagsand
e46f6f4a36
* Error-type changed from protocol to application for data-not-unique netconf/restconf errors
...
* Added new revision of main example yang: `clixon-example@2020-12-01.yang`
* Fixed [YANG: key statement in rpc/notification list #148 ](https://github.com/clicon/clixon/issues/148 )
* Do not check uniqueness among lists without keys
2020-12-01 18:58:20 +01:00
Olof hagsand
daaf3f17df
revert clixon-err on XML
...
restconf backend config
2020-11-18 13:57:25 +01:00
Olof hagsand
4eee00101c
Disabling IPv6 per default due to failing docker tests
2020-11-15 18:16:06 +01:00
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
1db43ca45b
yang augment sanity checks
2020-10-05 15:49:22 +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
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
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
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
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
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
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
3ecc259ec7
misc documentation
2020-07-28 16:15:02 +02:00
Olof hagsand
c2e459e8bb
Three errors in new upgrade code: DEL didnt work, empty config did now work, neither did no yang files in a dir
2020-06-27 13:02:04 +02:00
Olof hagsand
fade9dcfd5
Fixed: Reading in a yang-spec file exactly the same size as the buffer (1024/2048/4096/...) could leave the buffer not terminated with a 0 byte
2020-06-18 09:54:51 +02:00
Olof hagsand
fdf335fb2f
new function ; Added valgrind mem check in leak tests; pattern CDATA tests
2020-05-29 12:39:07 +02:00
Olof hagsand
65806f1ef2
Copyright change: LLC -> LLC(Netgate)
2020-04-23 16:55:56 +02:00
Olof hagsand
ba59e22fd7
NACM RFC341 datanode paths, read operation
2020-04-14 11:38:29 +02:00
Olof hagsand
0fd71ec372
loosen yang check of keys in lists to not do it in rpc declarations
2020-03-27 15:44:05 +01:00
Olof hagsand
0e94937ccf
Sanity check of mandatory key statement for Yang LISTs.
...
* If fails, exit with error message, eg: `Yang error: Sanity check failed: LIST vsDataContainer lacks key statement which MUST be present (See RFC 7950 Sec 7.8.2)`
* Can be disabled by setting `CLICON_CLICON_YANG_LIST_CHECK` to `false`
2020-03-09 15:48:33 +01:00
Olof hagsand
fdfeec96ec
Recursive (erroneous) Yang specs with recursive grouping/use statement is now fixed: instead of stack overflow, you get an error message and an exit
2020-03-05 20:13:24 +01:00
Olof hagsand
a71c256898
* New clixon-config@2020-02-22.yang revision
...
* C-code changes:
- Replaced stream uri:s w constants
- Replaced large debug print code with single clicon_log_xml
- Restconf put and post handling refactored using new parse API
2020-02-24 15:25:06 +01:00
Olof hagsand
83b22e7c2b
2020 copyright statement
2020-02-22 15:54:15 +01:00
Olof hagsand
3b26b22391
internal type/var/prefix name changes for yacc parsing
2020-02-22 11:15:51 +01:00