Python bindings and custom MIBS

"Tomas Penicka" <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <4C79D0ACAAB80D4ABBB789BB0DB2FE34AD86A4@EUDUCEX3.europe.ad.flextronics.com>
Hello,
  I have a problem with custom MIBS when using python bindings. On my
project we use custom MIBs to retrieve a specific information from the
network device.

I can run the following command:
Bash $ snmpget -m CUSTOM-MIB -v 2c -c community_string $ip:160
msInactRadio.0
And it returns some result (correct)

If I want to do something similar from python snmp module, I get:
Python >>> oid = netsnmp.Varbind('msInactRadio.0')
Python >>> res = netsnmp.snmpget(oid, Version = 2, DestHost = ip,
RemotePort = 160, Community = "community_string")
error: get: unknown object ID (msInactRadio)>>> 

The custom MIB files are copied into global MIBs directory, just for
simplicity.
I cannot see any option int the python interface how to enter something
like "-m CUSTOM-MIB" from the commandline.

Please can somebody help me?

Thanks,
   Tomas


Legal Disclaimer:
The information contained in this message may be privileged and confidential. It is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. If you have received this message in error, please immediately notify the sender and delete or destroy any copy of this message

------------------------------------------------------------------------------

_______________________________________________
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.