Package DataCollector :: Module SnmpSession :: Class SnmpSession
[show private | hide private]
[frames | no frames]

Class SnmpSession


Method Summary
  __init__(self, host, community, port, version, timeout, retries, callback)
  asip(self, val)
  asmac(self, val)
convert a byte string to a mac address string
  collectSnmpAttMap(self, snmpmap)
collect snmp information from device snmpmap is an SnmpAttMap object
  collectSnmpTable(self, tableOid, bulk)
collect and snmp table based on its oid and return a dict of dicts with row, col as keys
  collectSnmpTableMap(self, tableOid, dataMap, bulk)
optimized table collection we only get the columns in datamap
  collectSnmpTableMapClass(self, snmpmap)
collect and map snmp table data returns a list of dictionaries which have attribute names as keys and snmp data as values snmpmap is an SnmpTableMap object
  get(self, head_oids)
  getBulkTable(self, head_oids)
get a set of table oids using snmp bulk requests if a list of oids is passed in they must have result rows that are the same length (ie different columns of the same table)
  getnext(self, head_oids)
  getTable(self, head_oids, bulk)
walk a list of table oids
  snmpRowMap(self, row, oidmap)
map the results of a single row from a table query a row map has column numbers as keys (with the .) and object attributes as the values.
  snmpTableMap(self, tabledata, oidmap)
map the results of a full table query (as returned from collectSnmpTable) the oidmap should be in the same format has descripbed by snmpRowMap below

Method Details

asmac(self, val)

convert a byte string to a mac address string

collectSnmpAttMap(self, snmpmap)

collect snmp information from device snmpmap is an SnmpAttMap object

collectSnmpTable(self, tableOid, bulk=0)

collect and snmp table based on its oid and return a dict of dicts with row, col as keys

collectSnmpTableMap(self, tableOid, dataMap, bulk=0)

optimized table collection we only get the columns in datamap

collectSnmpTableMapClass(self, snmpmap)

collect and map snmp table data returns a list of dictionaries which have attribute names as keys and snmp data as values snmpmap is an SnmpTableMap object

getBulkTable(self, head_oids)

get a set of table oids using snmp bulk requests if a list of oids is passed in they must have result rows that are the same length (ie different columns of the same table)

getTable(self, head_oids, bulk=0)

walk a list of table oids

snmpRowMap(self, row, oidmap)

map the results of a single row from a table query a row map has column numbers as keys (with the .) and object attributes as the values. {'.2' : 'id', '.3' : 'type',}

snmpTableMap(self, tabledata, oidmap)

map the results of a full table query (as returned from collectSnmpTable) the oidmap should be in the same format has descripbed by snmpRowMap below

Generated by Epydoc 2.1 on Thu Aug 16 09:55:11 2007 http://epydoc.sf.net