Package com.elastisys.scale.cloudadapters.commons.adapter.BaseCloudAdapterConfig

Examples of com.elastisys.scale.cloudadapters.commons.adapter.BaseCloudAdapterConfig.ScalingGroupConfig


  }

  @Override
  public void configure(BaseCloudAdapterConfig configuration)
      throws ScalingGroupException {
    ScalingGroupConfig scalingGroupConfig = configuration.getScalingGroup();
    checkArgument(scalingGroupConfig != null, "missing scalingGroup config");

    try {
      // validate against client config schema
      JsonValidator.validate(CONFIG_SCHEMA,
          scalingGroupConfig.getConfig());
      // parse and validate cloud login configuration
      OpenStackScalingGroupConfig config = JsonUtils.toObject(
          scalingGroupConfig.getConfig(),
          OpenStackScalingGroupConfig.class);
      config.validate();
      this.config.set(config);
      this.scalingGroupName.set(scalingGroupConfig.getName());
      this.client.configure(config);
    } catch (Exception e) {
      Throwables.propagateIfInstanceOf(e, ScalingGroupException.class);
      throw new ScalingGroupException(String.format(
          "failed to apply configuration: %s", e.getMessage()), e);
View Full Code Here


  }

  @Override
  public void configure(BaseCloudAdapterConfig configuration)
      throws ScalingGroupException {
    ScalingGroupConfig scalingGroupConfig = configuration.getScalingGroup();
    checkArgument(scalingGroupConfig != null, "missing scalingGroup config");
    try {
      // validate against client config schema
      JsonValidator.validate(JSON_SCHEMA, scalingGroupConfig.getConfig());
      // parse and validate cloud login configuration
      Ec2ScalingGroupConfig config = JsonUtils
          .toObject(scalingGroupConfig.getConfig(),
              Ec2ScalingGroupConfig.class);
      config.validate();
      this.config.set(config);
      this.scalingGroupName.set(scalingGroupConfig.getName());
      this.client.configure(config);
    } catch (Exception e) {
      throw new ScalingGroupException(format(
          "failed to apply configuration: %s", e.getMessage()), e);
    }
View Full Code Here

  @Override
  public void configure(BaseCloudAdapterConfig configuration)
      throws ScalingGroupException {
    checkArgument(configuration != null, "config cannot be null");
    ScalingGroupConfig scalingGroup = configuration.getScalingGroup();
    checkArgument(scalingGroup != null, "missing scalingGroup config");

    try {
      // validate against client config schema
      JsonValidator.validate(CONFIG_SCHEMA, scalingGroup.getConfig());
      // parse and validate cloud login configuration
      AwsAsScalingGroupConfig config = JsonUtils.toObject(
          scalingGroup.getConfig(), AwsAsScalingGroupConfig.class);
      config.validate();
      this.config.set(config);
      this.scalingGroupName.set(scalingGroup.getName());
      this.client.configure(config);
    } catch (Exception e) {
      Throwables.propagateIfInstanceOf(e, ScalingGroupException.class);
      throw new ScalingGroupException(String.format(
          "failed to apply configuration: %s", e.getMessage()));
View Full Code Here

TOP

Related Classes of com.elastisys.scale.cloudadapters.commons.adapter.BaseCloudAdapterConfig.ScalingGroupConfig

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.