networklore / nelsnmp

A wrapper module for pysnmp
Other
7 stars 10 forks source link

Cisco 2600 problems parsing system description #14

Closed gavmckee80 closed 6 years ago

gavmckee80 commented 7 years ago
In [209]: dev = SnmpHandler(host='x.x.x.x', community='xxxxx', version='2c',timeout=5)

In [210]: hostinfo = HostInfo(dev)

In [211]: hostinfo.get_all()

In [212]: hostinfo.version
Out[212]: 'UNKNOWN'

In [213]: hostinfo.os
Out[213]: 'UNKNOWN'

In [214]: hostinfo.vendor
Out[214]: 'cisco'

In [215]: hostinfo.description
Out[215]: u'Cisco Internetwork Operating System Software \r\nIOS (tm) C2600 Software (C2600-IK9S-M), Version 12.2(24b), RELEASE SOFTWARE (fc1)\r\nCopyright (c) 1986-2004 by cisco Systems, Inc.\r\nCompiled Fri 23-Jul-04 21:35 by pwade'
ogenstad commented 7 years ago

That sounds a bit end of life:ish, but I can take a look. :)

ogenstad commented 7 years ago

Can you also do a: print hostinfo.__dict__

gavmckee80 commented 7 years ago

:) thanks

In [224]: print hostinfo.__dict__
{'sysobjectid': '1.3.6.1.4.1.9.1.209', 'vendor': 'cisco', 'description': u'Cisco Internetwork Operating System Software \r\nIOS (tm) C2600 Software (C2600-IK9S-M), Version 12.2(24b), RELEASE SOFTWARE (fc1)\r\nCopyright (c) 1986-2004 by cisco Systems, Inc.\r\nCompiled Fri 23-Jul-04 21:35 by pwade', 'uptime': datetime.timedelta(159, 84935, 500000), 'contact': u'Operations xxxxxx', 'location': u'xxxxxxxxxx', 'version': 'UNKNOWN', 'os': 'UNKNOWN', '_snmp': <nelsnmp.snmp.SnmpHandler object at 0x7ff53ac9a710>}
ogenstad commented 7 years ago

Can you test this with the cisco_eol branch I just pushed and report back?

Thanks!

gavmckee80 commented 7 years ago

sure, let me pull and test

ogenstad commented 7 years ago

Were you able to test this?