summaryrefslogtreecommitdiff
path: root/examples/v3arch/twisted/manager/cmdgen/get-v3-custom-context.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples/v3arch/twisted/manager/cmdgen/get-v3-custom-context.py')
-rw-r--r--examples/v3arch/twisted/manager/cmdgen/get-v3-custom-context.py36
1 files changed, 19 insertions, 17 deletions
diff --git a/examples/v3arch/twisted/manager/cmdgen/get-v3-custom-context.py b/examples/v3arch/twisted/manager/cmdgen/get-v3-custom-context.py
index e85babe..527125f 100644
--- a/examples/v3arch/twisted/manager/cmdgen/get-v3-custom-context.py
+++ b/examples/v3arch/twisted/manager/cmdgen/get-v3-custom-context.py
@@ -1,20 +1,22 @@
-#
-# GET Command Generator
-#
-# Send a SNMP GET request
-# with SNMPv3 with user 'usr-md5-none', SHA auth and no privacy protocols
-# for MIB instance identified by
-# contextEngineId: 0x80004fb805636c6f75644dab22cc
-# contextName: da761cfc8c94d3aceef4f60f049105ba
-# using Twisted framework for network transport
-# over IPv4/UDP
-# to an Agent at 195.218.195.228:161
-# for an OID in tuple form
-#
-# This script performs similar to the following Net-SNMP command:
-#
-# $ snmpget -v3 -l authNoPriv -u usr-md5-none -A authkey1 -E 80004fb805636c6f75644dab22cc -n da761cfc8c94d3aceef4f60f049105ba -ObentU 195.218.195.228:161 1.3.6.1.2.1.1.1.0
-#
+"""
+Custom ContextEngineId and ContextName
+++++++++++++++++++++++++++++++++++++++
+
+Send a SNMP GET request
+* with SNMPv3 with user 'usr-md5-none', SHA auth and no privacy protocols
+* for MIB instance identified by
+* contextEngineId: 0x80004fb805636c6f75644dab22cc
+* contextName: da761cfc8c94d3aceef4f60f049105ba
+* using Twisted framework for network transport
+* over IPv4/UDP
+* to an Agent at 195.218.195.228:161
+* for an OID in tuple form
+
+This script performs similar to the following Net-SNMP command:
+
+| $ snmpget -v3 -l authNoPriv -u usr-md5-none -A authkey1 -E 80004fb805636c6f75644dab22cc -n da761cfc8c94d3aceef4f60f049105ba -ObentU 195.218.195.228:161 1.3.6.1.2.1.1.1.0
+
+"""#
from twisted.internet import reactor, defer
from pysnmp.entity import engine, config
from pysnmp.entity.rfc3413.twisted import cmdgen