[rhmessaging-commits] rhmessaging commits: r4298 - mgmt/newdata/cumin/python/cumin.

rhmessaging-commits at lists.jboss.org rhmessaging-commits at lists.jboss.org
Thu Sep 16 10:31:37 EDT 2010


Author: eallen
Date: 2010-09-16 10:31:37 -0400 (Thu, 16 Sep 2010)
New Revision: 4298

Modified:
   mgmt/newdata/cumin/python/cumin/model.py
Log:
Fixed BZ 471625: Put the JobUniverse ad under the Main group and translated the integer value to a string.

Modified: mgmt/newdata/cumin/python/cumin/model.py
===================================================================
--- mgmt/newdata/cumin/python/cumin/model.py	2010-09-16 10:45:52 UTC (rev 4297)
+++ mgmt/newdata/cumin/python/cumin/model.py	2010-09-16 14:31:37 UTC (rev 4298)
@@ -1405,6 +1405,12 @@
         prop.description = "Submission name"
         prop.writable = False
 
+        prop = self.JobUniverse(self, "JobUniverse")
+        prop.group = "Main"
+        prop.title = "Job Universe"
+        prop.writable = False
+        prop.renderer = prop.render_universe
+
         ### Condor Info Group
         prop = AdProperty(self, "CondorVersion")
         prop.group = "Condor Info"
@@ -1542,6 +1548,22 @@
         def render_status(self, session, status):
             return JobStatusInfo.get_status_string(status)
 
+    class JobUniverse(AdProperty):
+        universes = {None: "Default",
+                    5: "Vanilla",
+                    7: "Scheduler",
+                    9: "Grid",
+                    10: "Java",
+                    11: "Parallel",
+                    12: "Local",
+                    13: "VM"}
+
+        def render_universe(self, session, value):
+            try:
+                return self.universes[value]
+            except KeyError:
+                return "Unknown (%s)" % str(value)
+
 class GetStartedAction(CuminAction):
     def get_xml_response(self, session, object, *args):
         updateTime = object.statsCurr and object.statsCurr.qmfUpdateTime \



More information about the rhmessaging-commits mailing list