Class VMImageToImage

java.lang.Object
org.jclouds.azurecompute.arm.compute.functions.VMImageToImage
All Implemented Interfaces:
com.google.common.base.Function<VMImage,Image>, Function<VMImage,Image>

public class VMImageToImage extends Object implements com.google.common.base.Function<VMImage,Image>
  • Method Details

    • apply

      public Image apply(VMImage image)
      Specified by:
      apply in interface com.google.common.base.Function<VMImage,Image>
      Specified by:
      apply in interface Function<VMImage,Image>
    • createMarketplacePlanIfPresent

      @Nullable public static Plan createMarketplacePlanIfPresent(Image image, AzureTemplateOptions templateOptions)
      In case that image is offered from Azure Marketplace then it requires to provide "Plan Information" (publisher/name/product) when creating VM from such an image. This method first tries to get this information from image but also allows to override those values by information passed in Azure template options (@see AzureTemplateOptions). In case there is used custom image which was created from Marketplace image then plan information is missing as this image cannot be referenced in format "location/publisher/offer/sku" from which Plan Information is normally parsed. In this case user can provide plan information (planPublisher/planName/planProduct) in template otherwise VM creation fails with error. It's allowed to override any of the original "image" plan information but only if those were present.
      Parameters:
      image - image
      templateOptions - Azure template options
      Returns:
      Plan Information (publisher, plan name, product) or null if any of publisher/name/product not defined
    • osFamily

      public static com.google.common.base.Function<VMImage,OperatingSystem.Builder> osFamily()