Below is the file 'plugins/basic_snmp.py' from this revision. You can also download the file.
# # basic_snmp : stuff a generic managed switch should support # plugin_info = { 'description' : '''\ A basic module, which provides as many tables as possible without vendor specific knowledge. It aims to work with any SNMP version 1 device that exports the required MIBs. ''' } def ethernet_forwarding(table_name, table_io, device): yield device.config['zone'], 1, '00:11:24:c7:dd:41', 'en1', now() def ethernet_arp(table_name, table_io, device): return None tables = { 'ethernet_forwarding' : ethernet_forwarding, 'ethernet_arp' : ethernet_arp, } def init(): export['has_table'] = simple_has_table(tables) export['get_table'] = simple_get_table(tables) log("basic snmp initialised")