[rhmessaging-commits] rhmessaging commits: r1107 - mgmt/cumin/python/cumin.
rhmessaging-commits at lists.jboss.org
rhmessaging-commits at lists.jboss.org
Wed Oct 17 14:37:14 EDT 2007
Author: justi9
Date: 2007-10-17 14:37:14 -0400 (Wed, 17 Oct 2007)
New Revision: 1107
Added:
mgmt/cumin/python/cumin/parameters.py
Modified:
mgmt/cumin/python/cumin/cluster.py
mgmt/cumin/python/cumin/realm.py
Log:
Change 1106 was incomplete. This adds a file I forgot for that change.
Modified: mgmt/cumin/python/cumin/cluster.py
===================================================================
--- mgmt/cumin/python/cumin/cluster.py 2007-10-17 18:34:51 UTC (rev 1106)
+++ mgmt/cumin/python/cumin/cluster.py 2007-10-17 18:37:14 UTC (rev 1107)
@@ -52,13 +52,6 @@
return mlink(branch.marshal(), "Server", server.name)
-class ClusterParameter(Parameter):
- def do_unmarshal(self, string):
- return self.app.model.get_cluster(int(string))
-
- def do_marshal(self, cluster):
- return str(cluster.id)
-
class ClusterFrame(CuminFrame):
def __init__(self, app, name):
super(ClusterFrame, self).__init__(app, name)
Added: mgmt/cumin/python/cumin/parameters.py
===================================================================
--- mgmt/cumin/python/cumin/parameters.py (rev 0)
+++ mgmt/cumin/python/cumin/parameters.py 2007-10-17 18:37:14 UTC (rev 1107)
@@ -0,0 +1,64 @@
+from wooly import *
+
+class ClusterParameter(Parameter):
+ def do_unmarshal(self, string):
+ return self.app.model.get_cluster(int(string))
+
+ def do_marshal(self, cluster):
+ return str(cluster.id)
+
+class ConfigPropertyParameter(Parameter):
+ def do_unmarshal(self, string):
+ return self.app.model.get_config_property(int(string))
+
+ def do_marshal(self, prop):
+ return str(prop.id)
+
+class ExchangeParameter(Parameter):
+ def do_unmarshal(self, string):
+ return self.app.model.get_exchange(int(string))
+
+ def do_marshal(self, exchange):
+ return str(exchange.id)
+
+class QueueParameter(Parameter):
+ def do_unmarshal(self, string):
+ return self.app.model.get_queue(int(string))
+
+ def do_marshal(self, queue):
+ return str(queue.id)
+
+class RealmParameter(Parameter):
+ def do_unmarshal(self, string):
+ return self.app.model.get_realm(int(string))
+
+ def do_marshal(self, queue):
+ return str(realm.id)
+
+class ServerGroupParameter(Parameter):
+ def do_unmarshal(self, string):
+ return self.app.model.get_server_group(int(string))
+
+ def do_marshal(self, group):
+ return str(group.id)
+
+class ServerParameter(Parameter):
+ def do_unmarshal(self, string):
+ return self.app.model.get_server(int(string))
+
+ def do_marshal(self, server):
+ return str(server.id)
+
+class ServerProfileParameter(Parameter):
+ def do_unmarshal(self, string):
+ return self.app.model.get_server_profile(int(string))
+
+ def do_marshal(self, profile):
+ return str(profile.id)
+
+class VirtualHostParameter(Parameter):
+ def do_unmarshal(self, string):
+ return self.app.model.get_virtual_host(int(string))
+
+ def do_marshal(self, vhost):
+ return str(vhost.id)
Modified: mgmt/cumin/python/cumin/realm.py
===================================================================
--- mgmt/cumin/python/cumin/realm.py 2007-10-17 18:34:51 UTC (rev 1106)
+++ mgmt/cumin/python/cumin/realm.py 2007-10-17 18:37:14 UTC (rev 1107)
@@ -19,13 +19,6 @@
def render_item_name(self, session, realm):
return realm.name
-class RealmParameter(Parameter):
- def do_unmarshal(self, string):
- return self.app.model.get_realm(int(string))
-
- def do_marshal(self, queue):
- return str(realm.id)
-
class RealmInputSet(CheckboxInputSet):
def __init__(self, app, name, form):
super(RealmInputSet, self).__init__(app, name, form)
More information about the rhmessaging-commits
mailing list