Open lunkwill42 opened 7 months ago
Two mibretriever implementations implement retrieve_alternate_bridge_mibs
: entity_mib
and cisco_vtp_mib
. The former fetched from ENTITY-MIB, the latter synthesizes entries from inspecting the proprietary CISCO-VTP-MIB
.
These are both used from this function (responses from ENTITY-MIB being preferred): https://github.com/Uninett/nav/blob/276e9f47fdfea81ccaf462a5141249e2528a639e/python/nav/ipdevpoll/utils.py#L146
The signature of the return values of these functions must likely be changed to include optional SNMPv3 contexts and engine IDs.
The results of these functions are used by this class to implement collection across multiple logical instances of a MIB:
The instance list is still a plain list of tuples of (description, community)
, and if we are to extend these tuples, they should probably be more formalized as a NamedTuple
and annotated properly in modern Python.
NAV currently uses
ENTITY-MIB::entLogicalTable
entries (if it can) to discover alternate logical views of the BRIDGE-MIB (SNMPv2-SMI::mib-2.17
).For matching entries, it fetches an alternative community from
ENTITY-MIB::entLogicalCommunity
:For SNMPv3, it should rather look at
ENTITY-MIB::entLogicalContextName
(and, potentially, heedENTITY-MIB::entLogicalContextEngineID
):