modules/core/dbutils/pom.xml
| 2
modules/core/dbutils/src/main/scripts/dbupgrade/db-upgrade.xml
| 42 +++-------
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/configuration/ConfigurationManagerBean.java
| 2
modules/enterprise/server/jar/src/test/resources/org/rhq/enterprise/server/discovery/DiscoveryBossBeanTest.xml
| 1
modules/enterprise/server/jar/src/test/resources/org/rhq/enterprise/server/inventory/InventoryManagerBeanTest.xml
| 1
modules/enterprise/server/jar/src/test/resources/org/rhq/enterprise/server/resource/metadata/MetadataTest.xml
| 1
modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ASConnection.java
| 2
modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ASUploadConnection.java
| 2
modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/Result.java
| 9 ++
modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/OperationJsonTest.java
| 17 +++-
10 files changed, 48 insertions(+), 31 deletions(-)
New commits:
commit 26c6ae2e65c7493dd38d91e79eff20a32bffa0d4
Merge: 9687460 04f6861
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Thu Jun 30 09:22:01 2011 +0200
Merge branch 'dependent-values' of
ssh://git.fedorahosted.org/git/rhq/rhq into
dependent-values
Conflicts:
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/configuration/ConfigurationManagerBean.java
commit 9687460e768d07c9ca16c28c950245cb3af84649
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Thu Jun 30 09:15:02 2011 +0200
Use the name as value and not the id.
diff --git
a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/configuration/ConfigurationManagerBean.java
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/configuration/ConfigurationManagerBean.java
index 8463123..e872a80 100644
---
a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/configuration/ConfigurationManagerBean.java
+++
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/configuration/ConfigurationManagerBean.java
@@ -2438,7 +2438,7 @@ public class ConfigurationManagerBean implements
ConfigurationManagerLocal, Conf
if (tt== PropertyOptionsSource.TargetType.RESOURCE) {
- PropertyDefinitionEnumeration pde = new
PropertyDefinitionEnumeration(composite.getResource().getName(),""+composite.getResource().getId());
+ PropertyDefinitionEnumeration pde = new
PropertyDefinitionEnumeration(composite.getResource().getName(),""+composite.getResource().getName());
// TODO filter -- or leave up to search expression??
pds.getEnumeratedValues().add(pde);
}
commit 4e9188a94bb4839bc58efb1be8c30ee64eb09005
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Tue Jun 28 13:51:40 2011 +0200
First cut at handling target=configuration and using DV in the resource config
editor.
diff --git
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/configuration/ResourceConfigurationEditView.java
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/configuration/ResourceConfigurationEditView.java
index 2df653a..8f1a058 100644
---
a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/configuration/ResourceConfigurationEditView.java
+++
b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/detail/configuration/ResourceConfigurationEditView.java
@@ -30,6 +30,7 @@ import com.smartgwt.client.widgets.toolbar.ToolStrip;
import org.rhq.core.domain.configuration.Configuration;
import org.rhq.core.domain.configuration.ResourceConfigurationUpdate;
+import org.rhq.core.domain.configuration.definition.ConfigurationDefinition;
import org.rhq.core.domain.resource.Resource;
import org.rhq.core.domain.resource.ResourceType;
import org.rhq.core.domain.resource.composite.ResourceComposite;
@@ -40,6 +41,7 @@ import org.rhq.enterprise.gui.coregui.client.RefreshableView;
import
org.rhq.enterprise.gui.coregui.client.components.configuration.ConfigurationEditor;
import
org.rhq.enterprise.gui.coregui.client.components.configuration.PropertyValueChangeEvent;
import
org.rhq.enterprise.gui.coregui.client.components.configuration.PropertyValueChangeListener;
+import org.rhq.enterprise.gui.coregui.client.gwt.ConfigurationGWTServiceAsync;
import org.rhq.enterprise.gui.coregui.client.gwt.GWTServiceLookup;
import
org.rhq.enterprise.gui.coregui.client.inventory.resource.detail.ResourceDetailView;
import
org.rhq.enterprise.gui.coregui.client.inventory.resource.type.ResourceTypeRepository;
@@ -127,19 +129,31 @@ public class ResourceConfigurationEditView extends LocatableVLayout
implements P
@Override
public void onTypesLoaded(ResourceType type) {
- editor = new
ConfigurationEditor(extendLocatorId("Editor"), type
- .getResourceConfigurationDefinition(),
result.getConfiguration());
- editor.setOverflow(Overflow.AUTO);
-
editor.addPropertyValueChangeListener(ResourceConfigurationEditView.this);
-
editor.setReadOnly(!resourcePermission.isConfigureWrite());
- addMember(editor);
-
- saveButton.disable();
- buttonbar.setVisible(true);
- markForRedraw();
- refreshing = false;
+ ConfigurationGWTServiceAsync configurationService =
GWTServiceLookup.getConfigurationService();
+
configurationService.getOptionValuesForConfigDefinition(type.getResourceConfigurationDefinition(),new
AsyncCallback<ConfigurationDefinition>(){
+ @Override
+ public void onFailure(Throwable throwable) {
+ refreshing = false;
+
CoreGUI.getErrorHandler().handleError("Failed to load configuration.",
throwable);
+ }
+
+ @Override
+ public void onSuccess(ConfigurationDefinition
configurationDefinition) {
+
+ editor = new
ConfigurationEditor(extendLocatorId("Editor"), configurationDefinition,
result.getConfiguration());
+ editor.setOverflow(Overflow.AUTO);
+
editor.addPropertyValueChangeListener(ResourceConfigurationEditView.this);
+
editor.setReadOnly(!resourcePermission.isConfigureWrite());
+ addMember(editor);
+
+ saveButton.disable();
+ buttonbar.setVisible(true);
+ markForRedraw();
+ refreshing = false;
+ }
+ });
}
- });
+ });
}
@Override
diff --git
a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/configuration/ConfigurationManagerBean.java
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/configuration/ConfigurationManagerBean.java
index f810129..8463123 100644
---
a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/configuration/ConfigurationManagerBean.java
+++
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/configuration/ConfigurationManagerBean.java
@@ -59,6 +59,9 @@ import org.rhq.core.domain.configuration.Configuration;
import org.rhq.core.domain.configuration.ConfigurationUpdateStatus;
import org.rhq.core.domain.configuration.PluginConfigurationUpdate;
import org.rhq.core.domain.configuration.Property;
+import org.rhq.core.domain.configuration.PropertyList;
+import org.rhq.core.domain.configuration.PropertyMap;
+import org.rhq.core.domain.configuration.PropertySimple;
import org.rhq.core.domain.configuration.RawConfiguration;
import org.rhq.core.domain.configuration.ResourceConfigurationUpdate;
import org.rhq.core.domain.configuration.composite.ConfigurationUpdateComposite;
@@ -77,6 +80,7 @@ import
org.rhq.core.domain.criteria.GroupResourceConfigurationUpdateCriteria;
import org.rhq.core.domain.criteria.PluginConfigurationUpdateCriteria;
import org.rhq.core.domain.criteria.ResourceConfigurationUpdateCriteria;
import org.rhq.core.domain.criteria.ResourceCriteria;
+import org.rhq.core.domain.criteria.ResourceGroupCriteria;
import org.rhq.core.domain.measurement.AvailabilityType;
import org.rhq.core.domain.resource.Agent;
import org.rhq.core.domain.resource.Resource;
@@ -87,8 +91,6 @@ import org.rhq.core.domain.resource.composite.ResourceComposite;
import org.rhq.core.domain.resource.group.GroupCategory;
import org.rhq.core.domain.resource.group.ResourceGroup;
import org.rhq.core.domain.resource.group.composite.ResourceGroupComposite;
-import org.rhq.core.domain.search.SearchSubsystem;
-import org.rhq.core.domain.search.SearchSuggestion;
import org.rhq.core.domain.util.PageControl;
import org.rhq.core.domain.util.PageList;
import org.rhq.core.domain.util.PageOrdering;
@@ -118,7 +120,6 @@ import
org.rhq.enterprise.server.resource.group.ResourceGroupManagerLocal;
import org.rhq.enterprise.server.resource.group.ResourceGroupNotFoundException;
import org.rhq.enterprise.server.resource.group.ResourceGroupUpdateException;
import org.rhq.enterprise.server.scheduler.SchedulerLocal;
-import org.rhq.enterprise.server.search.execution.SearchAssistManager;
import org.rhq.enterprise.server.system.ServerVersion;
import org.rhq.enterprise.server.util.CriteriaQueryGenerator;
import org.rhq.enterprise.server.util.CriteriaQueryRunner;
@@ -2412,21 +2413,136 @@ public class ConfigurationManagerBean implements
ConfigurationManagerLocal, Conf
if (pds.getOptionsSource()!=null) {
// evaluate the source parameters
PropertyOptionsSource pos = pds.getOptionsSource();
- ResourceCriteria criteria = new ResourceCriteria();
- criteria.setSearchExpression(pos.getExpression());
- // TODO for groups we need to talk to the group manager
- List<ResourceComposite> composites =
resourceManager.findResourceCompositesByCriteria(subject,criteria);
- for (ResourceComposite composite : composites) {
+ PropertyOptionsSource.TargetType tt = pos.getTargetType();
+ String expression = pos.getExpression();
+ if (tt== PropertyOptionsSource.TargetType.RESOURCE || tt==
PropertyOptionsSource.TargetType.CONFIGURATION) {
+ ResourceCriteria criteria = new ResourceCriteria();
+
+
+ if (tt==PropertyOptionsSource.TargetType.CONFIGURATION) {
+ // split out expression part for target=configuration
+ // return if no property specifier is given
+ String expr = expression;
+ if (!expr.contains(":")) {
+ log.warn("Option source expression for property " +
pds.getName() + " and target configuration contains no ':'");
+ return;
+ }
+ }
+ else {
+ criteria.setSearchExpression(expression);
+ }
+
+
+ List<ResourceComposite> composites =
resourceManager.findResourceCompositesByCriteria(subject,criteria);
+ for (ResourceComposite composite : composites) {
+
+ if (tt== PropertyOptionsSource.TargetType.RESOURCE) {
+
+ PropertyDefinitionEnumeration pde = new
PropertyDefinitionEnumeration(composite.getResource().getName(),""+composite.getResource().getId());
+ // TODO filter -- or leave up to search expression??
+ pds.getEnumeratedValues().add(pde);
+ }
+ else if (tt== PropertyOptionsSource.TargetType.CONFIGURATION) {
+ // for configuration we need to drill down into the resource
configuration
+ if (!handleConfigurationTarget(pds, expression,
composite.getResource())) return;
+
+ }
+ }
+ }
+ else if (tt == PropertyOptionsSource.TargetType.GROUP) {
+ // for groups we need to talk to the group manager
+ ResourceGroupCriteria criteria = new ResourceGroupCriteria();
+ criteria.setSearchExpression(expression);
+
+
resourceGroupManager.findResourceGroupCompositesByCriteria(subject,criteria);
+ }
+ // TODO plugin and resourceType
+ }
- // TODO for configuration we need to drill down into the resource
configuration
- PropertyDefinitionEnumeration pde = new
PropertyDefinitionEnumeration(composite.getResource().getName(),""+composite.getResource().getId());
+ }
- // TODO filter -- or leave up to search expression??
+ /**
+ * Drill down in the case the user set up a target of "configuration". We
need to check
+ * that the target property actually exiists and that it has a format we understand
+ * @param pds Propertydefinition to examine
+ * @param expression The whole expression starting with identifier: for the
configuration
+ * identifier. This looks like <i>listname</i> for list of
+ * property simple or <i>mapname=mapkey</i> for a map with simple
properties
+ * @param resource the
+ * @return false if the property can not be resolved, true otherwise
+ */
+ private boolean handleConfigurationTarget(PropertyDefinitionSimple pds, String
expression,
+ Resource resource) {
+ Configuration configuration = resource.getResourceConfiguration();
+ Property p;
+ String propName = expression.substring(0, expression.indexOf(":"));
+ boolean isMap = expression.contains("=");
+
+ if (isMap) {
+ String mapPropName = propName.substring(0, propName.indexOf("="));
+ p = configuration.get(mapPropName);
+ } else
+ p = configuration.get(propName);
+
+ if (p == null) {
+ log.warn("Option source expression for property " + pds.getName() +
" and target configuration not found");
+ return false;
+ }
+ if (!(p instanceof PropertyList)) {
+ log.warn("Option source expression for property " + pds.getName() +
" and target configuration does not point to a list");
+ return false;
+ }
+ PropertyList pl = (PropertyList) p;
+ List<Property> propertyList = pl.getList();
+ if (propertyList.size()==0)
+ return false;
+
+ // Now List of simple or list of maps (of simple) ?
+
+ if (propertyList.get(0) instanceof PropertySimple) {
+ if (isMap) {
+ log.warn(" expected a List of Maps, but got a list of
simple");
+ return false;
+ }
- pds.getEnumeratedValues().add(pde);
+ for (Property tmp : propertyList) {
+ PropertySimple ps= (PropertySimple) tmp;
+ String name = ps.getStringValue();
+ if (name!=null) {
+ PropertyDefinitionEnumeration pde = new
PropertyDefinitionEnumeration(name, name);
+ pds.getEnumeratedValues().add(pde);
+ }
+ }
+ } else if (propertyList.get(0) instanceof PropertyMap) {
+ if (!isMap) {
+ log.warn(" expected a List of simple, but got a list of
Maps");
+ return false;
+ }
+ String subPropName ;
+ subPropName = propName.substring(propName.indexOf("=") + 1);
+
+ for (Property tmp : propertyList) {
+ PropertyMap pm = (PropertyMap) tmp;
+ Property ps = pm.get(subPropName);
+ if (ps==null) {
+ log.warn("Option source expression for property " +
pds.getName() + " and target configuration does not have a map element " +
subPropName);
+ return false;
+ }
+ if (!(ps instanceof PropertySimple)) {
+ log.warn("ListOfMapOf!Simple are not supported");
+ return false;
+ }
+ PropertySimple propertySimple = (PropertySimple) ps;
+ String name = propertySimple.getStringValue();
+ if (name!=null) {
+ PropertyDefinitionEnumeration pde = new
PropertyDefinitionEnumeration(name, name);
+ pds.getEnumeratedValues().add(pde);
+ }
}
}
+
+ return true;
}
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
commit 9a60502fbe010972f9becd9474a1aa5a9fb69cbb
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Mon Jun 27 21:53:06 2011 +0200
Prevent a possible NPE later on if value is null.
diff --git
a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/util/ObjectUtil.java
b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/util/ObjectUtil.java
index a6f76b8..0592390 100644
--- a/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/util/ObjectUtil.java
+++ b/modules/core/plugin-api/src/main/java/org/rhq/core/pluginapi/util/ObjectUtil.java
@@ -145,6 +145,10 @@ public class ObjectUtil {
* @return the value read from the object's property path
*/
public static Object lookupDeepAttributeProperty(Object value, String propertyPath)
{
+
+ if (value==null)
+ return null;
+
String[] ps = propertyPath.split("\\.", 2);
String searchProperty = ps[0];
@@ -181,4 +185,4 @@ public class ObjectUtil {
// Prevent instantiation of this class.
private ObjectUtil() {
}
- }
\ No newline at end of file
+ }
commit aed0881f6c23e7015c7c8665074d2c444acad189
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Tue Jun 28 21:59:52 2011 +0200
Support the new "rolled-back" element in the JSON response from the AS.
diff --git
a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/Result.java
b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/Result.java
index a5583b7..63c5262 100644
---
a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/Result.java
+++
b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/json/Result.java
@@ -40,6 +40,8 @@ public class Result {
private /*List<Map<String, String>>*/Object failureDescription;
@JsonIgnore
private boolean success = false;
+ @JsonProperty("rolled-back")
+ private boolean rolledBack = false;
public Result() {
@@ -83,4 +85,11 @@ public class Result {
this.failureDescription = failureDescription;
}
+ public boolean isRolledBack() {
+ return rolledBack;
+ }
+
+ public void setRolledBack(boolean rolledBack) {
+ this.rolledBack = rolledBack;
+ }
}
diff --git
a/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/OperationJsonTest.java
b/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/OperationJsonTest.java
index 53ac89e..b36a03b 100644
---
a/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/OperationJsonTest.java
+++
b/modules/plugins/jboss-as-7/src/test/java/org/rhq/modules/plugins/jbossas7/OperationJsonTest.java
@@ -185,7 +185,7 @@ public class OperationJsonTest {
public void arrayResult1() throws Exception {
- String resultString =
"{\"outcome\":\"success\",\"result\":[\"standard-sockets\",\"messaging-sockets\"],\"compensating-operation\":null}";
+ String resultString =
"{\"outcome\":\"success\",\"result\":[\"standard-sockets\",\"messaging-sockets\"],\"compensating-operation\":null,
\"rolled-back\" : false}";
ObjectMapper mapper = new ObjectMapper();
Result result = mapper.readValue(resultString,Result.class);
@@ -197,6 +197,21 @@ public class OperationJsonTest {
assert stringList.size()==2;
assert stringList.get(0).equals("standard-sockets");
assert stringList.get(1).equals("messaging-sockets");
+ assert !result.isRolledBack();
+
+ }
+
+ public void rolledBack() throws Exception {
+
+ String resultString = "{\"outcome\":\"failed\",
\"rolled-back\" : true}";
+
+ ObjectMapper mapper = new ObjectMapper();
+ Result result = mapper.readValue(resultString,Result.class);
+
+ assert result != null;
+ assert result.getOutcome().equals("failed");
+ assert !result.isSuccess();
+ assert result.isRolledBack();
}
commit f3a39fd7c84e203b90c3a0b6e35bc0e0fc8c4c9b
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Tue Jun 28 13:43:36 2011 -0500
Fix dbunit setup failures after a new table was added to the schema.
diff --git
a/modules/enterprise/server/jar/src/test/resources/org/rhq/enterprise/server/discovery/DiscoveryBossBeanTest.xml
b/modules/enterprise/server/jar/src/test/resources/org/rhq/enterprise/server/discovery/DiscoveryBossBeanTest.xml
index 290ad18..51e689e 100644
---
a/modules/enterprise/server/jar/src/test/resources/org/rhq/enterprise/server/discovery/DiscoveryBossBeanTest.xml
+++
b/modules/enterprise/server/jar/src/test/resources/org/rhq/enterprise/server/discovery/DiscoveryBossBeanTest.xml
@@ -10,8 +10,8 @@
mtime="123456"/>
<rhq_config_def/>
- <rhq_config_pd_osrc/>
<rhq_config_prop_def/>
+ <rhq_config_pd_osrc/>
<rhq_conf_prop_def_enum/>
<rhq_config_prop_constr/>
diff --git
a/modules/enterprise/server/jar/src/test/resources/org/rhq/enterprise/server/inventory/InventoryManagerBeanTest.xml
b/modules/enterprise/server/jar/src/test/resources/org/rhq/enterprise/server/inventory/InventoryManagerBeanTest.xml
index 306297c..0cfe2f1 100644
---
a/modules/enterprise/server/jar/src/test/resources/org/rhq/enterprise/server/inventory/InventoryManagerBeanTest.xml
+++
b/modules/enterprise/server/jar/src/test/resources/org/rhq/enterprise/server/inventory/InventoryManagerBeanTest.xml
@@ -1,7 +1,7 @@
<dataset>
<rhq_config_def/>
- <rhq_config_pd_osrc/>
<rhq_config_prop_def/>
+ <rhq_config_pd_osrc/>
<rhq_conf_prop_def_enum/>
<rhq_config_prop_constr/>
diff --git
a/modules/enterprise/server/jar/src/test/resources/org/rhq/enterprise/server/resource/metadata/MetadataTest.xml
b/modules/enterprise/server/jar/src/test/resources/org/rhq/enterprise/server/resource/metadata/MetadataTest.xml
index d584809..29351c4 100644
---
a/modules/enterprise/server/jar/src/test/resources/org/rhq/enterprise/server/resource/metadata/MetadataTest.xml
+++
b/modules/enterprise/server/jar/src/test/resources/org/rhq/enterprise/server/resource/metadata/MetadataTest.xml
@@ -2,6 +2,7 @@
<rhq_config_def/>
<rhq_config_prop_grp_def/>
<rhq_config_prop_def/>
+ <rhq_config_pd_osrc/>
<rhq_conf_prop_def_enum/>
<rhq_config_prop_constr/>
<rhq_config/>
commit 50fb5956ca8b06cc826766bd2a9d84806d79cda2
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Tue Jun 28 17:30:10 2011 +0200
/domain-api got renamed to /management.
diff --git
a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ASConnection.java
b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ASConnection.java
index c51f275..f2bb47f 100644
---
a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ASConnection.java
+++
b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ASConnection.java
@@ -52,7 +52,7 @@ public class ASConnection {
public ASConnection(String host, int port) {
try {
- url = new URL("http",host,port,"/domain-api");
+ url = new URL("http",host,port,"/management");
urlString = url.toString();
} catch (MalformedURLException e) {
throw new IllegalArgumentException(e.getMessage());
diff --git
a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ASUploadConnection.java
b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ASUploadConnection.java
index 80e8ea4..d876c80 100644
---
a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ASUploadConnection.java
+++
b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/ASUploadConnection.java
@@ -51,7 +51,7 @@ public class ASUploadConnection {
private static final String POST_REQUEST_METHOD = "POST";
- private static final String UPLOAD_URL_PATH = "/domain-api/add-content";
+ private static final String UPLOAD_URL_PATH = "/management/add-content";
private final Log log = LogFactory.getLog(ASUploadConnection.class);
commit c4bc8030a89861799fc79ff1611fa7cfc0009168
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Tue Jun 28 09:58:25 2011 -0500
Attempt to correct the dbunit setup failures after a new table was added to the
schema.
diff --git
a/modules/enterprise/server/jar/src/test/resources/org/rhq/enterprise/server/discovery/DiscoveryBossBeanTest.xml
b/modules/enterprise/server/jar/src/test/resources/org/rhq/enterprise/server/discovery/DiscoveryBossBeanTest.xml
index 79ba415..290ad18 100644
---
a/modules/enterprise/server/jar/src/test/resources/org/rhq/enterprise/server/discovery/DiscoveryBossBeanTest.xml
+++
b/modules/enterprise/server/jar/src/test/resources/org/rhq/enterprise/server/discovery/DiscoveryBossBeanTest.xml
@@ -10,6 +10,7 @@
mtime="123456"/>
<rhq_config_def/>
+ <rhq_config_pd_osrc/>
<rhq_config_prop_def/>
<rhq_conf_prop_def_enum/>
<rhq_config_prop_constr/>
diff --git
a/modules/enterprise/server/jar/src/test/resources/org/rhq/enterprise/server/inventory/InventoryManagerBeanTest.xml
b/modules/enterprise/server/jar/src/test/resources/org/rhq/enterprise/server/inventory/InventoryManagerBeanTest.xml
index 7e6ae2a..306297c 100644
---
a/modules/enterprise/server/jar/src/test/resources/org/rhq/enterprise/server/inventory/InventoryManagerBeanTest.xml
+++
b/modules/enterprise/server/jar/src/test/resources/org/rhq/enterprise/server/inventory/InventoryManagerBeanTest.xml
@@ -1,5 +1,6 @@
<dataset>
<rhq_config_def/>
+ <rhq_config_pd_osrc/>
<rhq_config_prop_def/>
<rhq_conf_prop_def_enum/>
<rhq_config_prop_constr/>
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>