@Singleton public class CloudServersImageExtension extends Object implements ImageExtension
ImageExtension
Constructor and Description |
---|
CloudServersImageExtension(CloudServersClient client,
com.google.common.util.concurrent.ListeningExecutorService userExecutor,
com.google.common.base.Supplier<Location> location,
com.google.common.base.Predicate<AtomicReference<Image>> imageAvailablePredicate) |
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 CloudServersImageExtension(CloudServersClient client, @Named(value="jclouds.user-threads") com.google.common.util.concurrent.ListeningExecutorService userExecutor, com.google.common.base.Supplier<Location> location, @Named(value="jclouds.compute.timeout.image-available") com.google.common.base.Predicate<AtomicReference<Image>> imageAvailablePredicate)
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.