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));
switch (result.getStatus()) {
case ACTIVE:
logger.info("<< Image %s is available for use.", input);
logger.info("<< Image %s is available for use. %s", input, result);
return true;
case QUEUED:
case PREPARING:
case SAVING:
logger.debug("<< Image %s is not available yet.", input);
logger.debug("<< Image %s is not available yet. %s", input, result);
return false;
default:
lastFailure = new IllegalStateException("Image was not created: " + input);
lastFailure = new IllegalStateException("Image " + input + " was not created. " + result);
throw lastFailure;
}
}

View File

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