added missing spot state: closed

This commit is contained in:
Adrian Cole 2011-03-08 15:01:13 -08:00
parent fb4714cf33
commit f778dd3987
1 changed files with 3 additions and 2 deletions

View File

@ -57,8 +57,9 @@ public class SpotInstanceRequestActive implements Predicate<SpotInstanceRequest>
spot = refresh(spot); spot = refresh(spot);
logger.trace("%s: looking for spot state %s: currently: %s", spot.getId(), SpotInstanceRequest.State.ACTIVE, logger.trace("%s: looking for spot state %s: currently: %s", spot.getId(), SpotInstanceRequest.State.ACTIVE,
spot.getState()); spot.getState());
if (spot.getState() == SpotInstanceRequest.State.CANCELLED) if (spot.getState() == SpotInstanceRequest.State.CANCELLED
throw new IllegalStateException(String.format("spot request %s cancelled", spot.getId())); || spot.getState() == SpotInstanceRequest.State.CLOSED)
throw new IllegalStateException(String.format("spot request %s %s", spot.getId(), spot.getState()));
if (spot.getFaultCode() != null) if (spot.getFaultCode() != null)
throw new IllegalStateException(String.format("spot request %s fault code(%s) message(%s)", spot.getId(), throw new IllegalStateException(String.format("spot request %s fault code(%s) message(%s)", spot.getId(),
spot.getFaultCode(), spot.getFaultMessage())); spot.getFaultCode(), spot.getFaultMessage()));