summaryrefslogtreecommitdiff
path: root/examples/hlapi/asyncore/sync/manager
diff options
context:
space:
mode:
authorelie <elie>2013-09-30 21:10:52 +0000
committerelie <elie>2013-09-30 21:10:52 +0000
commit0f190c6a3817c5d0c4e38430a4e4714aa30063f1 (patch)
treee19fbd27f8726ad2cdd77f317592993f0e789b53 /examples/hlapi/asyncore/sync/manager
parent088bd1af9ba351f1f229fa56c7f7bcc93be68c23 (diff)
downloadpysnmp-git-0f190c6a3817c5d0c4e38430a4e4714aa30063f1.tar.gz
examples adjusted to work with fixed-EngineID SNMP simulator
Diffstat (limited to 'examples/hlapi/asyncore/sync/manager')
-rw-r--r--examples/hlapi/asyncore/sync/manager/cmdgen/custom-contextengineid-and-contextname.py8
-rw-r--r--examples/hlapi/asyncore/sync/manager/cmdgen/custom-contextengineid.py7
2 files changed, 9 insertions, 6 deletions
diff --git a/examples/hlapi/asyncore/sync/manager/cmdgen/custom-contextengineid-and-contextname.py b/examples/hlapi/asyncore/sync/manager/cmdgen/custom-contextengineid-and-contextname.py
index 2aa6407f..e273bba6 100644
--- a/examples/hlapi/asyncore/sync/manager/cmdgen/custom-contextengineid-and-contextname.py
+++ b/examples/hlapi/asyncore/sync/manager/cmdgen/custom-contextengineid-and-contextname.py
@@ -7,8 +7,8 @@
# * over IPv4/UDP
# * to an Agent at demo.snmplabs.com:161
# * addressing particular set of Managed Objects at remote SNMP Engine by:
-# * contextEngineId 0x8000000001020304 and
-# * contextName 'my-context'
+# * contextEngineId 0x80004fb805636c6f75644dab22cc and
+# * contextName 'a172334d7d97871b72241397f713fa12'
# * setting SNMPv2-MIB::sysName.0 to new value (type taken from MIB)
#
from pysnmp.entity.rfc3413.oneliner import cmdgen
@@ -20,8 +20,8 @@ errorIndication, errorStatus, errorIndex, varBinds = cmdGen.setCmd(
cmdgen.UsmUserData('usr-md5-none', 'authkey1'),
cmdgen.UdpTransportTarget(('demo.snmplabs.com', 161)),
(cmdgen.MibVariable('SNMPv2-MIB', 'sysORDescr', 1), 'new system name'),
- contextEngineId=rfc1902.OctetString(hexValue='8000000001020304'),
- contextName='my-context'
+ contextEngineId=rfc1902.OctetString(hexValue='80004fb805636c6f75644dab22cc'),
+ contextName='da761cfc8c94d3aceef4f60f049105ba'
)
# Check for errors and print out results
diff --git a/examples/hlapi/asyncore/sync/manager/cmdgen/custom-contextengineid.py b/examples/hlapi/asyncore/sync/manager/cmdgen/custom-contextengineid.py
index 8a5242fd..04ee0bf5 100644
--- a/examples/hlapi/asyncore/sync/manager/cmdgen/custom-contextengineid.py
+++ b/examples/hlapi/asyncore/sync/manager/cmdgen/custom-contextengineid.py
@@ -4,7 +4,8 @@
# Send SNMP GET request using the following options:
#
# * with SNMPv3 with user 'usr-md5-des', MD5 auth and DES privacy protocols
-# * use remote SNMP Engine ID 0x8000000004030201 (USM autodiscovery will run)
+# * use remote SNMP Engine ID 0x80004fb805636c6f75644dab22cc (USM
+# autodiscovery will run)
# * over IPv4/UDP
# * to an Agent at demo.snmplabs.com:161
# * setting SNMPv2-MIB::sysName.0 to new value (type taken from MIB)
@@ -17,7 +18,9 @@ cmdGen = cmdgen.CommandGenerator()
errorIndication, errorStatus, errorIndex, varBinds = cmdGen.setCmd(
cmdgen.UsmUserData(
'usr-md5-des', 'authkey1', 'privkey1',
- securityEngineId=rfc1902.OctetString(hexValue='8000000004030201')
+ securityEngineId=rfc1902.OctetString(
+ hexValue='80004fb805636c6f75644dab22cc'
+ )
),
cmdgen.UdpTransportTarget(('demo.snmplabs.com', 161)),
(cmdgen.MibVariable('SNMPv2-MIB', 'sysORDescr', 1), 'new system name'),