Anyone using Python and netsnmp library to set values on Cambium gear?
 Care to share a code example?  Having trouble getting the snmpset to
work but snmpget works fine so far.

If I use snmpset on linux command line it works fine.  This is on
Centos 7 release.

This seems to work fine.

import netsnmp

for line in ips:
  oid = netsnmp.Varbind('.1.3.6.1.2.1.1.5.0')
  result = netsnmp.snmpget(oid, Version = 2, DestHost=line,
Community=snmp_rw_string)
  print result

So does this:

for line in ips:
  oid = netsnmp.Varbind('.1.3.6.1.4.1.161.19.3.3.2.220.0')
  result = netsnmp.snmpget(oid, Version = 2, DestHost=line,
Community=snmp_rw_string)
  print result

This not so much:

for line in ips:
  oid = netsnmp.Varbind('enterprises',
'.1.3.6.1.4.1.161.19.3.3.2.220.0', '20', 'INTEGER')
  result = netsnmp.snmpset(oid, Version = 2, DestHost=line,
Community=snmp_rw_string)
  print result

Any python gurus lurking in here???

Reply via email to