summaryrefslogtreecommitdiff
path: root/examples/v3arch/asyncore/agent/cmdrsp/custom-mib-controller.py
diff options
context:
space:
mode:
authorIlya Etingof <etingof@gmail.com>2018-06-30 20:14:57 +0200
committerGitHub <noreply@github.com>2018-06-30 20:14:57 +0200
commitda4539e34cacdc0bd6ecfba98dc48caecc12b104 (patch)
tree22fdd82dae7dc971a8998d7679d9d6698105116c /examples/v3arch/asyncore/agent/cmdrsp/custom-mib-controller.py
parentdf6d6a6efd7ec6810feb9edddf369264512612b2 (diff)
downloadpysnmp-git-da4539e34cacdc0bd6ecfba98dc48caecc12b104.tar.gz
Overhaul SMI/MIB instrumentation API (#161)
Overhaul SMI/MIB instrumentation API SMI/MIB managed objects API overhauled for simplicity and flexibility breaking backward compatibility. This change would allow way more control over custom MIB managed objects and also is the prerequisite for asynchronous MIB instrumentation.
Diffstat (limited to 'examples/v3arch/asyncore/agent/cmdrsp/custom-mib-controller.py')
-rw-r--r--examples/v3arch/asyncore/agent/cmdrsp/custom-mib-controller.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/v3arch/asyncore/agent/cmdrsp/custom-mib-controller.py b/examples/v3arch/asyncore/agent/cmdrsp/custom-mib-controller.py
index 1a03e725..94bdb7de 100644
--- a/examples/v3arch/asyncore/agent/cmdrsp/custom-mib-controller.py
+++ b/examples/v3arch/asyncore/agent/cmdrsp/custom-mib-controller.py
@@ -53,7 +53,7 @@ snmpContext = context.SnmpContext(snmpEngine)
# any Managed Objects attached. It supports only GET's and
# always echos request var-binds in response.
class EchoMibInstrumController(instrum.AbstractMibInstrumController):
- def readVars(self, varBinds, acInfo=(None, None)):
+ def readVars(self, *varBinds, **context):
return [(ov[0], v2c.OctetString('You queried OID %s' % ov[0])) for ov in varBinds]