Kristofer Hallin
91bed5589a
Extended supported types with uint64.
2022-05-22 21:09:03 +02:00
Kristofer Hallin
aea2760cb0
Extended supported types with uint32.
2022-05-21 09:49:08 +02:00
Kristofer Hallin
299227a7ca
Test all fields in an ifTable with only single entry, disabled for now.
2022-05-20 15:59:56 +02:00
Olof hagsand
ea03363c3a
SNMP frontend: Generalized type handling for set functions
...
SPlit scalar_handler into get and set subfunctions
2022-05-20 15:05:23 +02:00
Olof hagsand
34fe439f53
SNMP frontend, restructure files
...
Split snmp_mib_yang.c into: snmp_register.[ch] and snmp_handler.[ch]
2022-05-19 16:02:52 +02:00
Olof hagsand
0cf87c75a9
SNMP frontend: Changed yang2xpath to us string, traverse only datanodes
2022-05-19 15:46:35 +02:00
Olof hagsand
7b2eee0158
removed binary added by mistake
2022-05-19 15:46:35 +02:00
Olof hagsand
63620994e8
SNMP frontend: added -z zap command-line option and pid-file exclusive check, fixed mem check
2022-05-19 15:46:35 +02:00
Kristofer Hallin
70ac79c825
Handle errors from clixon_table_create.
2022-05-19 15:46:35 +02:00
Olof hagsand
eb18a60d6c
SNMP frontend: changed default mibyang dir to /share/mib-yangs to be same as repo
...
Test: new prel test_snmp_ifmib.sh
2022-05-19 15:46:35 +02:00
Olof hagsand
14faf2b3f0
SNMP frontend: conflict typos, snmp pidfile
2022-05-19 15:46:35 +02:00
Olof hagsand
5a3e2eaae6
SNMP frontend: getnext, oid sanity checks and scalar debug
2022-05-19 15:46:35 +02:00
Kristofer Hallin
338be43e6a
New function, clixon_table_create which will clear a table and create any rows, indexes and columns to avoid collissions.
2022-05-19 15:46:35 +02:00
Olof hagsand
38d91a1305
SNMP frontend generic code for tables and clixon backend
...
Added snmp-msg translation table
Changed test-table to only GET
2022-05-19 15:46:35 +02:00
Olof hagsand
8a208693ba
SNMP frontend. New snmp_lib.[ch] and rearranged code into lib
...
Test: renamed WITH_SNMP -> ENABLE_SNMP
2022-05-19 15:46:35 +02:00
Olof hagsand
3642fde46f
SNMP frontend, add int32 + string type for scalars
...
Added get string test
Added set value for netconf test
2022-05-19 15:46:35 +02:00
Olof hagsand
1b921e874e
SNNP frontend. Added SMI default value support and deviation for set
2022-05-19 15:46:35 +02:00
Kristofer Hallin
299554048f
For tables use a callback to create indexes, rows etc.
2022-05-19 15:46:35 +02:00
Olof hagsand
63c5846091
SNMP frontend table fix: handler called with heartrate, return 0
2022-05-19 15:46:35 +02:00
Kristofer Hallin
f5d9f7226c
Don't rely on the pid-file to see if snmpd is running or not.
2022-05-19 15:46:35 +02:00
Olof hagsand
0473303a4c
SNMP frontend, main test for config false only, write test move to test_snmp_set.sh
2022-05-19 15:46:35 +02:00
Olof hagsand
f1db15c2ad
SNMP frontend, RPC of single variable through clixon
2022-05-19 15:46:35 +02:00
Olof hagsand
19c47ee043
SNMP frontend
...
Fixed table/scalar collision issue
Made the CS variable change said to be in previous commit
2022-05-19 15:46:35 +02:00
Olof hagsand
0a1ff1a445
SNMP frontend test changes
...
Added a CS variable, set to 0 if you started clixon_snmp yourself (eg in gdb)
Also added BE (backend) with the same purpose for backend
2022-05-19 15:46:35 +02:00
Kristofer Hallin
de28fb18fe
Minimal snmpd configuration for the Docker containers. Also change the pid-dir to /var/run/ since
...
that is what all the tests are expecting. Can we pass the tests now?
2022-05-19 15:46:35 +02:00
Kristofer Hallin
465c373e1e
Removed problematic MIB for now.
2022-05-19 15:46:35 +02:00
Kristofer Hallin
2b66def1f1
Change dockerfiles and start scripts to install Net-SNMP, configure snmpd properly
...
and make sure it is started. This is needed for the SNMP tests (test_snm*) to run properly.
Since we can't rely on systemd in Alpine we start snmpd from the startsystem-scripts.
2022-05-19 15:46:35 +02:00
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