Package org.jclouds.chef.domain

Examples of org.jclouds.chef.domain.BootstrapConfig$Builder


   public void testBuildBootstrapConfigurationWithNullConfig() {
      chefService.buildBootstrapConfiguration(null);
   }

   public void testBuildBootstrapConfigurationWithEmptyRunlist() {
      BootstrapConfig bootstrapConfig = BootstrapConfig.builder().runList(ImmutableList.<String> of()).build();
      String config = chefService.buildBootstrapConfiguration(bootstrapConfig);
      assertEquals(config, "{\"run_list\":[]}");
   }
View Full Code Here


      assertEquals(config, "{\"run_list\":[]}");
   }

   public void testBuildBootstrapConfigurationWithRunlist() {
      List<String> runlist = new RunListBuilder().addRecipe("apache2").addRole("webserver").build();
      BootstrapConfig bootstrapConfig = BootstrapConfig.builder().runList(runlist).build();
      String config = chefService.buildBootstrapConfiguration(bootstrapConfig);
      assertEquals(config, "{\"run_list\":[\"recipe[apache2]\",\"role[webserver]\"]}");
   }
View Full Code Here

      assertEquals(config, "{\"run_list\":[\"recipe[apache2]\",\"role[webserver]\"]}");
   }

   public void testBuildBootstrapConfigurationWithRunlistAndEmptyAttributes() {
      List<String> runlist = new RunListBuilder().addRecipe("apache2").addRole("webserver").build();
      BootstrapConfig bootstrapConfig = BootstrapConfig.builder().runList(runlist).attributes(new JsonBall("{}"))
            .build();
      String config = chefService.buildBootstrapConfiguration(bootstrapConfig);
      assertEquals(config, "{\"run_list\":[\"recipe[apache2]\",\"role[webserver]\"]}");
   }
View Full Code Here

      assertEquals(config, "{\"run_list\":[\"recipe[apache2]\",\"role[webserver]\"]}");
   }

   public void testBuildBootstrapConfigurationWithRunlistAndAttributes() {
      List<String> runlist = new RunListBuilder().addRecipe("apache2").addRole("webserver").build();
      BootstrapConfig bootstrapConfig = BootstrapConfig.builder().runList(runlist)
            .attributes(new JsonBall("{\"tomcat6\":{\"ssl_port\":8433}}")).build();
      String config = chefService.buildBootstrapConfiguration(bootstrapConfig);
      assertEquals(config, "{\"tomcat6\":{\"ssl_port\":8433},\"run_list\":[\"recipe[apache2]\",\"role[webserver]\"]}");
   }
View Full Code Here

      assertEquals(config, "{\"tomcat6\":{\"ssl_port\":8433},\"run_list\":[\"recipe[apache2]\",\"role[webserver]\"]}");
   }

   public void testBuildBootstrapConfigurationWithRunlistAndAttributesAndEnvironment() {
      List<String> runlist = new RunListBuilder().addRecipe("apache2").addRole("webserver").build();
      BootstrapConfig bootstrapConfig = BootstrapConfig.builder().runList(runlist)
            .attributes(new JsonBall("{\"tomcat6\":{\"ssl_port\":8433}}")).environment("env").build();
      String config = chefService.buildBootstrapConfiguration(bootstrapConfig);
      assertEquals(config,
            "{\"tomcat6\":{\"ssl_port\":8433},\"environment\":\"env\",\"run_list\":[\"recipe[apache2]\",\"role[webserver]\"]}");
   }
View Full Code Here

                    // Build the runlist for the deployed nodes
                    System.out.println("Configuring node runlist in the Chef server...");
                    List<String> runlist =
                            new RunListBuilder().addRecipes(recipes.split(",")).build();
                    BootstrapConfig config = BootstrapConfig.builder().runList(runlist).build();
                    chef.updateBootstrapConfigForGroup(groupName, config);
                    Statement chefServerBootstrap = chef.createBootstrapScriptForGroup(groupName);

                    // Run the script in the nodes of the group
                    System.out.printf(">> installing [%s] on group %s as %s%n", recipes, groupName,
View Full Code Here

   public void testBuildBootstrapConfigurationWithNullConfig() {
      chefService.buildBootstrapConfiguration(null);
   }

   public void testBuildBootstrapConfigurationWithEmptyRunlist() {
      BootstrapConfig bootstrapConfig = BootstrapConfig.builder().runList(ImmutableList.<String> of()).build();
      String config = chefService.buildBootstrapConfiguration(bootstrapConfig);
      assertEquals(config, "{\"run_list\":[]}");
   }
View Full Code Here

      assertEquals(config, "{\"run_list\":[]}");
   }

   public void testBuildBootstrapConfigurationWithRunlist() {
      List<String> runlist = new RunListBuilder().addRecipe("apache2").addRole("webserver").build();
      BootstrapConfig bootstrapConfig = BootstrapConfig.builder().runList(runlist).build();
      String config = chefService.buildBootstrapConfiguration(bootstrapConfig);
      assertEquals(config, "{\"run_list\":[\"recipe[apache2]\",\"role[webserver]\"]}");
   }
View Full Code Here

      assertEquals(config, "{\"run_list\":[\"recipe[apache2]\",\"role[webserver]\"]}");
   }

   public void testBuildBootstrapConfigurationWithRunlistAndEmptyAttributes() {
      List<String> runlist = new RunListBuilder().addRecipe("apache2").addRole("webserver").build();
      BootstrapConfig bootstrapConfig = BootstrapConfig.builder().runList(runlist).attributes(new JsonBall("{}"))
            .build();
      String config = chefService.buildBootstrapConfiguration(bootstrapConfig);
      assertEquals(config, "{\"run_list\":[\"recipe[apache2]\",\"role[webserver]\"]}");
   }
View Full Code Here

      assertEquals(config, "{\"run_list\":[\"recipe[apache2]\",\"role[webserver]\"]}");
   }

   public void testBuildBootstrapConfigurationWithRunlistAndAttributes() {
      List<String> runlist = new RunListBuilder().addRecipe("apache2").addRole("webserver").build();
      BootstrapConfig bootstrapConfig = BootstrapConfig.builder().runList(runlist)
            .attributes(new JsonBall("{\"tomcat6\":{\"ssl_port\":8433}}")).build();
      String config = chefService.buildBootstrapConfiguration(bootstrapConfig);
      assertEquals(config, "{\"run_list\":[\"recipe[apache2]\",\"role[webserver]\"],\"tomcat6\":{\"ssl_port\":8433}}");
   }
View Full Code Here

TOP

Related Classes of org.jclouds.chef.domain.BootstrapConfig$Builder

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.