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>
This commit is contained in:
Olof hagsand 2022-05-04 15:03:08 +02:00
parent ee06652e86
commit df687f7180
12 changed files with 561 additions and 243 deletions

View file

@ -861,7 +861,7 @@ cli_show_options(clicon_handle h,
else
fprintf(stdout, "%s: NULL\n", keys[i]);
}
/* Next print CLICON_FEATURE and CLICON_YANG_DIR from config tree
/* Next print CLICON_FEATURE, CLICON_YANG_DIR and CLICON_SNMP_MIB from config tree
* Since they are lists they are placed in the config tree.
*/
x = NULL;
@ -876,6 +876,12 @@ cli_show_options(clicon_handle h,
continue;
fprintf(stdout, "%s: \"%s\"\n", xml_name(x), xml_body(x));
}
x = NULL;
while ((x = xml_child_each(clicon_conf_xml(h), x, CX_ELMNT)) != NULL) {
if (strcmp(xml_name(x), "CLICON_SNMP_MIB") != 0)
continue;
fprintf(stdout, "%s: \"%s\"\n", xml_name(x), xml_body(x));
}
retval = 0;
done:
if (keys)