Class CloudStackImageExtension
- java.lang.Object
-
- org.jclouds.cloudstack.compute.extensions.CloudStackImageExtension
-
- All Implemented Interfaces:
ImageExtension
@Singleton public class CloudStackImageExtension extends Object implements ImageExtension
CloudStack implementation ofImageExtension
-
-
Constructor Summary
Constructors Constructor 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)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ImageTemplate
buildImageTemplateFromNode(String name, String id)
Build an ImageTemplate from a running node, to use later to create a newImage
.com.google.common.util.concurrent.ListenableFuture<Image>
createImage(ImageTemplate template)
Transform theImageTemplate
on anImage
that can be used to create nodes.boolean
deleteImage(String id)
Delete anImage
on the provider.
-
-
-
Field Detail
-
logger
@Named("jclouds.compute") protected Logger logger
-
-
Constructor Detail
-
CloudStackImageExtension
@Inject public CloudStackImageExtension(CloudStackApi client, @Named("jclouds.user-threads") com.google.common.util.concurrent.ListeningExecutorService userExecutor, com.google.common.base.Supplier<Set<? extends Location>> locations, @Named("jclouds.compute.timeout.image-available") com.google.common.base.Predicate<AtomicReference<Image>> imageAvailablePredicate, BlockUntilJobCompletesAndReturnResult blockUntilJobCompletesAndReturnResult, com.google.common.base.Predicate<String> jobComplete)
-
-
Method Detail
-
buildImageTemplateFromNode
public ImageTemplate buildImageTemplateFromNode(String name, String id)
Description copied from interface:ImageExtension
Build an ImageTemplate from a running node, to use later to create a newImage
.- Specified by:
buildImageTemplateFromNode
in interfaceImageExtension
- Parameters:
name
- name to give the new imageid
- node to base the template on- Returns:
- an image template that can be used to create a new image
-
createImage
public com.google.common.util.concurrent.ListenableFuture<Image> createImage(ImageTemplate template)
Description copied from interface:ImageExtension
Transform theImageTemplate
on anImage
that can be used to create nodes.- Specified by:
createImage
in interfaceImageExtension
- Parameters:
template
- template to base the new image on- Returns:
- the image that was just built *after* it is registered on the provider
-
deleteImage
public boolean deleteImage(String id)
Description copied from interface:ImageExtension
Delete anImage
on the provider.- Specified by:
deleteImage
in interfaceImageExtension
- Parameters:
id
- the id of the image to delete- Returns:
-
-