@Singleton public class CloudStackImageExtension extends Object implements ImageExtension
ImageExtension
Constructor and Description |
---|
CloudStackImageExtension(CloudStackApi client,
com.google.common.util.concurrent.ListeningExecutorService userExecutor,
com.google.common.base.Supplier<Set<? extends Location>> locations,
com.google.common.base.Predicate<AtomicReference<Image>> imageAvailablePredicate,
BlockUntilJobCompletesAndReturnResult blockUntilJobCompletesAndReturnResult,
com.google.common.base.Predicate<String> jobComplete) |
Modifier and Type | Method and Description |
---|---|
ImageTemplate |
buildImageTemplateFromNode(String name,
String id)
Build an ImageTemplate from a running node, to use later to create a new
Image . |
com.google.common.util.concurrent.ListenableFuture<Image> |
createImage(ImageTemplate template)
Transform the
ImageTemplate on an Image that can be used to create nodes. |
boolean |
deleteImage(String id)
Delete an
Image on the provider. |
@Named(value="jclouds.compute") protected Logger logger
@Inject public CloudStackImageExtension(CloudStackApi client, @Named(value="jclouds.user-threads") com.google.common.util.concurrent.ListeningExecutorService userExecutor, com.google.common.base.Supplier<Set<? extends Location>> locations, @Named(value="jclouds.compute.timeout.image-available") com.google.common.base.Predicate<AtomicReference<Image>> imageAvailablePredicate, BlockUntilJobCompletesAndReturnResult blockUntilJobCompletesAndReturnResult, com.google.common.base.Predicate<String> jobComplete)
public ImageTemplate buildImageTemplateFromNode(String name, String id)
ImageExtension
Image
.buildImageTemplateFromNode
in interface ImageExtension
name
- name to give the new imageid
- node to base the template onpublic com.google.common.util.concurrent.ListenableFuture<Image> createImage(ImageTemplate template)
ImageExtension
ImageTemplate
on an Image
that can be used to create nodes.createImage
in interface ImageExtension
template
- template to base the new image onpublic boolean deleteImage(String id)
ImageExtension
Image
on the provider.deleteImage
in interface ImageExtension
id
- the id of the image to deleteCopyright © 2009-2014 The Apache Software Foundation. All Rights Reserved.