Examples of AugeasConfigurationApache


Examples of org.rhq.plugins.apache.augeas.AugeasConfigurationApache

            @Override
            public AugeasConfiguration initConfiguration() {
                File tempDir = resourceContext.getDataDirectory();
                if (!tempDir.exists())
                    throw new RuntimeException("Loading of lens failed");
                AugeasConfigurationApache config = new AugeasConfigurationApache(tempDir.getAbsolutePath(),
                    resourceContext.getPluginConfiguration());
                return config;
            }

            @Override
View Full Code Here

Examples of org.rhq.plugins.apache.augeas.AugeasConfigurationApache

                        vhostFile = getNewVhostFileName(addr, mask);
                        File vhostFileFile = new File(vhostFile);

                        //we're creating a new file here, so we must ensure that Augeas does have this file
                        //on its load path, otherwise it will refuse to create it.
                        AugeasConfigurationApache config = (AugeasConfigurationApache) comp.getConfiguration();
                        AugeasModuleConfig moduleConfig = config.getModuleByName(config.getAugeasModuleName());
                        boolean willPersist = false;
                        for (String glob : moduleConfig.getIncludedGlobs()) {
                            if (Glob.matches(getServerRoot(), glob, vhostFileFile)) {
                                willPersist = true;
                                break;
View Full Code Here

Examples of org.rhq.plugins.apache.augeas.AugeasConfigurationApache

    /**
     * Tests if all included configuration files were loaded.
     */
    public void testFiles(AugeasProxy augeas) {
        System.out.print("Test if all included configuration files was discovered and loaded.");
        AugeasConfigurationApache config = (AugeasConfigurationApache) augeas.getConfiguration();
        List<File> configFiles = config.getAllConfigurationFiles();

        /*
         * There are three files one main file one which is included from main file and one which is included from
         * included file and which is declared in IfModule. All of them must be discovered.
         */
 
View Full Code Here

Examples of org.rhq.plugins.apache.augeas.AugeasConfigurationApache

        Configuration configuration = new Configuration();
        configuration.put(new PropertySimple("configurationFilesInclusionPatterns", configFilePath));
        configuration.put(new PropertySimple("augeasModuleName", ApacheTestConstants.MODULE_NAME));
        configuration.put(new PropertySimple(ApacheTestConstants.PLUGIN_CONFIG_PROP_SERVER_ROOT, serverRootPath));

        AugeasConfigurationApache conf = new AugeasConfigurationApache(lensPath, configuration);
        AugeasTreeBuilderApache builder = new AugeasTreeBuilderApache();
        AugeasProxy augeas = new AugeasProxy(conf, builder);

        augeas.load();
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.