Author: justi9
Date: 2008-09-02 17:51:55 -0400 (Tue, 02 Sep 2008)
New Revision: 2387
Modified:
mgmt/trunk/cumin/python/cumin/model.py
Log:
Add an AdProperty model object for describing condor ad props
Modified: mgmt/trunk/cumin/python/cumin/model.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/model.py 2008-09-02 21:14:21 UTC (rev 2386)
+++ mgmt/trunk/cumin/python/cumin/model.py 2008-09-02 21:51:55 UTC (rev 2387)
@@ -42,9 +42,9 @@
CuminScheduler(self)
CuminSubmitter(self)
+ CuminJob(self)
CuminPool(self)
- CuminJob(self)
# Systems
@@ -126,6 +126,16 @@
return value
+class AdProperty(object):
+ def __init__(self, cls, name):
+ self.cumin_model = cls.cumin_model
+ self.cumin_class = cls
+
+ self.name = name
+ self.writable = True
+
+ self.cumin_class.add_ad_property(self)
+
class CuminAction(object):
def __init__(self, cls, name):
self.cumin_model = cls.cumin_model
@@ -336,6 +346,8 @@
self.mint_class = mint_class
self.properties = list()
+ self.ad_properties = list()
+ self.ad_properties_by_name = dict()
self.stats = list()
self.actions = list()
@@ -344,6 +356,10 @@
def add_property(self, prop):
self.properties.append(prop)
setattr(self, prop.name, prop)
+
+ def add_ad_property(self, prop):
+ self.ad_properties.append(prop)
+ self.ad_properties_by_name[prop.name] = prop
def add_stat(self, stat):
self.stats.append(stat)
@@ -1439,6 +1455,9 @@
prop.title = "Group"
prop.summary = True
+ prop = AdProperty(self, "CondorVersion")
+ prop.writable = False
+
#prop = self.SchedulerProperty(self, "Scheduler")
#prop.title = "Scheduler"
#prop.summary = True
Show replies by date