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

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


         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


      this.jsonBinder = jsonBinder;
   }

   @Override   
   public <R extends HttpRequest> R bindToRequest(R request, Map<String, Object> postParams) {
      ScalingPolicy scalingPolicy = (ScalingPolicy) postParams.get("scalingPolicy");
      return jsonBinder.bindToRequest(request, ParseHelper.buildScalingPolicyMap(scalingPolicy));
   }
View Full Code Here

                                       .contents("VGhpcyBpcyBhIHRlc3QgZmlsZS4=").build()))
                                       .type(LaunchConfigurationType.LAUNCH_SERVER).build();

         List<ScalingPolicy> scalingPolicies = Lists.newArrayList();

         ScalingPolicy scalingPolicy = ScalingPolicy.builder().cooldown(1).type(ScalingPolicyType.WEBHOOK)
               .name("scale up by 1").targetType(ScalingPolicyTargetType.INCREMENTAL).target("1").build();
         scalingPolicies.add(scalingPolicy);

         Group g = groupApi.create(groupConfiguration, launchConfiguration, scalingPolicies);
         createdGroupList.add(g);
View Full Code Here

                                       .contents("VGhpcyBpcyBhIHRlc3QgZmlsZS4=").build()))
                                       .type(LaunchConfigurationType.LAUNCH_SERVER).build();

         List<ScalingPolicy> scalingPolicies = Lists.newArrayList();

         ScalingPolicy scalingPolicy = ScalingPolicy.builder().cooldown(3).type(ScalingPolicyType.WEBHOOK)
               .name("scale up by 1").targetType(ScalingPolicyTargetType.INCREMENTAL).target("1").build();
         scalingPolicies.add(scalingPolicy);

         Group g = groupApi.create(groupConfiguration, launchConfiguration, scalingPolicies);
         createdGroupList.add(g);
View Full Code Here

         PolicyApi policyApi = api.getPolicyApiForGroupInZone(created.get(zone).get(0).getId(), zone);

         List<ScalingPolicy> scalingPolicies = Lists.newArrayList();

         ScalingPolicy scalingPolicy = ScalingPolicy.builder()
               .cooldown(3)
               .type(ScalingPolicyType.WEBHOOK)
               .name("scale up by one server")
               .targetType(ScalingPolicyTargetType.INCREMENTAL)
               .target("1")
View Full Code Here

         PolicyApi policyApi = api.getPolicyApiForGroupInZone(created.get(zone).get(0).getId(), zone);

         List<ScalingPolicy> scalingPolicies = Lists.newArrayList();

         ScalingPolicy scalingPolicy = ScalingPolicy.builder()
               .cooldown(3)
               .type(ScalingPolicyType.WEBHOOK)
               .name("scale up by one server")
               .targetType(ScalingPolicyTargetType.INCREMENTAL)
               .target("1")
               .build();
         scalingPolicies.add(scalingPolicy);

         ScalingPolicy updated = ScalingPolicy.builder()
               .cooldown(3)
               .type(ScalingPolicyType.WEBHOOK)
               .name("scale up by 2 PERCENT server")
               .targetType(ScalingPolicyTargetType.PERCENT_CHANGE)
               .target("2")
View Full Code Here

         PolicyApi policyApi = api.getPolicyApiForGroupInZone(created.get(zone).get(0).getId(), zone);

         List<ScalingPolicy> scalingPolicies = Lists.newArrayList();

         ScalingPolicy scalingPolicy = ScalingPolicy.builder()
               .cooldown(3)
               .type(ScalingPolicyType.WEBHOOK)
               .name("scale up by one server")
               .targetType(ScalingPolicyTargetType.INCREMENTAL)
               .target("1")
View Full Code Here

         PolicyApi policyApi = api.getPolicyApiForGroupInZone(created.get(zone).get(0).getId(), zone);

         List<ScalingPolicy> scalingPolicies = Lists.newArrayList();

         ScalingPolicy scalingPolicy = ScalingPolicy.builder()
               .cooldown(3)
               .type(ScalingPolicyType.WEBHOOK)
               .name("scale up by 0 server")
               .targetType(ScalingPolicyTargetType.INCREMENTAL)
               .target("1")
View Full Code Here

               }
            }

            List<ScalingPolicy> scalingPolicies = Lists.newArrayList();

            ScalingPolicy scalingPolicy = ScalingPolicy.builder()
                  .cooldown(3)
                  .type(ScalingPolicyType.WEBHOOK)
                  .name("0 machines")
                  .targetType(ScalingPolicyTargetType.DESIRED_CAPACITY)
                  .target("0")
View Full Code Here

            .type(LaunchConfigurationType.LAUNCH_SERVER)
            .build();

      List<ScalingPolicy> scalingPolicies = Lists.newArrayList();

      ScalingPolicy scalingPolicy = ScalingPolicy.builder()
            .cooldown(0)
            .type(ScalingPolicyType.WEBHOOK)
            .name("scale up by 1")
            .targetType(ScalingPolicyTargetType.INCREMENTAL)
            .target("1")
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.