org.dasein.cloud.azure.compute.image
Class AzureOSImage

java.lang.Object
  extended by org.dasein.cloud.compute.AbstractImageSupport
      extended by org.dasein.cloud.azure.compute.image.AzureOSImage
All Implemented Interfaces:
AccessControlledService, MachineImageSupport

public class AzureOSImage
extends AbstractImageSupport

Implements support for Azure OS images through the Dasein Cloud machine image API.

Since:
2012.04.1
Version:
2012.04.1
Author:
George Reese (george.reese@imaginary.com)

Field Summary
 
Fields inherited from interface org.dasein.cloud.compute.MachineImageSupport
ANY, DOWNLOAD_IMAGE, GET_IMAGE, IMAGE_VM, LIST_IMAGE, MAKE_PUBLIC, REGISTER_IMAGE, REMOVE_IMAGE, SHARE_IMAGE, UPLOAD_IMAGE
 
Constructor Summary
AzureOSImage(Azure provider)
           
 
Method Summary
 void bundleVirtualMachineAsync(String virtualMachineId, MachineImageFormat format, String bucket, String name, AsynchronousTask<String> trackingTask)
           
protected  MachineImage capture(ImageCreateOptions options, AsynchronousTask<MachineImage> task)
           
 MachineImage getImage(String machineImageId)
           
 String getProviderTermForCustomImage(Locale locale, ImageClass cls)
           
 String getProviderTermForImage(Locale locale)
           
 String getProviderTermForImage(Locale locale, ImageClass cls)
           
 boolean hasPublicLibrary()
           
 Requirement identifyLocalBundlingRequirement()
           
 boolean isImageSharedWithPublic(String machineImageId)
           
 boolean isSubscribed()
           
 Iterable<MachineImage> listImages(ImageClass cls)
           
 Iterable<MachineImage> listImages(ImageClass cls, String ownedBy)
           
 Iterable<MachineImage> listImages(ImageFilterOptions imageFilterOptions)
           
 Iterable<ResourceStatus> listImageStatus(ImageClass cls)
           
 ArrayList<MachineImage> listMachineImages()
           
 Iterable<MachineImage> listMachineImagesOwnedBy(String accountId)
           
 Iterable<String> listShares(String forMachineImageId)
           
 Iterable<MachineImageFormat> listSupportedFormats()
           
 Iterable<MachineImageFormat> listSupportedFormatsForBundling()
           
 Iterable<ImageClass> listSupportedImageClasses()
           
 Iterable<MachineImageType> listSupportedImageTypes()
           
 String[] mapServiceAction(ServiceAction action)
           
 MachineImage registerImageBundle(ImageCreateOptions options)
           
 void remove(String machineImageId)
           
 void remove(String providerImageId, boolean checkState)
           
 void removeAllImageShares(String providerImageId)
           
 void removeImageShare(String providerImageId, String accountNumber)
           
 void removePublicShare(String providerImageId)
           
 void removeTags(String[] strings, Tag... tags)
           
 void removeTags(String s, Tag... tags)
           
 Iterable<MachineImage> searchImages(String accountNumber, String keyword, Platform platform, Architecture architecture, ImageClass... imageClasses)
           
 Iterable<MachineImage> searchMachineImages(String keyword, Platform platform, Architecture architecture)
           
 Iterable<MachineImage> searchPublicImages(ImageFilterOptions imageFilterOptions)
           
 Iterable<MachineImage> searchPublicImages(String keyword, Platform platform, Architecture architecture, ImageClass... imageClasses)
           
 boolean supportsCustomImages()
           
 boolean supportsDirectImageUpload()
           
 boolean supportsImageCapture(MachineImageType type)
           
 boolean supportsImageSharing()
           
 boolean supportsImageSharingWithPublic()
           
 boolean supportsPublicLibrary(ImageClass cls)
           
 ResourceStatus toStatus(ProviderContext ctx, Node entry)
           
 void updateTags(String[] strings, Tag... tags)
           
 void updateTags(String imageId, Tag... tags)
           
 
Methods inherited from class org.dasein.cloud.compute.AbstractImageSupport
addImageShare, addPublicShare, bundleVirtualMachine, captureImage, captureImageAsync, getContext, getMachineImage, getProvider, imageVirtualMachine, matches, shareMachineImage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AzureOSImage

public AzureOSImage(Azure provider)
Method Detail

bundleVirtualMachineAsync

public void bundleVirtualMachineAsync(@Nonnull
                                      String virtualMachineId,
                                      @Nonnull
                                      MachineImageFormat format,
                                      @Nonnull
                                      String bucket,
                                      @Nonnull
                                      String name,
                                      @Nonnull
                                      AsynchronousTask<String> trackingTask)
                               throws CloudException,
                                      InternalException
Specified by:
bundleVirtualMachineAsync in interface MachineImageSupport
Overrides:
bundleVirtualMachineAsync in class AbstractImageSupport
Throws:
CloudException
InternalException

capture

@Nonnull
protected MachineImage capture(@Nonnull
                                       ImageCreateOptions options,
                                       @Nullable
                                       AsynchronousTask<MachineImage> task)
                        throws CloudException,
                               InternalException
Overrides:
capture in class AbstractImageSupport
Throws:
CloudException
InternalException

getImage

public MachineImage getImage(@Nonnull
                             String machineImageId)
                      throws CloudException,
                             InternalException
Throws:
CloudException
InternalException

getProviderTermForImage

@Nonnull
public String getProviderTermForImage(@Nonnull
                                              Locale locale)
Specified by:
getProviderTermForImage in interface MachineImageSupport
Overrides:
getProviderTermForImage in class AbstractImageSupport

getProviderTermForImage

@Nonnull
public String getProviderTermForImage(@Nonnull
                                              Locale locale,
                                              @Nonnull
                                              ImageClass cls)

getProviderTermForCustomImage

@Nonnull
public String getProviderTermForCustomImage(@Nonnull
                                                    Locale locale,
                                                    @Nonnull
                                                    ImageClass cls)
Specified by:
getProviderTermForCustomImage in interface MachineImageSupport
Overrides:
getProviderTermForCustomImage in class AbstractImageSupport

hasPublicLibrary

public boolean hasPublicLibrary()
Specified by:
hasPublicLibrary in interface MachineImageSupport
Overrides:
hasPublicLibrary in class AbstractImageSupport

identifyLocalBundlingRequirement

@Nonnull
public Requirement identifyLocalBundlingRequirement()
                                             throws CloudException,
                                                    InternalException
Specified by:
identifyLocalBundlingRequirement in interface MachineImageSupport
Overrides:
identifyLocalBundlingRequirement in class AbstractImageSupport
Throws:
CloudException
InternalException

isImageSharedWithPublic

public boolean isImageSharedWithPublic(@Nonnull
                                       String machineImageId)
                                throws CloudException,
                                       InternalException
Specified by:
isImageSharedWithPublic in interface MachineImageSupport
Overrides:
isImageSharedWithPublic in class AbstractImageSupport
Throws:
CloudException
InternalException

isSubscribed

public boolean isSubscribed()
                     throws CloudException,
                            InternalException
Throws:
CloudException
InternalException

listImageStatus

@Nonnull
public Iterable<ResourceStatus> listImageStatus(@Nonnull
                                                        ImageClass cls)
                                         throws CloudException,
                                                InternalException
Specified by:
listImageStatus in interface MachineImageSupport
Overrides:
listImageStatus in class AbstractImageSupport
Throws:
CloudException
InternalException

toStatus

public ResourceStatus toStatus(@Nonnull
                               ProviderContext ctx,
                               @Nullable
                               Node entry)
                        throws CloudException,
                               InternalException
Throws:
CloudException
InternalException

listImages

@Nonnull
public Iterable<MachineImage> listImages(@Nullable
                                                 ImageFilterOptions imageFilterOptions)
                                  throws CloudException,
                                         InternalException
Throws:
CloudException
InternalException

listImages

@Nonnull
public Iterable<MachineImage> listImages(@Nonnull
                                                 ImageClass cls)
                                  throws CloudException,
                                         InternalException
Specified by:
listImages in interface MachineImageSupport
Overrides:
listImages in class AbstractImageSupport
Throws:
CloudException
InternalException

listImages

@Nonnull
public Iterable<MachineImage> listImages(@Nonnull
                                                 ImageClass cls,
                                                 @Nonnull
                                                 String ownedBy)
                                  throws CloudException,
                                         InternalException
Specified by:
listImages in interface MachineImageSupport
Overrides:
listImages in class AbstractImageSupport
Throws:
CloudException
InternalException

listMachineImages

@Nonnull
public ArrayList<MachineImage> listMachineImages()
                                          throws CloudException,
                                                 InternalException
Specified by:
listMachineImages in interface MachineImageSupport
Overrides:
listMachineImages in class AbstractImageSupport
Throws:
CloudException
InternalException

listMachineImagesOwnedBy

@Nonnull
public Iterable<MachineImage> listMachineImagesOwnedBy(String accountId)
                                                throws CloudException,
                                                       InternalException
Specified by:
listMachineImagesOwnedBy in interface MachineImageSupport
Overrides:
listMachineImagesOwnedBy in class AbstractImageSupport
Throws:
CloudException
InternalException

listSupportedFormats

@Nonnull
public Iterable<MachineImageFormat> listSupportedFormats()
                                                  throws CloudException,
                                                         InternalException
Specified by:
listSupportedFormats in interface MachineImageSupport
Overrides:
listSupportedFormats in class AbstractImageSupport
Throws:
CloudException
InternalException

listSupportedFormatsForBundling

@Nonnull
public Iterable<MachineImageFormat> listSupportedFormatsForBundling()
                                                             throws CloudException,
                                                                    InternalException
Specified by:
listSupportedFormatsForBundling in interface MachineImageSupport
Overrides:
listSupportedFormatsForBundling in class AbstractImageSupport
Throws:
CloudException
InternalException

listShares

@Nonnull
public Iterable<String> listShares(@Nonnull
                                           String forMachineImageId)
                            throws CloudException,
                                   InternalException
Specified by:
listShares in interface MachineImageSupport
Overrides:
listShares in class AbstractImageSupport
Throws:
CloudException
InternalException

listSupportedImageClasses

@Nonnull
public Iterable<ImageClass> listSupportedImageClasses()
                                               throws CloudException,
                                                      InternalException
Specified by:
listSupportedImageClasses in interface MachineImageSupport
Overrides:
listSupportedImageClasses in class AbstractImageSupport
Throws:
CloudException
InternalException

listSupportedImageTypes

@Nonnull
public Iterable<MachineImageType> listSupportedImageTypes()
                                                   throws CloudException,
                                                          InternalException
Specified by:
listSupportedImageTypes in interface MachineImageSupport
Overrides:
listSupportedImageTypes in class AbstractImageSupport
Throws:
CloudException
InternalException

registerImageBundle

@Nonnull
public MachineImage registerImageBundle(@Nonnull
                                                ImageCreateOptions options)
                                 throws CloudException,
                                        InternalException
Specified by:
registerImageBundle in interface MachineImageSupport
Overrides:
registerImageBundle in class AbstractImageSupport
Throws:
CloudException
InternalException

remove

public void remove(@Nonnull
                   String machineImageId)
            throws CloudException,
                   InternalException
Specified by:
remove in interface MachineImageSupport
Overrides:
remove in class AbstractImageSupport
Throws:
CloudException
InternalException

remove

public void remove(@Nonnull
                   String providerImageId,
                   boolean checkState)
            throws CloudException,
                   InternalException
Throws:
CloudException
InternalException

removeAllImageShares

public void removeAllImageShares(@Nonnull
                                 String providerImageId)
                          throws CloudException,
                                 InternalException
Specified by:
removeAllImageShares in interface MachineImageSupport
Overrides:
removeAllImageShares in class AbstractImageSupport
Throws:
CloudException
InternalException

removeImageShare

public void removeImageShare(@Nonnull
                             String providerImageId,
                             @Nonnull
                             String accountNumber)
                      throws CloudException,
                             InternalException
Specified by:
removeImageShare in interface MachineImageSupport
Overrides:
removeImageShare in class AbstractImageSupport
Throws:
CloudException
InternalException

removePublicShare

public void removePublicShare(@Nonnull
                              String providerImageId)
                       throws CloudException,
                              InternalException
Specified by:
removePublicShare in interface MachineImageSupport
Overrides:
removePublicShare in class AbstractImageSupport
Throws:
CloudException
InternalException

searchMachineImages

@Nonnull
public Iterable<MachineImage> searchMachineImages(@Nullable
                                                          String keyword,
                                                          @Nullable
                                                          Platform platform,
                                                          @Nullable
                                                          Architecture architecture)
                                           throws CloudException,
                                                  InternalException
Specified by:
searchMachineImages in interface MachineImageSupport
Overrides:
searchMachineImages in class AbstractImageSupport
Throws:
CloudException
InternalException

searchPublicImages

@Nonnull
public Iterable<MachineImage> searchPublicImages(@Nonnull
                                                         ImageFilterOptions imageFilterOptions)
                                          throws InternalException,
                                                 CloudException
Specified by:
searchPublicImages in interface MachineImageSupport
Overrides:
searchPublicImages in class AbstractImageSupport
Throws:
InternalException
CloudException

searchImages

@Nonnull
public Iterable<MachineImage> searchImages(@Nullable
                                                   String accountNumber,
                                                   @Nullable
                                                   String keyword,
                                                   @Nullable
                                                   Platform platform,
                                                   @Nullable
                                                   Architecture architecture,
                                                   @Nullable
                                                   ImageClass... imageClasses)
                                    throws CloudException,
                                           InternalException
Specified by:
searchImages in interface MachineImageSupport
Overrides:
searchImages in class AbstractImageSupport
Throws:
CloudException
InternalException

searchPublicImages

@Nonnull
public Iterable<MachineImage> searchPublicImages(@Nullable
                                                         String keyword,
                                                         @Nullable
                                                         Platform platform,
                                                         @Nullable
                                                         Architecture architecture,
                                                         @Nullable
                                                         ImageClass... imageClasses)
                                          throws CloudException,
                                                 InternalException
Specified by:
searchPublicImages in interface MachineImageSupport
Overrides:
searchPublicImages in class AbstractImageSupport
Throws:
CloudException
InternalException

supportsCustomImages

public boolean supportsCustomImages()
Specified by:
supportsCustomImages in interface MachineImageSupport
Overrides:
supportsCustomImages in class AbstractImageSupport

supportsDirectImageUpload

public boolean supportsDirectImageUpload()
                                  throws CloudException,
                                         InternalException
Specified by:
supportsDirectImageUpload in interface MachineImageSupport
Overrides:
supportsDirectImageUpload in class AbstractImageSupport
Throws:
CloudException
InternalException

supportsImageCapture

public boolean supportsImageCapture(@Nonnull
                                    MachineImageType type)
                             throws CloudException,
                                    InternalException
Specified by:
supportsImageCapture in interface MachineImageSupport
Overrides:
supportsImageCapture in class AbstractImageSupport
Throws:
CloudException
InternalException

supportsImageSharing

public boolean supportsImageSharing()
Specified by:
supportsImageSharing in interface MachineImageSupport
Overrides:
supportsImageSharing in class AbstractImageSupport

supportsImageSharingWithPublic

public boolean supportsImageSharingWithPublic()
Specified by:
supportsImageSharingWithPublic in interface MachineImageSupport
Overrides:
supportsImageSharingWithPublic in class AbstractImageSupport

supportsPublicLibrary

public boolean supportsPublicLibrary(@Nonnull
                                     ImageClass cls)
                              throws CloudException,
                                     InternalException
Specified by:
supportsPublicLibrary in interface MachineImageSupport
Overrides:
supportsPublicLibrary in class AbstractImageSupport
Throws:
CloudException
InternalException

updateTags

public void updateTags(@Nonnull
                       String imageId,
                       @Nonnull
                       Tag... tags)
                throws CloudException,
                       InternalException
Specified by:
updateTags in interface MachineImageSupport
Overrides:
updateTags in class AbstractImageSupport
Throws:
CloudException
InternalException

updateTags

public void updateTags(@Nonnull
                       String[] strings,
                       @Nonnull
                       Tag... tags)
                throws CloudException,
                       InternalException
Specified by:
updateTags in interface MachineImageSupport
Overrides:
updateTags in class AbstractImageSupport
Throws:
CloudException
InternalException

removeTags

public void removeTags(@Nonnull
                       String s,
                       @Nonnull
                       Tag... tags)
                throws CloudException,
                       InternalException
Specified by:
removeTags in interface MachineImageSupport
Overrides:
removeTags in class AbstractImageSupport
Throws:
CloudException
InternalException

removeTags

public void removeTags(@Nonnull
                       String[] strings,
                       @Nonnull
                       Tag... tags)
                throws CloudException,
                       InternalException
Specified by:
removeTags in interface MachineImageSupport
Overrides:
removeTags in class AbstractImageSupport
Throws:
CloudException
InternalException

mapServiceAction

@Nonnull
public String[] mapServiceAction(@Nonnull
                                         ServiceAction action)
Specified by:
mapServiceAction in interface AccessControlledService
Overrides:
mapServiceAction in class AbstractImageSupport


Copyright © 2013 enStratus Networks Inc. All Rights Reserved.