Python Net-SNMP Bindings cannot set objects with 3 vars

"Uttamchandani, Amit" <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
Hey there,

I'm currently using net-snmp 5.4.1 on a production machine. I am also using the python bindings that come with it quite extensively. So far it is working great! Thank you to all the developers.

It looks like I may have found a bug. I can't seem to set an object that has three variables/values associated with it. This sets fine with the snmpset command line so it looks like an issue with the python bindings.

snmpset:
--------

amit@debian:~$ snmpset -v2c -c private 172.16.142.171 cpPortVlanTranslationEgressVlanId.1.1 i 78 2>/dev/null
CP-PORT-VLAN-TRANSLATION-MIB::cpPortVlanTranslationEgressVlanId.1.1 = INTEGER: 78

python:
-------

import netsnmp

# works with two vars
#oid = netsnmp.Varbind('cpPortVlanTranslationEnabled', '1', '2')

# doesn't work with three
oid = netsnmp.Varbind('cpPortVlanTranslationEgressVlanId', '1', '1', '78')

# result
result = netsnmp.snmpset(oid, Version=2, DestHost='172.16.142.171', Community='private')
print result

amit@debian:~$ python tmp.py
0

I have tried different variations of setting the above object.

Thanks,
Amit

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone

_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.