Hi Dave,
See my answers below.
Q: > What happens if you try a "snmpget" request with the same numeric OID?
> Does that return a value or not?
A: I've just checked - it returns None:
In [15]: oid = netsnmp.Varbind(<numeric_OID_here>,'0')
In [19]: netsnmp.snmpget(oid, Version=2, RemotePort=8333,
Community="private")
Out[19]: (None,)
Q: > What happens if you try the python code with a "standard" OID?
> Does that work or not?
A: This works - for example the script below works fine:
sess = netsnmp.Session(Version=2, DestHost='localhost',
Community='public')
sess.UseEnums = 1
sess.UseLongNames = 1
vars = netsnmp.VarList(netsnmp.Varbind('sysUpTime', 0),
netsnmp.Varbind('sysContact', 0),
netsnmp.Varbind('sysLocation', 0))
vals = sess.get(vars)
Dave Shield wrote:
> On 16/04/07, Andreea Bogdana Botez <[EMAIL PROTECTED]> wrote:
>
>> 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.
>>
>
> What happens if you try a "snmpget" request with the same numeric OID?
> Does that return a value or not?
>
> What happens if you try the python code with a "standard" OID?
> Does that work or not?
>
> Dave
>
> -------------------------------------------------------------------------
> 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
>
>
-------------------------------------------------------------------------
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