When I run the following code I get no data back from the device. When I run the module using Ansible I do get data back. Can you help explain that ?
from nelsnmp.snmp import SnmpHandler
from nelsnmp.hostinfo.device import HostInfo
def main():
try:
dev = SnmpHandler(host='1.1.1.1', community='xxxxx', version='2c')
hostinfo = HostInfo(dev)
print "trying..."
print hostinfo.get_version()
except Exception as err:
print "Must be a timeout or something", err
Hi ,
When I run the following code I get no data back from the device. When I run the module using Ansible I do get data back. Can you help explain that ?
from nelsnmp.snmp import SnmpHandler from nelsnmp.hostinfo.device import HostInfo
def main():
main()