Olof hagsand
fb0b9409f3
- Moved restrconf code from pageing rpc to get
2021-09-21 11:24:53 +02:00
Olof hagsand
6bf3112fe7
* JSON encoding of YANG metadata according to RFC 7952
...
* XML -> JSON translation
2021-09-21 11:23:40 +02:00
Olof hagsand
76e59873c2
- Changed media name: yang.collection+xml/yang to application-collection+xml/json
...
- Modified ietf-netconf-list-pagination.yang:
- changed get-pagable -> get-pageable
- renamed count -> limit
- renamed skip -> offset
- added import ietf-yang-metadata
- added md:annotation remaining
2021-09-21 11:22:41 +02:00
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
acc6a0fec7
First working prototype
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
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
e3d0566d3c
- CLICON_RESTCONF_HTTP2_PLAIN set to default false
2021-09-06 13:30:12 +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
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
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
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
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
4d265d63bd
Fixed: The auto-cli identityref did not expand identities in grouping/usecases properly.
2021-08-03 11:15:45 +02:00
Olof hagsand
babdc6f496
* Fixed: [OpenConfig BGP afi-safi and when condition issues #249 ]( https://github.com/clicon/clixon/issues/249 )
...
* YANG when was not properly implemented for default values
* Improved error message on leafref validation errors
2021-08-02 15:48:38 +02: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
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
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
270c47b396
Native restconf fixes:
...
- memleak in http/1-only
- exit if http/1 request sent to http/2-only
- hang if http/1 TLS request sent to http/2 only
2021-07-09 15:08:21 +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
fe0541959f
* Native Restconf is now default, not fcgi/nginx
...
* That is, to configure with fcgi, you need to explicitly configure: `--with-restconf=fcgi`
* Updated main example to native restconf and several other fixes
2021-07-07 16:14:58 +02:00
Olof hagsand
98c5fcd20f
Clixon 5.3.0.PRE
2021-07-07 13:14:17 +02:00
Olof hagsand
22563ee2de
- Clixon 5.2.0 release
2021-07-01 17:47:31 +02:00
Olof hagsand
ef131cf407
* 5.2.0 preparations
...
* Restconf native openssl - ifdef SSL_get0_next_proto_negotiated
2021-07-01 16:34:38 +02:00
Olof hagsand
89f843f919
* Fixed: [uses oc-if:interface-ref error with openconfig #233 ]( https://github.com/clicon/clixon/issues/233 )
2021-07-01 11:55:45 +02:00
Olof hagsand
85e2945ec9
* Netconf message-id attribute changed from optional to mandatory
...
* Made NETCONF message handling more strict according to RFC 6241
* Set `CLICON_NETCONF_MESSAGE_ID_OPTIONAL` to true to accept omission of message-id attribute
* Fixed: [need make sure message-id exist in rpc validate #240 ](https://github.com/clicon/clixon/issues/240 )
2021-06-30 10:59:10 +02:00
Olof hagsand
54357a2a78
* Fixed: [ restconf patch method unable to chage value to empty string #229 ]( https://github.com/clicon/clixon/issues/229 )
2021-06-28 17:33:17 +02:00
Olof hagsand
940f4d4fb9
* Added ordering sanity check for YANG modules and sub-modules
...
* If YANG sub-statements are placed in wrong order, clixon fails on error.
2021-06-24 21:56:36 +02:00
Olof hagsand
528b649012
ci: install libnghttp2
2021-06-18 22:59:04 +02:00
Olof hagsand
4b83f4198c
New utility: clixon_util_validate for stand-alone application that validates or commits datastores
2021-06-18 09:54:17 +02:00
Olof hagsand
dd8883420c
* Made backend transaction and commit/validate API available to plugin code.
...
* This enables that RPOC handles can call commit and validate via lib
* The commit/validate API is now: `candidate_validate()` and `candidate_commit()`
2021-06-17 19:20:27 +02:00
Olof hagsand
113f92ab41
Move clixon CI from travis to github actions
2021-06-16 13:06:21 +02:00
Olof hagsand
b40dafb691
* Event exit API changed to a single decrementing counter where 1 means exit.
...
* Removed: `clicon_exit_reset()`
* Changed: `clicon_exit_set()` --> `clixon_exit_set(int nr)`
* Changed: `clicon_exit_get()` --> `clixon_exit_get()`
* native restconf special case upgrade handling from http/1 -> http/2 and restconf restart: delay the restart using event exit counter
2021-06-16 11:58:13 +02:00
Olof hagsand
4f513385e9
- Restconf native http/1 to http/2 upgrade (non-tls)
2021-06-13 12:43:19 +02:00
Olof hagsand
5ead099d0b
* Added autotool check for getresuid (and related functions) necessary for lowering of priviliges for backend and restconf
...
* If getresuid is not available, CLICON_RESTCONF_PRIVILEGES must be set to 'none'
2021-06-11 14:42:41 +02:00
Olof hagsand
a122efceff
* Fixed: [restconf patch method adds redundant namespaces #235 ]( https://github.com/clicon/clixon/issues/235 )
2021-06-10 13:05:03 +02:00
Olof hagsand
7d59ec1a3a
* Fixed: [JSON parsing error for a specific input. #236 ]( https://github.com/clicon/clixon/issues/236 )
...
* JSON empty list parse problems, eg `a:[]`
2021-06-09 11:44:28 +02:00
Olof hagsand
84f5762ab5
* Most tests work with HTTP/2 support using nghttp2
...
* except non-ssl http/1->/2 upgrade
* Restconf: ensure HEAD method works everywhere GET does.
2021-06-08 20:53:43 +02:00
Olof hagsand
b680e3c5ac
- Restconf nghttp2 compiles
2021-06-03 22:47:54 +02:00
Olof hagsand
0ad577fa81
- Started nghttp2 work
...
- Added autoconf config options, temporary for nghttp2 development: `--disable-evhtp`and `--enable-nghttp2`.
- Added special case for api-path:s beginning with //
2021-05-31 19:11:19 +02:00