Package org.platformlayer.ops.machines

Examples of org.platformlayer.ops.machines.MachineProvider


    String imageId = Tag.IMAGE_ID.findUnique(image.getTags());

    if (imageId == null) {
      // Check for existing image

      MachineProvider targetCloud = cloudHelpers.getCloud(image.cloud);
      DiskImageRecipe recipe = platformLayer.getItem(image.recipeId, DiskImageRecipe.class);

      ImageStore imageStore = cloud.getImageStore(targetCloud);

      List<CloudImage> existingImages = imageStore.findImages(Collections.<Tag> emptyList());
View Full Code Here


  public void buildImage(DiskImage image) throws OpsException, IOException {
    // Assume the worst...
    opsContext.setFailure(true);

    MachineProvider targetCloud = cloudHelpers.getCloud(image.cloud);
    DiskImageRecipe recipe = platformLayer.getItem(image.recipeId, DiskImageRecipe.class);

    OperatingSystem operatingSystem = getRequestedOperatingSystem(recipe);

    String kernelPackage = packageHelpers.getDefaultKernelPackage(operatingSystem);
View Full Code Here

      DirectCloud cloud = OpsContext.get().getInstance(DirectCloud.class);
      if (cloud == null) {
        throw new IllegalStateException("Cloud instance not found");
      }
      ImageStore imageStore = cloudHelpers.getImageStore(cloud);
      MachineProvider machineProvider = providers.toInterface(cloud, MachineProvider.class);
      CloudImage imageInfo = imageFactory.getOrCreateImageId(machineProvider, imageFormats, recipeKey);

      if (imageStore == null) {
        throw new OpsException("Image store not configured");
      }
View Full Code Here

  @Inject
  CloudContext cloud;

  public CloudImage getOrCreateImageId(ItemBase targetCloud, List<ImageFormat> formats, PlatformLayerKey recipeKey)
      throws OpsException {
    MachineProvider machineProvider = providers.toInterface(targetCloud, MachineProvider.class);
    return getOrCreateImageId(machineProvider, formats, recipeKey);
  }
View Full Code Here

TOP

Related Classes of org.platformlayer.ops.machines.MachineProvider

Copyright © 2018 www.massapicom. 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.