Commit graph

282 commits

Author SHA1 Message Date
Olof hagsand
bbcb4a7b03 Creator attribute changes: added as xmldb metadata
clixon-config.yang: New revision and Added `CLICON_NETCONF_CREATOR_ATTR` option
clixon-lib.yang: Added creator meta
Changed return value of xml_add_attr
2023-11-28 14:44:01 +01:00
Olof hagsand
e9c5287c36 Debug: improved debug level 2 with socket-description, also for notification 2023-11-01 13:48:41 +01:00
Olof hagsand
e7313fc9a2 New clixon-lib@2023-11-01.yang revision with ignore-compare extension 2023-10-25 18:09:40 +02:00
Olof hagsand
f6dbb30110 Minor fixes: UTF str: removed unused code, clarified loading of yang-lib load 2023-10-20 10:04:03 +02:00
Olof hagsand
9091582087 Low-level message functions added descr argument for better logging C-API change 2023-09-12 10:08:32 +02:00
Olof hagsand
b8f4dbd8d1 Test: more test cli multiple pipes 2023-09-04 14:04:34 +02:00
Olof hagsand
97eb603ac1 Add new clixon-autocli yang file 2023-08-31 22:32:50 +02:00
Olof hagsand
3b08653eb4 Added: [Feature request: node's alias for CLI](https://github.com/clicon/clixon/issues/434)
New `clixon-autocli@2023-09-01.yang` revision
Misc typos
2023-08-31 18:00:29 +02:00
Olof hagsand
bee30a4ea0 Example: added -m/-M options for testing mount-points 2023-08-07 18:12:53 +02:00
Olof hagsand
f526d5b7a0 Autocli optimization feature for generating smaller CLISPECs for large YANGs using treerefs
New `grouping-treeref` option added to clixon-autocli.yang
Default is disabled, set to true to generate smaller memory footprint of clixon_cl
Add prefix "mtpoint:" to cli api-paths to identify change of yang schemas
2023-07-23 15:21:59 +02:00
Olof hagsand
90b7a550b2 Added configure option CLICON_PLUGIN_DLOPEN_GLOBAL for config of dlopen() 2023-07-06 17:34:28 +02:00
Olof hagsand
0460c093cc Moved datastore-format datastype from clixon-config.yang to clixon-lib.yang 2023-06-20 10:06:52 +02:00
Olof Hagsand
53ceb35d51 New clixon-autocli.yang version with skip and alias extensions 2023-06-10 11:46:27 +02:00
Olof hagsand
bd6a67f1d9 New clixon-config@2023-05-01.yang revision
Added options: CLICON_CONFIG_EXTEND
2023-06-01 17:43:17 +02:00
Olof hagsand
b6116261a3 * Restructured and extended <stats> rpc to schema mountpoints
* New revision of clixon-lib.yang
* CLI: Added `show statistics` example code for backend and CLI memory stats
2023-05-05 17:54:10 +02:00
Olof hagsand
6335f810d3 C-API: clixon_xml2file and clixon_xml2cbuf added prefix argument
Added in-mem xml diff function: `xml_tree_diff_print`
2023-04-12 10:44:58 +02:00
Olof hagsand
819a0b5a9e New clixon-lib@2023-03-01.yang revision
* Added creator meta-object
2023-04-11 13:50:45 +02:00
Olof hagsand
1f5df800bc Restconf: Added fallback mechanism for non-ALPN HTTPS
* Set `CLICON_RESTCONF_NOALPN_DEFAULT` to `http/2` or `http/1.1`
  * For http/1 or http/2 only, that will be the default if no ALPN is set.
2023-03-03 16:05:31 +01:00
Olof hagsand
585e725aec Yang schema mount: replaced config --enable-yang-schame-mount with runtime option CLICON_YANG_SCHEMA_MOUNT
Added config and validation-level as parameters to ca_yang_mount
2023-02-17 16:39:39 +01:00
Olof hagsand
d358387d39 * Fixed: [State XML validation error when CLICON_MODULE_LIBRARY_RFC7895=true and ietf-yang-libra$
* Removed obsolete option: `CLICON_MODULE_LIBRARY_RFC7895'
  * Obsolete config options given in the confi file are considered an error
* Added section in CONTRIBUTING relating to optimzation
* Changed reset merge to implicit default values.
  * This avoids a potential overwriting of explicitly set default values in the existing config
* Adapted some code to [Make cligen_* functions const ](https://github.com/clicon/cligen/pull/83)
* Test: fixed test for * Fixed: [datamodel tree generated from basemodel tree is not proper when a list has more than one key and key is of enum type](https://github.com/clicon/clixon/issues/417)
2023-02-12 16:19:27 +01:00
Olof hagsand
000cb866c2 RFC 8525:
- Change from RFC 7805: Remove revision if empty instead of sending empty revision
RFC 6022
  - Added cli identity to RFC6022 transport
  - Added source-host for natove restconf, bit no other sessions
2023-01-15 22:44:00 +01:00
Olof hagsand
3916fa919c Netconf monitoring RFC 6022 Sessions (https://github.com/clicon/clixon/issues/370)
- statistics and transport/source-host parameters
  - extended internal NETCONF hello with transport and source-host attributes
clixon-lib,yang
  - Moved all extended internal NETCONF attributes to the clicon-lib namespace
C-API:
  - wrapped most attribute creation into new fn xml_add_attr()
2023-01-15 12:36:59 +01:00
Olof Hagsand
61e2f014be * Changed docker builds
* `clixon-test` built in `docker/test`
    * Renamed from `clixon-system` built in `docker/main`
  * `clixon-example` built in `docker/example`
    * Added netconf ssh subsystem
    * Renamed from `clixon` built in `docker/base`
* Added ietf-yang-schema-mount@2019-01-14.yang
2022-12-11 13:57:27 +01:00
Olof hagsand
571e26e0d6 Revert with-defaults option,
Added clarifying NETCONF_DEFAULT_RETRIEVAL_REPORT_ALL compile-time option instead
2022-12-08 20:28:32 +01:00
Olof hagsand
407860ccc7 Add new clixon-config.yang with CLICON_NETCONF_WITHDEFAULTS_REPORTALL 2022-12-07 10:56:04 +01:00
Olof hagsand
c94e9dad67 Feature Request: Support RFC 6022 (NETCONF Monitoring)
* Added capabilities and schema state, and get-schema rpc
* New `clixon-config@2022-11-01.yang` revision
  * Added option:
    * `CLICON_NETCONF_MONITORING`
    * `CLICON_NETCONF_MONITORING_LOCATION`
2022-11-28 15:53:24 +01:00
Olof hagsand
a9a82d6e0c Load RFC6022 ietf-netconf-monitoring, first step 2022-11-23 09:54:56 +01:00
Olof hagsand
05cdbf5c4f * List-pagination: Adhere to ietf-draft: Removed list-pagination "presence"
* Remove default expansion in NETCONF client
* C-API: Added `expanddefault` parameter to `xml_yang_validate_rpc()`
2022-11-02 11:25:06 +01:00
Olof hagsand
56f4bb45cc * Added PRETTYPRINT_INDENT compile-time option controlling indentation level for XML,JSON and TEXT
* Default value is `3`
2022-10-31 14:20:14 +01:00
Olof hagsand
d84c529ff1 [Code formatting: Change indentation style to space](https://github.com/clicon/clixon/issues/379)
* Applies to all c/h/y/l/sh files and .editorconfig
2022-10-27 14:21:17 +02:00
Olof hagsand
6f0bd01a6a Confirm-commit RESTCONF support 2022-10-18 10:56:14 +02:00
Olof hagsand
07536fc8d2 With-default cli test, use xpath to only show config tree
Make all tests independent of CLICON_STREAM_DISCOVERY_RFC8040 setting
2022-09-19 10:58:44 +02:00
Olof hagsand
ba9b313295 Restconf callhome: idle-timeout for periodic callhome 2022-08-22 11:27:02 +02:00
Olof hagsand
b748d68912 RESTCONF callhome, periodic and persistent connection-types, multiple clients 2022-08-18 16:38:24 +02:00
Olof hagsand
af8a440f6c Patched ietf-list-pagination revision 2022-07-24 2022-08-12 16:43:01 +02:00
Olof hagsand
5ac8bd2d03 Updated ietf-list-pagination YANGs to revision 2022-07-24 2022-08-12 16:13:32 +02:00
Olof hagsand
7e783952eb Restconf callhome: Added YANG connection-type, test: added NACM 2022-08-12 15:05:18 +02:00
Olof hagsand
7d8ddf7697 Restconf RFC8071 call-home first working prototype 2022-07-31 09:59:52 +02:00
Olof hagsand
6f5149cc32 Clixon 5.8.0 release 2022-07-28 19:15:00 +02:00
Olof hagsand
df687f7180 Clixon SNMP frontend
Added two new config options to clixon-config.yang: `CLICON_HTTP_DATA_ROOT`
Added new files: apps/snmp/snmp_mib_yang.[ch] for generic MIB/YANG handling
Test: killall quiet
Test: added specific MIB for generic code: <CLICON_SNMP_MIB>NET-SNMP-EXAMPLES-MIB</CLICON_SNMP_MIB>
2022-06-26 11:28:42 +02:00
Olof hagsand
28514c6750 Clixon SNMP frontend update
* Integration of testhandler.c gives proper callback handling
* YANG `clixon-config@2022-03-21.yang` changes:
    * Added option:
      * `CLICON_SNMP_AGENT_SOCK`
2022-06-26 11:27:54 +02:00
Olof hagsand
43a57dad79 Changed C-API for xml translation/print to other formats.
* Added `skiptop` parameter, if set only apply to children of a node, skip top node
    * default is 0
* Functions are merged, ie removed and replaced with more generic functions
* `xml2json_cbuf()`: Added `skiptop` parameter: `xml2json_cbuf(..., int skiptop)`
* `xml2json()` and `xml2json_cb()` merged into `xml2json_file()` with `skiptop`
    * Replace `xml2json(...)` with `xml2json_file(..., stdout, 0)`
    * Replace `xml2json_cb(...)` with `xml2json_file(..., 0)`
* `clicon_xml2cbuf()`: Added `skiptop` parameter: `clicon_xml2cbuf(..., int skiptop)`
* `xml2cli()`: Added `skiptop` parameter: `xml2cli(..., int skiptop)`
2022-06-01 10:48:39 +02:00
Olof hagsand
8e6ba7fa53 test of cligen expand bug #332 2022-05-30 15:27:19 +02:00
Olof hagsand
a49cf41d1e * CLI expansion of leafrefs default behavior changed
* In the autocli and handcrafted CLI:s using `expand_dbvar()` the CLI expansion followed the leafrefs to the sources, ie the origin of the leafrefs
    * Instead leafref expansion now only looks at the leafrefs
2022-05-10 10:06:43 +02:00
Olof hagsand
f11e4bad6c Http data server changes
* Indirect redirects from directory to `index.html`
  * Added `HTTP_DATA_INTERNAL_REDIRECT` compile-time option
* Added CLICON_RESTCONF_API_ROOT to clixon-config.yang
* Added 404 return without body if neither restconf, data or streams prefix match
* Fixed: HTTP/1 parse error for '/' path
2022-04-28 16:17:07 +02:00
Olof hagsand
84d88c8ad8 Restconf http-data server updates
Check data paths for .., ~ and soft links
Changed semantics of `CLICON_HTTP_DATA_PATH` and `_ROOT`
Change URI catch-all to 404 instead of 400
Fixed some memory leaks
2022-04-26 17:42:53 +02:00
Olof hagsand
2a8cedf0c3 Limited http-data static server
* Renamed from www-data to http-data
* New `clixon-restconf@2022-03-21.yang` revision
  * Added option:
    * `enable-http-data`
  * Added feature: `http-data`
* Added new str2str mapper
* Test: new test_http_data.sh, added CI github action testing
2022-04-21 16:02:39 +02:00
Olof hagsand
76213057b6 * Extended the Restconf implementation with a limited www-data
* This is an experimental implementation
  * Added `www-data` feature and two new config options to clixon-config.yang:
     * `CLICON_WWW_DATA_PATH`
     * `CLICON_WWW_DATA_ROOT`
  * The limited implemtation is as follows:
     * path: Local files within `CLICON_WWW_DATA_ROOT`
     * operation GET, HEAD, or OPTIONS
     * query parameters not supported
     * indata should be NULL (no write operations)
     * Limited media: text/html, JavaScript, image, and css
     * Authentication as restconf
Generic changes:
  * Uniform path selection across fcgi, native http/1 + http/2
2022-04-21 16:01:33 +02:00
Olof hagsand
580396d32f - Misc documentation
- Test: move pid file from tmp to global storage to prevent multiple instances
2022-04-14 15:21:25 +02:00
Olof hagsand
f1300d7a12 * [Adding feature to top level container doesn't work](https://github.com/clicon/clixon/issues/322)
* Instead of removing YANG which is disabled by `if-feature`, replace it with an yang `anydata` node.
  * This means XML specified by such YANG is ignored, and it is not an error to access it
  * Note the similarity with `CLICON_YANG_UNKNOWN_ANYDATA`
2022-04-06 14:04:11 +02:00