modules/core/dbutils/pom.xml
| 2
modules/core/dbutils/src/main/scripts/dbupgrade/db-upgrade.xml
| 41 +++-------
modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ConfigurationDelegate.java
| 3
3 files changed, 19 insertions(+), 27 deletions(-)
New commits:
commit 819d8fc91e1cbd04a8d5e0d4ed82d402d38b0ce1
Merge: 1e24f2a 19558e1
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Mon Jun 27 17:31:28 2011 -0400
Merge commit 'origin/master' into drift
Conflicts:
modules/core/dbutils/pom.xml
modules/core/dbutils/src/main/scripts/dbupgrade/db-upgrade.xml
diff --cc modules/core/dbutils/pom.xml
index d79b738,a368986..e2a599d
--- a/modules/core/dbutils/pom.xml
+++ b/modules/core/dbutils/pom.xml
@@@ -22,7 -22,7 +22,7 @@@
<properties>
<scm.module.path>modules/core/dbutils/</scm.module.path>
- <db.schema.version>2.113</db.schema.version>
- <db.schema.version>2.110</db.schema.version>
++ <db.schema.version>2.112</db.schema.version>
</properties>
<dependencies>
diff --cc modules/core/dbutils/src/main/scripts/dbupgrade/db-upgrade.xml
index 8e276a1,df0daf7..8f0a9c7
--- a/modules/core/dbutils/src/main/scripts/dbupgrade/db-upgrade.xml
+++ b/modules/core/dbutils/src/main/scripts/dbupgrade/db-upgrade.xml
@@@ -3441,145 -3442,9 +3441,134 @@@
REFERENCES RHQ_CONFIG_PROP_DEF (ID)
</statement>
</schema-directSQL>
- <schema-createSequence
name="rhq_config_prop_def_opt_src_id_seq" initial="10001" />
+ <schema-createSequence name="rhq_config_pd_osrc_id_seq"
initial="10001" />
</schemaSpec>
+ <schemaSpec version="2.111">
+ <schema-directSQL>
+ <statement desc="Creating global drift configuration
definition">
+ INSERT INTO rhq_config_def (id, name, description)
+ VALUES (1, 'GLOBAL_DRIFT_CONFIG_DEF', 'The drift
configuration definition')
+ </statement>
+ <statement>
+ INSERT INTO rhq_config_prop_def (id, name, display_name,
description, required, simple_type,
+ order_index, dtype, config_def_id)
+ VALUES (1, 'name', 'Drift Configuration Name',
'The drift configuration name', true, 'string',
+ 0, 'property', 1)
+ </statement>
+ <statement>
+ INSERT INTO rhq_config_prop_def (id, name, display_name,
description, required, simple_type,
+ default_value, order_index, dtype, config_def_id)
+ VALUES (2, 'enabled', 'Enabled', 'Enables or
disables drift detection for this configuration', true, 'boolean',
+ 'false', 1, 'property', 1)
+ </statement>
+ <statement>
+ INSERT INTO rhq_config_prop_def (id, name, display_name,
description, required, simple_type,
+ order_index, dtype, config_def_id)
+ VALUES (3, 'basedir', 'Base Directory', 'The
base directory from which files will be monitored for drift.',
+ true, 'string', 2, 'property', 1)
+ </statement>
+ <statement>
+ INSERT INTO rhq_config_prop_def (id, name, display_name,
description, required, simple_type,
+ order_index, dtype, default_value, config_def_id)
+ VALUES (4, 'interval', 'Interval', 'The
interval, in seconds, between drift detection scans for this configuration. Default is
thirty minutes.',
+ false, 'long', 3, 'property',
'1800', 1)
+ </statement>
+ <statement>
+ INSERT INTO rhq_config_prop_def (id, name, display_name, dtype,
description, order_index,
+ config_def_id)
+ VALUES (5, 'includes', 'Includes',
'list', 'A set of patterns that specify files and/or directories to
include.',
+ 4, 1)
+ </statement>
+ <statement>
+ INSERT INTO rhq_config_prop_def (id, name, display_name, dtype,
parent_list_definition_id)
+ VALUES (6, 'include', 'Include', 'map',
4)
+ </statement>
+ <statement>
+ INSERT INTO rhq_config_prop_def (id, name, display_name,
description, simple_type,
+ order_index, dtype, parent_map_definition_id)
+ VALUES (7, 'path', 'Path', 'A file system
path that can be a directory or a file. The path is assumed to be relative to the base
directory of the drift configuration.',
+ 'string', 0, 'property', 5)
+ </statement>
+ <statement>
+ INSERT INTO rhq_config_prop_def (id, name, display_name,
description, simple_type,
+ order_index, dtype, parent_map_definition_id)
+ VALUES (8, 'pattern', 'Pattern', 'TBD',
'string', 1, 'property', 5)
+ </statement>
+ <statement>
+ INSERT INTO rhq_config_prop_def (id, name, display_name, dtype,
description, order_index,
+ config_def_id)
+ VALUES (9, 'excludes', 'Excludes',
'list', 'A set of patterns that specify files and/or directories to
exclude.',
+ 5, 1)
+ </statement>
+ <statement>
+ INSERT INTO rhq_config_prop_def (id, name, display_name, dtype,
parent_list_definition_id)
+ VALUES (10, 'exclude', 'Exclude', 'map',
8)
+ </statement>
+ <statement>
+ INSERT INTO rhq_config_prop_def (id, name, display_name,
description, simple_type,
+ order_index, dtype, parent_map_definition_id)
+ VALUES (11, 'path', 'Path', 'A file system
path that can be a directory or a file. The path is assumed to be relative to the base
directory of the drift configuration.',
+ 'string', 0, 'property', 9)
+ </statement>
+ <statement>
+ INSERT INTO rhq_config_prop_def (id, name, display_name,
description, simple_type,
+ order_index, dtype, parent_map_definition_id)
+ VALUES (12, 'pattern', 'Pattern', 'TBD',
'string', 1, 'property', 9)
+ </statement>
+ </schema-directSQL>
+ </schemaSpec>
+
+ <schemaSpec version="2.112">
+ <schema-directSQL>
+ <statement desc="Creating table
RHQ_DRIFT_TEMPLATE">
+ CREATE TABLE RHQ_DRIFT_TEMPLATE (
+ RESOURCE_TYPE_ID INTEGER,
+ CONFIG_TEMPLATE_ID INTEGER)
+ </statement>
+ </schema-directSQL>
+ <schema-alterColumn table="RHQ_DRIFT_TEMPLATE"
column="RESOURCE_TYPE_ID" nullable="false"/>
+ <schema-alterColumn table="RHQ_DRIFT_TEMPLATE"
column="CONFIG_TEMPLATE_ID" nullable="false"/>
+ <schema-directSQL>
+ <statement desc="Creating RHQ_DRIFT_TEMPLATE foreign key to
RHQ_RESOURCE_TYPE">
+ ALTER TABLE RHQ_DRIFT_TEMPLATE
+ ADD CONSTRAINT RESOURCE_TYPE_ID_FK
+ FOREIGN KEY (RESOURCE_TYPE_ID)
+ REFERENCES RHQ_RESOURCE_TYPE (ID)
+ </statement>
+ <statement desc="Creating RHQ_DRIFT_TEMPLATE foreign key to
RHQ_CONFIG_TEMPLATE">
+ ALTER TABLE RHQ_DRIFT_TEMPLATE
+ ADD CONSTRAINT CONFIG_TEMPLATE_ID_FK
+ FOREIGN KEY (CONFIG_TEMPLATE_ID)
+ REFERENCES RHQ_CONFIG_TEMPLATE (ID)
+ </statement>
+ </schema-directSQL>
+
+ <schema-directSQL>
+ <statement desc="Creating table RHQ_DRIFT_CONFIG">
+ CREATE TABLE RHQ_DRIFT_CONFIG (
+ RESOURCE_ID INTEGER,
+ CONFIG_ID INTEGER)
+ </statement>
+ </schema-directSQL>
+ <schema-alterColumn table="RHQ_DRIFT_CONFIG"
column="RESOURCE_ID" nullable="false"/>
+ <schema-alterColumn table="RHQ_DRIFT_CONFIG"
column="CONFIG_ID" nullable="false"/>
+ <schema-directSQL>
+ <statement desc="Creating RHQ_DRIFT_CONFIG foreign key to
RHQ_RESOURCE">
+ ALTER TABLE RHQ_DRIFT_CONFIG
+ ADD CONSTRAINT RESOURCE_ID_FK
+ FOREIGN KEY (RESOURCE_ID)
+ REFERENCES RHQ_RESOURCE (ID)
+ </statement>
+ <statement desc="Creating RHQ_DRIFT_CONFIG foreign key to
RHQ_CONFIG">
+ ALTER TABLE RHQ_DRIFT_CONFIG
+ ADD CONSTRAINT CONFIG_ID_FK
+ FOREIGN KEY (CONFIG_ID)
+ REFERENCES RHQ_CONFIG (ID)
+ </statement>
+ </schema-directSQL>
+ </schemaSpec>
+
- <schemaSpec version="2.113">
- <schema-directSQL>
- <statement desc="rename to correct name">
- ALTER TABLE RHQ_PROP_DEF_OPT_SRC
- RENAME TO RHQ_CONFIG_PD_OSRC
- </statement>
- <statement desc="rename sequence">
- ALTER TABLE rhq_config_prop_def_opt_src_id_seq RENAME TO
rhq_config_pd_osrc_id_seq
- </statement>
- </schema-directSQL>
- </schemaSpec>
</dbupgrade>
</target>
</project>
commit 19558e110cd6f9233225e7122d8af4baafb1ea56
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Mon Jun 27 17:27:39 2011 -0400
we can't rename tables (which is essentially removing an old table and creating a
new table)
because dbsetup won't work - the dbsetup uninstall won't know about the old
table to remove if it is still around
collapse the two dbupgrade steps into one
diff --git a/modules/core/dbutils/pom.xml b/modules/core/dbutils/pom.xml
index 39f0798..a368986 100644
--- a/modules/core/dbutils/pom.xml
+++ b/modules/core/dbutils/pom.xml
@@ -22,7 +22,7 @@
<properties>
<scm.module.path>modules/core/dbutils/</scm.module.path>
- <db.schema.version>2.111</db.schema.version>
+ <db.schema.version>2.110</db.schema.version>
</properties>
<dependencies>
diff --git a/modules/core/dbutils/src/main/scripts/dbupgrade/db-upgrade.xml
b/modules/core/dbutils/src/main/scripts/dbupgrade/db-upgrade.xml
index 9950e58..df0daf7 100644
--- a/modules/core/dbutils/src/main/scripts/dbupgrade/db-upgrade.xml
+++ b/modules/core/dbutils/src/main/scripts/dbupgrade/db-upgrade.xml
@@ -3417,44 +3417,34 @@
<schemaSpec version="2.110">
<schema-directSQL>
- <statement desc="Creating table
RHQ_PROP_DEF_OPT_SRC">
- CREATE TABLE RHQ_PROP_DEF_OPT_SRC ( ID INTEGER PRIMARY KEY )
+ <statement desc="Creating table RHQ_CONFIG_PD_OSRC">
+ CREATE TABLE RHQ_CONFIG_PD_OSRC ( ID INTEGER PRIMARY KEY )
</statement>
</schema-directSQL>
- <schema-addColumn table="RHQ_PROP_DEF_OPT_SRC"
column="LINK_TO_TARGET" columnType="BOOLEAN"/>
- <schema-alterColumn table="RHQ_PROP_DEF_OPT_SRC"
column="LINK_TO_TARGET" nullable="TRUE"/>
+ <schema-addColumn table="RHQ_CONFIG_PD_OSRC"
column="LINK_TO_TARGET" columnType="BOOLEAN"/>
+ <schema-alterColumn table="RHQ_CONFIG_PD_OSRC"
column="LINK_TO_TARGET" nullable="TRUE"/>
- <schema-addColumn table="RHQ_PROP_DEF_OPT_SRC"
column="FILTER" columnType="VARCHAR2" precision="40"/>
- <schema-alterColumn table="RHQ_PROP_DEF_OPT_SRC"
column="FILTER" nullable="TRUE"/>
+ <schema-addColumn table="RHQ_CONFIG_PD_OSRC"
column="FILTER" columnType="VARCHAR2" precision="40"/>
+ <schema-alterColumn table="RHQ_CONFIG_PD_OSRC"
column="FILTER" nullable="TRUE"/>
- <schema-addColumn table="RHQ_PROP_DEF_OPT_SRC"
column="EXPRESSION" columnType="VARCHAR2"
precision="400"/>
- <schema-alterColumn table="RHQ_PROP_DEF_OPT_SRC"
column="EXPRESSION" nullable="FALSE"/>
+ <schema-addColumn table="RHQ_CONFIG_PD_OSRC"
column="EXPRESSION" columnType="VARCHAR2"
precision="400"/>
+ <schema-alterColumn table="RHQ_CONFIG_PD_OSRC"
column="EXPRESSION" nullable="FALSE"/>
- <schema-addColumn table="RHQ_PROP_DEF_OPT_SRC"
column="TARGET_TYPE" columnType="VARCHAR2"
precision="20"/>
- <schema-alterColumn table="RHQ_PROP_DEF_OPT_SRC"
column="TARGET_TYPE" nullable="FALSE"/>
+ <schema-addColumn table="RHQ_CONFIG_PD_OSRC"
column="TARGET_TYPE" columnType="VARCHAR2"
precision="20"/>
+ <schema-alterColumn table="RHQ_CONFIG_PD_OSRC"
column="TARGET_TYPE" nullable="FALSE"/>
- <schema-addColumn table="RHQ_PROP_DEF_OPT_SRC"
column="PROPERTY_DEF_ID" columnType="INTEGER"/>
+ <schema-addColumn table="RHQ_CONFIG_PD_OSRC"
column="PROPERTY_DEF_ID" columnType="INTEGER"/>
<schema-directSQL>
- <statement desc="Adding a fk">
- ALTER TABLE RHQ_PROP_DEF_OPT_SRC
- ADD CONSTRAINT RHQ_PROP_DEF_OPT_SRC_ID_FK
+ <statement desc="Adding a foreign key constraint to
RHQ_CONFIG_PD_OSRC">
+ ALTER TABLE RHQ_CONFIG_PD_OSRC
+ ADD CONSTRAINT RHQ_CONFIG_PD_OSRC_ID_FK
FOREIGN KEY (PROPERTY_DEF_ID)
REFERENCES RHQ_CONFIG_PROP_DEF (ID)
</statement>
</schema-directSQL>
- <schema-createSequence
name="rhq_config_prop_def_opt_src_id_seq" initial="10001" />
- </schemaSpec>
- <schemaSpec version="2.111">
- <schema-directSQL>
- <statement desc="rename to correct name">
- ALTER TABLE RHQ_PROP_DEF_OPT_SRC
- RENAME TO RHQ_CONFIG_PD_OSRC
- </statement>
- <statement desc="rename sequence">
- ALTER TABLE rhq_config_prop_def_opt_src_id_seq RENAME TO
rhq_config_pd_osrc_id_seq
- </statement>
- </schema-directSQL>
+ <schema-createSequence name="rhq_config_pd_osrc_id_seq"
initial="10001" />
</schemaSpec>
+
</dbupgrade>
</target>
</project>
commit 1553673802ec3f30d6582d6f0a8df3707cc5d6a1
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Mon Jun 27 17:55:59 2011 +0200
Fix a possible NPE that prevents config rendering.
diff --git
a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ConfigurationDelegate.java
b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ConfigurationDelegate.java
index f66cefd..ae8e5d9 100644
---
a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ConfigurationDelegate.java
+++
b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ConfigurationDelegate.java
@@ -219,6 +219,9 @@ public class ConfigurationDelegate implements ConfigurationFacet {
* @return the populated map
*/
PropertyMap handlePropertyMap(PropertyDefinitionMap propDef, Object valueObject) {
+ if (valueObject==null)
+ return null;
+
PropertyMap propertyMap = new PropertyMap(propDef.getName());
Map<String, PropertyDefinition> memberDefMap =
propDef.getPropertyDefinitions();