Examples of AugeasProxy


Examples of org.rhq.augeas.AugeasProxy

        ApacheAugeasUtil apacheUtil = new ApacheAugeasUtil();
        try {
            //copy all configuration files to temporary folder
            String path = apacheUtil.prepareConfigFiles();
            //loading of augeas from temporary folder
            AugeasProxy proxy =
                apacheUtil.initAugeas(path + File.separator + ApacheTestConstants.ROOT_CONFIG_FILE_NAME, path, path);
            AugeasTree tree = proxy.getAugeasTree(ApacheTestConstants.MODULE_NAME, true);

            testLoadConfig(tree, cont);
            testSaveConfig(cont);
            apacheUtil.cleanConfigFiles();
        } catch (Exception e) {
View Full Code Here

Examples of org.rhq.augeas.AugeasProxy

    public void testSaveConfig(PluginContainer container) throws Exception {
        System.out.print("Test mapping of rhq configuration to augeas tree.");
        ApacheAugeasUtil apacheUtil = new ApacheAugeasUtil();
        //load augeas tree from temporary folder
        String path = ApacheTestConstants.getApacheConfigFilesPath();
        AugeasProxy proxy = apacheUtil.initAugeas(path + ApacheTestConstants.ROOT_CONFIG_FILE_NAME, path, path);
        AugeasTree tree = proxy.getAugeasTree(ApacheTestConstants.MODULE_NAME, true);
        //load augeas tree from temporary folder "updateconfig"
        String pathUpdate = ApacheTestConstants.getApacheConfigFilesPathForUpdate();
        AugeasProxy proxyUpdate =
            apacheUtil.initAugeas(pathUpdate + ApacheTestConstants.ROOT_CONFIG_FILE_NAME, pathUpdate, pathUpdate);
        AugeasTree treeUpdate = proxyUpdate.getAugeasTree(ApacheTestConstants.MODULE_NAME, true);

        for (Components component : Components.values()) {
            List<AugeasNode> nodes = component.getAllNodes(tree);
            ConfigurationDefinition configDef =
                ApacheConfigurationUtil.getConfigurationDefinition(container, component);
View Full Code Here

Examples of org.rhq.augeas.AugeasProxy

        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();

        return augeas;
    }
View Full Code Here

Examples of org.rhq.augeas.AugeasProxy

       public Configuration loadResourceConfiguration() throws Exception {
              Configuration pluginConfiguration = new Configuration();
             
              AugeasTree tree=null;
              AugeasProxy augeas =null;
              try {      
                      RhqConfig config = new RhqConfig(context.getPluginConfiguration());
                      augeas = new AugeasProxy(config);
                      augeas.load();
                      tree = augeas.getAugeasTree("Iptables", true);
                     
              }catch(Exception e)
              {
                     log.error(e.getMessage());
                    
View Full Code Here

Examples of org.rhq.augeas.AugeasProxy

      

       public void updateResourceConfiguration(ConfigurationUpdateReport report) {
              Configuration pluginConfiguration = new Configuration();
              AugeasTree tree=null;
              AugeasProxy augeas =null;
              try {      
                      RhqConfig config = new RhqConfig(context.getPluginConfiguration());
                      augeas = new AugeasProxy(config);
                     
                      tree = augeas.getAugeasTree("Iptables", false);
                     
                     
              }catch(Exception e)
              {
                     log.error(e);
View Full Code Here

Examples of org.rhq.augeas.AugeasProxy

             
       }

       public void loadAugeas() throws Exception{             
              RhqConfig config = new RhqConfig(context.getPluginConfiguration());
              augeasComponent = new AugeasProxy(config);
              augeasComponent.load();
              augeasTree = augeasComponent.getAugeasTree("Iptables", true);
                     
       }
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.