python module for netsnmp

"Andreea Bogdana Botez" <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
Hi.
I'm trying to use the python module for netsnmp with a new MIB (not one the
standard ones) and a new snmp agent that knows how to interact with it.
Standard tests work ok, for example:

snmpset -v 2c -c private 127.1:8333  SOME-MIB::<oid>.0 i 5
SOME-MIB::<oid>.0 = INTEGER: 5

Also, the standard snmp module tests (test.py) against snmpd with the given
conf file are ok.

But, when I try to do the same think using the python module:

       sess = netsnmp.Session(Version=2, DestHost='localhost',
Community='public')
       sess.UseEnums = 1
       sess.UseLongNames = 1
       vars = netsnmp.VarList(netsnmp.Varbind(<oid>,'0'))
       vals = sess.get(vars)

I get an "get: unknown object ID (<oid>)v2 sess.get result:  None" error.

If I change vars = netsnmp.VarList(netsnmp.Varbind(<numeric_oid>,'0')) -
then I get a None object in vals.

Probably there's something that I didn't do right..

I'm using net-snmp version 5.4 on a Linux RH 2.6.16.7 platform.

Thanks for helping
Bogdana

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/

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