[rhmessaging-commits] rhmessaging commits: r3979 - in mgmt/newdata: cumin/python/cumin and 1 other directories.

rhmessaging-commits at lists.jboss.org rhmessaging-commits at lists.jboss.org
Thu May 20 11:22:30 EDT 2010


Author: justi9
Date: 2010-05-20 11:22:29 -0400 (Thu, 20 May 2010)
New Revision: 3979

Modified:
   mgmt/newdata/cumin/model/rosemary.xml
   mgmt/newdata/cumin/python/cumin/model.py
   mgmt/newdata/mint/python/mint/model.py
Log:
Move some metadata to rosemary.xml; remove the unused call_method on MintModel

Modified: mgmt/newdata/cumin/model/rosemary.xml
===================================================================
--- mgmt/newdata/cumin/model/rosemary.xml	2010-05-19 21:31:07 UTC (rev 3978)
+++ mgmt/newdata/cumin/model/rosemary.xml	2010-05-20 15:22:29 UTC (rev 3979)
@@ -26,6 +26,40 @@
       <property name="port">
         <title>Port</title>
       </property>
+
+      <property name="workerThreads">
+        <title>Worker Threads</title>
+      </property>
+
+      <property name="maxConns">
+        <title>Max Connections</title>
+      </property>
+
+      <property name="connBacklog">
+        <title>Connection Backlog</title>
+      </property>
+
+      <property name="stagingThreshold">
+        <title>Staging Threshold</title>
+      </property>
+
+      <property name="mgmtPubInterval">
+        <title>QMF Publish Interval</title>
+      </property>
+
+      <!--
+      <property name="clusterName">
+        <title>Cluster Name</title>
+      </property>
+      -->
+
+      <property name="version">
+        <title>Version</title>
+      </property>
+
+      <property name="dataDir">
+        <title>Data Directory</title>
+      </property>
     </class>
 
     <class name="Connection">
@@ -83,11 +117,11 @@
       </statistic>
 
      <statistic name="msgPersistEnqueues">
-       <title>Msgs. Enqueued</title>
+       <title>Messages Enqueued</title>
      </statistic>
 
      <statistic name="msgPersistDequeues">
-       <title>Msgs. Dequeued</title>
+       <title>Messages Dequeued</title>
      </statistic>
 
      <statistic name="bytePersistEnqueues">
@@ -99,11 +133,11 @@
      </statistic>
 
      <statistic name="msgTotalEnqueues">
-       <title>Msgs. Enqueued</title>
+       <title>Messages Enqueued</title>
      </statistic>
 
      <statistic name="msgTotalDequeues">
-       <title>Msgs. Dequeued</title>
+       <title>Messages Dequeued</title>
      </statistic>
 
      <statistic name="byteTotalEnqueues">
@@ -115,19 +149,13 @@
      </statistic>
 
      <statistic name="unackedMessages">
-       <title>Msgs. Unacked</title>
+       <title>Messages Unacked</title>
      </statistic>
 
      <statistic name="messageLatency">
-       <title>Msg. Latency</title>
+       <title>Message Latency</title>
      </statistic>
     </class>
-
-    <class name="System">
-      <property name="nodeName">
-        <title>Host</title>
-      </property>
-    </class>
   </package>
 
   <package name="org.apache.qpid.cluster">
@@ -154,12 +182,107 @@
 
   <package name="com.redhat.sesame">
     <class name="Sysimage">
+      <property name="uuid">
+        <title>System ID</title>
+      </property>
+
       <property name="nodeName">
         <title>Host</title>
       </property>
+
+      <property name="osName">
+        <title>Kernel</title>
+      </property>
+
+      <property name="release">
+        <title>Kernel Release</title>
+      </property>
+
+      <property name="version">
+        <title>Kernel Version</title>
+      </property>
+
+      <property name="machine">
+        <title>Architecture</title>
+      </property>
+
+      <property name="distro">
+        <title>Distribution</title>
+      </property>
+
+      <statistic name="memFree">
+        <title>Free Memory</title>
+      </statistic>
+
+      <statistic name="swapFree">
+        <title>Free Swap</title>
+      </statistic>
+
       <statistic name="loadAverage1Min">
-        <title>Load Average 1 Minute</title>
+        <title>1-Minute Load Average</title>
       </statistic>
+
+      <statistic name="loadAverage5Min">
+        <title>5-Minute Load Average</title>
+      </statistic>
+
+      <statistic name="loadAverage10Min">
+        <title>10-Minute Load Average</title>
+      </statistic>
+
+      <statistic name="procTotal">
+        <title>Processes</title>
+      </statistic>
+
+      <statistic name="procRunning">
+        <title>Running Processes</title>
+      </statistic>
     </class>
   </package>
+
+  <package name="mrg.grid">
+    <class name="Slot">
+      <property name="JobId">
+        <title>Job ID</title>
+      </property>
+
+      <property name="GlobalJobId">
+        <title>Global Job ID</title>
+      </property>
+
+      <property name="AccountingGroup">
+        <title>Accounting Group</title>
+      </property>
+
+      <property name="Arch">
+        <title>Architecture</title>
+      </property>
+
+      <property name="OpSys">
+        <title>Operating System</title>
+      </property>
+
+      <property name="ConcurrencyLimits">
+        <title>Concurrency Limits</title>
+      </property>
+
+      <property name="Cpus">
+        <title>CPUs</title>
+      </property>
+
+      <property name="Mips">
+        <title>MIPS</title>
+      </property>
+
+      <statistic name="CondorLoadAvg">
+        <title>Condor Load Average</title>
+        <!-- "%2.02f" -->
+      </statistic>
+
+      <statistic name="LoadAvg">
+        <title>Load Average</title>
+        <!-- "%2.02f" -->
+      </statistic>
+    </class>
+  </package>
 </model>

Modified: mgmt/newdata/cumin/python/cumin/model.py
===================================================================
--- mgmt/newdata/cumin/python/cumin/model.py	2010-05-19 21:31:07 UTC (rev 3978)
+++ mgmt/newdata/cumin/python/cumin/model.py	2010-05-20 15:22:29 UTC (rev 3979)
@@ -31,43 +31,6 @@
         self.limits_by_negotiator = dict()
         self.jobs_by_submission = dict()
 
-        # # Messaging
-
-        # CuminBroker(self)
-        # CuminQueue(self)
-        # CuminExchange(self)
-        # CuminBinding(self)
-        # CuminConnection(self)
-        # CuminSession(self)
-        # CuminLink(self)
-        # CuminRoute(self)
-        # CuminBrokerStoreModule(self)
-        # CuminJournal(self)
-        # CuminBrokerAclModule(self)
-        # CuminBrokerClusterModule(self)
-
-        # # Grid
-
-        # CuminScheduler(self)
-        # CuminSubmission(self)
-        # CuminSubmitter(self)
-        # CuminJob(self)
-        # CuminJobGroup(self)
-        # CuminLimit(self)
-
-        # CuminCollector(self)
-        # CuminNegotiator(self)
-
-        # # Systems
-
-        # CuminSystem(self)
-        # CuminSlot(self)
-        # CuminGrid(self)
-
-        # # Other
-
-        # CuminSubject(self)
-
     def check(self):
         log.info("Checking %s", self)
 
@@ -765,195 +728,6 @@
     def get_icon_href(self, session):
         return "resource?name=pool-36.png"
 
-class CuminSlot(RemoteClass):
-    def __init__(self, model):
-        super(CuminSlot, self).__init__(model, "slot", Slot, SlotStats)
-
-        prop = CuminProperty(self, "Name")
-        prop.title = "Name"
-
-        prop = CuminProperty(self, "Machine")
-        prop.title = "Machine"
-
-        prop = CuminProperty(self, "JobId")
-        prop.title = "Current Job Id"
-        prop.category = "JobInfo"
-
-        prop = CuminProperty(self, "GlobalJobId")
-        prop.title = "Global Job Id"
-        prop.category = "JobInfo"
-
-        prop = CuminProperty(self, "AccountingGroup")
-        prop.title = "Accounting Group"
-
-        prop = CuminProperty(self, "Arch")
-        prop.title = "Architecture"
-
-        prop = CuminProperty(self, "OpSys")
-        prop.title = "Operating System"
-
-        prop = CuminProperty(self, "ConcurrencyLimits")
-        prop.title = "Concurrency Limits"
-
-        prop = CuminProperty(self, "Cpus")
-        prop.title = "CPUs"
-
-        prop = CuminProperty(self, "Disk")
-        prop.title = "Disk"
-
-        prop = CuminProperty(self, "Memory")
-        prop.title = "Memory"
-
-        prop = CuminProperty(self, "Mips")
-        prop.title = "MIPS"
-
-        prop = CuminProperty(self, "JobStart")
-        prop.title = "JobStart"
-        prop.category = "JobInfo"
-
-        """
-        prop = CuminProperty(self, "Activity")
-        prop.title = "Activity"
-        prop.category = "JobInfo"
-
-        prop = CuminProperty(self, "State")
-        prop.title = "State"
-        prop.category = "JobInfo"
-        """
-
-        stat = CuminStat(self, "CondorLoadAvg")
-        stat.title = "Condor Load Avg"
-        stat.format = "%2.02f"
-        stat.category = "load"
-
-        stat = CuminStat(self, "LoadAvg")
-        stat.title = "Load Avg"
-        stat.format = "%2.02f"
-        stat.category = "load"
-
-    def get_title(self, session):
-        return "Slot"
-
-    def get_object_name(self, slot):
-        return slot.Name
-
-class CuminSystem(RemoteClass):
-    def __init__(self, model):
-        super(CuminSystem, self).__init__(model, "system", Sysimage, SysimageStats)
-
-        prop = CuminProperty(self, "uuid")
-        prop.title = "System ID"
-
-        prop = CuminProperty(self, "nodeName")
-        prop.title = "Address"
-        prop.summary = True
-
-        prop = CuminProperty(self, "osName")
-        prop.title = "Kernel"
-
-        prop = CuminProperty(self, "release")
-        prop.title = "Kernel Release"
-
-        prop = CuminProperty(self, "version")
-        prop.title = "Kernel Version"
-
-        prop = CuminProperty(self, "machine")
-        prop.title = "Architecture"
-
-        prop = CuminProperty(self, "distro")
-        prop.title = "Distribution"
-
-        stat = CuminStat(self, "memFree")
-        stat.title = "Memory Free"
-        stat.highlow = True
-
-        stat = CuminStat(self, "swapFree")
-        stat.title = "Swap Free"
-
-        stat = self.LoadStat(self, "loadAverage1Min")
-        stat.title = "1 Minute Load Average"
-        stat.highlow = True
-
-        stat = self.LoadStat(self, "loadAverage5Min")
-        stat.title = "5 Minute Load Average"
-
-        stat = self.LoadStat(self, "loadAverage10Min")
-        stat.title = "10 Minute Load Average"
-
-        stat = CuminStat(self, "procTotal")
-        stat.title = "Total processes"
-
-        stat = CuminStat(self, "procRunning")
-        stat.title = "Running processes"
-
-    def init(self):
-        super(CuminSystem, self).init()
-
-    def get_title(self, session):
-        return "System"
-
-    def get_icon_href(self, session):
-        return "resource?name=system-36.png"
-
-    def get_object_name(self, object):
-        return object.nodeName
-
-    class LoadStat(CuminStat):
-        def value_text(self, object):
-            value = self.value(object)
-            text = value and "%0.2f" % value or ""
-            return text
-
-class CuminBroker(RemoteClass):
-    def __init__(self, model):
-        super(CuminBroker, self).__init__(model, "broker", Broker, BrokerStats)
-
-        prop = CuminProperty(self, "port")
-        prop.title = "Port"
-
-        prop = CuminProperty(self, "workerThreads")
-        prop.title = "Worker Threads"
-
-        prop = CuminProperty(self, "maxConns")
-        prop.title = "Max Connections"
-
-        prop = CuminProperty(self, "connBacklog")
-        prop.title = "Connection Backlog"
-
-        prop = CuminProperty(self, "stagingThreshold")
-        prop.title = "Staging Threshold"
-
-        prop = CuminProperty(self, "mgmtPubInterval")
-        prop.title = "Mgmt. Publish Interval"
-
-        prop = CuminProperty(self, "clusterName")
-        prop.title = "Cluster Name"
-
-        prop = CuminProperty(self, "version")
-        prop.title = "Version"
-        prop.summary = True
-
-        prop = CuminProperty(self, "dataDir")
-        prop.title = "Data Directory"
-
-    def init(self):
-        super(CuminBroker, self).init()
-
-        self.frame = self.model.frame.messaging.broker
-
-    def get_icon_href(self, session):
-        return "resource?name=broker-36.png"
-
-    def get_title(self, session):
-        return "Broker"
-
-    def get_object_name(self, broker):
-        try:
-            host, port = broker.system.nodeName, broker.port
-            return "%s:%i" % (host, port)
-        except:
-            return broker.name
-
 # XXX "do_" on this doesn't make sense
 def do_bind(session, queue_name, binding_info):
         for exchange in binding_info:

Modified: mgmt/newdata/mint/python/mint/model.py
===================================================================
--- mgmt/newdata/mint/python/mint/model.py	2010-05-19 21:31:07 UTC (rev 3978)
+++ mgmt/newdata/mint/python/mint/model.py	2010-05-20 15:22:29 UTC (rev 3979)
@@ -63,30 +63,6 @@
         finally:
             self.model.lock.release()
 
-    def call_method(self, callback, obj, name, *args):
-        assert isinstance(obj, RosemaryObject)
-        
-        class_key = ClassKey(obj._qmf_class_key)
-
-        oid_args = {"_agent_name": obj._qmf_agent_id,
-                    "_object_name": obj._qmf_object_id}
-
-        oid = ObjectId(oid_args)
-
-        self.model.lock.acquire()
-        try:
-            broker = self.qmf_agent.getBroker()
-
-            seq = self.model.qmf_session._sendMethodRequest \
-                    (broker, class_key, oid, name, args)
-
-            if seq is not None:
-                self.model.outstanding_method_calls[seq] = callback
-
-            return seq
-        finally:
-            self.model.lock.release()
-
     def delete(self):
         self.model.lock.acquire()
         try:



More information about the rhmessaging-commits mailing list