Examples of auditDeployment()


Examples of org.rhq.core.pluginapi.bundle.BundleManagerProvider.auditDeployment()

                DeployDifferences diffs = project.getDeployDifferences();

                String msg = "Added files=" + diffs.getAddedFiles().size() + "; Deleted files="
                    + diffs.getDeletedFiles().size() + " (see attached details for more information)";
                String fullDetails = formatDiff(diffs);
                bundleManagerProvider.auditDeployment(resourceDeployment, "Deployment Differences", project.getName(),
                    DEPLOY_STEP, null, msg, fullDetails);
            } catch (Throwable t) {
                if (LOG.isDebugEnabled()) {
                    try {
                        LOG.debug(new String(StreamUtil.slurp(new FileInputStream(logFile))));
View Full Code Here

Examples of org.rhq.core.pluginapi.bundle.BundleManagerProvider.auditDeployment()

                    if (!externalDeleteSuccesses.isEmpty()) {
                        StringBuilder deleteSuccessesDetails = new StringBuilder();
                        for (String path : externalDeleteSuccesses) {
                            deleteSuccessesDetails.append(path).append("\n");
                        }
                        bundleManagerProvider.auditDeployment(deploymentToPurge, "Purge", "External files were purged",
                            AUDIT_MESSAGE, SUCCESS, "[" + externalDeleteSuccesses.size() + "] of ["
                                + totalExternalFiles
                                + "] external files were purged. See attached details for the list",
                            deleteSuccessesDetails.toString());
                    }
View Full Code Here

Examples of org.rhq.core.pluginapi.bundle.BundleManagerProvider.auditDeployment()

                    if (!externalDeleteFailures.isEmpty()) {
                        StringBuilder deleteFailuresDetails = new StringBuilder();
                        for (String path : externalDeleteFailures) {
                            deleteFailuresDetails.append(path).append("\n");
                        }
                        bundleManagerProvider.auditDeployment(deploymentToPurge, "Purge",
                            "External files failed to be purged", AUDIT_MESSAGE, FAILURE,
                            "[" + externalDeleteFailures.size() + "] of [" + totalExternalFiles
                                + "] external files failed to be purged. See attached details for the list",
                            deleteFailuresDetails.toString());
                    }
View Full Code Here

Examples of org.rhq.core.pluginapi.bundle.BundleManagerProvider.auditDeployment()

            // if we are managing the full deploy dir, completely purge the deployment directory.
            // otherwise, just report that we deleted what we were responsible for.
            if (manageAllDeployDir) {
                FileUtil.purge(deployDir, true);
                if (!deployDir.exists()) {
                    bundleManagerProvider.auditDeployment(deploymentToPurge, "Purge",
                        "The destination directory has been purged", AUDIT_MESSAGE, SUCCESS, "Directory purged: "
                            + deployDirAbsolutePath, null);
                } else {
                    bundleManagerProvider.auditDeployment(deploymentToPurge, "Purge",
                        "The destination directory failed to be purged", AUDIT_MESSAGE, FAILURE,
View Full Code Here

Examples of org.rhq.core.pluginapi.bundle.BundleManagerProvider.auditDeployment()

                if (!deployDir.exists()) {
                    bundleManagerProvider.auditDeployment(deploymentToPurge, "Purge",
                        "The destination directory has been purged", AUDIT_MESSAGE, SUCCESS, "Directory purged: "
                            + deployDirAbsolutePath, null);
                } else {
                    bundleManagerProvider.auditDeployment(deploymentToPurge, "Purge",
                        "The destination directory failed to be purged", AUDIT_MESSAGE, FAILURE,
                        "The directory that failed to be purged: " + deployDirAbsolutePath, null);
                }
            } else {
                if (!errorPurgingDeployDirContent) {
View Full Code Here

Examples of org.rhq.core.pluginapi.bundle.BundleManagerProvider.auditDeployment()

                        "The destination directory failed to be purged", AUDIT_MESSAGE, FAILURE,
                        "The directory that failed to be purged: " + deployDirAbsolutePath, null);
                }
            } else {
                if (!errorPurgingDeployDirContent) {
                    bundleManagerProvider.auditDeployment(deploymentToPurge, "Purge",
                        "The managed bundle content was removed from the destination directory; "
                            + "other unmanaged content may still remain", AUDIT_MESSAGE, SUCCESS, "Deploy Directory: "
                            + deployDirAbsolutePath, null);
                } else {
                    bundleManagerProvider.auditDeployment(deploymentToPurge, "Purge",
View Full Code Here

Examples of org.rhq.core.pluginapi.bundle.BundleManagerProvider.auditDeployment()

                    bundleManagerProvider.auditDeployment(deploymentToPurge, "Purge",
                        "The managed bundle content was removed from the destination directory; "
                            + "other unmanaged content may still remain", AUDIT_MESSAGE, SUCCESS, "Deploy Directory: "
                            + deployDirAbsolutePath, null);
                } else {
                    bundleManagerProvider.auditDeployment(deploymentToPurge, "Purge",
                        "Not all managed bundle content was able to be removed from the destination directory. "
                            + "That managed content along with other unmanaged content still remain", AUDIT_MESSAGE,
                        FAILURE, "Deploy Directory: " + deployDirAbsolutePath, null);
                }
View Full Code Here

Examples of org.rhq.core.pluginapi.bundle.BundleManagerProvider.auditDeployment()

                // make sure we remove the metadata directory, too - since it may still have sensitive files that were backed up
                if (metadataDirectoryToPurge != null) {
                    FileUtil.purge(metadataDirectoryToPurge, true);
                    if (metadataDirectoryToPurge.exists()) {
                        bundleManagerProvider.auditDeployment(deploymentToPurge, "Purge",
                            "Failed to purge the metadata directory from the destination directory. "
                                + "It may still contain backed up files from previous bundle deployments.",
                            AUDIT_MESSAGE, FAILURE,
                            "Metadata Directory: " + metadataDirectoryToPurge.getAbsolutePath(), null);
                    }
View Full Code Here

Examples of org.rhq.core.pluginapi.bundle.BundleManagerProvider.auditDeployment()

                StringWriter attachmentStringWriter = new StringWriter();
                PrintWriter attachmentPrintWriter = new PrintWriter(attachmentStringWriter, true);
                attachmentPrintWriter.println(bundleHandoverRequest);

                if (success) {
                    bundleManagerProvider.auditDeployment(resourceDeployment, "Handover",
                        "Successful content handover to bundle target resource", AUDIT_MESSAGE, SUCCESS,
                        handoverResponse.getMessage(), attachmentStringWriter.toString());
                } else {
                    String handoverFailure = getHandoverFailure(handoverResponse);
                    Throwable handoverResponseThrowable = handoverResponse.getThrowable();
View Full Code Here

Examples of org.rhq.core.pluginapi.bundle.BundleManagerProvider.auditDeployment()

                    if (handoverResponseThrowable != null) {
                        attachmentPrintWriter.println();
                        attachmentPrintWriter.println(ThrowableUtil.getAllMessages(handoverResponseThrowable));
                    }

                    bundleManagerProvider.auditDeployment(resourceDeployment, "Handover", handoverFailure,
                        AUDIT_MESSAGE, FAILURE, handoverResponse.getMessage(), attachmentStringWriter.toString());
                }
            } catch (Exception e) {
                LOG.warn("Unexpected failure while auditing deployment", e);
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.