Olof hagsand
eaedb14918
Prepare for 4.9.0 release
2020-12-18 13:54:00 +01:00
Olof hagsand
b8f5d1dcae
* Added CLICON_BACKEND_RESTCONF_PROCESS to clixon-config.yang
2020-12-17 12:13:06 +01:00
Olof Hagsand
4fe3486d4e
Merge pull request #162 from s-bauer/patch-2
...
Fixed filter-namespace not recognized correctly
2020-12-16 16:22:29 +01:00
Olof hagsand
22adc58187
* New process-control RPC feature in clixon-lib.yang to manage processes
...
* This is an alternative to manage a clixon daemon via sudtemd, containerd or other
* One important special case is starting the clixon-restconf daemon internally
* This is how it works:
* Register a process via `clixon_process_register(h, name, namespace, argv, argc)`
* Use process-control RPC defined in clixon-lib.yang to start/stop/restart or query status on that process
* Example code in the main example
2020-12-15 15:48:42 +01:00
Olof hagsand
8540820698
* New clixon-lib@2020-12-08.yang revision
...
* Added: autocli-op extension (see new features)
* Added: rpc process-control for process/daemon management
* Added enable flag and removed presence in clixon-restconf
2020-12-13 22:19:25 +01:00
Simon Bauer
638658c63d
Update netconf_rpc.c
2020-12-13 18:07:28 +01:00
Simon Bauer
be329dac6d
Fixed filter namespace in netconf_rpc.o
...
The "filter" node was not detected when an a namespace was used. The fix is similar to d045e8abce and related to bug #154 #143
2020-12-13 18:05:49 +01:00
Olof hagsand
d6db28c47a
Fixed memory error in RESTCONF PATCH/PUT when accessing top-level data node.
2020-12-09 13:39:38 +01:00
Olof hagsand
b8641f30bd
* More YANG extension functionality,
...
* See [Augment auto-cli for hiding/modifying cli syntax #156 ](https://github.com/clicon/clixon/issues/156 ) and [hiding auto-generated CLI entries #153 ](https://github.com/clicon/clixon/issues/153 )
* Extensions can be used in augmentations
* Extension `autocli-op` has been added to add "hidden" commands in the autocli
* Documentation: https://clixon-docs.readthedocs.io/en/latest/misc.html#extensions
2020-12-08 17:21:37 +01:00
Olof hagsand
e1b94d94d2
* Ensure all fopen check for NULL (not -1)
...
* Improve test-perf cycles
2020-12-07 13:33:21 +01:00
Olof Hagsand
344dcacf6f
* Second fix of https://github.com/clicon/clixon/issues/158
...
* Actually there is an error of duplicate rpc-replies, but it should be detected in the backend not here
2020-12-06 11:22:26 +00:00
Olof hagsand
3c014184f7
* Fixed: [ Calling copy-config RPC from restconf #158 ]( https://github.com/clicon/clixon/issues/158 )
2020-12-05 17:36:21 +01:00
Olof hagsand
a71e8aaceb
* minor edits make datastore=nocache pass tests, and ensure generic copy-config works
2020-12-04 14:47:55 +01:00
Olof hagsand
d045e8abce
* Fixed: [namespace prefix nc is not supported in full #154 ]( https://github.com/clicon/clixon/issues/154 )
...
* edit-config "config" parameter did not work with prefix other than null
2020-12-02 14:21:17 +01:00
Olof hagsand
6810472a42
* Fixed typo: [False Header Content_type in restconf error #152 ]( https://github.com/clicon/clixon/issues/152 )
2020-12-01 12:58:07 +01:00
Olof hagsand
c32950c8a9
* Added message-id attributes in error and hello replies
...
* See [namespace prefix nc is not supported in full #154 ](https://github.com/clicon/clixon/issues/154 )
* Removed mandatory loading of clixon_restconf.yang
2020-12-01 12:14:30 +01:00
Olof hagsand
19fb063f82
Support for building static lib:
2020-11-29 17:00:35 +01:00
Olof hagsand
542c0495b3
autocli sub fixes
2020-11-28 18:17:32 +01:00
Olof hagsand
75f85e0253
revert yang2cli sub code, use existing yang2cli solution
2020-11-27 15:31:27 +01:00
Olof hagsand
dda3244252
* Auto-cli changed singature of yang2cli()
...
* Auto-cli: create generated CLI for sub-parts of a YANG spec
2020-11-26 17:32:09 +01:00
Olof hagsand
0b948248e4
* Reworked evhtp restconf config to only use clixon-restconf.yang and marked local restconf options as obsolete
...
* Extended clicon-config with clixon-restconf for local config
* Removed obsolete CLICON_TRANSACTION_MOD
2020-11-21 13:16:29 +01:00
Olof hagsand
3d10c3bfcb
evhtp debugging: memleaks, test errors, etc
2020-11-19 18:06:20 +01:00
Olof hagsand
c0ad6d3f8f
remove global ssl-enable in clixon-restconf.yang
2020-11-18 21:52:47 +01:00
Olof hagsand
9016dde319
Modify tests so they all work with evhtp and backend config, eg that CLICON_RESTCONF_CONFIG is default true.
...
Note that some tests are forced to CLICON_RESTCONF_CONFIG is false due to test complexities.
2020-11-18 13:57:25 +01:00
Olof Hagsand
a2bef12ce0
strncpy warnings fixed: stringop-truncation and stringop-overflow
2020-11-17 07:35:50 -06:00
Olof hagsand
6eb18da5e9
* Multi-socket feature (eg IPv4/IPv6 http/https) to restconf evhtp
...
* Added by-ref parameter to `ys_cv_validate()` returning which sub-yang spec was validated in a union.
2020-11-15 12:34:40 +01:00
Olof hagsand
a0006075c3
Merge branch 'topic_benavrhm_rfc8527a_20201103' of https://github.com/benavrhm/clixon into benavrhm-topic_benavrhm_rfc8527a_20201103
2020-11-11 13:41:05 +01:00
Olof hagsand
4ecffa6885
test systemctl; better rpc namespace errormsg
2020-11-11 13:09:58 +01:00
Jonathan Ben-Avraham
0f1a2ef631
Whitespace fix
2020-11-11 13:54:09 +02:00
Jonathan Ben-Avraham
cd45f277ef
Added basic rfc8527 support
...
Added basic rfc8527 support, but without support for:
* ds:operational
* with-origin
* clixon/test/test_rfc8527_*.sh
The current level of rfc8527 support is intended to allow commit
operations on the 'candidate' datastore without rewriting the 'startup'
datastore.
2020-11-07 22:11:35 +02:00
Olof hagsand
6ecb0d5232
tests for restconf backend configure
...
rm client-cert-ca
2020-11-06 11:41:59 +01:00
Olof hagsand
c31b1c471b
* 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 )
2020-11-04 22:21:42 +01:00
Olof hagsand
7a0838da3a
* Restconf configuration has a new configure model: clixon-restconf.yang enabling restconf daemon configuration from datastore instead of from config file.
2020-11-03 21:26:34 +01:00
Olof hagsand
5c5e45d10a
Added new backend plugin: ca_pre-demon called if backend is daemonized just prior to forking.
2020-10-31 17:08:59 +01:00
Olof hagsand
fab261cb53
* Added XPATH functions position
2020-10-27 09:40:45 +01:00
Olof hagsand
1614bcd19c
Cleanup master for 4.9.0.PRE
2020-10-19 20:06:20 +02:00
Olof hagsand
e176330a74
* Removed string limit on cli prompt and cli mode name
2020-10-18 16:24:11 +02:00
Olof hagsand
f07f291bdd
Main examples uses new auto-mode
2020-10-18 00:02:38 +02:00
Olof hagsand
a77cd27abb
* Fixed: [namespace prefix nc is not supported]( https://github.com/clicon/clixon/issues/143 )
...
* Added more sanity checks on incoming top-level rpc and hello messages, including verifying top-level namespace
2020-10-17 18:04:46 +02:00
Olof hagsand
6465022f57
Find non-config nodes and mark/return error with better error message
2020-10-15 13:55:44 +02:00
Olof hagsand
fec6fbbd49
removed debug printf:s
2020-10-14 22:24:39 +02:00
Olof hagsand
7da98de695
uninitizlized variable
2020-10-14 12:55:21 +02:00
Olof hagsand
a41bd8aed3
Merge branch 'master' of https://github.com/clicon/clixon
2020-10-14 11:23:59 +02:00
Olof hagsand
2d56c9674a
* New YANG generated auto-cli feature with syntax modes
...
* The existing autocli does not support modes, complete paths must be given, eg: `set a b c d 42`.
* In the new auto-cli, automatic modes are present at each YANG syntax node level, eg the above can be given as: `edit a b c; set d 4; top`
* The existing CLI API remains, the new API is as follows: `cli_auto_edit()`, `cli_auto_up()`, `cli_auto_top()`, `cli_auto_show()`, `cli_auto_set()`, `cli_auto_merge()`, `cli_auto_create()`, `cli_auto_del()`.
* See `test/test_cli_auto.sh` for an example of the new API, and `apps/cli/cli_auto.c` for the source code of the new callback API.
* Documentation will be appear and full integration with the main example.
* Added inline state field to clixon-example.yang
* Added new clicon_data_cvec_*() API for generic cvec structs
2020-10-14 10:54:10 +02:00
Olof hagsand
8d901e1fde
* Extended CLI_PROMPT syntax with %W as working path in tree, which more concretely is a path to the current position in a syntax tree in the autocli.
...
* Comments on clixon-config.yang
2020-10-12 11:19:43 +02:00
Olof hagsand
f9cc26582a
minor: strncpy -> strcpy and formatting
2020-10-10 15:32:19 +02:00
Olof hagsand
5c67bcd364
validation of list keys rearrangement of code
2020-10-08 15:32:23 +02:00
Olof hagsand
8ae647c32b
* More explanatory validation error messages for when and augments error messages.
...
* Example: error-message: `Mandatory variable` -> `Mandatory variable of edit-config in module ietf-netconf`.
2020-10-07 20:57:49 +02:00
Olof hagsand
09d33acd45
cli show options. doc and testing
2020-10-01 11:07:57 +02:00
Olof hagsand
6f2c4a076d
* Configuration directory
...
* A new configuration option `CLICON_CONFIGDIR` has been added for loading of extra config files
* If not given, only the main configfile is loaded.
* If given, and if the directory exists, the files in this directory will be loaded alphabetically AFTER the main config file in the following way:
* leaf values are overwritten
* leaf-list values are appended
* You can override file setting with `-E <dir>` command-line option.
* New clixon-config@2020-10-01.yang revision
* Added option for configuration directory: `CLICON_CONFIGDIR`
2020-10-01 11:04:25 +02:00