public boolean apply(RunningInstance instance) { logger.trace("looking for instance %s", instance); try { instance = refresh(instance); return true; } catch (ResourceNotFoundException e) { return false; } catch (NoSuchElementException e) { return false; } }
@Override @BeforeClass(groups = { "integration", "live" }) public void setupContext() { super.setupContext(); client = view.unwrapApi(AWSEC2Api.class); availableTester = retry(new PlacementGroupAvailable(client), 60, 1, SECONDS); deletedTester = retry(new PlacementGroupDeleted(client), 60, 1, SECONDS); }
public boolean apply(PlacementGroup group) { logger.trace("looking for state on group %s", group); try { group = refresh(group); } catch (NoSuchElementException e) { return true; } logger.trace("%s: looking for group state %s: currently: %s", group.getName(), PlacementGroup.State.DELETED, group.getState()); return group.getState() == PlacementGroup.State.DELETED; }
public boolean apply(PlacementGroup group) { logger.trace("looking for state on group %s", group); try { group = refresh(group); logger.trace("%s: looking for group state %s: currently: %s", group.getName(), PlacementGroup.State.AVAILABLE, group.getState()); return group.getState() == PlacementGroup.State.AVAILABLE; } catch (ResourceNotFoundException e) { return false; } catch (NoSuchElementException e) { return false; } }
public boolean apply(SpotInstanceRequest spot) { logger.trace("looking for state on spot %s", spot); try { spot = refresh(spot); logger.trace("%s: looking for spot state %s: currently: %s", spot.getId(), SpotInstanceRequest.State.ACTIVE, spot.getState()); if (spot.getState() == SpotInstanceRequest.State.CANCELLED || spot.getState() == SpotInstanceRequest.State.CLOSED) throw new IllegalStateException(String.format("spot request %s %s", spot.getId(), spot.getState())); if (spot.getFaultCode() != null) throw new IllegalStateException(String.format("spot request %s fault code(%s) message(%s)", spot.getId(), spot.getFaultCode(), spot.getFaultMessage())); return spot.getState() == SpotInstanceRequest.State.ACTIVE; } catch (ResourceNotFoundException e) { return false; } catch (NoSuchElementException e) { return false; } }
public boolean apply(RunningInstance instance) { logger.trace("looking for ipAddress on instance %s", instance); try { instance = refresh(instance); return instance.getIpAddress() != null; } catch (AWSResponseException e) { if (e.getError().getCode().equals("InvalidInstanceID.NotFound")) return false; throw e; } }
public boolean apply(RunningInstance instance) { logger.trace("looking for state on instance %s", instance); try { instance = refresh(instance); } catch (NoSuchElementException e) { return true; } logger.trace("%s: looking for instance state %s: currently: %s", instance.getId(), InstanceState.TERMINATED, instance.getInstanceState()); return instance.getInstanceState() == InstanceState.TERMINATED; }
public boolean apply(RunningInstance instance) { logger.trace("looking for state on instance %s", instance); try { instance = refresh(instance); logger.trace("%s: looking for instance state %s: currently: %s", instance.getId(), InstanceState.RUNNING, instance .getInstanceState()); return instance.getInstanceState() == InstanceState.RUNNING; } catch (ResourceNotFoundException e) { return false; } }
public boolean apply(RunningInstance instance) { logger.trace("looking for state on instance %s", instance); instance = refresh(instance); logger.trace("%s: looking for instance state %s: currently: %s", instance.getId(), InstanceState.STOPPED, instance.getInstanceState()); return instance.getInstanceState() == InstanceState.STOPPED; }
@Override @BeforeClass(groups = { "integration", "live" }) public void setupContext() { super.setupContext(); client = view.unwrapApi(AWSEC2Api.class); activeTester = retry(new SpotInstanceRequestActive(client), SPOT_DELAY_SECONDS, 1, 1, SECONDS); }
public boolean apply(PlacementGroup group) { logger.trace("looking for state on group %s", group); try { group = refresh(group); } catch (NoSuchElementException e) { return true; } logger.trace("%s: looking for group state %s: currently: %s", group.getName(), PlacementGroup.State.DELETED, group.getState()); return group.getState() == PlacementGroup.State.DELETED; }
public boolean apply(PlacementGroup group) { logger.trace("looking for state on group %s", group); try { group = refresh(group); logger.trace("%s: looking for group state %s: currently: %s", group.getName(), PlacementGroup.State.AVAILABLE, group.getState()); return group.getState() == PlacementGroup.State.AVAILABLE; } catch (ResourceNotFoundException e) { return false; } catch (NoSuchElementException e) { return false; } }
public boolean apply(SpotInstanceRequest spot) { logger.trace("looking for state on spot %s", spot); try { spot = refresh(spot); logger.trace("%s: looking for spot state %s: currently: %s", spot.getId(), SpotInstanceRequest.State.ACTIVE, spot.getState()); if (spot.getState() == SpotInstanceRequest.State.CANCELLED || spot.getState() == SpotInstanceRequest.State.CLOSED) throw new IllegalStateException(String.format("spot request %s %s", spot.getId(), spot.getState())); if (spot.getFaultCode() != null) throw new IllegalStateException(String.format("spot request %s fault code(%s) message(%s)", spot.getId(), spot.getFaultCode(), spot.getFaultMessage())); return spot.getState() == SpotInstanceRequest.State.ACTIVE; } catch (ResourceNotFoundException e) { return false; } catch (NoSuchElementException e) { return false; } }
public boolean apply(PlacementGroup group) { logger.trace("looking for state on group %s", group); try { group = refresh(group); } catch (NoSuchElementException e) { return true; } logger.trace("%s: looking for group state %s: currently: %s", group.getName(), PlacementGroup.State.DELETED, group.getState()); return group.getState() == PlacementGroup.State.DELETED; }
public boolean apply(PlacementGroup group) { logger.trace("looking for state on group %s", group); try { group = refresh(group); logger.trace("%s: looking for group state %s: currently: %s", group.getName(), PlacementGroup.State.AVAILABLE, group.getState()); return group.getState() == PlacementGroup.State.AVAILABLE; } catch (ResourceNotFoundException e) { return false; } catch (NoSuchElementException e) { return false; } }
public boolean apply(SpotInstanceRequest spot) { logger.trace("looking for state on spot %s", spot); try { spot = refresh(spot); logger.trace("%s: looking for spot state %s: currently: %s", spot.getId(), SpotInstanceRequest.State.ACTIVE, spot.getState()); if (spot.getState() == SpotInstanceRequest.State.CANCELLED || spot.getState() == SpotInstanceRequest.State.CLOSED) throw new IllegalStateException(String.format("spot request %s %s", spot.getId(), spot.getState())); if (spot.getFaultCode() != null) throw new IllegalStateException(String.format("spot request %s fault code(%s) message(%s)", spot.getId(), spot.getFaultCode(), spot.getFaultMessage())); return spot.getState() == SpotInstanceRequest.State.ACTIVE; } catch (ResourceNotFoundException e) { return false; } catch (NoSuchElementException e) { return false; } }
public boolean apply(PlacementGroup group) { logger.trace("looking for state on group %s", group); try { group = refresh(group); } catch (NoSuchElementException e) { return true; } logger.trace("%s: looking for group state %s: currently: %s", group.getName(), PlacementGroup.State.DELETED, group.getState()); return group.getState() == PlacementGroup.State.DELETED; }
public boolean apply(PlacementGroup group) { logger.trace("looking for state on group %s", group); try { group = refresh(group); logger.trace("%s: looking for group state %s: currently: %s", group.getName(), PlacementGroup.State.AVAILABLE, group.getState()); return group.getState() == PlacementGroup.State.AVAILABLE; } catch (ResourceNotFoundException e) { return false; } catch (NoSuchElementException e) { return false; } }