Package org.jclouds.rackspace.autoscale.v1.domain

Examples of org.jclouds.rackspace.autoscale.v1.domain.GroupConfiguration$Builder


         GroupConfiguration groupConfiguration = GroupConfiguration.builder().maxEntities(10).cooldown(360)
               .name("testscalinggroup198547").minEntities(0)
               .metadata(ImmutableMap.of("gc_meta_key_2", "gc_meta_value_2", "gc_meta_key_1", "gc_meta_value_1"))
               .build();

         LaunchConfiguration launchConfiguration = LaunchConfiguration
               .builder()
               .loadBalancers(ImmutableList.of(LoadBalancer.builder().port(8080).id(9099).build()))
               .serverName("autoscale_server")
               .serverImageRef("57b8a366-ab2c-454b-939f-215303a4431f")
               .serverFlavorRef("2")
View Full Code Here


   @Test
   public void testGetGroupLaunchConfiguration() {
      for (String zone : api.getConfiguredZones()) {
         GroupApi groupApi = api.getGroupApiForZone(zone);
         String groupId = created.get(zone).get(0).getId();
         LaunchConfiguration testLaunchConfiguration = groupApi.getLaunchConfiguration(groupId);
         assertEquals(testLaunchConfiguration.getLoadBalancers().get(0).getPort(), 8080);
         assertEquals(testLaunchConfiguration.getType(), LaunchConfigurationType.LAUNCH_SERVER);
         assertEquals(testLaunchConfiguration.getServerFlavorRef(), "2");
      }
   }
View Full Code Here

   public void testUpdateLaunchConfiguration() {
      for (String zone : api.getConfiguredZones()) {
         GroupApi groupApi = api.getGroupApiForZone(zone);
         String groupId = created.get(zone).get(0).getId();

         LaunchConfiguration launchConfiguration = LaunchConfiguration
               .builder()
               .loadBalancers(ImmutableList.of(LoadBalancer.builder().port(8080).id(9099).build()))
               .serverName("autoscale_server")
               .serverImageRef("57b8a366-ab2c-454b-939f-215303a4431f")
               .serverFlavorRef("2")
View Full Code Here

         GroupConfiguration groupConfiguration = GroupConfiguration.builder().maxEntities(10).cooldown(3)
               .name("testscalinggroup198547").minEntities(0)
               .metadata(ImmutableMap.of("gc_meta_key_2", "gc_meta_value_2", "gc_meta_key_1", "gc_meta_value_1"))
               .build();

         LaunchConfiguration launchConfiguration = LaunchConfiguration
               .builder()
               .loadBalancers(ImmutableList.of(LoadBalancer.builder().port(8080).id(9099).build()))
               .serverName("autoscale_server")
               .serverImageRef("c52a0ca6-c1f2-4cd1-b7d6-afbcd1ebda22")
               .serverFlavorRef("2")
View Full Code Here

            .name("testscalinggroup198547")
            .minEntities(0)
            .metadata(ImmutableMap.of("gc_meta_key_2","gc_meta_value_2","gc_meta_key_1","gc_meta_value_1"))
            .build();

      LaunchConfiguration launchConfiguration = LaunchConfiguration.builder()
            .loadBalancers(ImmutableList.of(LoadBalancer.builder().port(8080).id(9099).build()))
            .serverName("autoscale_server")
            .serverImageRef("0d589460-f177-4b0f-81c1-8ab8903ac7d8")
            .serverFlavorRef("2")
            .serverDiskConfig("AUTO")
View Full Code Here

            .name("testscalinggroup198547")
            .minEntities(0)
            .metadata(ImmutableMap.of("gc_meta_key_2","gc_meta_value_2","gc_meta_key_1","gc_meta_value_1"))
            .build();

      LaunchConfiguration launchConfiguration = LaunchConfiguration.builder()
            .loadBalancers(ImmutableList.of(LoadBalancer.builder().port(8080).id(9099).build()))
            .serverName("autoscale_server")
            .serverImageRef("0d589460-f177-4b0f-81c1-8ab8903ac7d8")
            .serverFlavorRef("2")
            .serverDiskConfig("AUTO")
View Full Code Here

            authenticatedGET().endpoint(endpoint).build(),
            HttpResponse.builder().statusCode(200)
            .payload(payloadFromResource("/autoscale_groups_launch_configuration_get_response.json")).build())
            .getGroupApiForZone("DFW");

      LaunchConfiguration lc = api.getLaunchConfiguration("1234567890");
      assertEquals(lc.getServerName(), "webhead");
      assertEquals(lc.getType(), LaunchConfigurationType.LAUNCH_SERVER);
   }
View Full Code Here

            authenticatedGET().endpoint(endpoint).build(),
            HttpResponse.builder().statusCode(404)
            .payload(payloadFromResource("/autoscale_groups_launch_configuration_get_response.json")).build())
            .getGroupApiForZone("DFW");

      LaunchConfiguration lc = api.getLaunchConfiguration("1234567890");
      assertNull(lc);
   }
View Full Code Here

            .payload(payloadFromResourceWithContentType("/autoscale_groups_update_launch_configuration_request.json", MediaType.APPLICATION_JSON)).build(),
            HttpResponse.builder().statusCode(200)
            .build())
            .getGroupApiForZone("DFW");

      LaunchConfiguration lc = LaunchConfiguration.builder()
            .loadBalancers(ImmutableList.of(LoadBalancer.builder().port(8080).id(9099).build()))
            .serverName("autoscale_server")
            .serverImageRef("0d589460-f177-4b0f-81c1-8ab8903ac7d8")
            .serverFlavorRef("2")
            .serverDiskConfig("AUTO")
View Full Code Here

            .payload(payloadFromResourceWithContentType("/autoscale_groups_update_launch_configuration_request.json", MediaType.APPLICATION_JSON)).build(),
            HttpResponse.builder().statusCode(404)
            .build())
            .getGroupApiForZone("DFW");

      LaunchConfiguration lc = LaunchConfiguration.builder()
            .loadBalancers(ImmutableList.of(LoadBalancer.builder().port(8080).id(9099).build()))
            .serverName("autoscale_server")
            .serverImageRef("0d589460-f177-4b0f-81c1-8ab8903ac7d8")
            .serverFlavorRef("2")
            .serverDiskConfig("AUTO")
View Full Code Here

TOP

Related Classes of org.jclouds.rackspace.autoscale.v1.domain.GroupConfiguration$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.