Author: eallen
Date: 2008-12-03 12:17:01 -0500 (Wed, 03 Dec 2008)
New Revision: 2916
Modified:
mgmt/trunk/cumin/python/cumin/model.py
mgmt/trunk/cumin/python/cumin/parameters.py
mgmt/trunk/cumin/python/cumin/system.py
mgmt/trunk/cumin/python/cumin/system.strings
Log:
Switching from System to Sysimage
Modified: mgmt/trunk/cumin/python/cumin/model.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/model.py 2008-12-03 16:29:12 UTC (rev 2915)
+++ mgmt/trunk/cumin/python/cumin/model.py 2008-12-03 17:17:01 UTC (rev 2916)
@@ -617,9 +617,9 @@
class CuminSystem(RemoteClass):
def __init__(self, model):
- super(CuminSystem, self).__init__(model, "system", System,
SystemStats)
+ super(CuminSystem, self).__init__(model, "system", Sysimage,
SysimageStats)
- prop = self.SystemIdProperty(self, "systemId")
+ prop = CuminProperty(self, "uuid")
prop.title = "System ID"
prop = CuminProperty(self, "nodeName")
@@ -670,12 +670,6 @@
def render_sql_orderby(self, session, *args):
return "order by machine, name asc"
- class SystemIdProperty(CuminProperty):
- def value(self, session, object):
- val = super(CuminSystem.SystemIdProperty, self).value(session, object)
-
- return val
-
class CuminMaster(RemoteClass):
def __init__(self, model):
super(CuminMaster, self).__init__(model, "master", Master,
MasterStats)
Modified: mgmt/trunk/cumin/python/cumin/parameters.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/parameters.py 2008-12-03 16:29:12 UTC (rev 2915)
+++ mgmt/trunk/cumin/python/cumin/parameters.py 2008-12-03 17:17:01 UTC (rev 2916)
@@ -172,7 +172,7 @@
class SystemParameter(Parameter):
def do_unmarshal(self, string):
- return System.get(int(string))
+ return Sysimage.get(int(string))
def do_marshal(self, session):
return str(session.id)
Modified: mgmt/trunk/cumin/python/cumin/system.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/system.py 2008-12-03 16:29:12 UTC (rev 2915)
+++ mgmt/trunk/cumin/python/cumin/system.py 2008-12-03 17:17:01 UTC (rev 2916)
@@ -22,9 +22,8 @@
self.set_default_column(col)
def render_title(self, session, *args):
- count = System.select().count()
- return "Systems %s" % fmt_count(count)
-
+ return "Systems %s" % fmt_count(self.get_item_count(session, *args))
+
class NameColumn(SqlTableColumn):
def render_title(self, session, data):
return "Name"
Modified: mgmt/trunk/cumin/python/cumin/system.strings
===================================================================
--- mgmt/trunk/cumin/python/cumin/system.strings 2008-12-03 16:29:12 UTC (rev 2915)
+++ mgmt/trunk/cumin/python/cumin/system.strings 2008-12-03 17:17:01 UTC (rev 2916)
@@ -1,11 +1,11 @@
[SystemSet.sql]
select s.id, s.node_name as name
-from system as s
+from sysimage as s
{sql_orderby}
{sql_limit}
[SystemSet.count_sql]
-select count(*) from system
+select count(*) from sysimage
[SystemSet.html]
<form id="{id}" method="post" action="?">
Show replies by date