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.
This commit is contained in:
Olof hagsand 2022-05-02 17:20:22 +02:00
parent 2699393c4a
commit f112580546
7 changed files with 58 additions and 1 deletions

24
configure vendored
View file

@ -632,6 +632,7 @@ ac_ct_CXX
CXXFLAGS
CXX
CPP
MIB_GENERATED_YANG_DIR
YANG_STANDARD_DIR
YANG_INSTALLDIR
CLIXON_YANG_PATCH
@ -724,6 +725,7 @@ with_restconf
enable_http1
enable_nghttp2
enable_netsnmp
with_mib_generated_yang_dir
with_configfile
with_libxml2
with_sigaction
@ -1387,6 +1389,9 @@ Optional Packages:
--with-restconf=fcgi FCGI interface for stand-alone web rev-proxy eg
nginx
--without-restconf Disable restconf altogether
--with-mib-generated-yang-dir=DIR
Directory of generated YANG specs (default:
$prefix/share/mibyang)
--with-configfile=FILE Set default path to config file
--with-libxml2 Use gnome/libxml2 regex engine
--without-sigaction Don't use sigaction
@ -3400,6 +3405,8 @@ HAVE_HTTP1=false
# Examples require standard IETF YANGs. You need to provide these for example and tests
# SNMP tests require generated YANGs from MIBs
#
ac_ext=c
@ -5429,6 +5436,23 @@ fi
done
# MIB_GENERATED_YANG_DIR is where clixon assumes generated YANGs from MIBs are stored
# This is NOT installed by Clixon and is not needed for core system
# However, it is required by SNMP tests.
# To generate: for i in /usr/share/snmp/mibs/*; do smidump -f yang $i > `basename -s .txt $i`.yang; done
# Check whether --with-mib-generated-yang-dir was given.
if test "${with_mib_generated_yang_dir+set}" = set; then :
withval=$with_mib_generated_yang_dir; MIB_GENERATED_YANG_DIR="$withval"
else
MIB_GENERATED_YANG_DIR="${prefix}/share/mibyang"
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Generated YANGs from MIB files are expected to be in ${MIB_GENERATED_YANG_DIR}" >&5
$as_echo "Generated YANGs from MIB files are expected to be in ${MIB_GENERATED_YANG_DIR}" >&6; }
fi
# Set default config file location