fixed a cloudservers bug

This commit is contained in:
David Ribeiro Alves 2012-05-10 18:27:49 +01:00
parent f63c5a44c6
commit fe7d426e2e
2 changed files with 6 additions and 5 deletions

View File

@ -63,14 +63,15 @@ public final class GetImageWhenStatusActivePredicateWithResult implements Predic
result = checkNotNull(findImage(input)); result = checkNotNull(findImage(input));
switch (result.getStatus()) { switch (result.getStatus()) {
case ACTIVE: case ACTIVE:
logger.info("<< Image %s is available for use.", input); logger.info("<< Image %s is available for use. %s", input, result);
return true; return true;
case QUEUED: case QUEUED:
case PREPARING:
case SAVING: case SAVING:
logger.debug("<< Image %s is not available yet.", input); logger.debug("<< Image %s is not available yet. %s", input, result);
return false; return false;
default: default:
lastFailure = new IllegalStateException("Image was not created: " + input); lastFailure = new IllegalStateException("Image " + input + " was not created. " + result);
throw lastFailure; throw lastFailure;
} }
} }

View File

@ -138,8 +138,8 @@ public class Image {
@Override @Override
public String toString() { public String toString() {
return "Image [created=" + created + ", id=" + id + ", name=" + name + ", serverId=" return "Image [created=" + created + ", id=" + id + ", name=" + name + ", serverId=" + serverId + ", status="
+ serverId + "]"; + status + "]";
} }
} }