Skip to content
Snippets Groups Projects
Commit 2cda488c authored by Erik Reid's avatar Erik Reid
Browse files

resolve oid's with mib

parent fab575f6
No related branches found
No related tags found
No related merge requests found
......@@ -44,26 +44,21 @@ def walk(agent_hostname, community, base_oid):
UdpTransportTarget((agent_hostname, 161)),
ContextData(),
ObjectType(ObjectIdentity(base_oid)
.addAsn1MibSource('http://mibs.snmplabs.com/asn1/@mib@')),
.addAsn1MibSource('http://mibs.snmplabs.com/asn1/@mib@')),
lexicographicMode=False,
lookupNames=True,
lookupValues=True):
assert not engineErrorIndication
assert not pduErrorIndication
assert errorIndex == 0
varBinds = [
rfc1902.ObjectType(rfc1902.ObjectIdentity(x[0]),x[1])
.resolveWithMib(mibViewController)
for x in varBinds]
for oid, val in varBinds:
print("\toid: '%s', val: '%s'" % (
oid.prettyPrint(), val.prettyPrint()))
zzz = [
rfc1902.ObjectType(rfc1902.ObjectIdentity(x[0]),x[1])
.resolveWithMib(mibViewController) for x
in
varBinds]
for z in zzz:
print('zzz: %s' % z.prettyPrint())
def _validate_config(ctx, param, value):
"""
loads, validates and returns configuration parameters
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment