Commit graph

355 commits

Author SHA1 Message Date
Philip Prindeville
cf2e27b43d Drop __FUNCTION__ from clixon_debug() calls 2024-01-11 17:29:37 +01:00
Olof hagsand
9e54f0602f Changed ca_errmsg callback to a more generic variant
Includes all error, log and debug messages
See [Customized NETCONF error message](https://github.com/clicon/clixon/issues/454)
2024-01-05 16:41:53 +01:00
Olof hagsand
24a4991ec8 Restructured error,debug anf log API
Renamed functions clicon->clixon, replaced global variables w access functions
Unified clicon_netconf_error with clixon_err()
2023-12-18 08:29:14 +01:00
Olof hagsand
261469be16 Feature: [Add support for -V option to give version](https://github.com/clicon/clixon/issues/472) 2023-12-14 23:10:51 +01:00
Olof hagsand
7713e79dc2 Netconf error callback resilient to prefixes
Reformat json code
2023-12-14 10:08:34 +01:00
Olof hagsand
2e6d9167f2 Mount-point support for restconf 2023-11-15 12:12:42 +01:00
Olof hagsand
c703e89bc8 Moved and split install of main example config file 2023-11-02 17:25:11 +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
5bdad1870e New feature: [Customized NETCONF error message](https://github.com/clicon/clixon/issues/454)
* Added new callback `.ca_errmsg`
* Changed signature of `clicon_netconf_error()` and `netconf_err2cb()`
2023-10-26 14:59:51 +02:00
Olof hagsand
62348fc9c7 C-style update: Unified comment, retvals in order, remove trailing spaces
Changed function name for `clicon_debug` functions
2023-10-23 09:58:13 +02:00
Philip Prindeville
951aa71d56 Make /var directory tree owned by $CLICON_GROUP 2023-10-03 23:41:47 +02:00
Philip Prindeville
3a2ffd4233 Run tests as appropriate group
Need to add "groupadd" and "groupdel" for Alpine. See:

https://github.com/gliderlabs/docker-alpine/issues/326
2023-10-03 23:41:47 +02:00
Philip Prindeville
5919ba6c6a Add autoconf handling of clixon user/group in config files 2023-10-03 23:41:47 +02:00
Olof hagsand
2603b6f139 CLI show compare example function
Improved diff algorithm for XML and TEXT/curly, replaced UNIX diff with structural in-mem algorithm
Fixed: ["show compare" and "show compare | display cli" differs #23](https://github.com/clicon/clixon-controller/issues/23)
Changed parameters of example clispec function `compare_dbs()`
Added show2cbuf functions for TEXT/CLI
Renamed clixon_txt2file to clixon_text2file
2023-09-22 10:42:00 +02:00
Olof hagsand
0e81e8137b [YANG error when poking on EOS configuration](https://github.com/clicon/clixon-controller/issues/26) 2023-08-21 10:57:27 +02:00
Olof hagsand
fc73493881 Docs update, externalized cvec_concat_cb, example mem-leak 2023-08-15 20:45:15 +02:00
Olof hagsand
bee30a4ea0 Example: added -m/-M options for testing mount-points 2023-08-07 18:12:53 +02:00
Olof hagsand
b33603107d Output pipe functionality
Based on output pipe code in CLIgen
Clixon adaptions include `CLICON_PIPETREE=` variable and a new cli_pipe.c callback file
2023-07-03 15:14:11 +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
7eb37273b8 Formatting of comments 2023-03-30 15:39:35 +02:00
Olof hagsand
55422f4187 PERF: Added a recurse parameter to xml_yang_minmax_recurse() to avoid "double recursion"
C-API: `candidate_commit()`: validate_level (added in 6.1) marked obsolete
2023-02-23 11:42:15 +01:00
Olof hagsand
2db5961169 Example: fixed mismatch between install dirs and DIRs in example.xml.in
Docker: Removed example from test container, fixed example container
2023-02-22 23:24:50 +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
ecd60fbcfe
Merge pull request #418 from kernelkit/kkit
Misc. build fixes encountered when cross-compiling
2023-02-17 09:52:42 +01:00
Joachim Wiberg
9cd764f031 example/main: replace hard-coded path with variables from configure
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-02-09 15:53:52 +01:00
Joachim Wiberg
b48c6ad982 example/main: add missing $(DESTDIR) to standard include path
This is used everywhere else so looks loke a simple omission.  Needed
when cross-compiling (or packaging) Clixon.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2023-02-09 15:53:52 +01:00
Olof hagsand
8f7ae33262 Yang schema mount: repaired yanglib statedata mountpoint
Example: patch to fix "dual xpath" issue
2023-02-08 15:00:07 +01:00
Olof hagsand
a203f6cde7 Updated extraxml reset callback example and added a regression test 2023-02-02 12:17:52 +01:00
Olof Hagsand
a8e13047fc * YANG schema mount RFC 8528, state data 2023-01-27 15:11:08 +01:00
Olof hagsand
6fedf65de7 C-API: Changed type of veclen parameter to size_t in xpath_vec_flag()
Rewrite of sed -e to be portable to freebsd
2022-12-29 15:49:19 +01:00
Olof hagsand
0d41d49fa9 Moved with-defaults processing from get(-config) to xmldb_get when reading db
With-defaults: fixed cornercase in xpath used in list pagination
C-API: Added `with-defaults` parameter (default 0) to `xmldb_get0()`
2022-12-18 19:59:02 +01:00
Olof Hagsand
e885d63f68 Minor doc and err handling fixes 2022-12-16 10:48:28 +01:00
Olof hagsand
100f15b699 Add SSH_BIN compile-time option
Clarify documentation of internal netconf message struct
2022-12-07 12:15:08 +01:00
Olof hagsand
c2faf8b96c Main example: Removed dependency of external IETF RFCs
+  * See [Can't initiate clixon_backend](https://github.com/clicon/clixon/issues/382)
2022-11-01 12:20:30 +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
Phil Heller
284316b646 Initial implementation of NETCONF confirmed-commit 2022-10-03 21:44:35 -06:00
Olof hagsand
fcc9245c35 Test: make streams optional, remove dependency on main example 2022-09-20 14:44:30 +02:00
Olof hagsand
a6f67755b3 Refactor of cli show commands:
- Changed `cli_show_config()`
- Removed `cli_show_config_state()`
- Replaced `cli_auto_show()` with `cli_show_auto_mode()`
2022-09-15 17:42:57 +02:00
Olof hagsand
9a224ea4a0 Fixed: [All values in list don't appear when writing "show <list>" in cli](https://github.com/clicon/clixon/issues/359)
CLISPEC change:
* Changed signature of `cli_show_auto()`,
* remove: `cli_show_auto_state()`
2022-09-15 09:48:08 +02:00
Olof hagsand
743076b171 With-defaults CLI support
Extended cli_auto_show() with with-defaults argument, also changing its signature
Example: Added with-defaults argument to clispec
C-API: Added with-defaults argument to clicon_rpc_get_config
Replaced with-defaults prefix/namespace with constants
2022-09-09 13:46:20 +02:00
Kristofer Hallin
68b528ac0b Make Clixon build on MacOS. 2022-08-16 08:40:04 +02:00
Olof hagsand
57bc36d5ed Fixed: [Clixon CLI issue: when I try to print the value of the leaf node nothing appeared](https://github.com/clicon/clixon/issues/345) 2022-07-26 13:32:57 +02:00
Olof hagsand
4514f2a538 Fixed: ["autocli:hide-show" extension cause bug in xmldb_put method #343](https://github.com/clicon/clixon/issues/343)
As a side-effect, added extra "autocliext" parameter to:
- clixon_xml2file()
- clixon_json2file()
- clixon_json2cbuf()
- clixon_txt2file()
2022-07-22 16:06:28 +02:00
Olof hagsand
e724dd7f40 Test: Added detail env var to sum.sh, Changed make test to include detailed test 2022-07-21 09:08:18 +02:00
Olof hagsand
42efb59a75 Example main -v/-V issues breaking previous commit tests 2022-07-21 08:07:48 +02:00
Olof hagsand
89f8567f75 Refactoring of if-feature parse code
Moved if-feature sub-parser to clixon_yang_parse_sub.[ch]
2022-07-20 22:48:09 +02:00
Olof hagsand
bdb516fec9 YANG Action (RFC 7950 Section 7.15)
See [Support for "action" statement](https://github.com/clicon/clixon/issues/101)
2022-06-21 15:44:02 +02:00
Olof hagsand
b6bfcb69f7 Text syntax parser/loader
Added support for list x y;
Uses a mechanism to parse as unknown XML body and post-parsing replace with list keys
Fixed example and test to work with new TEXT syntax
2022-06-02 19:28:49 +02:00
Olof hagsand
0c79298e76 Changed C-API for xml translation/print the internal cxobj tree data structure to other formats
New API is as follows:
  * `clixon_xml2file()` - Print internal tree as XML to file
  * `clixon_xml2cbuf()` - Print internal tree as XML to buffer
  * `clixon_json2file()` - Print internal tree as JSON to file
  * `clixon_json2cbuf()` - Print internal tree as JSON to buffer
  * `clixon_cli2file()` - Print internal tree as CLI format to file
  * `clixon_txt2file()` - Print internal tree as text format to file
2022-06-01 20:02:27 +02:00