From 5215d0d2b72743407eb748efad61c985e3ec3bea 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 --- .../manager/cmdgen/getbulk-v3-with-custom-mib-path-and-options.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'examples') diff --git a/examples/v3arch/oneliner/manager/cmdgen/getbulk-v3-with-custom-mib-path-and-options.py b/examples/v3arch/oneliner/manager/cmdgen/getbulk-v3-with-custom-mib-path-and-options.py index f85cf6b..a0f0f29 100644 --- a/examples/v3arch/oneliner/manager/cmdgen/getbulk-v3-with-custom-mib-path-and-options.py +++ b/examples/v3arch/oneliner/manager/cmdgen/getbulk-v3-with-custom-mib-path-and-options.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