summaryrefslogtreecommitdiff
path: root/pysnmp/smi
diff options
context:
space:
mode:
authorelie <elie>2012-12-02 15:00:06 +0000
committerelie <elie>2012-12-02 15:00:06 +0000
commit029323a7294242fe0d037e23ca3abd54454770f1 (patch)
treed01b32b43ef6c1d1a975e17c062c14f677874319 /pysnmp/smi
parentfa4814a83761d858612d5ba057ab76ab9cadbd70 (diff)
downloadpysnmp-029323a7294242fe0d037e23ca3abd54454770f1.tar.gz
- AbstractMibInstrumController class added as a base class for all possible
kinds of Management Instrumentation controllers - MibInstrumController.getMibBuilder() added
Diffstat (limited to 'pysnmp/smi')
-rw-r--r--pysnmp/smi/instrum.py16
1 files changed, 14 insertions, 2 deletions
diff --git a/pysnmp/smi/instrum.py b/pysnmp/smi/instrum.py
index 22d919a..986b923 100644
--- a/pysnmp/smi/instrum.py
+++ b/pysnmp/smi/instrum.py
@@ -3,9 +3,19 @@ import sys
from pysnmp.smi import error
from pysnmp import debug
-__all__ = [ 'MibInstrumController' ]
+__all__ = [ 'AbstractMibInstrumController', 'MibInstrumController' ]
-class MibInstrumController:
+class AbstractMibInstrumController:
+ def readVars(self, vars, acInfo=(None, None)):
+ raise error.NoSuchInstanceError()
+
+ def readNextVars(self, vars, acInfo=(None, None)):
+ raise error.EndOfMibViewError()
+
+ def writeVars(self, vars, acInfo=(None, None)):
+ raise error.NoSuchObjectError()
+
+class MibInstrumController(AbstractMibInstrumController):
fsmReadVar = {
# ( state, status ) -> newState
('start', 'ok'): 'readTest',
@@ -43,6 +53,8 @@ class MibInstrumController:
self.mibBuilder = mibBuilder
self.lastBuildId = -1
self.lastBuildSyms = {}
+
+ def getMibBuilder(self): return self.mibBuilder
# MIB indexing