Closed bkwood89 closed 6 years ago
The problem is that the nelsnmp library doesn't support Aruba.
Can you open an issue in that repo instead? https://github.com/networklore/nelsnmp/issues
What I'd need from you is the output from the below Python code, just swap out to match your device, mask the community if you want to. Aside from the below output it would be great if you could make a short note of what you think the values for vendor
, os
and version
should be. With that info it should be easy enough to fix.
>>> import nelsnmp
>>> from nelsnmp.hostinfo.device import HostInfo
>>> from nelsnmp.snmp import SnmpHandler
>>>
>>> handler = SnmpHandler(host='og-sw-01', version='2c', community="public")
>>> hostinfo = HostInfo(handler)
>>> hostinfo.get_all()
>>> hostinfo.__dict__
{'sysobjectid': '1.3.6.1.4.1.9.1.798', 'vendor': 'cisco', 'description': u'Cisco IOS Software, C2960 Software (C2960-LANBASEK9-M), Version 15.0(2)SE11, RELEASE SOFTWARE (fc3)\r\nTechnical Support: http://www.cisco.com/techsupport\r\nCopyright (c) 1986-2017 by Cisco Systems, Inc.\r\nCompiled Sat 19-Aug-17 09:34 by prod_rel_team', 'uptime': datetime.timedelta(109, 63313, 570000), 'contact': u'v3me', 'location': u'v3location', 'version': u'15.0(2)SE11', 'os': 'ios', '_snmp': <nelsnmp.snmp.SnmpHandler object at 0x108a433d0>}
>>>
Thank you for the quick reply, here is the output that you requested:
import nelsnmp from nelsnmp.hostinfo.device import HostInfo from nelsnmp.snmp import SnmpHandler
handler = SnmpHandler(host='itb-neteng-b-nomon', version='2c', community="public") hostinfo = HostInfo(handler) hostinfo.get_all() hostinfo.dict {'sysobjectid': '1.3.6.1.4.1.11.2.3.7.8.5.4', 'vendor': 'UNKNOWN', 'description': u'Aruba 3810M Switch Stack, revision KB.16.04.0009, ROM KB.16.01.0008 (/ws/swbuildm/rel_ukiah_qaoff/code/build/bom(swbuildm_rel_ukiah_qaoff_rel_ukiah))', 'uptime': datetime.timedelta(56, 12254), 'contact': u'', 'location': u'', 'version': 'UNKNOWN', 'os': 'UNKNOWN', '_snmp': <nelsnmp.snmp.SnmpHandler object at 0x7fbe7950e310>}
From that output above here are what I believe the values should be (I've not seen this anywhere, but I know that hpe bought out Aruba): vendor: hpe
os: arubaos-switch (This is an odd one, anywhere I look this is the name that I get from other people, but I've never seen this documented officially or in the OS itself.)--This difference could be due to arubaos being used for their access points and controllers.
version:
Aruba titles the OS versions differently based on the hardware: For the 5400 and 3810 devices they use KB_xx_xx_xxxx.swi: KB_16_05_0007.swi For the 2930 devices they use WC_xx_xx_xxxx.swi: WC_16_05_0007.swi For the 2500 devices they use YA_xx_xx_xxxx.swi: YA_16_05_0007.swi
Thank you again! Let me know if there is anything else you would like me to do or get. I'll go create an issue over on the repo you posted above.
Best regards,
Working on this in the Nelsnmp repo.
When I run my playbook, the task for GET LLDP NEIGHBORS fails and it seems to be because the SNMP task does not return the proper version. The switch is an Aruba 3810M running KB.16.04.0009 soon to be running KB.16.05.0007.
Troubleshooting: I have tested with Cisco and had (not in uploaded files) been calling a variable from the group_vars to call the correct version of "show lldp neighbors" (even though the present file shows a cdp command).
Thanks in advance! I don't know if you plan on keeping this up-to-date, but it has been an asset to us thus far.
Any thoughts as to why the version info returned would be UNKNOWN?
Main output:
ok: [itb-neteng-b-nomon] => { "ansible_facts": { "ansible_device_os": "UNKNOWN", "ansible_device_vendor": "UNKNOWN", "ansible_device_version": "UNKNOWN" }, "changed": false, "invocation": { "module_args": { "authkey": null, "community": "expand", "host": "itb-neteng-b-nomon", "integrity": null, "level": null, "port": 161, "privacy": null, "privkey": null, "username": null, "version": "2c" } } }
TASK [GET SNMP DISCOVERY INFORMATION] ** task path: /home/adm.bwood7/ansible/auto-config-port-descriptions.yml:14 Using module file /home/adm.bwood7/.ansible/plugins/modules/ansible-snmp/library/snmp_device_version.py-ORIG