[rhmessaging-commits] rhmessaging commits: r2259 - mgmt/trunk/cumin/python/cumin.
rhmessaging-commits at lists.jboss.org
rhmessaging-commits at lists.jboss.org
Wed Aug 6 09:39:16 EDT 2008
Author: eallen
Date: 2008-08-06 09:39:16 -0400 (Wed, 06 Aug 2008)
New Revision: 2259
Modified:
mgmt/trunk/cumin/python/cumin/binding.py
mgmt/trunk/cumin/python/cumin/exchange.py
Log:
Force built in exchanges to show up in exchange lists, even if they are currently inactive.
Modified: mgmt/trunk/cumin/python/cumin/binding.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/binding.py 2008-08-05 22:55:40 UTC (rev 2258)
+++ mgmt/trunk/cumin/python/cumin/binding.py 2008-08-06 13:39:16 UTC (rev 2259)
@@ -1,9 +1,10 @@
+from cumin.exchange import ExchangeInfo
from cumin.util import sorted_by, is_active
from formats import fmt_shorten
+from wooly import Template, Writer, Attribute
from wooly.forms import FormInput, FormField
+from wooly.parameters import DictParameter
from wooly.resources import StringCatalog
-from wooly import Template, Writer, Attribute
-from wooly.parameters import DictParameter
strings = StringCatalog(__file__)
@@ -246,7 +247,7 @@
# render each exchange we support
writer = Writer()
for exchange in sortedExchanges:
- if is_active(exchange):
+ if ExchangeInfo.is_builtin(exchange) or is_active(exchange):
# instance_key gives us a unique path for each exchange
# we will be rendering
instance_key = self.dict_param.get_instance_key(str(exchange.id))
Modified: mgmt/trunk/cumin/python/cumin/exchange.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/exchange.py 2008-08-05 22:55:40 UTC (rev 2258)
+++ mgmt/trunk/cumin/python/cumin/exchange.py 2008-08-06 13:39:16 UTC (rev 2259)
@@ -546,3 +546,11 @@
def render_item_name(self, session, producer):
return producer.name
+
+class ExchangeInfo(object):
+ def is_builtin(self, exchange):
+ return exchange.name in ["amq.direct", "amq.topic", "amq.match", "amq.fanout"]
+
+ is_builtin = classmethod(is_builtin)
+
+
\ No newline at end of file
More information about the rhmessaging-commits
mailing list