Kristofer Hallin
812b9accf8
In come cases we need YANG files which are converted from SNMP MIBs using smidump. For the Docker images we'll clone the from an external repository.
2022-05-19 15:46:35 +02:00
Olof hagsand
3dbfbf5b31
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-05-19 15:46:35 +02:00
Kristofer Hallin
80651503fd
SNMP tests: Don't start snmpd, check if the system have snmpd started otherwise present instructions for how to configure and start it.
2022-05-19 15:46:35 +02:00
Kristofer Hallin
1c55ed05f2
SNMP MIB to YANG conversion. Script to traverse a MIB directory and convert the MIBs to YANG files using smidump.
2022-05-19 15:46:35 +02:00
Olof hagsand
d82df5b707
SNMP MIB->YANG translation file handling.
...
Added configure option --with-mib-generated-yang-dir=DIR with
default value /usr/share/mibyang where generated YANGs from MIBs
should be placed so that SNMP tests know where to find the YANGs.
2022-05-19 15:46:35 +02:00
Olof hagsand
2a98ae5d93
SNMP: replaced testhandler code to use only NET-SNMP-EXAMPLES-MIB for scalar and table
2022-05-19 15:46:35 +02:00
Kristofer Hallin
0ada609d2f
Fix for snmpd in Alpine, snmpd crashes with the default configuration.
2022-05-19 15:46:35 +02:00
Kristofer Hallin
168598168f
Fixed minor typo in comment.
2022-05-19 15:46:35 +02:00
Kristofer Hallin
964fbfd3bc
Tests for SNMP tables.
2022-05-19 15:46:35 +02:00
Kristofer Hallin
1894de66a6
Added example for tables.
2022-05-19 15:46:35 +02:00
Kristofer Hallin
bc459a8229
Workaround for crashing snmpd in Alpine.
2022-05-19 15:46:35 +02:00
Kristofer Hallin
3d84a48b45
Valgrind tests for clixon_snmp.
2022-05-19 15:46:35 +02:00
Olof hagsand
625cc76bde
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-05-19 15:46:34 +02:00
Kristofer Hallin
1e05207fd5
Check if we have Net-SNMP support enabled before trying to run SNMP tests.
2022-05-19 15:46:08 +02:00
Kristofer Hallin
e106fa4e5c
Add SNMP tools.
2022-05-19 15:46:08 +02:00
Kristofer Hallin
b4b00bffaf
Set proper paths to SNMP utils.
2022-05-19 15:46:08 +02:00
Kristofer Hallin
498394695c
Changed paths for SNMP tools used in test.
2022-05-19 15:46:08 +02:00
Kristofer Hallin
68b99dc1ad
Initial SNMP tests.
2022-05-19 15:46:08 +02:00
Kristofer Hallin
e74bee7a3d
Tell the agent to use a Unix socket for communication.
2022-05-19 15:46:08 +02:00
Olof hagsand
b7e991dca9
Clixon SNMP frontend update
...
Integrated netsnmp agent and clixon event handling, made a workaround of fdset:s
used in the netsnmp API with sockets used in Clixon
Added a hardcoded MIB OID handler as subagent
Added libnetsnmpagent to autotools dependency check
New OE_SNMP error code
2022-05-19 15:46:08 +02:00
Kristofer Hallin
ce326b0238
Move include of signal.h
2022-05-19 15:46:08 +02:00
Kristofer Hallin
cd77c11109
Install net-snmp-dev and build Clixon with Net-SNMP support.
2022-05-19 15:46:08 +02:00
Kristofer Hallin
b24082c683
Include signal.h
2022-05-19 15:46:08 +02:00
Olof hagsand
451cbef23d
Initial Net-snmp frontend commit
...
Added apps/snmp with makefiles, autotools, docker adjustment
Minimal snmp_main program
2022-05-19 15:46:08 +02:00
Olof hagsand
cca8c88ec1
5.7.0 release
2022-05-17 11:45:43 +02:00
Olof hagsand
0adeae64df
Clixon 5.7.0
2022-05-16 19:44:32 +02:00
Olof hagsand
50fcedafac
Make socket read (SSL_read) error handling more resilient: log and continue instead of exit
2022-05-16 19:34:00 +02:00
Olof hagsand
3a336838f7
Fixed a cornercase of RFC 7950 Sec 7.9, a choice witout case with sub-containers
2022-05-16 13:12:59 +02:00
Olof Hagsand
5bd64712c7
Tests: disabled: valgrind and pagination, restconf notification
2022-05-13 15:02:20 +00:00
Olof hagsand
7b099a5685
Fixed Restconf nghttp2 client EPIPE crash
2022-05-13 13:34:06 +02:00
Olof hagsand
c3b120b364
Test: netconf -H flag replaced with -1 caused valgrind fails
2022-05-12 21:49:34 +02:00
Olof hagsand
d153bfcd0c
Test: restconf notification parallel disabled. start script -l removed
2022-05-12 16:17:26 +02:00
Olof hagsand
9cbe313712
* Fixed: [Keywords containing '-' hyphen are missing from the auto-completion list]( https://github.com/clicon/clixon/issues/330 )
...
* Fixed by disabling `cligen_preference_mode`. This may have other side effects.
2022-05-12 14:54:53 +02:00
Olof hagsand
0c81b66ef3
Fixed: [Returning a string while Querying leaf-list for single entry]( https://github.com/clicon/clixon/issues/326 )
2022-05-12 12:04:13 +02:00
Olof hagsand
7065d6f760
Test: restconf CN variable, strip curl newline
...
Fixed a few compile warnings
2022-05-12 09:40:12 +02:00
Olof hagsand
c27ecf0923
Test: added test of CLI rest variables with delimiters
2022-05-10 17:37:55 +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
614c927343
* Added nsc parameter to xml2xpath() and ensured the xpath uses prefixes.
...
* Old code: add `NULL` as second parameter
2022-05-09 13:48:07 +02:00
Olof hagsand
82a0670031
Docker test: copy clixon.png for http-data test
2022-05-05 18:32:22 +02:00
Olof hagsand
7452813da7
Http data server Fixed binary data retrieval
2022-05-05 18:08:45 +02:00
Olof hagsand
90474d1523
Fixed: A long TLS+HTTP/2 request such as by a browser causing block of other requests.
...
Test: Disabled privileges test if clixon_restconf started with -r
2022-05-02 10:31:53 +02:00
Olof hagsand
463aa15544
Restconf compile warnings and docs
2022-05-02 10:28:24 +02:00
Olof hagsand
5551d753ef
Logging fixes
...
* Fixed: [Error message seen twice in some cases](https://github.com/clicon/clixon/issues/325 )
* Extended `-l` command-line option to all clixon commands with a `none` option, eg `-l n` directs logging to `dev/null`
2022-04-30 11:31:51 +02:00
Olof hagsand
ef302f0c05
Fixed: [if choice is declared with multiple elements or leaf-list with in a case scope , addition or updation is not happening as expected]( https://github.com/clicon/clixon/issues/327 )
...
* This includes several choice/case adjustments to follow RFC 7950 Sec 7.9 better
2022-04-29 19:16:56 +02:00
Olof hagsand
28bd146e5c
Added clixon_netconf command-line option -0and changed -H to -1
...
* `-0` means dont send hello, but fix netconf base version to 0 and use EOM framing
* `-1` means dont send hello, but fix netconf base version to 1 and use chunked framing
2022-04-29 19:07:12 +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
0ed8b836b1
Test: Ensured HVER/RCPROTO work as envvars to test and documented it
2022-04-23 17:23:41 +02:00
Olof hagsand
e0100a6e3c
Fixed: YANG if-feature in config file did not work, was always on
...
Test: unset test variables
2022-04-23 16:49:09 +02:00
Olof hagsand
404d05950a
HTTP data server updates
...
Check of enable-http-data config option
HTTP/2 Return 400 bad request if no path match
Test: updated yang file revisions, extended restconf config with http-data
2022-04-22 15:23:38 +02:00