Examples of ApacheAugeasMapping


Examples of org.rhq.plugins.apache.mapping.ApacheAugeasMapping

        AugeasTree tree = null;
        try {
            tree = comp.getAugeasTree(ApacheServerComponent.AUGEAS_HTTP_MODULE_NAME);
            AugeasNode directoryNode = parentComponent.getNode(tree);

            ApacheAugeasMapping mapping = new ApacheAugeasMapping(tree);
            return mapping.updateConfiguration(getNode(directoryNode), resourceConfigDef);
        } finally {
            comp.close();
        }
    }
View Full Code Here

Examples of org.rhq.plugins.apache.mapping.ApacheAugeasMapping

        AugeasComponent comp = parentComponent.getAugeas();
        AugeasTree tree = null;
        try {
            tree = comp.getAugeasTree(ApacheServerComponent.AUGEAS_HTTP_MODULE_NAME);
            ConfigurationDefinition resourceConfigDef = context.getResourceType().getResourceConfigurationDefinition();
            ApacheAugeasMapping mapping = new ApacheAugeasMapping(tree);
            AugeasNode directoryNode = getNode(parentComponent.getNode(tree));
            mapping.updateAugeas(directoryNode, report.getConfiguration(), resourceConfigDef);
            tree.save();

            report.setStatus(ConfigurationUpdateStatus.SUCCESS);
            log.info("Apache configuration was updated");
View Full Code Here

Examples of org.rhq.plugins.apache.mapping.ApacheAugeasMapping

        try {
            ConfigurationDefinition resourceConfigDef = resourceContext.getResourceType()
                .getResourceConfigurationDefinition();

            AugeasTree tree = comp.getAugeasTree(AUGEAS_HTTP_MODULE_NAME);
            ApacheAugeasMapping mapping = new ApacheAugeasMapping(tree);
            return mapping.updateConfiguration(tree.getRootNode(), resourceConfigDef);
        } catch (Exception e) {
            LOG.error("Failed to load Apache configuration.", e);
            throw e;
        } finally {
            comp.close();
View Full Code Here

Examples of org.rhq.plugins.apache.mapping.ApacheAugeasMapping

        AugeasTree tree = null;
        try {
            tree = comp.getAugeasTree(AUGEAS_HTTP_MODULE_NAME);
            ConfigurationDefinition resourceConfigDef = resourceContext.getResourceType()
                .getResourceConfigurationDefinition();
            ApacheAugeasMapping mapping = new ApacheAugeasMapping(tree);

            mapping.updateAugeas(tree.getRootNode(), report.getConfiguration(), resourceConfigDef);
            tree.save();

            LOG.info("Apache configuration was updated");
            report.setStatus(ConfigurationUpdateStatus.SUCCESS);
View Full Code Here

Examples of org.rhq.plugins.apache.mapping.ApacheAugeasMapping

                } else {
                    try {
                        for (int i = 0; i < vhostDefs.length; ++i) {
                            tree.createNode(vhost, "param", vhostDefs[i], i + 1);
                        }
                        ApacheAugeasMapping mapping = new ApacheAugeasMapping(tree);
                        mapping.updateAugeas(vhost, vhostResourceConfig, vhostResourceConfigDef);

                        tree.save();
                        report.setStatus(CreateResourceStatus.SUCCESS);

                        finishChildResourceCreate(report);
View Full Code Here

Examples of org.rhq.plugins.apache.mapping.ApacheAugeasMapping

        try {
            AugeasTree tree = comp.getAugeasTree(ApacheServerComponent.AUGEAS_HTTP_MODULE_NAME);
            ConfigurationDefinition resourceConfigDef =
                resourceContext.getResourceType().getResourceConfigurationDefinition();

            ApacheAugeasMapping mapping = new ApacheAugeasMapping(tree);
            return mapping.updateConfiguration(getNode(tree), resourceConfigDef);
        } finally {
            comp.close();
        }
    }
View Full Code Here

Examples of org.rhq.plugins.apache.mapping.ApacheAugeasMapping

        AugeasTree tree = null;
        try {
            tree = comp.getAugeasTree(ApacheServerComponent.AUGEAS_HTTP_MODULE_NAME);
            ConfigurationDefinition resourceConfigDef =
                resourceContext.getResourceType().getResourceConfigurationDefinition();
            ApacheAugeasMapping mapping = new ApacheAugeasMapping(tree);
            AugeasNode directoryNode = getNode(tree);
            mapping.updateAugeas(directoryNode, report.getConfiguration(), resourceConfigDef);
            tree.save();

            report.setStatus(ConfigurationUpdateStatus.SUCCESS);
            log.info("Apache configuration was updated");
View Full Code Here

Examples of org.rhq.plugins.apache.mapping.ApacheAugeasMapping

    public static Configuration componentToConfiguration(PluginContainer container, Components component, String key,
        AugeasTree tree) throws UnitTestException {
        ConfigurationDefinition def = getConfigurationDefinition(container, component);
        AugeasNode node = AugeasNodeSearch.findNodeById(tree.getRootNode(), key);
        ApacheAugeasMapping map = new ApacheAugeasMapping(tree);
        Configuration config = map.updateConfiguration(node, def);
        return config;
    }
View Full Code Here

Examples of org.rhq.plugins.apache.mapping.ApacheAugeasMapping

            comp = parentComponent.getAugeas();
            AugeasTree tree = comp.getAugeasTree(ApacheServerComponent.AUGEAS_HTTP_MODULE_NAME);
            ConfigurationDefinition resourceConfigDef = context.getResourceType().getResourceConfigurationDefinition();

            AugeasNode virtualHostNode = parentComponent.getNode(tree);
            ApacheAugeasMapping mapping = new ApacheAugeasMapping(tree);
            return mapping.updateConfiguration(getNode(virtualHostNode), resourceConfigDef);
        } finally {
            if (comp != null)
                comp.close();
        }
    }
View Full Code Here

Examples of org.rhq.plugins.apache.mapping.ApacheAugeasMapping

        AugeasTree tree = null;
        try {
            comp = parentComponent.getAugeas();
            tree = comp.getAugeasTree(ApacheServerComponent.AUGEAS_HTTP_MODULE_NAME);
            ConfigurationDefinition resourceConfigDef = context.getResourceType().getResourceConfigurationDefinition();
            ApacheAugeasMapping mapping = new ApacheAugeasMapping(tree);

            AugeasNode directoryNode = getNode(parentComponent.getNode(tree));
            mapping.updateAugeas(directoryNode, report.getConfiguration(), resourceConfigDef);
            tree.save();

            report.setStatus(ConfigurationUpdateStatus.SUCCESS);
            log.info("Apache configuration was updated");
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.