return new ImageTemplateBuilder.CloneImageTemplateBuilder().nodeId(id).name(name.toLowerCase()).build();
}
@Override
public ListenableFuture<Image> createImage(ImageTemplate template) {
final CloneImageTemplate cloneTemplate = (CloneImageTemplate) template;
<BUG>final String id = cloneTemplate.getSourceNodeId();
final String name = cloneTemplate.getName();
logger.debug(">> stopping node %s...", id);

api.getVirtualMachineApi(group).stop(id);

checkState(nodeSuspendedPredicate.apply(id), "Node %s was not suspended within the configured time limit", id);
return userExecutor.submit(new Callable<Image>() {</BUG>
@Override

return new ImageTemplateBuilder.CloneImageTemplateBuilder().nodeId(id).name(name.toLowerCase()).build();
}
@Override
public ListenableFuture<Image> createImage(ImageTemplate template) {
final CloneImageTemplate cloneTemplate = (CloneImageTemplate) template;
final RegionAndId regionAndId = RegionAndId.fromSlashEncoded(cloneTemplate.getSourceNodeId());
final String group = locationToResourceGroupName.apply(regionAndId.region());
logger.debug(">> stopping node %s...", regionAndId.slashEncode());
api.getVirtualMachineApi(group).stop(regionAndId.id());
checkState(nodeSuspendedPredicate.create(group).apply(regionAndId.id()),
"Node %s was not suspended within the configured time limit", regionAndId.slashEncode());
return userExecutor.submit(new Callable<Image>() {
@Override
