Package org.jclouds.compute.domain

Examples of org.jclouds.compute.domain.ImageBuilder.ids()


public class CIMOperatingSystemToImage implements Function<CIMOperatingSystem, Image> {

   @Override
   public Image apply(CIMOperatingSystem from) {
      ImageBuilder builder = new ImageBuilder();
      builder.ids(from.getOsType().getCode() + "");
      builder.name(from.getName());
      builder.description(from.getDescription());
      builder.operatingSystem(from);
      builder.status(Status.AVAILABLE);
      return builder.build();
View Full Code Here


   @Override
   public Image apply(DataSet from) {

      ImageBuilder builder = new ImageBuilder();
      builder.ids(from.getUuid() + "");
      builder.name(from.getUrn());
      builder.description(from.getUrn());
      builder.status(Image.Status.AVAILABLE);

      OsFamily family;
View Full Code Here

   public Image apply(VAppTemplate from) {
      checkNotNull(from, "VAppTemplate");
      Envelope ovf = templateToEnvelope.apply(from);

      ImageBuilder builder = new ImageBuilder();
      builder.ids(from.getHref().toASCIIString());
      builder.uri(from.getHref());
      builder.name(from.getName());
      Link vdc = Iterables.find(checkNotNull(from, "from").getLinks(), LinkPredicates.typeEquals(VCloudDirectorMediaType.VDC));
      if (vdc != null) {
         builder.location(findLocationForResource.apply(vdc));
View Full Code Here

      this.imageToOs = imageToOs;
   }
  
   public Image apply(org.jclouds.cloudservers.domain.Image from) {
      ImageBuilder builder = new ImageBuilder();
      builder.ids(from.getId() + "");
      builder.name(from.getName());
      builder.description(from.getName());
      builder.version(from.getUpdated().getTime() + "");
      builder.operatingSystem(imageToOs.apply(from));
      builder.status(toPortableImageStatus.get(from.getStatus()));
View Full Code Here

public class ImageToImage implements Function<Image, org.jclouds.compute.domain.Image> {

   @Override
   public org.jclouds.compute.domain.Image apply(final Image input) {
      ImageBuilder builder = new ImageBuilder();
      builder.ids(String.valueOf(input.getId()));
      builder.name(input.getName());
      builder.description(input.getName());
      builder.status(Status.AVAILABLE);

      OperatingSystem os = input.getOs();
View Full Code Here

   public Image apply(DiskImage from) {
      checkNotNull(from, "disk image");

      ImageBuilder builder = new ImageBuilder();

      builder.ids(from.getId());
      builder.name(from.getName());
      builder.description(from.getDescription());
      // in fgcp, if the image is listed it is available
      builder.status(Status.AVAILABLE);
      OperatingSystem os = diskImageToOperatingSystem.apply(from);
View Full Code Here

   }

   @Override
   public Image apply(final VirtualMachineTemplate template) {
      ImageBuilder builder = new ImageBuilder();
      builder.ids(template.getId().toString());
      builder.name(template.getName());
      builder.description(template.getDescription());

      // Location information
      Datacenter region = regionMap.get().get(template.unwrap().getIdFromLink(ParentLinkName.DATACENTER));
View Full Code Here

   @Override
   public Image apply(@Nullable VAppTemplate from) {
      if (from == null)
         return null;
      ImageBuilder builder = new ImageBuilder();
      builder.ids(from.getHref().toASCIIString());
      builder.uri(from.getHref());
      builder.name(from.getName());
      builder.location(findLocationForResource.apply(checkNotNull(parent, "parent")));
      builder.description(from.getDescription() != null ? from.getDescription() : from.getName());
      builder.operatingSystem(osParser.apply(from.getName()));
View Full Code Here

   }

   @Override
   public Image apply(final VirtualMachineTemplate template) {
      ImageBuilder builder = new ImageBuilder();
      builder.ids(template.getId().toString());
      builder.name(template.getName());
      builder.description(template.getDescription());

      // Location information
      Datacenter region = regionMap.get().get(template.unwrap().getIdFromLink(ParentLinkName.DATACENTER));
View Full Code Here

   public Image apply(DiskImage from) {
      checkNotNull(from, "disk image");

      ImageBuilder builder = new ImageBuilder();

      builder.ids(from.getId());
      builder.name(from.getName());
      builder.description(from.getDescription());
      // in fgcp, if the image is listed it is available
      builder.status(Status.AVAILABLE);
      OperatingSystem os = diskImageToOperatingSystem.apply(from);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.