getLog().info("image create init [" + imageName() + "]");
final CarrotElasticCompute compute = newElasticCompute();
final Image image = compute.imageCreate( //
imageInstanceId(), //
imageName(), //
imageDescription //
);
final ImageState state = ImageState.fromValue(image.getState());
switch (state) {
case AVAILABLE:
break;
default:
throw new IllegalStateException("image create failed : \n"
+ image);
}
final String imageId = image.getImageId();
/** publish result */
project().getProperties().put(imageResultProperty, image);
project().getProperties().put(imageIdResultProperty, imageId);
/** tag image */
compute.tagCreate(imageId, amazonTagName(), imageName());
/** tag image devices */
for (final BlockDeviceMapping blockDevice : image
.getBlockDeviceMappings()) {
final EbsBlockDevice elasticDevice = blockDevice.getEbs();
if (elasticDevice == null) {