[rhmessaging-commits] rhmessaging commits: r1505 - mgmt/mint/python/mint.

rhmessaging-commits at lists.jboss.org rhmessaging-commits at lists.jboss.org
Mon Dec 17 14:26:18 EST 2007


Author: justi9
Date: 2007-12-17 14:26:18 -0500 (Mon, 17 Dec 2007)
New Revision: 1505

Modified:
   mgmt/mint/python/mint/schema.py
   mgmt/mint/python/mint/schema.sql
   mgmt/mint/python/mint/schemaparser.py
Log:
Upgrades the schema.

Makes the parser generate SQLMultipleJoins instead of MultipleJoins.



Modified: mgmt/mint/python/mint/schema.py
===================================================================
--- mgmt/mint/python/mint/schema.py	2007-12-17 19:18:02 UTC (rev 1504)
+++ mgmt/mint/python/mint/schema.py	2007-12-17 19:26:18 UTC (rev 1505)
@@ -55,6 +55,7 @@
       classToSchemaNameMap[self.__class__.__name__], "leaveCluster", args=actualArgs, packageName="qpid")
 
   def echo(self, model, managedBrokerLabel, callbackMethod, sequence, body):
+    """Request a response to test the path to the management agent"""
     actualArgs = dict()
     actualArgs["sequence"] = sequence
     actualArgs["body"] = body
@@ -247,12 +248,6 @@
     model.getConnectedBroker(managedBrokerLabel).method(methodId, self.idOriginal, \
       classToSchemaNameMap[self.__class__.__name__], "close", args=actualArgs, packageName="qpid")
 
-  def detach(self, model, managedBrokerLabel, callbackMethod):
-    actualArgs = dict()
-    methodId = model.registerCallback(callbackMethod)
-    model.getConnectedBroker(managedBrokerLabel).method(methodId, self.idOriginal, \
-      classToSchemaNameMap[self.__class__.__name__], "detach", args=actualArgs, packageName="qpid")
-
 Vhost.sqlmeta.addJoin(SQLMultipleJoin('Client', joinMethodName='clients'))
 
 
@@ -260,11 +255,12 @@
   idOriginal = BigIntCol(default=None)
   recTime = TimestampCol(default=None)
   client = ForeignKey('Client', cascade='null', default=None)
+  closing = BoolCol(default=None)
   authIdentity = StringCol(length=1000, default=None)
   framesFromClient = BigIntCol(default=None)
-  msgsConsumed = BigIntCol(default=None)
+  framesToClient = BigIntCol(default=None)
   bytesFromClient = BigIntCol(default=None)
-  bytesConsumed = BigIntCol(default=None)
+  bytesToClient = BigIntCol(default=None)
 
 Client.sqlmeta.addJoin(SQLMultipleJoin('ClientStats', joinMethodName='stats'))
 
@@ -279,6 +275,7 @@
   statsPrev = ForeignKey('SessionStats', cascade='null', default=None)
   vhost = ForeignKey('Vhost', cascade='null', default=None)
   name = StringCol(length=1000, default=None)
+  channelId = SmallIntCol(default=None)
   client = ForeignKey('Client', cascade='null', default=None)
   detachedLifespan = IntCol(default=None)
 

Modified: mgmt/mint/python/mint/schema.sql
===================================================================
--- mgmt/mint/python/mint/schema.sql	2007-12-17 19:18:02 UTC (rev 1504)
+++ mgmt/mint/python/mint/schema.sql	2007-12-17 19:26:18 UTC (rev 1505)
@@ -109,11 +109,12 @@
     id_original BIGINT,
     rec_time TIMESTAMP,
     client_id INT,
+    closing BOOL,
     auth_identity VARCHAR(1000),
     frames_from_client BIGINT,
-    msgs_consumed BIGINT,
+    frames_to_client BIGINT,
     bytes_from_client BIGINT,
-    bytes_consumed BIGINT
+    bytes_to_client BIGINT
 );
 
 CREATE TABLE consumer (
@@ -297,6 +298,7 @@
     stats_prev_id INT,
     vhost_id INT,
     name VARCHAR(1000),
+    channel_id SMALLINT,
     client_id INT,
     detached_lifespan INT
 );

Modified: mgmt/mint/python/mint/schemaparser.py
===================================================================
--- mgmt/mint/python/mint/schemaparser.py	2007-12-17 19:18:02 UTC (rev 1504)
+++ mgmt/mint/python/mint/schemaparser.py	2007-12-17 19:26:18 UTC (rev 1505)
@@ -54,7 +54,7 @@
   def generateMultipleJoin(self, tableFrom, tableTo, attrib=""):
     if (attrib == ""):
       attrib = tableTo.lower() + "s"
-    self.additionalPythonOutput += "\n%s.sqlmeta.addJoin(MultipleJoin('%s', joinMethodName='%s'))\n" % (tableFrom, tableTo, attrib)
+    self.additionalPythonOutput += "\n%s.sqlmeta.addJoin(SQLMultipleJoin('%s', joinMethodName='%s'))\n" % (tableFrom, tableTo, attrib)
 
   def generateClassAttribs(self, schemaName, elements):
     for elem in elements:




More information about the rhmessaging-commits mailing list