Author: eallen
Date: 2008-09-10 16:29:50 -0400 (Wed, 10 Sep 2008)
New Revision: 2440
Modified:
mgmt/trunk/cumin/python/cumin/binding.py
mgmt/trunk/cumin/python/cumin/binding.strings
Log:
Adding required binding key to direct exchange on binding form.
Modified: mgmt/trunk/cumin/python/cumin/binding.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/binding.py 2008-09-10 20:00:25 UTC (rev 2439)
+++ mgmt/trunk/cumin/python/cumin/binding.py 2008-09-10 20:29:50 UTC (rev 2440)
@@ -88,9 +88,6 @@
self.exchange = exchange
self.instance_data = dict_key
-class DirectExchangeInput(ExchangeInput):
- pass
-
class FanoutExchangeInput(ExchangeInput):
pass
@@ -107,6 +104,9 @@
def render_key_value(self, session, exchange):
return self.get_exchange_info_for(session, exchange, "key")
+class DirectExchangeInput(BindingKeyExchangeInput):
+ pass
+
class TopicExchangeInput(BindingKeyExchangeInput):
pass
@@ -339,7 +339,7 @@
for exchange in form_binding_info:
type = form_binding_info[exchange]["type"]
- if type == "topic":
+ if (type == "topic") or (type == "direct"):
if not "key" in form_binding_info[exchange]:
name = form_binding_info[exchange]["name"]
errs = berrs.setdefault(name, list())
@@ -382,8 +382,8 @@
# if the exchange checkbox is checked
if "name" in binding_info[this_exchange]:
type = binding_info[this_exchange]["type"]
- if type == "direct":
- binding_info[this_exchange]["key"] = queue_name
+ #if type == "direct":
+ # binding_info[this_exchange]["key"] = queue_name
form_binding_info[this_exchange] = dict()
form_binding_info[this_exchange]["name"] =
binding_info[this_exchange]["name"]
Modified: mgmt/trunk/cumin/python/cumin/binding.strings
===================================================================
--- mgmt/trunk/cumin/python/cumin/binding.strings 2008-09-10 20:00:25 UTC (rev 2439)
+++ mgmt/trunk/cumin/python/cumin/binding.strings 2008-09-10 20:29:50 UTC (rev 2440)
@@ -19,7 +19,7 @@
[DirectExchangeInput.html]
<tr>
{exchange_name_input}
- <td> </td>
+ {exchange_key_input}
</tr>
[TopicExchangeInput.html]
Show replies by date