summaryrefslogtreecommitdiff
path: root/pysnmp/hlapi/v3arch/twisted
diff options
context:
space:
mode:
authorIlya Etingof <etingof@gmail.com>2018-11-03 12:51:35 +0100
committerIlya Etingof <etingof@gmail.com>2018-11-03 12:55:51 +0100
commit4994111b2bdfb496d2b33cce6607db8a1de40473 (patch)
tree030d5c5fae96f94551440f9f986f6e1698f8a5ec /pysnmp/hlapi/v3arch/twisted
parent9ebd0c0fab207c02f2046a1d221f147aa69c6c26 (diff)
downloadpysnmp-git-4994111b2bdfb496d2b33cce6607db8a1de40473.tar.gz
Fix hlapi LCD to include `contextName` (#217)
Fixed hlapi LCD configurator to include `contextName`. Prior to this fix sending SNMPv3 TRAP with non-default `contextName` would fail. This change modifies the signature of the internal LCD methods.
Diffstat (limited to 'pysnmp/hlapi/v3arch/twisted')
-rw-r--r--pysnmp/hlapi/v3arch/twisted/cmdgen.py12
-rw-r--r--pysnmp/hlapi/v3arch/twisted/ntforg.py5
2 files changed, 10 insertions, 7 deletions
diff --git a/pysnmp/hlapi/v3arch/twisted/cmdgen.py b/pysnmp/hlapi/v3arch/twisted/cmdgen.py
index 745ce9d2..30eb5b4d 100644
--- a/pysnmp/hlapi/v3arch/twisted/cmdgen.py
+++ b/pysnmp/hlapi/v3arch/twisted/cmdgen.py
@@ -128,7 +128,8 @@ def getCmd(snmpEngine, authData, transportTarget, contextData,
else:
deferred.callback((errorStatus, errorIndex, varBindsUnmade))
- addrName, paramsName = lcd.configure(snmpEngine, authData, transportTarget)
+ addrName, paramsName = lcd.configure(
+ snmpEngine, authData, transportTarget, contextData.contextName)
deferred = Deferred()
@@ -244,7 +245,8 @@ def setCmd(snmpEngine, authData, transportTarget, contextData,
else:
deferred.callback((errorStatus, errorIndex, varBindsUnmade))
- addrName, paramsName = lcd.configure(snmpEngine, authData, transportTarget)
+ addrName, paramsName = lcd.configure(
+ snmpEngine, authData, transportTarget, contextData.contextName)
deferred = Deferred()
@@ -374,7 +376,8 @@ def nextCmd(snmpEngine, authData, transportTarget, contextData,
else:
deferred.callback((errorStatus, errorIndex, varBindsUnmade))
- addrName, paramsName = lcd.configure(snmpEngine, authData, transportTarget)
+ addrName, paramsName = lcd.configure(
+ snmpEngine, authData, transportTarget, contextData.contextName)
deferred = Deferred()
@@ -532,7 +535,8 @@ def bulkCmd(snmpEngine, authData, transportTarget, contextData,
else:
deferred.callback((errorStatus, errorIndex, varBindsUnmade))
- addrName, paramsName = lcd.configure(snmpEngine, authData, transportTarget)
+ addrName, paramsName = lcd.configure(
+ snmpEngine, authData, transportTarget, contextData.contextName)
deferred = Deferred()
diff --git a/pysnmp/hlapi/v3arch/twisted/ntforg.py b/pysnmp/hlapi/v3arch/twisted/ntforg.py
index 0f57068d..ba05bb47 100644
--- a/pysnmp/hlapi/v3arch/twisted/ntforg.py
+++ b/pysnmp/hlapi/v3arch/twisted/ntforg.py
@@ -166,9 +166,8 @@ def sendNotification(snmpEngine, authData, transportTarget, contextData,
else:
deferred.callback((errorStatus, errorIndex, varBindsUnmade))
- notifyName = lcd.configure(
- snmpEngine, authData, transportTarget, notifyType
- )
+ notifyName = lcd.configure(snmpEngine, authData, transportTarget,
+ notifyType, contextData.contextName)
def __trapFun(deferred):
deferred.callback((0, 0, []))