Olof hagsand
8008fa01b7
Pagination draft
2021-09-21 11:22:40 +02:00
Olof hagsand
c4b1051b1f
* 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 )
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
ab0bc0ea4b
* 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 )
2021-09-21 11:22:40 +02:00
Olof hagsand
2e857bb417
First working prototype
2021-09-21 11:22:40 +02:00
Olof hagsand
6b357dc038
* Partly Fixed: [String concatenation in YANG model leads to syntax error]( https://github.com/clicon/clixon/issues/265 )
...
* In this case, eg "uses", single quotes can now be used, but not `qstring + qstring` in this case
2021-09-20 22:54:14 +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
3cd3f7987d
- Cannot reproduce https://github.com/clicon/clixon/issues/245 , added sanity chaeck and regression test
2021-09-09 14:01:48 +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
Dave Cornejo
3344adb487
initial import of dispatcher
...
this code implements a way of registering path handlers and then calling those handlers based on a path.
2021-09-07 10:14:45 -10:00
Olof hagsand
e3d0566d3c
- CLICON_RESTCONF_HTTP2_PLAIN set to default false
2021-09-06 13:30:12 +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
7794c619cc
test: curl error codes in github/actions
2021-08-26 18:45:12 +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
562320dcbc
* Fixed: [JSON leaf-list output single element leaf-list does not use array]( https://github.com/clicon/clixon/issues/261 )
2021-08-24 17:08:31 +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
c35ca82083
* Fixed: Netconf diff callback did not work with choice and same value replace
...
* Eg if YANG is `choice c { leaf x; leaf y }` and XML changed from `<x>42</x>` to `<y>42</y>` the datastrore changed, but was not detected by diff algorithms and provided to validate callbacks.
* Thanks: Alexander Skorichenko, Netgate
2021-08-17 16:51:08 +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
629757d1fd
Merge branch 'alanyanigersiklu-yang-patch-test'
2021-08-15 17:11:48 +02:00
Olof hagsand
89ca5ac154
Merge branch 'yang-patch-test' of https://github.com/alanyanigersiklu/clixon into alanyanigersiklu-yang-patch-test
2021-08-15 17:09:39 +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
Alan Yaniger
18170fabbc
Merge branch 'yang-patch-test' of github.com:alanyanigersiklu/clixon into yang-patch-test
2021-08-14 21:22:03 +03:00
Alan Yaniger
2f9485800b
Added test for YANG patch with XML media
2021-08-14 21:21:09 +03: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
c2c0a6210a
re-add CLICON_RESTCONF_INSTALLDIR
2021-08-12 21:20:31 +02:00
alanyanigersiklu
95a3664882
Merge branch 'master' into yang-patch-test
2021-08-12 21:06:57 +03:00
Alan Yaniger
8f110331d5
Add tests for yang patch
2021-08-12 21:01:48 +03:00
Olof hagsand
bd8cbbc393
Merge branch 'alanyanigersiklu-yang-patch-alanfork'
2021-08-10 19:50:27 +02:00
Olof hagsand
8fafe4a67e
revert main example
2021-08-10 19:47:46 +02:00
Olof hagsand
e780ed963b
* Fixed: [clixon_netconf errors on client XML Declaration with valid encoding spec]( https://github.com/clicon/clixon/issues/250 )
2021-08-10 19:32:02 +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
26a8cfcedb
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-10 19:29:07 +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
2abbea4e3a
fixed Makefile.in to use name of yang patch file
2021-08-06 12:00:38 +03:00
Olof hagsand
355ed7d96a
* Fixed: [clixon_netconf errors on client XML Declaration with valid encoding spec]( https://github.com/clicon/clixon/issues/250 )
2021-08-05 21:44:52 +02:00
Alan Yaniger
94b8f7fec5
fixed another rebase error
2021-08-05 15:39:27 +03:00
Alan Yaniger
17c7acfa11
fixed error in rebase
2021-08-05 15:34:38 +03:00
Olof hagsand
d4c77ffa90
Move Yang patterns: \n match from yang parse to regex compile stage
2021-08-05 15:16:29 +03:00
Olof hagsand
a6176ec773
cli exclude clixon-restconf, extra cv check in default1
2021-08-05 15:16:29 +03:00
Olof hagsand
c743b90fdd
* 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 15:16:29 +03:00
Olof hagsand
dc2b3a80ca
* Fixed: YANG when was not properly implemented for LEAF default values
2021-08-05 15:16:29 +03:00
Olof hagsand
8675620d22
* 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-05 15:16:29 +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