modules/common/ant-bundle/src/main/java/org/rhq/bundle/ant/BundleAntProject.java | 4 ++-- modules/common/ant-bundle/src/main/java/org/rhq/bundle/ant/task/AuditTask.java | 4 ++-- modules/common/ant-bundle/src/main/java/org/rhq/bundle/ant/type/DeploymentUnitType.java | 6 +++--- modules/core/domain/src/main/java/org/rhq/core/domain/bundle/BundleResourceDeploymentHistory.java | 3 ++- modules/core/plugin-container/src/main/java/org/rhq/core/pc/bundle/BundleManager.java | 1 + modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/deployment/BundleResourceDeploymentHistoryListView.java | 4 ++++ modules/enterprise/gui/coregui/src/main/webapp/images/subsystems/bundle/Info_11.png |binary 7 files changed, 14 insertions(+), 8 deletions(-)
New commits: commit 18eb7dd0a7d96e58b1e470a31a92ee46a8af9129 Author: John Mazzitelli mazz@redhat.com Date: Mon Jan 10 14:22:58 2011 -0500
add INFO audit status so we can log things that aren't warning but the user should know about in the audit trail (e.g. a clean-deployment was requested and thus the target dir will be purged before the deployment happens)
diff --git a/modules/common/ant-bundle/src/main/java/org/rhq/bundle/ant/BundleAntProject.java b/modules/common/ant-bundle/src/main/java/org/rhq/bundle/ant/BundleAntProject.java index 1beb540..3c7921d 100644 --- a/modules/common/ant-bundle/src/main/java/org/rhq/bundle/ant/BundleAntProject.java +++ b/modules/common/ant-bundle/src/main/java/org/rhq/bundle/ant/BundleAntProject.java @@ -52,7 +52,7 @@ import org.rhq.core.util.updater.DeployDifferences; public class BundleAntProject extends Project { // these statuses should match those of see BundleResourceDeploymentHistory.Status public enum AuditStatus { - SUCCESS, FAILURE, WARN + SUCCESS, FAILURE, WARN, INFO };
// Bundle-level attributes @@ -180,7 +180,7 @@ public class BundleAntProject extends Project { * When running in the agent, this audit log will be sent to the server. * It is always logged at part of the normal Ant logger mechanism. * - * @param status SUCCESS, FAILURE or WARN + * @param status SUCCESS, FAILURE, WARN, INFO * @param action audit action, a short summary easily displayed (e.g "File Download") * @param info information about the action target, easily displayed (e.g. "myfile.zip") * @param message Optional, brief (one or two lines) information message diff --git a/modules/common/ant-bundle/src/main/java/org/rhq/bundle/ant/task/AuditTask.java b/modules/common/ant-bundle/src/main/java/org/rhq/bundle/ant/task/AuditTask.java index 19f284b..ffdd646 100644 --- a/modules/common/ant-bundle/src/main/java/org/rhq/bundle/ant/task/AuditTask.java +++ b/modules/common/ant-bundle/src/main/java/org/rhq/bundle/ant/task/AuditTask.java @@ -26,7 +26,7 @@ import org.rhq.bundle.ant.BundleAntProject.AuditStatus; * The rhq:audit task is a way recipe authors can add their own audit messages to the stream * of audit messages that the server gets to see how the progress went with the provisioning of a bundle. * - * <rhq:audit status='SUCCESS|WARN|FAILURE' action="My Step" info="summary info" message="intermediate details"> + * <rhq:audit status='SUCCESS|INFO|WARN|FAILURE' action="My Step" info="summary info" message="intermediate details"> * long details here * </rhq:audit> * @@ -60,7 +60,7 @@ public class AuditTask extends AbstractBundleTask { try { this.status = AuditStatus.valueOf(status.toUpperCase()); } catch (Exception e) { - throw new BuildException("The 'status' attribute must be either 'SUCCESS', 'WARN' or 'FAILURE'"); + throw new BuildException("The 'status' attribute must be either 'SUCCESS', 'INFO', 'WARN' or 'FAILURE'"); } } } diff --git a/modules/common/ant-bundle/src/main/java/org/rhq/bundle/ant/type/DeploymentUnitType.java b/modules/common/ant-bundle/src/main/java/org/rhq/bundle/ant/type/DeploymentUnitType.java index dfcbcab..162ba4d 100644 --- a/modules/common/ant-bundle/src/main/java/org/rhq/bundle/ant/type/DeploymentUnitType.java +++ b/modules/common/ant-bundle/src/main/java/org/rhq/bundle/ant/type/DeploymentUnitType.java @@ -85,7 +85,7 @@ public class DeploymentUnitType extends AbstractBundleType { public void install(boolean revert, boolean clean) throws BuildException { if (clean) { getProject().auditLog( - AuditStatus.WARN, + AuditStatus.INFO, "Clean Requested", "A clean deployment has been requested. Files will be deleted!", "A clean deployment has been requested. Files will be deleted" @@ -93,7 +93,7 @@ public class DeploymentUnitType extends AbstractBundleType { } if (revert) { getProject().auditLog( - AuditStatus.WARN, + AuditStatus.INFO, "Revert Requested", "The previous deployment will be reverted!", "The previous deployment will be reverted. An attempt to restore" @@ -162,7 +162,7 @@ public class DeploymentUnitType extends AbstractBundleType { if (!dryRun) { getProject() .auditLog( - AuditStatus.WARN, + AuditStatus.INFO, "Managing Top Level Deployment Directory", "The top level deployment directory will be managed - files found there will be backed up and removed!", "The bundle recipe has requested that the top level deployment directory be fully managed by RHQ." diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/bundle/BundleResourceDeploymentHistory.java b/modules/core/domain/src/main/java/org/rhq/core/domain/bundle/BundleResourceDeploymentHistory.java index b7f28fc..b04e257 100644 --- a/modules/core/domain/src/main/java/org/rhq/core/domain/bundle/BundleResourceDeploymentHistory.java +++ b/modules/core/domain/src/main/java/org/rhq/core/domain/bundle/BundleResourceDeploymentHistory.java @@ -209,7 +209,8 @@ public class BundleResourceDeploymentHistory implements Serializable { public enum Status { SUCCESS("Success"), // FAILURE("Failure"), // - WARN("Warning"); + WARN("Warning"), // + INFO("Information"); // used mainly for informational audit messages
private String displayName;
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/deployment/BundleResourceDeploymentHistoryListView.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/deployment/BundleResourceDeploymentHistoryListView.java index 60f5007..5c66158 100644 --- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/deployment/BundleResourceDeploymentHistoryListView.java +++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/bundle/deployment/BundleResourceDeploymentHistoryListView.java @@ -74,6 +74,10 @@ public class BundleResourceDeploymentHistoryListView extends LocatableVLayout { statusIcons.put(BundleDeploymentStatus.FAILURE.name(), "subsystems/bundle/Error_11.png"); statusIcons.put(BundleDeploymentStatus.MIXED.name(), "subsystems/bundle/Warning_11.png"); statusIcons.put(BundleDeploymentStatus.SUCCESS.name(), "subsystems/bundle/Ok_11.png"); + // bundle deployment history statuses are success/failure/warn/info - two of which have the same names/icons + // as bundle-deployment-status. however, there is no "warn" or "info" in bundle-deployment-status, so add them here + statusIcons.put(BundleResourceDeploymentHistory.Status.WARN.name(), "subsystems/bundle/Warning_11.png"); + statusIcons.put(BundleResourceDeploymentHistory.Status.INFO.name(), "subsystems/bundle/Info_11.png"); }
@Override diff --git a/modules/enterprise/gui/coregui/src/main/webapp/images/subsystems/bundle/Info_11.png b/modules/enterprise/gui/coregui/src/main/webapp/images/subsystems/bundle/Info_11.png new file mode 100644 index 0000000..78ed9aa Binary files /dev/null and b/modules/enterprise/gui/coregui/src/main/webapp/images/subsystems/bundle/Info_11.png differ
commit 94d2aa12b2ab7ee1bd0a0fc4a7ed1b16fadf4108 Author: John Mazzitelli mazz@redhat.com Date: Mon Jan 10 13:09:24 2011 -0500
make sure we create the bundle file directory otherwise, potential errors occur later on
diff --git a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/bundle/BundleManager.java b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/bundle/BundleManager.java index cf9c025..8f1525b 100644 --- a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/bundle/BundleManager.java +++ b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/bundle/BundleManager.java @@ -159,6 +159,7 @@ public class BundleManager extends AgentService implements BundleAgentService, B File pluginTmpDir = resourceContainer.getResourceContext().getTemporaryDirectory(); File bundleFilesDir = new File(pluginTmpDir, "bundle-versions/" + bundleDeployment.getBundleVersion().getId()); + bundleFilesDir.mkdirs(); Map<PackageVersion, File> downloadedFiles = downloadBundleFiles(resourceDeployment, bundleFilesDir);
rhq-commits@lists.fedorahosted.org