Commit graph

2896 commits

Author SHA1 Message Date
Хроменок Роман Владимирович
20750cb616 Added examples to the cli
The function has been renamed and has become more universal
Added error checking (incorrect input)
2024-06-20 14:03:38 +02:00
Хроменок Роман Владимирович
b81e18141d Refactoring has been performed
Goto added
Added margins
Added comments
2024-06-20 14:03:38 +02:00
Хроменок Роман Владимирович
de820417d1 Added api 2024-06-20 14:03:38 +02:00
Хроменок Роман Владимирович
a6fb392365 Added examples of running scripts, and an example with an error 2024-06-20 14:03:38 +02:00
Хроменок Роман Владимирович
cc68426929 Added a feature that allows you to run python scripts from the cli without bash 2024-06-20 14:03:38 +02:00
Olof hagsand
43325ca2f8 Fixed: [Invalid api-path errors thrown when displayin qfx family device conf in CLI](https://github.com/clicon/clixon-controller/issues/126) 2024-06-19 14:49:22 +02:00
Olof hagsand
0234ed94bc Added CLICON_LOG_DESTINATION and CLICON_LOG_FILE for al applications 2024-06-19 12:46:09 +02:00
Corey Minyard
26062d7003 backend: Consolidate common code in plugin callbacks
There was a bunch of repeated code in the calls to the transaction
callbacks.  Consolidate it all in one function and call that from the
various transaction handling functions.

Signed-off-by: Corey Minyard <minyard@acm.org>
2024-06-11 16:45:49 +02:00
Corey Minyard
ec36f57c8d plugin: Consolidate plugin initialization
There was duplicate code in the the plugins, consolidate allocating and
adding a plugin into one function and call it from elsewhere.

Signed-off-by: Corey Minyard <minyard@acm.org>
2024-06-11 16:45:49 +02:00
Corey Minyard
a84547ed0a plugin: Remove pointless if statement
cp has to be valid here, no need to check it.

Signed-off-by: Corey Minyard <minyard@acm.org>
2024-06-11 16:45:49 +02:00
Corey Minyard
c94ca6179f plugin: Always dlclose() a module with a handle
Even if it doesn't have a ca_exit function.  Otherwise it will leave
modules lying around.

Signed-off-by: Corey Minyard <minyard@acm.org>
2024-06-11 16:45:49 +02:00
Olof hagsand
54ba56a41e YANG schema shared fix
YANG_SCHEMA_MOUNT_YANG_LIB_FORCE caused equality to fail
2024-06-11 11:35:31 +02:00
Olof hagsand
ef89561215 CLI: improved show memory command 2024-06-08 14:51:36 +02:00
Olof hagsand
8d05432e98 CLI: Improved and renamed show statistics -> show memory command
Fixed shared yang-spec reference count
2024-06-07 13:57:41 +02:00
Olof hagsand
25e1bade8f RESTCONF notification for HTTP/2 native mode 2024-06-06 17:04:53 +02:00
Olof hagsand
3579d98243 Refactoring of yang schema mount code 2024-06-02 12:16:00 +02:00
Olof hagsand
80d03fb5b0 test: adding correct x509 v3 CA cert 2024-05-31 08:48:00 +02:00
Olof hagsand
8098fb031f Test: check openssl 3.3.0 for x509 v1 2024-05-28 19:44:38 +02:00
Olof hagsand
e2140aed10 Formatting and debugs 2024-05-28 18:50:07 +02:00
Olof hagsand
c377a28d56 Use x509 v1 certs for test use in openssl 3.3
Switch back to alpine 3.20
2024-05-28 17:29:27 +02:00
Olof hagsand
a194c049c7 Fix clixon test container to alpine 3.19
Affects make test and action regressions
Some issue with alpine 3.20, probably openssl 3.3 enforcing cert usage fields
2024-05-28 16:40:35 +02:00
Olof hagsand
b8599558d4 Test: disable ssl client cert tests (temporarily) 2024-05-27 14:55:05 +02:00
Olof hagsand
148982d3a9 Fix NETCONF filtering patch 2024-05-27 14:32:18 +02:00
Olof hagsand
1412b416f6 Filter duplicate NETCONF requests on the same object causing memory fault 2024-05-27 14:09:04 +02:00
Olof hagsand
1904805103 Fixed: [Error message from CLI if terminal is modified](https://github.com/clicon/clixon-controller/issues/122) 2024-05-22 16:48:57 +02:00
Olof Hagsand
d5d23dd90e Fix shared yang code 2024-05-22 14:54:09 +02:00
Colin Baumgarten
d29b7e574c xml_merge1(): Allow merging trees with nodes below mountpoints
xml_merge1() fails right now when merging trees which have data
below mountpoints with an error message like this:

XML node %s/%s has no corresponding yang specification (Invalid XML or wrong Yang spec?

This is because xml_merge1() does not handle mountpoints. Adjust
it accordingly.

Note that this was encountered when generating the state of a a yang
module that has both state and config below a mountpoint. In that case
netconf_trymerge() will be called to merge state and config and will
trigger the problem in xml_merge1().
2024-05-22 14:10:37 +02:00
Olof hagsand
b6480ac07d clixon-config.yang: Added CLICON_DEBUG, Removed: CLICON_NETCONF_DUPLICATE_ALLOW
Rearranged and grouped options
clixon-lib.yang: Added debug types
Removed git reliance in test - moved to configure script
2024-05-21 13:21:55 +02:00
Olof hagsand
c8a8197e92 Github actions: added a fcgi restconf test 2024-05-19 18:23:50 +02:00
Olof hagsand
1336a4ccfb RESTCONF notification for native mode 2024-05-19 17:44:24 +02:00
Olof hagsand
7a842846db Formatting 2024-05-19 10:04:31 +02:00
Olof hagsand
37e9429ec8 Optimization of yang schema mount: share yang-specs if equal 2024-05-19 10:04:31 +02:00
Colin Baumgarten
4b33841858 cli_auto_up: Partly fix handling of mountpoints
The cli_auto_up command right now does not properly handle
mountpoints.

Fix the case when going up one level inside of a mounted
module.

Note that this does not yet fix the case where the current level
is the top-level of the mounted module. In that case the up command
should switch to the presence container that holds the mounted
module. Instead it switches all the way up to the topmost level, so
it has the same effect as the top command.
2024-05-16 12:09:55 +02:00
Olof hagsand
c353c6dcab Debug: Added PARSE debug flag 2024-05-15 13:51:18 +02:00
Olof hagsand
03a9c03b1c Fixed: backend exit when receiving invalid NETCONF get select XPath
Added XML encoding to XPaths in `select` attribute
2024-05-15 13:44:12 +02:00
Olof hagsand
989a7b38ee Test: add coreutils to test container 2024-05-14 10:13:36 +02:00
Olof hagsand
62a4b5feff Restconf native+http/1 + tls
Added command-line timeout -t <sec> to restconf
Example: Added programmable timeout to backend example
Test: updated for fcgi and native using internal timeouts
2024-05-13 23:13:05 +02:00
Olof hagsand
2b2a2ec1ad Restconf native stream support 2024-05-13 08:29:48 +02:00
Olof hagsand
2d5a646b51 Changed -f /usr/local/etc/example.xml -> /usr/local/etc/clixon/example.xml everywhere 2024-05-13 08:29:46 +02:00
Olof hagsand
488a532dec Log: remove trailing \n, added log description 2024-05-09 17:00:01 +02:00
Olof hagsand
9738345f82 Optimize of multi-db write 2024-05-09 12:18:35 +02:00
Olof hagsand
ca701b0c1a Changed intermediate version numbers to be git-style, eg 7.0.0-39 instead of 7.1.0-PRE
* Changed datastore modstate to be last in file, as prior to 7.0
2024-05-08 16:51:45 +02:00
Olof hagsand
8ebfdb8168 Changed datastore modstate to be last in file, as prior to 7.0 2024-05-08 14:47:44 +02:00
Olof hagsand
b1209aac67 Multi-db: Moved top-level datastore from (eg) running_db to running.d/0.xml 2024-05-08 09:40:27 +02:00
Olof hagsand
af36838b4c Changed -f /usr/local/etc/example.xml -> /usr/local/etc/clixon/example.xml everywhere 2024-05-07 12:27:51 +02:00
Colin Baumgarten
60fdb65ee0 cli_auto_edit: Fix data below mountpoint cannot be edited
Without this fix, every edit affects the mountpoint destination
module directly instead of the same module inside of its mountpoint
container.
2024-05-07 12:25:43 +02:00
Colin Baumgarten
34fff6c270 cli_auto_top: Add missing clear of cli-edit-mtpoint
Without that going to the top from inside a mountpoint will lead
to an invalid combination of cli-edit-* states which will in turn
make following commands fail.
2024-05-07 12:25:43 +02:00
Colin Baumgarten
2142a4fd96 cli_dbxml(): Fix handling of mountpoints
The function has code to handle mountpoints, however there is
a logic error that prevents that code from ever being run.

Fix that.
2024-05-07 12:25:43 +02:00
Olof hagsand
fcdfbd23cc Re-optimized yang cardinality
Misc rearrangements
2024-05-02 13:34:46 +02:00
maverick0815
d2f3405ab6 Use yacc and lex as detected by autoconf to build restconf
Setup YACC and LEX via autoconf
On opensuse tumbleweed I had a build error because the wrong lex variant was used without this.

This is the same as in lib/src/Makefile.in
2024-04-29 21:00:21 +02:00