Package org.rhq.plugins.apache.mapping

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


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

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

                pluginConfiguration.put(new PropertySimple(ApacheDirectoryComponent.REGEXP_PROP, false));
                String dirNameToSet = AugeasNodeValueUtil.escape(directoryName);

                //now actually create the data in augeas
                try {
                    ApacheAugeasMapping mapping = new ApacheAugeasMapping(tree);
                    AugeasNode directoryNode = tree.createNode(myNode, "<Directory", null, seq);
                    String myNodeKey = AugeasNodeSearch.getNodeKey(myNode, tree.getRootNode());
                    tree.createNode(directoryNode, "param", dirNameToSet, 0);
                    mapping.updateAugeas(directoryNode, resourceConfiguration,
                        resourceType.getResourceConfigurationDefinition());

                    tree.save();
                    comp.close();
                    tree = comp.getAugeasTree(ApacheServerComponent.AUGEAS_HTTP_MODULE_NAME);
View Full Code Here

                String key = AugeasNodeSearch.getNodeKey(nodes.get(i), tree.getRootNode());
                Configuration config =
                    ApacheConfigurationUtil.componentToConfiguration(container, component, key, tree);
                AugeasNode updateNode = AugeasNodeSearch.findNodeById(treeUpdate.getRootNode(), key);

                ApacheAugeasMapping mapping = new ApacheAugeasMapping(treeUpdate);
                mapping.updateAugeas(updateNode, config, configDef);
            }
        }
        treeUpdate.save();
        //test if the updated augeas tree can be mapped to configuration stored at files in "loadconfig" temporary directory
        testLoadConfig(treeUpdate, container);
View Full Code Here

TOP

Related Classes of org.rhq.plugins.apache.mapping.ApacheAugeasMapping

Copyright © 2018 www.massapicom. 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.