Package org.jclouds.compute.domain

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


      builder.description(input.getName());
      builder.status(Status.AVAILABLE);

      OperatingSystem os = input.getOs();

      builder.operatingSystem(builder()
            .name(input.getName())
            .family(os.getDistribution().getOsFamily())
            .description(input.getName())
            .arch(os.getArch())
            .version(os.getVersion())
View Full Code Here


              .uri(image.getSelfLink());

      List<String> splits = Lists.newArrayList(image.getName().split("-"));
      OperatingSystem.Builder osBuilder = defaultOperatingSystem(image);
      if (splits == null || splits.size() == 0 || splits.size() < 3) {
         return builder.operatingSystem(osBuilder.build()).build();
      }

      OsFamily family = OsFamily.fromValue(splits.get(0));
      if (family != OsFamily.UNRECOGNIZED) {
         osBuilder.family(family);
View Full Code Here

      if (image.getDeprecated().isPresent()) {
         builder.userMetadata(ImmutableMap.of("deprecatedState", image.getDeprecated().get().getState().orNull()));
      }
      builder.version(getLast(splits));
      return builder.operatingSystem(osBuilder.build()).build();
   }

   private OperatingSystem.Builder defaultOperatingSystem(Image image) {
      return OperatingSystem.builder()
              .family(OsFamily.LINUX)
View Full Code Here

         builder.location(findLocationForResource.apply(from.getVDC()));
      } else {
         // otherwise, it could be in a public catalog, which is not assigned to a VDC
      }
      builder.description(from.getDescription() != null ? from.getDescription() : from.getName());
      builder.operatingSystem(CIMOperatingSystem.toComputeOs(ovf));
      builder.status(toPortableImageStatus.get(from.getStatus()));
      return builder.build();
   }

}
View Full Code Here

   public Image apply(ServerImage from) {
      ImageBuilder builder = new ImageBuilder();
      builder.ids(from.getId() + "");
      builder.name(from.getFriendlyName());
      builder.description(from.getDescription());
      builder.operatingSystem(parseOs(from));
      builder.status(toPortableImageStatus.get(from.getState()));
      return builder.build();
   }

}
View Full Code Here

      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()));
      Image image = builder.build();
      return image;
   }
}
View Full Code Here

      builder.description(from.name);

      OsFamily family = null;
      try {
         family = OsFamily.fromValue(from.name);
         builder.operatingSystem(new OperatingSystem.Builder().name(from.name).family(family).build());
      } catch (IllegalArgumentException e) {
         logger.debug("<< didn't match os(%s)", from);
      }
      builder.status(Status.AVAILABLE);
      return builder.build();
View Full Code Here

      } catch (NoSuchElementException e) {
         logger.error("unknown region %s for image %s; not in %s", from.getRegion(), from.getId(), locations);
         builder.location(new LocationBuilder().scope(LocationScope.REGION).id(from.getRegion()).description(
                  from.getRegion()).parent(defaultLocation.get()).build());
      }
      builder.operatingSystem(osBuilder.build());
      builder.status(toPortableImageStatus.get(from.getImageState()));
      builder.backendStatus(from.getRawState());
      return builder.build();
   }
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.