org.jclouds.virtualbox.compute.extensions
Class VirtualBoxImageExtension

java.lang.Object
  extended by org.jclouds.virtualbox.compute.extensions.VirtualBoxImageExtension
All Implemented Interfaces:
ImageExtension

@Singleton
public class VirtualBoxImageExtension
extends Object
implements ImageExtension

Virtualbox implementation of ImageExtension

Author:
David Alves

Constructor Summary
VirtualBoxImageExtension(ComputeServiceAdapter<org.virtualbox_4_1.IMachine,Hardware,Image,Location> vboxAdapter, com.google.common.base.Function<org.virtualbox_4_1.IMachine,NodeMetadata> machineToNode, com.google.common.base.Supplier<org.virtualbox_4_1.VirtualBoxManager> manager, String workingDir, com.google.common.base.Function<org.virtualbox_4_1.IMachine,Image> imachineToImage, MachineUtils machineUtils)
           
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VirtualBoxImageExtension

@Inject
public VirtualBoxImageExtension(ComputeServiceAdapter<org.virtualbox_4_1.IMachine,Hardware,Image,Location> vboxAdapter,
                                       com.google.common.base.Function<org.virtualbox_4_1.IMachine,NodeMetadata> machineToNode,
                                       com.google.common.base.Supplier<org.virtualbox_4_1.VirtualBoxManager> manager,
                                       @Named(value="jclouds.virtualbox.workingdir")
                                       String workingDir,
                                       com.google.common.base.Function<org.virtualbox_4_1.IMachine,Image> imachineToImage,
                                       MachineUtils machineUtils)
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 new Image.

Specified by:
buildImageTemplateFromNode in interface ImageExtension
Parameters:
name - name to give the new image
id - 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 the ImageTemplate on an Image that can be used to create nodes.

Specified by:
createImage in interface ImageExtension
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 an Image on the provider.

Specified by:
deleteImage in interface ImageExtension
Parameters:
id - the id of the image to delete
Returns:


Copyright © 2009-2012 jclouds. All Rights Reserved.