diff options
author | elie <elie> | 2014-08-18 07:21:15 +0000 |
---|---|---|
committer | elie <elie> | 2014-08-18 07:21:15 +0000 |
commit | 5215d0d2b72743407eb748efad61c985e3ec3bea (patch) | |
tree | 21484f9104abc221a1c5f7758a4f4b2c0b79a192 /examples | |
parent | 3e848c2f1d170b3f12fe122432417002e045d3b5 (diff) | |
download | pysnmp-5215d0d2b72743407eb748efad61c985e3ec3bea.tar.gz |
CommandGenerator.getNext() & .getBulk() methods now support the
maxCalls kwarg to limit the maximum number of request-response
iterations to perform
Diffstat (limited to 'examples')
-rw-r--r-- | examples/v3arch/oneliner/manager/cmdgen/getbulk-v3-with-custom-mib-path-and-options.py | 5 |
1 files changed, 3 insertions, 2 deletions
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: |