summaryrefslogtreecommitdiff
path: root/examples/v3arch/asyncore/agent/cmdrsp/multiple-snmp-engines.py
diff options
context:
space:
mode:
authorelie <elie>2015-09-14 05:20:24 +0000
committerelie <elie>2015-09-14 05:20:24 +0000
commitddc989155d58641cf32e6a1ef8a400f22f5d167c (patch)
tree9df696918f07781d60cca7a8cc3ff8a6378b638f /examples/v3arch/asyncore/agent/cmdrsp/multiple-snmp-engines.py
parent6596cb464810233b3b16973665f2a4fe27ddd1db (diff)
downloadpysnmp-git-ddc989155d58641cf32e6a1ef8a400f22f5d167c.tar.gz
* synchronous oneliner apps redesigned to offer Python generator-based
API along with a more comprehensive set of accepted parameters. * massively documented (in Sphinx, NumPy style)
Diffstat (limited to 'examples/v3arch/asyncore/agent/cmdrsp/multiple-snmp-engines.py')
-rw-r--r--examples/v3arch/asyncore/agent/cmdrsp/multiple-snmp-engines.py52
1 files changed, 27 insertions, 25 deletions
diff --git a/examples/v3arch/asyncore/agent/cmdrsp/multiple-snmp-engines.py b/examples/v3arch/asyncore/agent/cmdrsp/multiple-snmp-engines.py
index 870363a5..0a7b3a20 100644
--- a/examples/v3arch/asyncore/agent/cmdrsp/multiple-snmp-engines.py
+++ b/examples/v3arch/asyncore/agent/cmdrsp/multiple-snmp-engines.py
@@ -1,28 +1,30 @@
-#
-# Multiple Command Responders
-#
-# Run multiple SNMP Engines each with a complete Command Responder.
-# Bind each SNMP Engine to a dedicated network transport endpoint:
-#
-# * IPv4/UDP, listening at 127.0.0.1:161
-# * IPv4/UDP, listening at 127.0.0.2:161
-#
-# Each Command Responder will respond to SNMP GET/SET/GETNEXT/GETBULK
-# queries with the following options:
-#
-# * SNMPv3
-# * with USM user 'usr-md5-des', auth: MD5, priv DES
-# * allow read access to SNMPv2-MIB objects (1.3.6)
-# * allow write access to SNMPv2-MIB objects (1.3.6.1.2.1)
-#
-# The following Net-SNMP commands will walk the first and the second
-# Agent respectively:
-#
-# $ snmpwalk -Ob -v3 -u usr-md5-des -l authPriv -A authkey1 -X privkey1 127.0.0.1 usmUserEntry
-# $ snmpwalk -Ob -v3 -u usr-md5-des -l authPriv -A authkey1 -X privkey1 127.0.0.2 usmUserEntry
-#
-# Notice differently configured snmpEngineId's in usmUserEntry columns.
-#
+"""
+Multiple SNMP Engines
++++++++++++++++++++++
+
+Run multiple SNMP Engines each with a complete Command Responder.
+Bind each SNMP Engine to a dedicated network transport endpoint:
+
+* IPv4/UDP, listening at 127.0.0.1:161
+* IPv4/UDP, listening at 127.0.0.2:161
+
+Each Command Responder will respond to SNMP GET/SET/GETNEXT/GETBULK
+queries with the following options:
+
+* SNMPv3
+* with USM user 'usr-md5-des', auth: MD5, priv DES
+* allow read access to SNMPv2-MIB objects (1.3.6)
+* allow write access to SNMPv2-MIB objects (1.3.6.1.2.1)
+
+The following Net-SNMP commands will walk the first and the second
+Agent respectively:
+
+| $ snmpwalk -Ob -v3 -u usr-md5-des -l authPriv -A authkey1 -X privkey1 127.0.0.1 usmUserEntry
+| $ snmpwalk -Ob -v3 -u usr-md5-des -l authPriv -A authkey1 -X privkey1 127.0.0.2 usmUserEntry
+
+Notice differently configured snmpEngineId's in usmUserEntry columns.
+
+"""#
from pysnmp.entity import engine, config
from pysnmp.entity.rfc3413 import cmdrsp, context
from pysnmp.proto import rfc1902