Re: [pysnmp-users] GETNEXT and maxRows
Brought to you by:
elie
From: Ilya E. <il...@gl...> - 2015-02-12 16:50:01
|
Oh, that's a mess. :-( I just put up the latest CVS code on SF downloads. Let me know in case of any issues. -ilya On 02/12/2015 07:19 PM, Frédéric Perrin wrote: > Le jeudi 12 à 16:51, Frédéric Perrin a écrit : >> Hi Ilya, >> >> What Debian calls 4.2.5 is actually 4.2.5rc2. > I'm getting confused somewhere... The file listed on the SF.net download > page as pysnmp-4.2.5.tar.gz contains a CHANGES file whose first line is > "Revision 4.2.5rc2", and the commit I list further down is not part of > it. > > The file you linked to identifies itself as 4.2.6rc0, and lists that > commit under "Revision 4.2.5". > >> This means the Debian >> version is missing the following commit: >> >> Mon Aug 18 07:21:17 2014 UTC (5 months, 3 weeks ago) by elie >> >> CommandGenerator.getNext() & .getBulk() methods now support the >> maxCalls kwarg to limit the maximum number of request-response >> iterations to perform >> >> http://pysnmp.cvs.sourceforge.net/viewvc/pysnmp/pysnmp/pysnmp/entity/rfc3413/oneliner/cmdgen.py?r1=1.96&r2=1.97 >> >> (with this change, the size of varBindTotalTable is compared to maxRows >> AFTER extending the table) >> >> Thanks Ilya, I think I need to take this with the Debian maintainer. >> >> Le jeudi 12 à 16:24, Ilya Etingof a écrit : >>> Hi Frédéric, >>> >>> Just checked the latest (development) pysnmp operation: with maxRows=1 >>> it sends just one GETNEXT: >>> >>> http://pysnmp.cvs.sourceforge.net/viewvc/pysnmp/pysnmp/?view=tar >>> >>> ilya >>> >>> On 02/12/2015 06:14 PM, Frédéric Perrin wrote: >>>> Hi list, >>>> >>>> It seems that nextCmd() always sends one request too many. IOW, with the >>>> following: >>>> >>>>>>> print cmdgen.CommandGenerator().nextCmd( >>>> ... cmdgen.CommunityData("public"), >>>> ... cmdgen.UdpTransportTarget(("192.168.100.240", 161)), >>>> ... "1.3.6.1.2.1.1.4.0", >>>> ... lexicographicMode = True, >>>> ... maxRows = 1) >>>> (None, Integer('noError'), Integer(0), [[(ObjectName(1.3.6.1.2.1.1.5.0), >>>> OctetString('dut-1'))]]) >>>> >>>> Wireshark shows two GETNEXT being sent (and responded to), even though >>>> only the first response is returned to me. I was expecting only one >>>> request to be sent, as per maxRows. >>>> >>>> Am I doing something wrong? Or is there an off-by-one somewhere in >>>> pysnmp? >>>> >>>> I'm running with python-pysnmp4 4.2.5-1 on Debian Sid. >>>> >>>> Cheers, >>>> |