From a3191d9a358bab64b4a71f2048349671ec320f4e Mon Sep 17 00:00:00 2001 From: elie Date: Mon, 18 Aug 2014 07:21:15 +0000 Subject: CommandGenerator.getNext() & .getBulk() methods now support the maxCalls kwarg to limit the maximum number of request-response iterations to perform --- .../asyncore/sync/manager/cmdgen/custom-pysnmp-mibs-search-path.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'examples') diff --git a/examples/hlapi/asyncore/sync/manager/cmdgen/custom-pysnmp-mibs-search-path.py b/examples/hlapi/asyncore/sync/manager/cmdgen/custom-pysnmp-mibs-search-path.py index f85cf6b2..a0f0f298 100644 --- a/examples/hlapi/asyncore/sync/manager/cmdgen/custom-pysnmp-mibs-search-path.py +++ b/examples/hlapi/asyncore/sync/manager/cmdgen/custom-pysnmp-mibs-search-path.py @@ -8,7 +8,8 @@ # * to an Agent at demo.snmplabs.com:161 # * for all OIDs past TCP-MIB::tcpConnTable # * TCP-MIB will be searched by a user-specified path -# * run till end-of-mib condition is reported by Agent OR maxRows == 20 +# * run till end-of-mib condition is reported by Agent OR maxRows == 100 OR +# maxCalls == 10 request-response interactions occur # * ignoring non-increasing OIDs whenever reported by Agent # # make sure IF-MIB.py is search path @@ -22,7 +23,7 @@ errorIndication, errorStatus, errorIndex, varBindTable = cmdGen.bulkCmd( cmdgen.UdpTransportTarget(('demo.snmplabs.com', 161)), 0, 50, cmdgen.MibVariable('TCP-MIB', 'tcpConnTable').addMibSource('/tmp/mymibs'), - lexicographicMode=True, maxRows=100, ignoreNonIncreasingOid=True + lexicographicMode=True, maxRows=100, maxCalls=10,ignoreNonIncreasingOid=True ) if errorIndication: -- cgit v1.2.1