Commit graph

1420 commits

Author SHA1 Message Date
Olof hagsand
a5f32fbedf * Restconf evhtp using network namespaces implemented 2021-01-26 17:33:24 +01:00
Olof hagsand
3fe218da2e New clixon_client API for external access 2021-01-22 14:50:07 +01:00
Olof hagsand
94c6bd9c49 Added proc socket and text proto rpc 2021-01-22 14:41:47 +01:00
Olof hagsand
68371d4fc5 upgrade copyright, aux tools, etc 2021-01-21 12:23:46 +01:00
Olof hagsand
2d402b7ba5 Added validation of clixon-restconf.yang: server-key-path and server-cert-path must be present if ssl enabled. 2021-01-21 12:11:26 +01:00
Olof hagsand
f1449a2542 test error 2021-01-15 14:21:06 +01:00
Olof hagsand
f0325d989e Fixed: [Behaviour of Empty LIST Input in RESTCONF JSON #166](https://github.com/clicon/clixon/issues/166) 2021-01-15 13:50:05 +01:00
Olof hagsand
96b50b88e8 Copyright 2021 2021-01-13 14:40:34 +01:00
Olof hagsand
a7e11c75d8 Merge branch 'baruchsiach-fix-netconf-startup-validate' 2021-01-13 11:23:46 +01:00
Olof hagsand
5337619af8 Merge branch 'fix-netconf-startup-validate' of https://github.com/baruchsiach/clixon into baruchsiach-fix-netconf-startup-validate 2021-01-13 11:15:10 +01:00
Olof hagsand
d914495ab4 Fixed a bug where clicon_debug_init interfered with clicon_log_file 2021-01-13 11:11:50 +01:00
Olof hagsand
c269d094e4 * Experimental IPC API, clixon_client, to support a loose integration model
* Many systems using other tools employ such a model, and this API is an effort to make a usage of clixon easier
  * see https://clixon-docs.readthedocs.io/en/latest/overview.html#loose-integration
  * This is work-in-progress and is expected to change
2021-01-12 14:08:35 +01:00
Olof hagsand
2a392ca0e9 * rpc msg C API rearranged to separate socket/connect from connect 2021-01-12 14:03:07 +01:00
Olof hagsand
8cde7a4ded * Handling empty netconf XML messages "]]>]]>" is changed from being accepted to return an error.
* Netconf split lines input (input fragments) fixed
  * Netconf input split on several lines, eg using stdin: "<a>\nfoo</a>]]>]]>" could under some circumstances be split so that only "</a>]]>]]>" be properly processed. This could also happen to a socket receiving a sub-string and then after a delay receive the rest.
  * Fixed by storing residue and add that to the input string if later input is received on the same socket.
* Use [https://github.com/clicon/libevhtp](https://github.com/clicon/libevhtp) instead of [https://github.com/criticalstack/libevhtp](https://github.com/criticalstack/libevhtp) as a source of the evhtp source
2021-01-07 16:57:47 +01:00
Olof hagsand
cf63d0f761 * New clixon-config@2020-12-30.yang revision
* New clixon-lib@2020-12-30.yang revision
* Added callback to process-control RPC feature in clixon-lib.yang to manage processes
* Changed behavior of starting restconf internally using `CLICON_BACKEND_RESTCONF_PROCESS` monitoring changes in enable flag, not only the RPC.
* Changed: RPC process-control output parameter status to pid
2021-01-02 17:27:44 +01:00
Olof hagsand
7459925bd0 Limited fuzz by AFL committed, see [fuzz/README.md](fuzz/README.md) for details 2020-12-29 18:29:06 +01:00
Olof hagsand
7f49c13eba test restconf bugfix, added xml_nsctx_cbuf 2020-12-29 15:57:21 +01:00
Olof hagsand
41e23865a1 revise testing: change expectfn -> extectpart etc 2020-12-29 13:49:49 +01:00
Olof hagsand
96ab7292b9 * Added cvv_i output parameter to api_path_fmt2api_path() to see how many cvv entries were used
* CLIspec dbxml API: Ability to specify deletion of _any_ vs _specific_ entry.
2020-12-29 11:14:34 +01:00
Baruch Siach
0289569586 datastore_read: bind yang when reading from cache
The cached xml version might be missing the yang information. This
breaks netconf validation of the running database:

yangcli admin@192.168.0.1> validate source=startup

RPC Error Reply 3 for session 3:

rpc-reply {
  rpc-error {
    error-type application
    error-tag operation-failed
    error-severity error
    error-message 'No spec found radio-dn'
  }
}

Make sure that the cached database respects the yb parameter.
2020-12-28 17:23:16 +02:00
Olof hagsand
906d8bc63c [Presence container configs not displayed in 'show config set' #164 ](https://github.com/clicon/clixon/issues/164) 2020-12-28 14:52:56 +01:00
Olof hagsand
4de0a475d3 4.10.PRE 2020-12-28 13:16:25 +01:00
Olof hagsand
006580cdc1 4.9.0 2020-12-18 15:08:42 +01:00
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
2b820e153a * [Delete and show config are oblivious to the leaf value #157](https://github.com/clicon/clixon/issues/157)
* Added equality of values necessary condition in edit-config delete/remove of leafs
2020-12-16 16:03:57 +01:00
Olof hagsand
8bc81a8e42 Merge branch 'baruchsiach-fix-xpath-select' 2020-12-16 11:52:32 +01:00
Olof hagsand
aefc84892b Merge branch 'fix-xpath-select' of https://github.com/baruchsiach/clixon into baruchsiach-fix-xpath-select 2020-12-16 11:43:45 +01:00
Olof hagsand
f4076497f1 Merge branch 'master' of https://github.com/clicon/clixon 2020-12-16 11:37:57 +01:00
Olof hagsand
214f9cbd82 Merge branch 'dcornejo-master' 2020-12-16 11:37:28 +01:00
Olof hagsand
07f96934b3 need to check grand-parent exists 2020-12-16 11:37:02 +01:00
Olof hagsand
0e1ae1deab Merge branch 'master' of https://github.com/dcornejo/clixon into dcornejo-master 2020-12-16 10:18:37 +01:00
Olof Hagsand
53cdfebe11
Merge pull request #161 from s-bauer/patch-1
Fixed example_reset function
2020-12-16 10:03:21 +01:00
Olof hagsand
ff8650c748 restconf-rpc tests 2020-12-15 17:22:07 +01:00
Olof hagsand
475e70d773 * 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 16:04:58 +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
Simon Bauer
4ea547ac6f
Fixed example_reset function
The `xmldb_put` is failing due to the `x_spec` field not being set on the xml tree (`xt`) due to no yang spec being passed to the `clixon_xml_parse_string` function.
2020-12-13 17:04:43 +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
99c570e278 test/vagrant fixes 2020-12-03 14:23:59 +00: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
2b9f19a19f test rpc keyless wrong order 2020-12-02 09:53:33 +01:00