[Pysnmp-dev] noSuchInstance
Brought to you by:
elie
From: Guy M. <gu...@p-...> - 2004-11-30 09:28:58
|
Hi, I am trying to use the pysnmp with the basic operation of GETREQUEST from a network device that support SNMP and I responded with "noSuchInstance" although this specific OID has value and it can be seen by "AdnentNet" Snmp browser, the code I am using is: from pysnmp import role, v2c, asn1 ###################################################################### req = v2c.GETREQUEST() tr = role.manager(('10.1.12.85', 161)) (rawrsp, src) = tr.send_and_receive( \ req.encode(community='guy', \ encoded_oids=map(asn1.OBJECTID().encode,[ '1.3.6.1.4.1.5655.4.1.6.3']))) rsp = v2c.RESPONSE() rsp.decode(rawrsp) oids = map(lambda x:x[0], map(asn1.OBJECTID().decode, rsp['encoded_oids'])) print oids vals = map(lambda x: x[0](), map(asn1.decode, rsp['encoded_vals'])) print map(asn1.decode, rsp['encoded_vals']) print vals ###################################################################### and the output I recieve is: ########################################### ['.1.3.6.1.4.1.5655.4.1.6.3'] [(noSuchInstance(''), '')] [''] ########################################### Appreciate your help Guy. |