Commit graph

802 commits

Author SHA1 Message Date
Olof hagsand
0c7f2043f3 * Pagination according to new draft
* count/skip -> limit/offset
* ietf-yang-metadata RFC 7952 support, placeholder parsing and extension
2021-09-21 11:22:41 +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
2485bec483 fixes for compilation 2021-09-21 11:22:40 +02:00
Olof hagsand
ba835346a5 cli-pagination 2021-09-21 11:22:40 +02:00
Olof hagsand
2b5dceb82c cli pagination 2021-09-21 11:22:40 +02:00
Olof hagsand
8e266dd136 skip+count 2021-09-21 11:22:40 +02:00
Olof hagsand
acc6a0fec7 First working prototype 2021-09-21 11:22:40 +02:00
Olof hagsand
78f5a6983c Pagination draft 2021-09-21 11:22:40 +02:00
Olof hagsand
2e857bb417 First working prototype 2021-09-21 11:22:40 +02:00
Olof hagsand
392e6679c5 * JSON errors are now labelled with JSON and not XML
* Fixed: [Performance issue when parsing large JSON param](https://github.com/clicon/clixon/issues/266)
* Moved strlen() from for end condition
* Fixed debugging of xpath parser
2021-09-20 21:35:01 +02:00
Olof hagsand
ca14879e8c - Fixed: [Duplicate lines emitted by cli_show_config (cli output style) when yang list element has composite key](https://github.com/clicon/clixon/issues/258) 2021-09-09 13:33:51 +02:00
Olof hagsand
d1ed4ecd7d - Refactor yang patch code according to Clixon coding style
- Fixed all memory leaks
2021-09-08 10:38:49 +02:00
Olof hagsand
aed7dbfd8b - Restconf error: added special case for translating from netconf invalid-value to 400 vs 404
- Added media to restconf sanity checks, such as bad client cert error
2021-08-27 15:12:50 +02:00
Olof hagsand
cdacca125c Native restconf: SSL client certs failures are returned as http 405 errors, not fail during SSL negotiation 2021-08-27 09:33:59 +02:00
Olof hagsand
ef4d082f4b * Restconf native HTTP/2:
* Added option `CLICON_RESTCONF_HTTP2_PLAIN`
    * if disabled non-tls HTTP/2 is disabled: both direct and upgrade
2021-08-26 16:58:52 +02:00
Olof hagsand
9fce0a1214 - IPC socket: add REUSEADDR when using IP (remove comment)
- Test: remove variable to use backend restconf, since that is the only option
- Docs C-style: describe return values better
2021-08-24 13:46:47 +02:00
Olof hagsand
6e0e45aab7 * Fixed: Some native restconf error messages did not end with \r\n.
* Specifically the error when sending http request on https.
2021-08-20 15:45:13 +02:00
Olof hagsand
8352e25860 * Restconf internal start: fail early if clixon_restconf binary is not found
* If CLICON_BACKEND_RESTCONF_PROCESS is true
2021-08-17 10:08:04 +02:00
Olof hagsand
980718178a * YANG Leafref feature update
* Closer adherence to RFC 7950. Some of this is changed behavior, some is new feature.
  * Essentially instead of looking at the referring leaf, context is referred(target) node
  * Validation uses referred node
    * Validation changed to use type of referred node, instead of just "string"
  * Auto-cli
    * Changed to use type of referred node for typecheck
    * Completion uses referred node
  * Required instance / less strict validation
    * New: Leafrefs must refer to existing data leaf ONLY IF YANG `required-instance` is true
    * Previous: All leafrefs must refer to existing data leaf node
* Fixed: [Autocli does not offer completions for leafref to identityref #254](https://github.com/clicon/clixon/issues/254)
2021-08-16 17:14:27 +02:00
Olof hagsand
8db716ca07 - Moved yang patch code to new files restconf_methods_patch.[ch]
- Started modifying patch code to style guidelines
- Made patch test independent of example
- Added developers style guidelines
2021-08-15 20:43:52 +02:00
Olof Hagsand
bf14df3c40
Merge pull request #257 from PlushBeaver/diff-path
Remove hardcoded path to diff binary
2021-08-15 17:08:44 +02:00
Dmitry Kozlyuk
56bfd9c36f Remove hardcoded path to diff binary
Like other programs, diff can and should be located using PATH.
This fixes compare_dbs() on non-FHS systems, like NixOS.
2021-08-13 22:21:28 +03:00
Olof hagsand
bd8cbbc393 Merge branch 'alanyanigersiklu-yang-patch-alanfork' 2021-08-10 19:50:27 +02:00
Phil Heller
b200361620 Testing dependency fixes, Netconf XML declaration and filter logic fix
Install libnghttp2-devel in ubuntu and centos per required dependencies
Ignore case when checking XML declaration encoding value per W3C recommendations
Fix filter logic to follow RFC6241 (7.1, 7.7) and default to subtree
2021-08-10 19:32:02 +02:00
Olof Hagsand
e6022bc088
Merge pull request #252 from pheller/filter-and-xml-encoding-fixes
Testing dependency fixes, Netconf XML declaration and filter logic fix
2021-08-08 13:32:24 +02:00
Alan Yaniger
f2e81be66e fix merge conflicts 2021-08-06 12:08:13 +03:00
Alan Yaniger
94b8f7fec5 fixed another rebase error 2021-08-05 15:39:27 +03:00
Olof hagsand
efcfb176ae Fixed: The auto-cli identityref did not expand identities in grouping/usecases properly. 2021-08-05 15:16:29 +03:00
Alan Yaniger
ad950efc32 fixed check when getting value inside xml tag given the key 2021-08-05 15:16:29 +03:00
Alan Yaniger
523407a9c1 fixed string length checks, removed unnecessary loop, changed some other code for clarity 2021-08-05 15:16:29 +03:00
Alan Yaniger
fd28fd498d - Add prefix "yang_patch_" to new functions
- use clixon cbuf functions instead of new string functions
 - moved some code into separate functions
 - added comments
 - added documentation to functions that did not have it
2021-08-05 15:16:29 +03:00
Olof hagsand
96a3ee98c6 Removed default of CLICON_RESTCONF_INSTALLDIR
* The default behaviour is changed to use the config $(sbindir) to locate `clixon_restconf` when starting restconf internally
2021-08-05 15:16:29 +03:00
Olof hagsand
5de6d56822 * Fixed: SEGV in clixon_netconf_lib functions from internal errors including validation.
* Check xerr argument both before and after call on netconf lib functions
2021-08-05 15:15:28 +03:00
Olof hagsand
128764a570 - Added yang patch test: test_restconf_yang_patch.sh as placeholder for rfc 8072 tests
- Added patch-xml as valid media
2021-08-05 15:15:28 +03:00
Olof hagsand
659aaac5c6 - cli set debug vars
- fixed: restconf native evhtp appended indata to old data
2021-08-05 15:15:28 +03:00
Alan Yaniger
86b64c4dd0 split up long function, use safe string handling functions 2021-08-05 15:15:28 +03:00
Alan Yaniger
8d2fbf39de implement yang-patch 2021-08-05 15:15:28 +03:00
Olof hagsand
4d265d63bd Fixed: The auto-cli identityref did not expand identities in grouping/usecases properly. 2021-08-03 11:15:45 +02:00
Alan Yaniger
d1f44e2f1f fixed check when getting value inside xml tag given the key 2021-08-01 17:01:40 +03:00
Alan Yaniger
db7e016aa0 fixed string length checks, removed unnecessary loop, changed some other code for clarity 2021-08-01 16:50:04 +03:00
Phil Heller
3c5f956805 Merge branch 'master' into filter-and-xml-encoding-fixes 2021-07-29 23:01:47 -06:00
Phil Heller
38f4cd8237 Testing dependency fixes, Netconf XML declaration and filter logic fix
Install libnghttp2-devel in ubuntu and centos per required dependencies
Ignore case when checking XML declaration encoding value per W3C recommendations
Fix filter logic to follow RFC6241 (7.1, 7.7) and default to subtree
2021-07-29 22:48:07 -06:00
Alan Yaniger
948fa70b44 - Add prefix "yang_patch_" to new functions
- use clixon cbuf functions instead of new string functions
 - moved some code into separate functions
 - added comments
 - added documentation to functions that did not have it
2021-07-27 18:36:46 +03:00
Olof hagsand
93a4777f0f Removed default of CLICON_RESTCONF_INSTALLDIR
* The default behaviour is changed to use the config $(sbindir) to locate `clixon_restconf` when starting restconf internally
2021-07-27 10:53:47 +02:00
Olof hagsand
dee081646c * Fixed: SEGV in clixon_netconf_lib functions from internal errors including validation.
* Check xerr argument both before and after call on netconf lib functions
2021-07-27 10:31:16 +02:00
Olof hagsand
600f29a117 - Added yang patch test: test_restconf_yang_patch.sh as placeholder for rfc 8072 tests
- Added patch-xml as valid media
2021-07-26 12:20:06 +02:00
Olof hagsand
c1c4e5b3f3 - cli set debug vars
- fixed: restconf native evhtp appended indata to old data
2021-07-26 10:46:00 +02:00
Alan Yaniger
46d07c1372 split up long function, use safe string handling functions 2021-07-25 09:04:26 +03:00
Olof hagsand
f7f24949d6 Merge branch 'yang-patch-alanfork' of https://github.com/alanyanigersiklu/clixon into alanyanigersiklu-yang-patch-alanfork 2021-07-19 22:54:00 +02:00
Alan Yaniger
0c72100a05 implement yang-patch 2021-07-19 13:17:10 +03:00