NAME
App::Netdisco::Util::Snapshot
DESCRIPTION
Helper functions for SNMP::Info instances.
There are no default exports, however the :all
tag will export all subroutines.
EXPORT_OK
load_cache_for_device( $device )
Tries to find a device cache in database or on disk, or build one from a net-snmp snmpwalk on disk. Returns a cache.
make_snmpwalk_browsable( $device )
Takes the device_browser rows for a device and rewrites them to convert table rows to hashref, enum values translated, and oid_parts filled.
collapse_snmp_tables ( %oids )
In an snmpwalk where table rows are individual entries, gather them up into a hashref. Returns %oids hash similar to what's passed in.
resolve_enums ( %oids )
In an snmpwalk where the values are untranslated but enumerated types, convert the values. Returns %oids hash similar to what's passed in.
snmpwalk_to_snmpinfo_cache( %oids )
Takes an snmpwalk with collapsed tables and returns an SNMP::Info instance using that as the cache.
add_snmpinfo_aliases( $snmp_info_instance | $snmp_info_cache )
Add in any GLOBALS and FUNCS aliases from the SNMP::Info device class or else a set of defaults that allow device discovery. Returns the cache.