summaryrefslogtreecommitdiff
path: root/tools/libsmi2pysnmp
diff options
context:
space:
mode:
authorelie <elie>2005-10-26 21:33:16 +0000
committerelie <elie>2005-10-26 21:33:16 +0000
commitf5b318c21a0a3dba8b6562ba19176f75dae8d8ab (patch)
tree623ad125af0f307f600fbb447681573fe93456f0 /tools/libsmi2pysnmp
parentef9be89462fd954474dfcfc5f0b81ebcc6066cfd (diff)
downloadpysnmp-f5b318c21a0a3dba8b6562ba19176f75dae8d8ab.tar.gz
adjusted to re-worked SMI model
Diffstat (limited to 'tools/libsmi2pysnmp')
-rw-r--r--tools/libsmi2pysnmp11
1 files changed, 5 insertions, 6 deletions
diff --git a/tools/libsmi2pysnmp b/tools/libsmi2pysnmp
index 60b0e66..55370b2 100644
--- a/tools/libsmi2pysnmp
+++ b/tools/libsmi2pysnmp
@@ -6,7 +6,7 @@ from string import split, replace, find, atol, atoi
from types import StringType, DictType
import sys, time
-version = '0.0.4-alpha'
+version = '0.0.5-alpha'
class Error(StandardError): pass
@@ -45,7 +45,7 @@ out = sys.stdout
__symsTable = {
'MODULE-IDENTITY': ('ModuleIdentity',),
- 'OBJECT-TYPE': ('MibVariable', 'MibTable', 'MibTableRow', 'MibTableColumn'),
+ 'OBJECT-TYPE': ('MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn'),
'NOTIFICATION-TYPE': ('NotificationType',),
'TEXTUAL-CONVENTION': ('TextualConvention',),
'MODULE-COMPLIANCE': ('ModuleCompliance',),
@@ -298,7 +298,7 @@ if nodes:
else:
out.write('MibIdentifier(%s)' % __oidToTuple(symDef['oid']))
if symDef['nodetype'] == 'scalar':
- out.write('MibVariable(%s' % __oidToTuple(symDef['oid']))
+ out.write('MibScalar(%s' % __oidToTuple(symDef['oid']))
out.write('%s)' % __genTypeDef((symName, symDef)))
out.write('.setMaxAccess(\"%s\")' % symDef['access'])
if symDef.has_key('units'):
@@ -331,9 +331,8 @@ if nodes:
))
out.write(')')
if symDef['nodetype'] == 'column':
- out.write('MibTableColumn(%s)' % __oidToTuple(symDef['oid']))
- out.write('.setColumnInitializer(MibVariable(()')
- out.write('%s)' % __genTypeDef((symName, symDef)))
+ out.write('MibTableColumn(%s' % __oidToTuple(symDef['oid']))
+ out.write(', %s)' % __genTypeDef((symName, symDef)))
out.write('.setMaxAccess(\"%s\"))' % symDef['access'])
out.write('%s\n' % addLabelForSymbol(symName))