Troubles with the Python NET-SNMP bindings
Andreas Andersson <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <[email protected]> |
On https://net-snmp.svn.sourceforge.net/svnroot/net-snmp/trunk/net-snmp/python/README
it says <tag>, <iid>, <val>, <type>
In my case I guess it's supposed to be like:
netsnmp.Varbind("SNMPv2-SMI::transmission::adslLineConfProfile",
str(self.GeneratePortNum(portnum)), str(profilename), TYPE_HERE)
Hower, I cannot find what I am supposed to use for the type string.
I've tried the following: "STRING", "String", "S", "s", none of them
works though.
Setting numeric problems is no problems.
IE, this works:
command = netsnmp.Varbind("IF-MIB::ifAdminStatus",
str(self.GeneratePortNum(portnum)), '1', "INTEGER")
And it sets the value without a problem.
Am I severely lacking on my reading skills? I cannot find what to
enter if it's a string.
I'm using Debian Lenny, libsnmp-python 5.4.1~dfsg-12 if that helps.
On another note:
command = netsnmp.Varbind("IF-MIB::ifAlias",
str(self.GeneratePortNum(portnum)), str(interfacename))
Works, even though I've ommited the type.
Could anyone shed some light on this?
/Andreas
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
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