summaryrefslogtreecommitdiff
path: root/examples/v3arch/oneliner/manager/cmdgen/set-v3-with-custom-contextengineid-and-contextname.py
diff options
context:
space:
mode:
authorelie <elie>2015-05-31 19:35:10 +0000
committerelie <elie>2015-05-31 19:35:10 +0000
commitbea11dfe16e6714737b6f5016697206a038f051b (patch)
tree439ca11bab4cacb13f6438d50ad8500e902fdd82 /examples/v3arch/oneliner/manager/cmdgen/set-v3-with-custom-contextengineid-and-contextname.py
parent8a7fa29b9b4cd263db4b283704bda1c09eb002e6 (diff)
downloadpysnmp-bea11dfe16e6714737b6f5016697206a038f051b.tar.gz
Major overhaul related to PySMI integration and Standard SNMP Applications
API redesign: * MibVariable becomes ObjectIdentity and moves to pysnmp.smi.rfc1902 * ObjectType and NotificationType classes resempling corresponding MIB MACROs implemented * SNMP Standard Applications and examples modified to support ObjectType and NotificationType parameters
Diffstat (limited to 'examples/v3arch/oneliner/manager/cmdgen/set-v3-with-custom-contextengineid-and-contextname.py')
-rw-r--r--examples/v3arch/oneliner/manager/cmdgen/set-v3-with-custom-contextengineid-and-contextname.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/examples/v3arch/oneliner/manager/cmdgen/set-v3-with-custom-contextengineid-and-contextname.py b/examples/v3arch/oneliner/manager/cmdgen/set-v3-with-custom-contextengineid-and-contextname.py
index e273bba..f28063b 100644
--- a/examples/v3arch/oneliner/manager/cmdgen/set-v3-with-custom-contextengineid-and-contextname.py
+++ b/examples/v3arch/oneliner/manager/cmdgen/set-v3-with-custom-contextengineid-and-contextname.py
@@ -19,7 +19,10 @@ cmdGen = cmdgen.CommandGenerator()
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'),
+ cmdgen.ObjectType(
+ cmdgen.ObjectIdentity('SNMPv2-MIB', 'sysORDescr', 1),
+ 'new system name'
+ ),
contextEngineId=rfc1902.OctetString(hexValue='80004fb805636c6f75644dab22cc'),
contextName='da761cfc8c94d3aceef4f60f049105ba'
)