Author: nunofsantos
Date: 2007-11-13 15:43:12 -0500 (Tue, 13 Nov 2007)
New Revision: 1306
Modified:
mgmt/mint/python/mint/__init__.py
mgmt/mint/schemaparser.py
Log:
remove extraneous declarations
Modified: mgmt/mint/python/mint/__init__.py
===================================================================
--- mgmt/mint/python/mint/__init__.py 2007-11-13 20:11:26 UTC (rev 1305)
+++ mgmt/mint/python/mint/__init__.py 2007-11-13 20:43:12 UTC (rev 1306)
@@ -5,10 +5,6 @@
from schema import *
class MintModel:
- currentMethodId = None
- outstandingMethodCalls = None
- managedBrokers = None
-
def __init__(self):
self.currentMethodId = 1
self.outstandingMethodCalls = dict()
Modified: mgmt/mint/schemaparser.py
===================================================================
--- mgmt/mint/schemaparser.py 2007-11-13 20:11:26 UTC (rev 1305)
+++ mgmt/mint/schemaparser.py 2007-11-13 20:43:12 UTC (rev 1306)
@@ -5,19 +5,14 @@
class SqlGenerator:
"""generates SQL code from broker XML schema"""
- # mapping between xml schema types and database column types
- dataTypesMap = {}
- sqlOutput = ""
- indexes = ""
- currentTable = ""
- syle = None
-
def __init__(self, style):
self.sqlOutput = ""
self.indexes = ""
self.currentTable = ""
self.style = style
+ # mapping between xml schema types and database column types
# see xml/MgmtTypes.xml
+ self.dataTypesMap = dict()
self.dataTypesMap["objId"] = "INT8"
self.dataTypesMap["uint8"] = self.dataTypesMap["hilo8"] =
self.dataTypesMap["count8"] = "INT2"
self.dataTypesMap["uint16"] = self.dataTypesMap["hilo16"] =
self.dataTypesMap["count16"] = "INT2"
@@ -97,10 +92,6 @@
class PythonGenerator:
"""generates Python code from broker XML schema"""
- pythonOutput = ""
- additional = ""
- syle = None
-
def __init__(self, style, dsn):
self.pythonOutput = "from sqlobject import *\n\n"
self.pythonOutput += "conn = connectionForURI(\"%s\")\n" % (dsn)
@@ -181,13 +172,8 @@
class SchemaParser:
"""parses broker XML schema"""
- options = dict()
- schema = None
- style = None
- pythonGen = None
- sqlGen = None
-
def __init__(self):
+ self.options = dict()
self.parseConfigFile()
self.style = MixedCaseUnderscoreStyle()
self.pythonGen = PythonGenerator(self.style, self.options["dsn"])
Show replies by date