Author: eallen Date: 2010-12-20 14:12:38 +0000 (Mon, 20 Dec 2010) New Revision: 4442
Modified: trunk/cumin/python/cumin/model.py Log: Removing obsolete CuminClass and RemoteClass code
Modified: trunk/cumin/python/cumin/model.py =================================================================== --- trunk/cumin/python/cumin/model.py 2010-12-20 13:53:33 UTC (rev 4441) +++ trunk/cumin/python/cumin/model.py 2010-12-20 14:12:38 UTC (rev 4442) @@ -667,189 +667,6 @@ self.ad_properties.append(prop) self.ad_properties_by_name[prop.name] = prop
-class CuminClass(object): - def __init__(self, model, name, mint_class): - self.model = model - self.cumin_name = name - self.mint_class = mint_class - - self.properties = list() - self.ad_properties = list() - self.ad_properties_by_name = dict() - self.stats = list() - self.actions = list() - - self.tasks = list() - self.tasks_by_class = dict() - - self.frame = None - - self.model.add_class(self) - - 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) - setattr(self, stat.name, stat) - - def add_action(self, action): - self.actions.append(action) - setattr(self, action.name, action) - - def add_task(self, task): - self.tasks.append(task) - self.tasks_by_class[task.__class__] = task - - def init(self): - log.debug("Initializing class %s", self) - - for prop in self.properties: - prop.init() - - for ad_prop in self.ad_properties: - ad_prop.init() - - for stat in self.stats: - stat.init() - - for action in self.actions: - action.init() - - for task in self.tasks: - log.debug("Initializing task %s", task) - task.init() - - def get_title(self, session): - return "Object" - - def get_plural_title(self, session): - return self.get_title(session) + "s" - - def get_icon_href(self, session): - return "resource?name=action-36.png" - - def get_object_href(self, session, object): - branch = session.branch() - self.show_object(branch, object) - return branch.marshal() - - def get_object_href_by_id(self, session, id): - return self.get_object_href(session, Identifiable(id)) - - def show_object(self, session, object): - return self.frame.show_object(session, object) - - def get_object_title(self, session, object): - title = self.get_title(session) - name = self.get_object_name(object) - return "%s '%s'" % (title, name) - - def get_object_name(self, object): - return object.name - - def write_event_xml(self, writer, object): - writer.write("<events errors="%i" warnings="%i"/>" % (0, 0)) - - def write_stat_xml(self, session, writer, object): - for stat in self.stats: - stat.write_xml(writer, object) - - def write_xml(self, session, writer, object): - object.sync() - - writer.write("<%s id="%s" name="%s">" % \ - (self.cumin_name, str(object.id), - self.get_object_name(object))) - - self.write_event_xml(writer, object) - self.write_stat_xml(session, writer, object) - - writer.write("</%s>" % self.cumin_name) - - def __str__(self): - return "%s.%s" % (self.__module__, self.__class__.__name__) - -class RemoteClass(CuminClass): - def __init__(self, model, name, mint_class, mint_stats_class): - super(RemoteClass, self).__init__(model, name, mint_class) - - self.mint_stats_class = mint_stats_class - - prop = CuminProperty(self, "qmfObjectId") - prop.title = "Management ID" - - prop = CuminProperty(self, "qmfCreateTime") - prop.title = "Creation Time" - - prop = CuminProperty(self, "qmfDeleteTime") - prop.title = "Deletion Time" - - prop = CuminProperty(self, "qmfUpdateTime") - prop.title = "Last Updated" - prop.summary = True - -class CuminGrid(RemoteClass): - def __init__(self, model): - super(CuminGrid, self).__init__(model, "grid", Grid, GridStats) - - prop = CuminProperty(self, "Name") - prop.title = "Name" - - prop = CuminProperty(self, "Pool") - prop.title = "Pool" - - prop = CuminProperty(self, "JobLimit") - prop.title = "Job Limit" - - prop = CuminProperty(self, "SubmitLimit") - prop.title = "Submit Limit" - - prop = CuminProperty(self, "GridResourceUnavailableTime") - prop.title = "Grid Resource Unavailable Time" - - stat = CuminStat(self, "NumJobs") - stat.title = "Num Jobs" - stat.category = "general" - - stat = CuminStat(self, "SubmitsInProgress") - stat.title = "Submits In Progress" - stat.category = "general" - - stat = CuminStat(self, "SubmitsQueued") - stat.title = "Submits Queued" - stat.category = "general" - - stat = CuminStat(self, "SubmitsAllowed") - stat.title = "Submits Allowed" - stat.category = "general" - - stat = CuminStat(self, "SubmitsWanted") - stat.title = "Submits Wanted" - stat.category = "general" - - stat = CuminStat(self, "RunningJobs") - stat.title = "Running Jobs" - stat.category = "general" - - stat = CuminStat(self, "IdleJobs") - stat.title = "Idle Jobs" - stat.category = "general" - - def init(self): - super(CuminGrid, self).init() - - def get_title(self, session): - return "Grid" - - def get_icon_href(self, session): - return "resource?name=pool-36.png" - # XXX "do_" on this doesn't make sense def do_bind(session, queue_name, binding_info): for exchange in binding_info: @@ -863,573 +680,6 @@ binding_key=binding_key, arguments=binding_info[exchange]["arguments"])
-class CuminQueue(RemoteClass): - def __init__(self, model): - super(CuminQueue, self).__init__(model, "queue", Queue, QueueStats) - - prop = CuminProperty(self, "name") - prop.title = "Name" - - prop = CuminProperty(self, "durable") - prop.title = "Durable?" - prop.summary = True - - prop = CuminProperty(self, "autoDelete") - prop.title = "Auto Delete?" - prop.summary = True - - prop = CuminProperty(self, "exclusive") - prop.title = "Exclusive?" - prop.summary = True - - prop = CuminProperty(self, "arguments") - prop.title = "Arguments" - prop.prefix = "qpid." - prop.escape = False - - stat = CuminStat(self, "consumerCount") - stat.title = "Consumers" - stat.unit = "consumer" - stat.highlow = True - - stat = CuminStat(self, "bindingCount") - stat.title = "Bindings" - stat.unit = "binding" - stat.highlow = True - - stat = CuminStat(self, "msgDepth") - stat.title = "Message Depth" - stat.highlow = True - - stat = CuminStat(self, "msgTotalEnqueues") - stat.title = "Msgs. Enqueued" - stat.unit = "message" - stat.category = "io" - - stat = CuminStat(self, "msgTotalDequeues") - stat.title = "Msgs. Dequeued" - stat.unit = "message" - stat.category = "io" - - stat = CuminStat(self, "byteDepth") - stat.title = "Byte Depth" - stat.unit = "byte" - stat.highlow = True - - stat = CuminStat(self, "byteTotalEnqueues") - stat.title = "Bytes Enqueued" - stat.unit = "byte" - stat.category = "io" - - stat = CuminStat(self, "byteTotalDequeues") - stat.title = "Bytes Dequeued" - stat.unit = "byte" - stat.category = "io" - - stat = CuminStat(self, "unackedMessages") - stat.title = "Msgs. Unacked" - stat.unit = "message" - stat.category = "io" - stat.highlow = True - - stat = CuminStat(self, "messageLatencyMin") - stat.title = "Min. Msg. Latency" - stat.unit = "nanosecond" - stat.category = "io" - - stat = CuminStat(self, "messageLatencyMax") - stat.title = "Max. Msg. Latency" - stat.unit = "nanosecond" - stat.category = "io" - - stat = CuminStat(self, "messageLatencyAverage") - stat.title = "Avg. Msg. Latency" - stat.unit = "nanosecond" - stat.category = "io" - - # Transactional - - stat = CuminStat(self, "msgTxnEnqueues") - stat.title = "Msgs. Enqueued" - stat.unit = "message" - stat.category = "io.txn" - - stat = CuminStat(self, "msgTxnDequeues") - stat.title = "Msgs. Dequeued" - stat.unit = "message" - stat.category = "io.txn" - - stat = CuminStat(self, "byteTxnEnqueues") - stat.title = "Bytes Enqueued" - stat.unit = "byte" - stat.category = "io.txn" - - stat = CuminStat(self, "byteTxnDequeues") - stat.title = "Bytes Dequeued" - stat.unit = "byte" - stat.category = "io.txn" - - stat = CuminStat(self, "enqueueTxnStarts") - stat.title = "Enq. Trans. Started" - stat.unit = "transaction" - stat.category = "txn" - - stat = CuminStat(self, "enqueueTxnCommits") - stat.title = "Enq. Trans. Committed" - stat.unit = "transaction" - stat.category = "txn" - - stat = CuminStat(self, "enqueueTxnRejects") - stat.title = "Enq. Trans. Rejected" - stat.unit = "transaction" - stat.category = "txn" - - stat = CuminStat(self, "enqueueTxnCount") - stat.title = "Enq. Trans. Pending" - stat.unit = "transaction" - stat.category = "txn" - stat.highlow = True - - stat = CuminStat(self, "dequeueTxnStarts") - stat.title = "Deq. Trans. Started" - stat.unit = "transaction" - stat.category = "txn" - - stat = CuminStat(self, "dequeueTxnCommits") - stat.title = "Deq. Trans. Committed" - stat.unit = "transaction" - stat.category = "txn" - - stat = CuminStat(self, "dequeueTxnRejects") - stat.title = "Deq. Trans. Rejected" - stat.unit = "transaction" - stat.category = "txn" - - stat = CuminStat(self, "dequeueTxnCount") - stat.title = "Deq. Trans. Pending" - stat.unit = "transaction" - stat.category = "txn" - stat.highlow = True - - # Durable - - stat = CuminStat(self, "msgPersistEnqueues") - stat.title = "Msgs. Enqueued" - stat.unit = "message" - stat.category = "io.durable" - - stat = CuminStat(self, "msgPersistDequeues") - stat.title = "Msgs. Dequeued" - stat.unit = "message" - stat.category = "io.durable" - - stat = CuminStat(self, "bytePersistEnqueues") - stat.title = "Bytes Enqueued" - stat.unit = "byte" - stat.category = "io.durable" - - stat = CuminStat(self, "bytePersistDequeues") - stat.title = "Bytes Dequeued" - stat.unit = "byte" - stat.category = "io.durable" - - def init(self): - super(CuminQueue, self).init() - - self.frame = self.model.frame.messaging.broker.queue - - def get_title(self, session): - return "Queue" - - def get_icon_href(self, session): - return "resource?name=queue-36.png" - -class CuminExchange(RemoteClass): - def __init__(self, model): - super(CuminExchange, self).__init__(model, "exchange", - Exchange, ExchangeStats) - - prop = self.NameProperty(self, "name") - prop.title = "Name" - - prop = CuminProperty(self, "type") - prop.title = "Type" - prop.summary = True - - prop = CuminProperty(self, "durable") - prop.title = "Durable?" - prop.summary = True - - prop = CuminProperty(self, "arguments") - prop.title = "Arguments" - prop.prefix = "qpid." - prop.escape = False - - stat = CuminStat(self, "producerCount") - stat.title = "Producers" - stat.unit = "producer" - stat.highlow = True - - stat = CuminStat(self, "bindingCount") - stat.title = "Bindings" - stat.unit = "binding" - stat.highlow = True - - stat = CuminStat(self, "msgReceives") - stat.title = "Msgs. Received" - stat.unit = "message" - stat.category = "io" - - stat = CuminStat(self, "msgRoutes") - stat.title = "Msgs. Routed" - stat.unit = "message" - stat.category = "io" - - stat = CuminStat(self, "msgDrops") - stat.title = "Msgs. Dropped" - stat.unit = "message" - stat.category = "io" - - stat = CuminStat(self, "byteReceives") - stat.title = "Bytes Received" - stat.unit = "message" - stat.category = "io" - - stat = CuminStat(self, "byteRoutes") - stat.title = "Bytes Routed" - stat.unit = "message" - stat.category = "io" - - stat = CuminStat(self, "byteDrops") - stat.title = "Bytes Dropped" - stat.unit = "message" - stat.category = "io" - - def init(self): - super(CuminExchange, self).init() - - self.frame = self.model.frame.messaging.broker.exchange - - def get_title(self, session): - return "Exchange" - - def get_icon_href(self, session): - return "resource?name=exchange-36.png" - - def get_object_title(self, session, object): - name = super(CuminExchange, self).get_object_name(object) - - if name: - return super(CuminExchange, self).get_object_title(session, object) - else: - return self.get_object_name(object) - - def get_object_name(self, object): - return object.name and object.name or "Default Exchange" - - class NameProperty(CuminProperty): - def value(self, session, object): - value = getattr(object, self.name, None) - return value and value or "Default Exchange" - -class CuminBinding(RemoteClass): - def __init__(self, model): - super(CuminBinding, self).__init__(model, "binding", - Binding, BindingStats) - - prop = CuminProperty(self, "bindingKey") - prop.title = "Binding Key" - - stat = CuminStat(self, "msgMatched") - stat.title = "Msgs. Matched" - stat.unit = "message" - - def get_title(self, session): - return "Binding" - - def get_object_name(self, binding): - return "between %s and %s" % (binding.exchange.name, binding.queue.name) - -class CuminRoute(RemoteClass): - def __init__(self, model): - super(CuminRoute, self).__init__ \ - (model, "route", Bridge, BridgeStats) - - prop = CuminProperty(self, "key") - prop.title = "Route Key" - - prop = CuminProperty(self, "tag") - prop.title = "Tag" - - prop = CuminProperty(self, "excludes") - prop.title = "Excludes" - - prop = CuminProperty(self, "durable") - prop.title = "Durable" - - prop = CuminProperty(self, "dest") - prop.title = "Exchange" - - def get_title(self, session): - return "Route" - - def get_object_name(self, route): - return route.src - -class CuminConnection(RemoteClass): - def __init__(self, model): - super(CuminConnection, self).__init__(model, "connection", - ClientConnection, - ClientConnectionStats) - - prop = CuminProperty(self, "address") - prop.title = "Address" - - prop = CuminProperty(self, "SystemConnection") - prop.title = "System Connection?" - - prop = CuminProperty(self, "authIdentity") - prop.title = "Auth Identity?" - - prop = CuminProperty(self, "federationLink") - prop.title = "Federation Link" - - stat = CuminStat(self, "closing") - stat.title = "Closing Down" - stat.category = "general" - - stat = CuminStat(self, "bytesFromClient") - stat.title = "Bytes Sent" - stat.unit = "byte" - stat.category = "io" - - stat = CuminStat(self, "bytesToClient") - stat.title = "Bytes Received" - stat.unit = "byte" - stat.category = "io" - - stat = CuminStat(self, "framesFromClient") - stat.title = "Frames Sent" - stat.unit = "frame" - stat.category = "io" - - stat = CuminStat(self, "framesToClient") - stat.title = "Frames Received" - stat.unit = "frame" - stat.category = "io" - - def init(self): - super(CuminConnection, self).init() - - self.frame = self.model.frame.messaging.broker.connection - - def get_title(self, session): - return "Connection" - - def get_icon_href(self, session): - return "resource?name=client-36.png" - - def get_object_name(self, conn): - return conn.address - -class CuminLink(RemoteClass): - def __init__(self, model): - super(CuminLink, self).__init__(model, "link", Link, LinkStats) - - prop = CuminProperty(self, "useSsl") - prop.title = "Use SSL" - prop.summary = True - - prop = CuminProperty(self, "durable") - prop.title = "Durable" - prop.summary = True - - stat = CuminStat(self, "closing") - stat.title = "Closing Down" - - stat = CuminStat(self, "framesFromPeer") - stat.title = "Frames from Peer" - stat.unit = "frame" - stat.category = "io" - - stat = CuminStat(self, "framesToPeer") - stat.title = "Frames to Peer" - stat.unit = "frame" - stat.category = "io" - - stat = CuminStat(self, "bytesFromPeer") - stat.title = "Bytes from Peer" - stat.unit = "byte" - stat.category = "io" - - stat = CuminStat(self, "bytesToPeer") - stat.title = "Bytes to Peer" - stat.unit = "byte" - stat.category = "io" - - def get_title(self, session): - return "Broker Link" - - def get_object_name(self, link): - return "%s:%d" % (link.host, link.port) - -class CuminBrokerStoreModule(RemoteClass): - def __init__(self, model): - super(CuminBrokerStoreModule, self).__init__ \ - (model, "store", Store, StoreStats) - - prop = CuminProperty(self, "location") - prop.title = "Location" - -class CuminJournal(RemoteClass): - def __init__(self, model): - super(CuminJournal, self).__init__(model, "journal", - Journal, JournalStats) - - prop = CuminProperty(self, "name") - prop.title = "Name" - prop.summary = True - - prop = CuminProperty(self, "directory") - prop.title = "Directory" - - stat = CuminStat(self, "initialFileCount") - stat.title = "Initial File Count" - stat.unit = "file" - stat.category = "io.journal" - - stat = CuminStat(self, "dataFileSize") - stat.title = "Data File Size" - stat.unit = "byte" - stat.category = "io.journal" - - stat = CuminStat(self, "recordDepth") - stat.title = "Record Depth" - stat.unit = "record" - stat.category = "io.journal" - - stat = CuminStat(self, "recordEnqueues") - stat.title = "Record Enqueues" - stat.unit = "record" - stat.category = "io.journal" - - stat = CuminStat(self, "outstandingAIOs") - stat.title = "Outstanding AIOs" - stat.unit = "aio" - stat.category = "io.journal" - - stat = CuminStat(self, "freeFileCount") - stat.title = "Free Files" - stat.unit = "file" - stat.category = "io.journal" - - stat = CuminStat(self, "availableFileCount") - stat.title = "Avail. Files" - stat.unit = "file" - stat.category = "io.journal" - - stat = CuminStat(self, "writeWaitFailures") - stat.title = "Write Wait Failures" - stat.unit = "failure" - stat.category = "io.journal" - - stat = CuminStat(self, "writeBusyFailures") - stat.title = "Write Busy Failures" - stat.unit = "failure" - stat.category = "io.journal" - - stat = CuminStat(self, "readRecordCount") - stat.title = "Read Records" - stat.unit = "record" - stat.category = "io.journal" - - stat = CuminStat(self, "readBusyFailures") - stat.title = "Read Busy Failures" - stat.unit = "failure" - stat.category = "io.journal" - - stat = CuminStat(self, "writePageCacheDepth") - stat.title = "Write Page Cache Depth" - stat.unit = "page" - stat.category = "io.journal" - - stat = CuminStat(self, "readPageCacheDepth") - stat.title = "Read Page Cache Depth" - stat.unit = "page" - stat.category = "io.journal" - -class CuminBrokerAclModule(RemoteClass): - def __init__(self, model): - super(CuminBrokerAclModule, self).__init__ \ - (model, "store", Acl, AclStats) - - prop = CuminProperty(self, "policyFile") - prop.title = "Policy File" - - prop = CuminProperty(self, "enforcingAcl") - prop.title = "Enforcing?" - - prop = CuminProperty(self, "transferAcl") - prop.title = "Transfer?" - - prop = CuminProperty(self, "lastAclLoad") - prop.title = "Last Loaded" - - stat = CuminStat(self, "aclDenyCount") - stat.title = "Denials" - stat.unit = "denial" - -class CuminBrokerClusterModule(RemoteClass): - def __init__(self, model): - super(CuminBrokerClusterModule, self).__init__ \ - (model, "broker_cluster_module", Cluster, ClusterStats) - - prop = CuminProperty(self, "clusterName") - prop.title = "Name" - - prop = CuminProperty(self, "clusterID") - prop.title = "ID" - - prop = CuminProperty(self, "publishedURL") - prop.title = "URL" - - prop = CuminProperty(self, "clusterSize") - prop.title = "Size" - - prop = CuminProperty(self, "status") - prop.title = "Status" - - prop = CuminProperty(self, "members") - prop.title = "Members" - -class CuminLimit(CuminClass): - def __init__(self, model): - super(CuminLimit, self).__init__ \ - (model, "limit", None) - - prop = CuminProperty(self, "name") - prop.title = "Name" - - prop = CuminProperty(self, "curr") - prop.summary = True - prop.title = "Current" - - prop = CuminProperty(self, "max") - prop.summary = True - prop.title = "Maximum" - - def init(self): - super(CuminLimit, self).init() - - #self.frame = self.model.frame.grid.pool.limit - - def get_title(self, session): - return "Concurrency Limit" - - def get_object_title(self, session, limit): - title = self.get_title(session) - return "%s '%s'" % (title, limit) - class JobMetaData(MetaData): def __init__(self, name): super(JobMetaData, self).__init__(name) @@ -1759,181 +1009,6 @@ log.exception(e) return self.do_wait()
-class CuminScheduler(RemoteClass): - def __init__(self, model): - super(CuminScheduler, self).__init__(model, "scheduler", - Scheduler, SchedulerStats) - - prop = CuminProperty(self, "Name") - prop.title = "Name" - - prop = CuminProperty(self, "JobQueueBirthdate") - prop.title = "Job Queue Birthdate" - - prop = CuminProperty(self, "MaxJobsRunning") - prop.title = "Max Jobs Running" - - prop = CuminProperty(self, "MyAddress") - prop.title = "Contact Address" - - prop = CuminProperty(self, "PublicNetworkIpAddr") - prop.title = "Public IP Address" - - prop = CuminProperty(self, "Machine") - prop.title = "Machine" - prop.summary = True - - prop = CuminProperty(self, "System") - prop.title = "System" - - stat = CuminStat(self, "NumUsers") - stat.title = "Users" - - stat = CuminStat(self, "TotalRunningJobs") - stat.title = "Running Jobs" - - stat = CuminStat(self, "TotalIdleJobs") - stat.title = "Idle Jobs" - - stat = CuminStat(self, "TotalHeldJobs") - stat.title = "Held Jobs" - - stat = CuminStat(self, "TotalJobAds") - stat.title = "Job Ads" - - stat = CuminStat(self, "TotalRemovedJobs") - stat.title = "Removed Jobs" - - action = GetStartedAction(self, "GetStarted") - action.navigable = False - - def init(self): - super(CuminScheduler, self).init() - - # self.frame = self.model.frame.grid.pool.scheduler - - def get_title(self, session): - return "Scheduler" - - def get_object_name(self, sched): - return sched.Name - -class CuminSubmission(RemoteClass): - def __init__(self, model): - super(CuminSubmission, self).__init__(model, "submission", - Submission, SubmissionStats) - - prop = CuminProperty(self, "Name") - prop.title = "Name" - - stat = CuminStat(self, "Idle") - stat.title = "Idle Jobs" - - stat = CuminStat(self, "Running") - stat.title = "Running Jobs" - - stat = CuminStat(self, "Removed") - stat.title = "Removed Jobs" - - stat = CuminStat(self, "Completed") - stat.title = "Completed Jobs" - - stat = CuminStat(self, "Held") - stat.title = "Held Jobs" - - def get_title(self, session): - return "Submission" - - def get_object_name(self, sub): - return sub.Name - -class CuminSubmitter(RemoteClass): - def __init__(self, model): - super(CuminSubmitter, self).__init__(model, "submitter", - Submitter, SubmitterStats) - - prop = CuminProperty(self, "Name") - prop.title = "Name" - - stat = CuminStat(self, "RunningJobs") - stat.title = "Running Jobs" - - stat = CuminStat(self, "IdleJobs") - stat.title = "Idle Jobs" - - stat = CuminStat(self, "HeldJobs") - stat.title = "Held Jobs" - - def init(self): - super(CuminSubmitter, self).init() - - #self.frame = self.model.frame.grid.pool.scheduler.submitter - - def get_title(self, session): - return "Submitter" - - def get_object_name(self, sub): - return sub.Name - - def show_object(self, session, sub): - pool = self.model.get_main_pool() - - assert pool - - self.model.frame.grid.pool.set_object(session, pool) - - return self.frame.show_object(session, sub) - -class CuminCollector(RemoteClass): - def __init__(self, model): - super(CuminCollector, self).__init__(model, "collector", - Collector, CollectorStats) - - prop = CuminProperty(self, "Name") - prop.title = "Name" - - prop = CuminProperty(self, "PublicNetworkIpAddr") - prop.title = "IP Address" - - action = GetStartedAction(self, "GetStarted") - action.navigable = False - - stat = CuminStat(self, "RunningJobs") - stat.title = "Running Jobs" - - stat = CuminStat(self, "IdleJobs") - stat.title = "Idle Jobs" - - stat = CuminStat(self, "HostsClaimed") - stat.title = "Claimed Slots" - - stat = CuminStat(self, "HostsUnclaimed") - stat.title = "Unclaimed Slots" - - stat = CuminStat(self, "HostsOwner") - stat.title = "Owner Slots" - - stat = CuminStat(self, "HostsTotal") - stat.title = "Total Slots" - - def init(self): - super(CuminCollector, self).init() - - #self.frame = self.model.frame.grid.pool.collector - - def get_title(self, session): - return "Collector" - - def get_object_name(self, coll): - return coll.Name - -class CuminSubject(CuminClass): - def __init__(self, model): - super(CuminSubject, self).__init__(model, "subject", Subject) - - def get_title(self, session): - return "Subject" - class Pool(object): def __init__(self, id): self.id = id