I get the exact same results for Debian Lenny (aka testing) so I would 
say it is very likely a netsnmp python issue, rather that a specific OS 
build issue.

Cheers, Brendan.


Brendan Simon wrote:
> I have managed to get net-snmp-5.4.1 to build with python bindings on 
> Mac OS X 10.4 (Tiger) using the fink package sources.
>
> I have done some simple tests on some v2 and v3 agents.  It seems that 
> the python bindings are a bit sensitive, particularly for v3.
>
> Some arguments are case sensitive (eg. AuthProto) and cause python to 
> exit if the wrong case is supplied (eg "sha" versus "SHA").  Standard 
> snmpget command line args seem to be case insensitive.
>
> Also, I did not get any error indication when my authentication 
> password was incorrect.
>
> Are these likely to be net-snmp python bindings issues, or just Mac OS 
> X specific ???
>
> What is the best place to discuss net-snmp python issues.  This list ???
>
> Thanks, Brendan.
>
>
> Brendan Simon wrote:
>> I am now at work and did some simple tests following examples at 
>> http://www.ibm.com/developerworks/aix/library/au-netsnmpnipython/
>>
>> My results are:
>>
>>    * v1 and v2 snmpwalk worked if specifiying 'sysDescr' but I got an
>>      output message of "sysDesr  = None ( None )".  The output of
>>      'result' was correct.
>>
>>    * v1 and v2 snmpget and snmpwalk worked ok if specifiying
>>      'sysDescr.0'.  The prompt just returns and the output of 'result'
>>      was as expected :)
>>
>>    * With v3 i get a major error if the value of AuthProto is in lower
>>      case.  The python interpreter exited back to the shell !!!  Note
>>      that standard snmpget command allows "-A sha" or "-A SHA" or "-A
>>      sHa" ...  Obviously using strcasecmp, but python bindings seem
>>      less forgiving.
>>
>>     >>> import netsnmp
>>     >>> oid = netsnmp.Varbind('sysDescr.0')
>>     >>> result = netsnmp.snmpget(oid, Version=3,
>>    DestHost='10.0.100.177', SecName='admin', SecLevel='authNoPriv',
>>    AuthProto='sha', AuthPass='Password1')
>>    error:snmp_new_v3_session:Unsupported authentication protocol(sha)
>>    error:v3_session: couldn't open SNMP session().
>>    Bus error
>>
>>    * Tried v3 with AuthProto='SHA' (instead of 'sha').  Python prompt
>>      returned without any error, but result was set to (None,) instead
>>      of expected text.  OK, the password was wrong so shouldn't python
>>      have returned some kind of authentication error ???
>>
>>    * Tried v3 with AuthProto='SHA' and correct password.  Python prompt
>>      returned without any error and result was as expected :)
>>
>>
>> Cheers, Brendan.
>>
>>
>>
>> Alexander Hansen wrote:
>>> Great!  It sounds like python bindings might be easy to implement once
>>> the maintainer is back (and has cleared his plate of other stuff).
>>>
>>>
>>> Brendan Simon wrote:
>>>  
>>>> I managed to get net-snmp-unified built and installed with the python
>>>> bindings.
>>>> My quick test seems to work.  Followed some simple python code 
>>>> tutorial
>>>> to do an snmpwalk on sysDescr and python did not complain.
>>>>
>>>>     
>>
>>
>
>


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
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

Reply via email to