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

Examples of com.elastisys.scale.cloudadapters.commons.adapter.scalinggroup.ScalingGroupException


      LOG.info("terminating instance {}", machineId);
      this.client.terminateInstance(machineId);
    } catch (Exception e) {
      String message = format("failed to terminate instance \"%s\": %s",
          machineId, e.getMessage());
      throw new ScalingGroupException(message);
    }
  }
View Full Code Here


          .launchInstance(scaleUpConfig);
      // refresh meta data
      return this.client.getInstanceMetadata(launchedInstance
          .getInstanceId());
    } catch (Exception e) {
      throw new ScalingGroupException(format(
          "failed to launch instance: %s", e.getMessage()), e);
    }
  }
View Full Code Here

      String ipAddress = awaitIp.call();
      LOG.debug("instance was assigned public IP address {}", ipAddress);
      // re-read instance meta data
      return this.client.getInstanceMetadata(instance.getInstanceId());
    } catch (Exception e) {
      throw new ScalingGroupException(
          format("gave up waiting for instance \"%s\" to be assigned a public IP address: %s",
              instance.getInstanceId(), e.getMessage()), e);
    }
  }
View Full Code Here

    try {
      this.client.tagInstance(instance.getInstanceId(),
          Arrays.asList(nameTag, scalingGroupTag));
    } catch (Exception e) {
      throw new ScalingGroupException(String.format(
          "failed to set \"%s\" tag on instance \"%s\": %s",
          Constants.SCALING_GROUP_TAG, instance.getInstanceId(),
          e.getMessage()), e);
    }
    return this.client.getInstanceMetadata(instance.getInstanceId());
View Full Code Here

      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

      group.addAll(acquiredInstances);
      group.addAll(requestedInstances);
      LOG.debug("scaling group members: {}", group);
      return group;
    } catch (Exception e) {
      throw new ScalingGroupException(format(
          "failed to retrieve machines in scaling group \"%s\": %s",
          getScalingGroupName(), e.getMessage()), e);
    }
  }
View Full Code Here

      LOG.info("terminating instance {}", machineId);
      this.client.terminateInstance(getScalingGroupName(), machineId);
    } catch (Exception e) {
      String message = format("failed to terminate instance \"%s\": %s",
          machineId, e.getMessage());
      throw new ScalingGroupException(message);
    }
  }
View Full Code Here

      String ipAddress = awaitIp.call();
      LOG.info("instance was assigned public IP address {}", ipAddress);
      // re-read instance meta data
      return this.client.getInstanceMetadata(instanceId);
    } catch (Exception e) {
      throw new ScalingGroupException(format(
          "gave up waiting for instance \"%s\" to be "
              + "assigned a public IP address: %s", instanceId,
          e.getMessage()), e);
    }
  }
View Full Code Here

TOP

Related Classes of com.elastisys.scale.cloudadapters.commons.adapter.scalinggroup.ScalingGroupException

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.