checkState(uri != null && imageAvailablePredicate.apply(uri),
"Image %s was not created within the configured time limit", cloneTemplate.getName());
List<ResourceDefinition> definitions = api.getJobApi().captureStatus(uri);
checkState(definitions.size() == 1,
"Expected one resource definition after creating the image but %s were returned", definitions.size());
<BUG>Image image = resourceDefinitionToImage.create(id, name).apply(definitions.get(0));
logger.debug(">> created %s", image);</BUG>
return image;
}
});

checkState(uri != null && imageAvailablePredicate.apply(uri),
"Image %s was not created within the configured time limit", cloneTemplate.getName());
List<ResourceDefinition> definitions = api.getJobApi().captureStatus(uri);
checkState(definitions.size() == 1,
"Expected one resource definition after creating the image but %s were returned", definitions.size());
Image image = resourceDefinitionToImage.create(cloneTemplate.getSourceNodeId(), cloneTemplate.getName())
.apply(definitions.get(0));
logger.debug(">> created %s", image);
return image;
}
});
