[rhmessaging-commits] rhmessaging commits: r1423 - in mgmt: mint/python/mint and 1 other directory.
rhmessaging-commits at lists.jboss.org
rhmessaging-commits at lists.jboss.org
Tue Dec 4 14:30:24 EST 2007
Author: justi9
Date: 2007-12-04 14:30:24 -0500 (Tue, 04 Dec 2007)
New Revision: 1423
Modified:
mgmt/cumin/python/cumin/broker.py
mgmt/mint/python/mint/__init__.py
Log:
Adds logic to the config callback to associate brokers with
registrations.
Modified: mgmt/cumin/python/cumin/broker.py
===================================================================
--- mgmt/cumin/python/cumin/broker.py 2007-12-04 16:53:03 UTC (rev 1422)
+++ mgmt/cumin/python/cumin/broker.py 2007-12-04 19:30:24 UTC (rev 1423)
@@ -600,6 +600,8 @@
reg.name = names[i]
+ self.app.model.data.connectToBroker(reg.host, reg.port or 5672)
+
self.process_cancel(session, model)
class BrokerRemove(CuminConfirmForm):
Modified: mgmt/mint/python/mint/__init__.py
===================================================================
--- mgmt/mint/python/mint/__init__.py 2007-12-04 16:53:03 UTC (rev 1422)
+++ mgmt/mint/python/mint/__init__.py 2007-12-04 19:30:24 UTC (rev 1423)
@@ -73,6 +73,25 @@
else:
#print "\n\n=============== %s %d found AFTER QUERY\n\n" % (objType.__name__, idOriginal)
pass
+
+ if obj and obj.__class__ is Broker and obj.registration is None:
+ host, port = obj.managedBroker.split(":")
+
+ port = int(port)
+
+ if port == 5672:
+ port = None
+
+ regs = BrokerRegistration.selectBy(host=host, port=port)
+
+ print "regs", regs
+
+ for reg in regs:
+ print "Attaching broker to reg", reg
+
+ reg.broker = obj
+ obj.registration = reg
+
return obj
def getByIndexAttrib(self, objType, indexAttrib, indexValue, create=False, args={}):
More information about the rhmessaging-commits
mailing list