[rhmessaging-commits] rhmessaging commits: r3872 - in mgmt/newdata: mint/instance and 3 other directories.

rhmessaging-commits at lists.jboss.org rhmessaging-commits at lists.jboss.org
Mon Mar 22 12:54:25 EDT 2010


Author: justi9
Date: 2010-03-22 12:54:24 -0400 (Mon, 22 Mar 2010)
New Revision: 3872

Added:
   mgmt/newdata/cumin/instance/xml
   mgmt/newdata/mint/instance/xml
Modified:
   mgmt/newdata/mint/python/mint/expire.py
   mgmt/newdata/mint/python/mint/newupdate.py
   mgmt/newdata/mint/sql/rosemary.sql
   mgmt/newdata/rosemary/python/rosemary/model.py
Log:
Rename stats to samples; add missing xml dir links

Added: mgmt/newdata/cumin/instance/xml
===================================================================
--- mgmt/newdata/cumin/instance/xml	                        (rev 0)
+++ mgmt/newdata/cumin/instance/xml	2010-03-22 16:54:24 UTC (rev 3872)
@@ -0,0 +1 @@
+link ../../mint/xml
\ No newline at end of file


Property changes on: mgmt/newdata/cumin/instance/xml
___________________________________________________________________
Name: svn:special
   + *

Added: mgmt/newdata/mint/instance/xml
===================================================================
--- mgmt/newdata/mint/instance/xml	                        (rev 0)
+++ mgmt/newdata/mint/instance/xml	2010-03-22 16:54:24 UTC (rev 3872)
@@ -0,0 +1 @@
+link ../xml
\ No newline at end of file


Property changes on: mgmt/newdata/mint/instance/xml
___________________________________________________________________
Name: svn:special
   + *

Modified: mgmt/newdata/mint/python/mint/expire.py
===================================================================
--- mgmt/newdata/mint/python/mint/expire.py	2010-03-22 14:58:08 UTC (rev 3871)
+++ mgmt/newdata/mint/python/mint/expire.py	2010-03-22 16:54:24 UTC (rev 3872)
@@ -92,23 +92,23 @@
     def do_process(self, conn, stats):
         seconds = self.model.app.expire_threshold
 
-        log.info("Expiring stats older than %i seconds", seconds)
+        log.info("Expiring samples older than %i seconds", seconds)
 
         count = 0
 
         for pkg in self.model.rosemary._packages:
             for cls in pkg._classes:
-                count += self.delete_stats(conn, cls, seconds)
+                count += self.delete_samples(conn, cls, seconds)
 
                 conn.commit()
 
-        log.info("Expired %i stat records", count)
+        log.info("Expired %i samples", count)
 
-    def delete_stats(self, conn, cls, seconds):
+    def delete_samples(self, conn, cls, seconds):
         cursor = conn.cursor()
 
         try:
-            cls.sql_stats_delete.execute(cursor, (), {"seconds": seconds})
+            cls.sql_samples_delete.execute(cursor, (), {"seconds": seconds})
 
             log.debug("Deleted %i %s", cursor.rowcount, cls)
 

Modified: mgmt/newdata/mint/python/mint/newupdate.py
===================================================================
--- mgmt/newdata/mint/python/mint/newupdate.py	2010-03-22 14:58:08 UTC (rev 3871)
+++ mgmt/newdata/mint/python/mint/newupdate.py	2010-03-22 16:54:24 UTC (rev 3872)
@@ -324,7 +324,8 @@
 
         try:
             cls.sql_update.execute(cursor, update_columns, obj.__dict__)
-            cls.sql_stats_insert.execute(cursor, insert_columns, obj.__dict__)
+            cls.sql_samples_insert.execute \
+                (cursor, insert_columns, obj.__dict__)
         finally:
             cursor.close()
 

Modified: mgmt/newdata/mint/sql/rosemary.sql
===================================================================
--- mgmt/newdata/mint/sql/rosemary.sql	2010-03-22 14:58:08 UTC (rev 3871)
+++ mgmt/newdata/mint/sql/rosemary.sql	2010-03-22 16:54:24 UTC (rev 3872)
@@ -27,11 +27,11 @@
         constraint "Cluster_pk" primary key ("_id"),
         constraint "Cluster_qmf_ids_uq" unique ("_qmf_agent_id", "_qmf_object_id")
         )
-    create table "Cluster_stats" (
+    create table "Cluster_samples" (
         "_id" serial8 not null,
         "_parent_id" int8 not null,
         "_qmf_update_time" timestamp not null,
-        constraint "Cluster_stats_pk" primary key ("_id")
+        constraint "Cluster_samples_pk" primary key ("_id")
         )
     ;
 create schema "org.apache.qpid.broker"
@@ -53,11 +53,11 @@
         constraint "System_pk" primary key ("_id"),
         constraint "System_qmf_ids_uq" unique ("_qmf_agent_id", "_qmf_object_id")
         )
-    create table "System_stats" (
+    create table "System_samples" (
         "_id" serial8 not null,
         "_parent_id" int8 not null,
         "_qmf_update_time" timestamp not null,
-        constraint "System_stats_pk" primary key ("_id")
+        constraint "System_samples_pk" primary key ("_id")
         )
     create table "Broker" (
         "_id" serial8 not null,
@@ -81,12 +81,12 @@
         constraint "Broker_pk" primary key ("_id"),
         constraint "Broker_qmf_ids_uq" unique ("_qmf_agent_id", "_qmf_object_id")
         )
-    create table "Broker_stats" (
+    create table "Broker_samples" (
         "_id" serial8 not null,
         "_parent_id" int8 not null,
         "_qmf_update_time" timestamp not null,
         "uptime" numeric(19) not null,
-        constraint "Broker_stats_pk" primary key ("_id")
+        constraint "Broker_samples_pk" primary key ("_id")
         )
     create table "Agent" (
         "_id" serial8 not null,
@@ -106,11 +106,11 @@
         constraint "Agent_pk" primary key ("_id"),
         constraint "Agent_qmf_ids_uq" unique ("_qmf_agent_id", "_qmf_object_id")
         )
-    create table "Agent_stats" (
+    create table "Agent_samples" (
         "_id" serial8 not null,
         "_parent_id" int8 not null,
         "_qmf_update_time" timestamp not null,
-        constraint "Agent_stats_pk" primary key ("_id")
+        constraint "Agent_samples_pk" primary key ("_id")
         )
     create table "Vhost" (
         "_id" serial8 not null,
@@ -127,11 +127,11 @@
         constraint "Vhost_pk" primary key ("_id"),
         constraint "Vhost_qmf_ids_uq" unique ("_qmf_agent_id", "_qmf_object_id")
         )
-    create table "Vhost_stats" (
+    create table "Vhost_samples" (
         "_id" serial8 not null,
         "_parent_id" int8 not null,
         "_qmf_update_time" timestamp not null,
-        constraint "Vhost_stats_pk" primary key ("_id")
+        constraint "Vhost_samples_pk" primary key ("_id")
         )
     create table "Queue" (
         "_id" serial8 not null,
@@ -170,7 +170,7 @@
         constraint "Queue_pk" primary key ("_id"),
         constraint "Queue_qmf_ids_uq" unique ("_qmf_agent_id", "_qmf_object_id")
         )
-    create table "Queue_stats" (
+    create table "Queue_samples" (
         "_id" serial8 not null,
         "_parent_id" int8 not null,
         "_qmf_update_time" timestamp not null,
@@ -192,7 +192,7 @@
         "bindingCount" int8 not null,
         "unackedMessages" int8 not null,
         "messageLatency" numeric(19),
-        constraint "Queue_stats_pk" primary key ("_id")
+        constraint "Queue_samples_pk" primary key ("_id")
         )
     create table "Exchange" (
         "_id" serial8 not null,
@@ -221,7 +221,7 @@
         constraint "Exchange_pk" primary key ("_id"),
         constraint "Exchange_qmf_ids_uq" unique ("_qmf_agent_id", "_qmf_object_id")
         )
-    create table "Exchange_stats" (
+    create table "Exchange_samples" (
         "_id" serial8 not null,
         "_parent_id" int8 not null,
         "_qmf_update_time" timestamp not null,
@@ -233,7 +233,7 @@
         "byteReceives" numeric(19) not null,
         "byteDrops" numeric(19) not null,
         "byteRoutes" numeric(19) not null,
-        constraint "Exchange_stats_pk" primary key ("_id")
+        constraint "Exchange_samples_pk" primary key ("_id")
         )
     create table "Binding" (
         "_id" serial8 not null,
@@ -253,12 +253,12 @@
         constraint "Binding_pk" primary key ("_id"),
         constraint "Binding_qmf_ids_uq" unique ("_qmf_agent_id", "_qmf_object_id")
         )
-    create table "Binding_stats" (
+    create table "Binding_samples" (
         "_id" serial8 not null,
         "_parent_id" int8 not null,
         "_qmf_update_time" timestamp not null,
         "msgMatched" numeric(19) not null,
-        constraint "Binding_stats_pk" primary key ("_id")
+        constraint "Binding_samples_pk" primary key ("_id")
         )
     create table "Subscription" (
         "_id" serial8 not null,
@@ -281,12 +281,12 @@
         constraint "Subscription_pk" primary key ("_id"),
         constraint "Subscription_qmf_ids_uq" unique ("_qmf_agent_id", "_qmf_object_id")
         )
-    create table "Subscription_stats" (
+    create table "Subscription_samples" (
         "_id" serial8 not null,
         "_parent_id" int8 not null,
         "_qmf_update_time" timestamp not null,
         "delivered" numeric(19) not null,
-        constraint "Subscription_stats_pk" primary key ("_id")
+        constraint "Subscription_samples_pk" primary key ("_id")
         )
     create table "Connection" (
         "_id" serial8 not null,
@@ -315,7 +315,7 @@
         constraint "Connection_pk" primary key ("_id"),
         constraint "Connection_qmf_ids_uq" unique ("_qmf_agent_id", "_qmf_object_id")
         )
-    create table "Connection_stats" (
+    create table "Connection_samples" (
         "_id" serial8 not null,
         "_parent_id" int8 not null,
         "_qmf_update_time" timestamp not null,
@@ -324,7 +324,7 @@
         "framesToClient" numeric(19) not null,
         "bytesFromClient" numeric(19) not null,
         "bytesToClient" numeric(19) not null,
-        constraint "Connection_stats_pk" primary key ("_id")
+        constraint "Connection_samples_pk" primary key ("_id")
         )
     create table "Link" (
         "_id" serial8 not null,
@@ -345,13 +345,13 @@
         constraint "Link_pk" primary key ("_id"),
         constraint "Link_qmf_ids_uq" unique ("_qmf_agent_id", "_qmf_object_id")
         )
-    create table "Link_stats" (
+    create table "Link_samples" (
         "_id" serial8 not null,
         "_parent_id" int8 not null,
         "_qmf_update_time" timestamp not null,
         "state" text not null,
         "lastError" text not null,
-        constraint "Link_stats_pk" primary key ("_id")
+        constraint "Link_samples_pk" primary key ("_id")
         )
     create table "Bridge" (
         "_id" serial8 not null,
@@ -377,11 +377,11 @@
         constraint "Bridge_pk" primary key ("_id"),
         constraint "Bridge_qmf_ids_uq" unique ("_qmf_agent_id", "_qmf_object_id")
         )
-    create table "Bridge_stats" (
+    create table "Bridge_samples" (
         "_id" serial8 not null,
         "_parent_id" int8 not null,
         "_qmf_update_time" timestamp not null,
-        constraint "Bridge_stats_pk" primary key ("_id")
+        constraint "Bridge_samples_pk" primary key ("_id")
         )
     create table "Session" (
         "_id" serial8 not null,
@@ -409,7 +409,7 @@
         constraint "Session_pk" primary key ("_id"),
         constraint "Session_qmf_ids_uq" unique ("_qmf_agent_id", "_qmf_object_id")
         )
-    create table "Session_stats" (
+    create table "Session_samples" (
         "_id" serial8 not null,
         "_parent_id" int8 not null,
         "_qmf_update_time" timestamp not null,
@@ -419,7 +419,7 @@
         "TxnRejects" numeric(19) not null,
         "TxnCount" int8 not null,
         "clientCredit" int8 not null,
-        constraint "Session_stats_pk" primary key ("_id")
+        constraint "Session_samples_pk" primary key ("_id")
         )
     create table "ManagementSetupState" (
         "_id" serial8 not null,
@@ -435,11 +435,11 @@
         constraint "ManagementSetupState_pk" primary key ("_id"),
         constraint "ManagementSetupState_qmf_ids_uq" unique ("_qmf_agent_id", "_qmf_object_id")
         )
-    create table "ManagementSetupState_stats" (
+    create table "ManagementSetupState_samples" (
         "_id" serial8 not null,
         "_parent_id" int8 not null,
         "_qmf_update_time" timestamp not null,
-        constraint "ManagementSetupState_stats_pk" primary key ("_id")
+        constraint "ManagementSetupState_samples_pk" primary key ("_id")
         )
     ;
 create schema "com.redhat.sesame"
@@ -471,7 +471,7 @@
         constraint "Sysimage_pk" primary key ("_id"),
         constraint "Sysimage_qmf_ids_uq" unique ("_qmf_agent_id", "_qmf_object_id")
         )
-    create table "Sysimage_stats" (
+    create table "Sysimage_samples" (
         "_id" serial8 not null,
         "_parent_id" int8 not null,
         "_qmf_update_time" timestamp not null,
@@ -482,7 +482,7 @@
         "loadAverage10Min" float4 not null,
         "procTotal" int8 not null,
         "procRunning" int8 not null,
-        constraint "Sysimage_stats_pk" primary key ("_id")
+        constraint "Sysimage_samples_pk" primary key ("_id")
         )
     ;
 create schema "org.apache.qpid.acl"
@@ -504,12 +504,12 @@
         constraint "Acl_pk" primary key ("_id"),
         constraint "Acl_qmf_ids_uq" unique ("_qmf_agent_id", "_qmf_object_id")
         )
-    create table "Acl_stats" (
+    create table "Acl_samples" (
         "_id" serial8 not null,
         "_parent_id" int8 not null,
         "_qmf_update_time" timestamp not null,
         "aclDenyCount" numeric(19) not null,
-        constraint "Acl_stats_pk" primary key ("_id")
+        constraint "Acl_samples_pk" primary key ("_id")
         )
     ;
 create schema "com.redhat.cumin"
@@ -527,11 +527,11 @@
         constraint "BrokerGroup_pk" primary key ("_id"),
         constraint "BrokerGroup_qmf_ids_uq" unique ("_qmf_agent_id", "_qmf_object_id")
         )
-    create table "BrokerGroup_stats" (
+    create table "BrokerGroup_samples" (
         "_id" serial8 not null,
         "_parent_id" int8 not null,
         "_qmf_update_time" timestamp not null,
-        constraint "BrokerGroup_stats_pk" primary key ("_id")
+        constraint "BrokerGroup_samples_pk" primary key ("_id")
         )
     create table "BrokerGroupMapping" (
         "_id" serial8 not null,
@@ -547,11 +547,11 @@
         constraint "BrokerGroupMapping_pk" primary key ("_id"),
         constraint "BrokerGroupMapping_qmf_ids_uq" unique ("_qmf_agent_id", "_qmf_object_id")
         )
-    create table "BrokerGroupMapping_stats" (
+    create table "BrokerGroupMapping_samples" (
         "_id" serial8 not null,
         "_parent_id" int8 not null,
         "_qmf_update_time" timestamp not null,
-        constraint "BrokerGroupMapping_stats_pk" primary key ("_id")
+        constraint "BrokerGroupMapping_samples_pk" primary key ("_id")
         )
     ;
 create schema "com.redhat.rhm.store"
@@ -583,7 +583,7 @@
         constraint "Store_pk" primary key ("_id"),
         constraint "Store_qmf_ids_uq" unique ("_qmf_agent_id", "_qmf_object_id")
         )
-    create table "Store_stats" (
+    create table "Store_samples" (
         "_id" serial8 not null,
         "_parent_id" int8 not null,
         "_qmf_update_time" timestamp not null,
@@ -592,7 +592,7 @@
         "tplTxnCommits" numeric(19) not null,
         "tplTxnAborts" numeric(19) not null,
         "tplOutstandingAIOs" int8 not null,
-        constraint "Store_stats_pk" primary key ("_id")
+        constraint "Store_samples_pk" primary key ("_id")
         )
     create table "Journal" (
         "_id" serial8 not null,
@@ -636,7 +636,7 @@
         constraint "Journal_pk" primary key ("_id"),
         constraint "Journal_qmf_ids_uq" unique ("_qmf_agent_id", "_qmf_object_id")
         )
-    create table "Journal_stats" (
+    create table "Journal_samples" (
         "_id" serial8 not null,
         "_parent_id" int8 not null,
         "_qmf_update_time" timestamp not null,
@@ -657,7 +657,7 @@
         "readBusyFailures" numeric(19) not null,
         "writePageCacheDepth" int8 not null,
         "readPageCacheDepth" int8 not null,
-        constraint "Journal_stats_pk" primary key ("_id")
+        constraint "Journal_samples_pk" primary key ("_id")
         )
     ;
 create schema "mrg.grid"
@@ -754,7 +754,7 @@
         constraint "Slot_pk" primary key ("_id"),
         constraint "Slot_qmf_ids_uq" unique ("_qmf_agent_id", "_qmf_object_id")
         )
-    create table "Slot_stats" (
+    create table "Slot_samples" (
         "_id" serial8 not null,
         "_parent_id" int8 not null,
         "_qmf_update_time" timestamp not null,
@@ -781,7 +781,7 @@
         "TotalTimePreemptingVacating" int8 not null,
         "TotalTimeUnclaimedBenchmarking" int8 not null,
         "TotalTimeUnclaimedIdle" int8 not null,
-        constraint "Slot_stats_pk" primary key ("_id")
+        constraint "Slot_samples_pk" primary key ("_id")
         )
     create table "Scheduler" (
         "_id" serial8 not null,
@@ -808,7 +808,7 @@
         constraint "Scheduler_pk" primary key ("_id"),
         constraint "Scheduler_qmf_ids_uq" unique ("_qmf_agent_id", "_qmf_object_id")
         )
-    create table "Scheduler_stats" (
+    create table "Scheduler_samples" (
         "_id" serial8 not null,
         "_parent_id" int8 not null,
         "_qmf_update_time" timestamp not null,
@@ -818,7 +818,7 @@
         "TotalJobAds" int8 not null,
         "TotalRemovedJobs" int8 not null,
         "TotalRunningJobs" int8 not null,
-        constraint "Scheduler_stats_pk" primary key ("_id")
+        constraint "Scheduler_samples_pk" primary key ("_id")
         )
     create table "Submitter" (
         "_id" serial8 not null,
@@ -840,14 +840,14 @@
         constraint "Submitter_pk" primary key ("_id"),
         constraint "Submitter_qmf_ids_uq" unique ("_qmf_agent_id", "_qmf_object_id")
         )
-    create table "Submitter_stats" (
+    create table "Submitter_samples" (
         "_id" serial8 not null,
         "_parent_id" int8 not null,
         "_qmf_update_time" timestamp not null,
         "HeldJobs" int8 not null,
         "IdleJobs" int8 not null,
         "RunningJobs" int8 not null,
-        constraint "Submitter_stats_pk" primary key ("_id")
+        constraint "Submitter_samples_pk" primary key ("_id")
         )
     create table "Negotiator" (
         "_id" serial8 not null,
@@ -866,11 +866,11 @@
         constraint "Negotiator_pk" primary key ("_id"),
         constraint "Negotiator_qmf_ids_uq" unique ("_qmf_agent_id", "_qmf_object_id")
         )
-    create table "Negotiator_stats" (
+    create table "Negotiator_samples" (
         "_id" serial8 not null,
         "_parent_id" int8 not null,
         "_qmf_update_time" timestamp not null,
-        constraint "Negotiator_stats_pk" primary key ("_id")
+        constraint "Negotiator_samples_pk" primary key ("_id")
         )
     create table "Collector" (
         "_id" serial8 not null,
@@ -896,7 +896,7 @@
         constraint "Collector_pk" primary key ("_id"),
         constraint "Collector_qmf_ids_uq" unique ("_qmf_agent_id", "_qmf_object_id")
         )
-    create table "Collector_stats" (
+    create table "Collector_samples" (
         "_id" serial8 not null,
         "_parent_id" int8 not null,
         "_qmf_update_time" timestamp not null,
@@ -906,7 +906,7 @@
         "HostsClaimed" int8 not null,
         "HostsUnclaimed" int8 not null,
         "HostsOwner" int8 not null,
-        constraint "Collector_stats_pk" primary key ("_id")
+        constraint "Collector_samples_pk" primary key ("_id")
         )
     create table "Master" (
         "_id" serial8 not null,
@@ -926,11 +926,11 @@
         constraint "Master_pk" primary key ("_id"),
         constraint "Master_qmf_ids_uq" unique ("_qmf_agent_id", "_qmf_object_id")
         )
-    create table "Master_stats" (
+    create table "Master_samples" (
         "_id" serial8 not null,
         "_parent_id" int8 not null,
         "_qmf_update_time" timestamp not null,
-        constraint "Master_stats_pk" primary key ("_id")
+        constraint "Master_samples_pk" primary key ("_id")
         )
     create table "Grid" (
         "_id" serial8 not null,
@@ -958,7 +958,7 @@
         constraint "Grid_pk" primary key ("_id"),
         constraint "Grid_qmf_ids_uq" unique ("_qmf_agent_id", "_qmf_object_id")
         )
-    create table "Grid_stats" (
+    create table "Grid_samples" (
         "_id" serial8 not null,
         "_parent_id" int8 not null,
         "_qmf_update_time" timestamp not null,
@@ -969,7 +969,7 @@
         "SubmitsWanted" int8 not null,
         "RunningJobs" int8 not null,
         "IdleJobs" int8 not null,
-        constraint "Grid_stats_pk" primary key ("_id")
+        constraint "Grid_samples_pk" primary key ("_id")
         )
     create table "Submission" (
         "_id" serial8 not null,
@@ -991,7 +991,7 @@
         constraint "Submission_pk" primary key ("_id"),
         constraint "Submission_qmf_ids_uq" unique ("_qmf_agent_id", "_qmf_object_id")
         )
-    create table "Submission_stats" (
+    create table "Submission_samples" (
         "_id" serial8 not null,
         "_parent_id" int8 not null,
         "_qmf_update_time" timestamp not null,
@@ -1000,151 +1000,151 @@
         "Removed" int8 not null,
         "Completed" int8 not null,
         "Held" int8 not null,
-        constraint "Submission_stats_pk" primary key ("_id")
+        constraint "Submission_samples_pk" primary key ("_id")
         )
     ;
 alter table "org.apache.qpid.cluster"."Cluster"
     add constraint "_brokerRef_id_fk" foreign key ("_brokerRef_id") references "org.apache.qpid.broker"."Broker" ("_id") on update cascade on delete set null
     ;
-alter table "org.apache.qpid.cluster"."Cluster_stats"
+alter table "org.apache.qpid.cluster"."Cluster_samples"
     add constraint "_parent_id_fk" foreign key ("_parent_id") references "org.apache.qpid.cluster"."Cluster" ("_id") on update cascade on delete cascade
     ;
-alter table "org.apache.qpid.broker"."System_stats"
+alter table "org.apache.qpid.broker"."System_samples"
     add constraint "_parent_id_fk" foreign key ("_parent_id") references "org.apache.qpid.broker"."System" ("_id") on update cascade on delete cascade
     ;
 alter table "org.apache.qpid.broker"."Broker"
     add constraint "_systemRef_id_fk" foreign key ("_systemRef_id") references "org.apache.qpid.broker"."System" ("_id") on update cascade on delete set null
     ;
-alter table "org.apache.qpid.broker"."Broker_stats"
+alter table "org.apache.qpid.broker"."Broker_samples"
     add constraint "_parent_id_fk" foreign key ("_parent_id") references "org.apache.qpid.broker"."Broker" ("_id") on update cascade on delete cascade
     ;
 alter table "org.apache.qpid.broker"."Agent"
     add constraint "_connectionRef_id_fk" foreign key ("_connectionRef_id") references "org.apache.qpid.broker"."Connection" ("_id") on update cascade on delete set null,
     add constraint "_registeredTo_id_fk" foreign key ("_registeredTo_id") references "org.apache.qpid.broker"."Broker" ("_id") on update cascade on delete set null
     ;
-alter table "org.apache.qpid.broker"."Agent_stats"
+alter table "org.apache.qpid.broker"."Agent_samples"
     add constraint "_parent_id_fk" foreign key ("_parent_id") references "org.apache.qpid.broker"."Agent" ("_id") on update cascade on delete cascade
     ;
 alter table "org.apache.qpid.broker"."Vhost"
     add constraint "_brokerRef_id_fk" foreign key ("_brokerRef_id") references "org.apache.qpid.broker"."Broker" ("_id") on update cascade on delete set null
     ;
-alter table "org.apache.qpid.broker"."Vhost_stats"
+alter table "org.apache.qpid.broker"."Vhost_samples"
     add constraint "_parent_id_fk" foreign key ("_parent_id") references "org.apache.qpid.broker"."Vhost" ("_id") on update cascade on delete cascade
     ;
 alter table "org.apache.qpid.broker"."Queue"
     add constraint "_vhostRef_id_fk" foreign key ("_vhostRef_id") references "org.apache.qpid.broker"."Vhost" ("_id") on update cascade on delete set null,
     add constraint "_altExchange_id_fk" foreign key ("_altExchange_id") references "org.apache.qpid.broker"."Exchange" ("_id") on update cascade on delete set null
     ;
-alter table "org.apache.qpid.broker"."Queue_stats"
+alter table "org.apache.qpid.broker"."Queue_samples"
     add constraint "_parent_id_fk" foreign key ("_parent_id") references "org.apache.qpid.broker"."Queue" ("_id") on update cascade on delete cascade
     ;
 alter table "org.apache.qpid.broker"."Exchange"
     add constraint "_vhostRef_id_fk" foreign key ("_vhostRef_id") references "org.apache.qpid.broker"."Vhost" ("_id") on update cascade on delete set null,
     add constraint "_altExchange_id_fk" foreign key ("_altExchange_id") references "org.apache.qpid.broker"."Exchange" ("_id") on update cascade on delete set null
     ;
-alter table "org.apache.qpid.broker"."Exchange_stats"
+alter table "org.apache.qpid.broker"."Exchange_samples"
     add constraint "_parent_id_fk" foreign key ("_parent_id") references "org.apache.qpid.broker"."Exchange" ("_id") on update cascade on delete cascade
     ;
 alter table "org.apache.qpid.broker"."Binding"
     add constraint "_exchangeRef_id_fk" foreign key ("_exchangeRef_id") references "org.apache.qpid.broker"."Exchange" ("_id") on update cascade on delete set null,
     add constraint "_queueRef_id_fk" foreign key ("_queueRef_id") references "org.apache.qpid.broker"."Queue" ("_id") on update cascade on delete set null
     ;
-alter table "org.apache.qpid.broker"."Binding_stats"
+alter table "org.apache.qpid.broker"."Binding_samples"
     add constraint "_parent_id_fk" foreign key ("_parent_id") references "org.apache.qpid.broker"."Binding" ("_id") on update cascade on delete cascade
     ;
 alter table "org.apache.qpid.broker"."Subscription"
     add constraint "_sessionRef_id_fk" foreign key ("_sessionRef_id") references "org.apache.qpid.broker"."Session" ("_id") on update cascade on delete set null,
     add constraint "_queueRef_id_fk" foreign key ("_queueRef_id") references "org.apache.qpid.broker"."Queue" ("_id") on update cascade on delete set null
     ;
-alter table "org.apache.qpid.broker"."Subscription_stats"
+alter table "org.apache.qpid.broker"."Subscription_samples"
     add constraint "_parent_id_fk" foreign key ("_parent_id") references "org.apache.qpid.broker"."Subscription" ("_id") on update cascade on delete cascade
     ;
 alter table "org.apache.qpid.broker"."Connection"
     add constraint "_vhostRef_id_fk" foreign key ("_vhostRef_id") references "org.apache.qpid.broker"."Vhost" ("_id") on update cascade on delete set null
     ;
-alter table "org.apache.qpid.broker"."Connection_stats"
+alter table "org.apache.qpid.broker"."Connection_samples"
     add constraint "_parent_id_fk" foreign key ("_parent_id") references "org.apache.qpid.broker"."Connection" ("_id") on update cascade on delete cascade
     ;
 alter table "org.apache.qpid.broker"."Link"
     add constraint "_vhostRef_id_fk" foreign key ("_vhostRef_id") references "org.apache.qpid.broker"."Vhost" ("_id") on update cascade on delete set null
     ;
-alter table "org.apache.qpid.broker"."Link_stats"
+alter table "org.apache.qpid.broker"."Link_samples"
     add constraint "_parent_id_fk" foreign key ("_parent_id") references "org.apache.qpid.broker"."Link" ("_id") on update cascade on delete cascade
     ;
 alter table "org.apache.qpid.broker"."Bridge"
     add constraint "_linkRef_id_fk" foreign key ("_linkRef_id") references "org.apache.qpid.broker"."Link" ("_id") on update cascade on delete set null
     ;
-alter table "org.apache.qpid.broker"."Bridge_stats"
+alter table "org.apache.qpid.broker"."Bridge_samples"
     add constraint "_parent_id_fk" foreign key ("_parent_id") references "org.apache.qpid.broker"."Bridge" ("_id") on update cascade on delete cascade
     ;
 alter table "org.apache.qpid.broker"."Session"
     add constraint "_vhostRef_id_fk" foreign key ("_vhostRef_id") references "org.apache.qpid.broker"."Vhost" ("_id") on update cascade on delete set null,
     add constraint "_connectionRef_id_fk" foreign key ("_connectionRef_id") references "org.apache.qpid.broker"."Connection" ("_id") on update cascade on delete set null
     ;
-alter table "org.apache.qpid.broker"."Session_stats"
+alter table "org.apache.qpid.broker"."Session_samples"
     add constraint "_parent_id_fk" foreign key ("_parent_id") references "org.apache.qpid.broker"."Session" ("_id") on update cascade on delete cascade
     ;
-alter table "org.apache.qpid.broker"."ManagementSetupState_stats"
+alter table "org.apache.qpid.broker"."ManagementSetupState_samples"
     add constraint "_parent_id_fk" foreign key ("_parent_id") references "org.apache.qpid.broker"."ManagementSetupState" ("_id") on update cascade on delete cascade
     ;
-alter table "com.redhat.sesame"."Sysimage_stats"
+alter table "com.redhat.sesame"."Sysimage_samples"
     add constraint "_parent_id_fk" foreign key ("_parent_id") references "com.redhat.sesame"."Sysimage" ("_id") on update cascade on delete cascade
     ;
 alter table "org.apache.qpid.acl"."Acl"
     add constraint "_brokerRef_id_fk" foreign key ("_brokerRef_id") references "org.apache.qpid.broker"."Broker" ("_id") on update cascade on delete set null
     ;
-alter table "org.apache.qpid.acl"."Acl_stats"
+alter table "org.apache.qpid.acl"."Acl_samples"
     add constraint "_parent_id_fk" foreign key ("_parent_id") references "org.apache.qpid.acl"."Acl" ("_id") on update cascade on delete cascade
     ;
-alter table "com.redhat.cumin"."BrokerGroup_stats"
+alter table "com.redhat.cumin"."BrokerGroup_samples"
     add constraint "_parent_id_fk" foreign key ("_parent_id") references "com.redhat.cumin"."BrokerGroup" ("_id") on update cascade on delete cascade
     ;
 alter table "com.redhat.cumin"."BrokerGroupMapping"
     add constraint "_broker_id_fk" foreign key ("_broker_id") references "org.apache.qpid.broker"."Broker" ("_id") on update cascade on delete set null,
     add constraint "_group_id_fk" foreign key ("_group_id") references "com.redhat.cumin"."BrokerGroup" ("_id") on update cascade on delete set null
     ;
-alter table "com.redhat.cumin"."BrokerGroupMapping_stats"
+alter table "com.redhat.cumin"."BrokerGroupMapping_samples"
     add constraint "_parent_id_fk" foreign key ("_parent_id") references "com.redhat.cumin"."BrokerGroupMapping" ("_id") on update cascade on delete cascade
     ;
 alter table "com.redhat.rhm.store"."Store"
     add constraint "_brokerRef_id_fk" foreign key ("_brokerRef_id") references "org.apache.qpid.broker"."Broker" ("_id") on update cascade on delete set null
     ;
-alter table "com.redhat.rhm.store"."Store_stats"
+alter table "com.redhat.rhm.store"."Store_samples"
     add constraint "_parent_id_fk" foreign key ("_parent_id") references "com.redhat.rhm.store"."Store" ("_id") on update cascade on delete cascade
     ;
 alter table "com.redhat.rhm.store"."Journal"
     add constraint "_queueRef_id_fk" foreign key ("_queueRef_id") references "org.apache.qpid.broker"."Queue" ("_id") on update cascade on delete set null
     ;
-alter table "com.redhat.rhm.store"."Journal_stats"
+alter table "com.redhat.rhm.store"."Journal_samples"
     add constraint "_parent_id_fk" foreign key ("_parent_id") references "com.redhat.rhm.store"."Journal" ("_id") on update cascade on delete cascade
     ;
-alter table "mrg.grid"."Slot_stats"
+alter table "mrg.grid"."Slot_samples"
     add constraint "_parent_id_fk" foreign key ("_parent_id") references "mrg.grid"."Slot" ("_id") on update cascade on delete cascade
     ;
-alter table "mrg.grid"."Scheduler_stats"
+alter table "mrg.grid"."Scheduler_samples"
     add constraint "_parent_id_fk" foreign key ("_parent_id") references "mrg.grid"."Scheduler" ("_id") on update cascade on delete cascade
     ;
 alter table "mrg.grid"."Submitter"
     add constraint "_schedulerRef_id_fk" foreign key ("_schedulerRef_id") references "mrg.grid"."Scheduler" ("_id") on update cascade on delete set null
     ;
-alter table "mrg.grid"."Submitter_stats"
+alter table "mrg.grid"."Submitter_samples"
     add constraint "_parent_id_fk" foreign key ("_parent_id") references "mrg.grid"."Submitter" ("_id") on update cascade on delete cascade
     ;
-alter table "mrg.grid"."Negotiator_stats"
+alter table "mrg.grid"."Negotiator_samples"
     add constraint "_parent_id_fk" foreign key ("_parent_id") references "mrg.grid"."Negotiator" ("_id") on update cascade on delete cascade
     ;
-alter table "mrg.grid"."Collector_stats"
+alter table "mrg.grid"."Collector_samples"
     add constraint "_parent_id_fk" foreign key ("_parent_id") references "mrg.grid"."Collector" ("_id") on update cascade on delete cascade
     ;
-alter table "mrg.grid"."Master_stats"
+alter table "mrg.grid"."Master_samples"
     add constraint "_parent_id_fk" foreign key ("_parent_id") references "mrg.grid"."Master" ("_id") on update cascade on delete cascade
     ;
-alter table "mrg.grid"."Grid_stats"
+alter table "mrg.grid"."Grid_samples"
     add constraint "_parent_id_fk" foreign key ("_parent_id") references "mrg.grid"."Grid" ("_id") on update cascade on delete cascade
     ;
 alter table "mrg.grid"."Submission"
     add constraint "_schedulerRef_id_fk" foreign key ("_schedulerRef_id") references "mrg.grid"."Scheduler" ("_id") on update cascade on delete set null
     ;
-alter table "mrg.grid"."Submission_stats"
+alter table "mrg.grid"."Submission_samples"
     add constraint "_parent_id_fk" foreign key ("_parent_id") references "mrg.grid"."Submission" ("_id") on update cascade on delete cascade
     ;

Modified: mgmt/newdata/rosemary/python/rosemary/model.py
===================================================================
--- mgmt/newdata/rosemary/python/rosemary/model.py	2010-03-22 14:58:08 UTC (rev 3871)
+++ mgmt/newdata/rosemary/python/rosemary/model.py	2010-03-22 16:54:24 UTC (rev 3872)
@@ -167,29 +167,29 @@
 
         # Stats table
 
-        name = "%s_stats" % self._name
-        self.sql_stats_table = SqlTable(self._package.sql_schema, name)
+        name = "%s_samples" % self._name
+        self.sql_samples_table = SqlTable(self._package.sql_schema, name)
 
-        stats_id_col = SqlColumn(self.sql_stats_table, "_id", sql_serial8)
-        self.sql_stats_table.key_column = stats_id_col
+        stats_id_col = SqlColumn(self.sql_samples_table, "_id", sql_serial8)
+        self.sql_samples_table.key_column = stats_id_col
 
-        name = "%s_pk" % self.sql_stats_table._name
-        SqlPrimaryKeyConstraint(self.sql_stats_table, name, (stats_id_col,))
+        name = "%s_pk" % self.sql_samples_table._name
+        SqlPrimaryKeyConstraint(self.sql_samples_table, name, (stats_id_col,))
 
         name = "_parent_id"
-        parent_col = SqlColumn(self.sql_stats_table, name, sql_int8)
+        parent_col = SqlColumn(self.sql_samples_table, name, sql_int8)
         parent_col.foreign_key_column = id_col
 
-        table = self.sql_stats_table
+        table = self.sql_samples_table
         name = "%s_fk" % parent_col.name
         constraint = SqlForeignKeyConstraint(table, name, parent_col, id_col)
         constraint.on_delete = "cascade"
 
         name = "_qmf_update_time"
-        SqlColumn(self.sql_stats_table, name, sql_timestamp)
+        SqlColumn(self.sql_samples_table, name, sql_timestamp)
 
-        self.sql_stats_insert = SqlInsertItemStats(self.sql_stats_table)
-        self.sql_stats_delete = SqlDeleteItemStats(self.sql_stats_table)
+        self.sql_samples_insert = SqlInsertItemStats(self.sql_samples_table)
+        self.sql_samples_delete = SqlDeleteItemStats(self.sql_samples_table)
 
     def add_headers(self):
         name = "_qmf_agent_id"
@@ -290,36 +290,7 @@
             meth.init()
 
         self.add_constraints()
-            
-#    def add_id_columns(self):
-        # id_col = SqlColumn(self.sql_table, "_id", sql_serial8)
-        # self.sql_table.key_column = id_col
 
-#        name = "%s_pk" % self._name
-#        SqlPrimaryKeyConstraint(self.sql_table, name, (id_col,))
-
-
-#    def add_qmf_columns(self):
-#        agent = SqlColumn(self.sql_table, "_qmf_agent_id", sql_text)
-#        object = SqlColumn(self.sql_table, "_qmf_object_id", sql_text)
-
-#        name = "%s_qmf_ids_uq" % self._name
-
-        #SqlUniqueConstraint(self.sql_table, name, (agent, object))
-
-        #col = SqlColumn(self.sql_table, "_qmf_session_id", sql_text)
-        #col.nullable = True
-
-        #SqlColumn(self.sql_table, "_qmf_class_key", sql_text)
-
-        #SqlColumn(self.sql_table, "_qmf_update_time", sql_timestamp)
-        #SqlColumn(self.sql_table, "_qmf_create_time", sql_timestamp)
-
-        #col = SqlColumn(self.sql_table, "_qmf_delete_time", sql_timestamp)
-        #col.nullable = True
-
-        #SqlColumn(self.sql_stats_table, "_qmf_update_time", sql_timestamp)
-
     def select_objects(self, cursor, **kwargs):
         objects = list()
 
@@ -539,7 +510,7 @@
         self.sql_column = SqlColumn(self.cls.sql_table, self.name, type)
         self.sql_column.nullable = True
 
-        col = SqlColumn(self.cls.sql_stats_table, self.name, type)
+        col = SqlColumn(self.cls.sql_samples_table, self.name, type)
         col.nullable = self.optional
 
 class RosemaryMethod(object):



More information about the rhmessaging-commits mailing list