Examples of WellKnownImage


Examples of org.jclouds.elasticstack.domain.WellKnownImage

      this.credentialStore = checkNotNull(credentialStore, "credentialStore cannot be null");
   }

   @Override
   public Image apply(DriveInfo drive) {
      WellKnownImage input = preinstalledImages.get().get(drive.getUuid());
      // set credentials in the store here, as opposed to directly modifying the image. we need to
      // set credentials on the image outside of this function so that they can be for example
      // overridden by properties
      credentialStore.put("image#" + drive.getUuid(), LoginCredentials.builder().user(input.getLoginUser()).build());
      return new ImageBuilder()
            .ids(drive.getUuid())
            .userMetadata(
                  ImmutableMap.<String, String> builder().putAll(drive.getUserMetadata())
                        .put("size", input.getSize() + "").build())
            .location(locationSupplier.get())
            .name(input.getDescription())
            .description(drive.getName())
            .status(Status.AVAILABLE)
            .operatingSystem(
                  new OperatingSystem.Builder().family(input.getOsFamily()).version(input.getOsVersion())
                        .name(input.getDescription()).description(drive.getName()).is64Bit(input.is64bit()).build())
            .version("").build();
   }
View Full Code Here

Examples of org.jclouds.elasticstack.domain.WellKnownImage

            "2008 R2 SP1 with SQL Server 2008 R2 Web Edition", true);
   }

   private void assertOS(String name, OsFamily expectedFamily, String expectedVersion, boolean expectedIs64bit) {
      StandardDrive drive = standardDrive(name);
      WellKnownImage image = function.apply(drive);

      assertEquals(image.getOsFamily(), expectedFamily, String.format("Parsing family for [%s]:", name));
      assertEquals(image.getOsVersion(), expectedVersion, String.format("Parsing version for [%s]:", name));
      assertEquals(image.is64bit(), expectedIs64bit, String.format("Parsing arch for [%s]:", name));
   }
View Full Code Here

Examples of org.jclouds.elasticstack.domain.WellKnownImage

      this.credentialStore = credentialStore;
   }

   @Override
   public Image apply(DriveInfo drive) {
      WellKnownImage input = preinstalledImages.get(drive.getUuid());
      // set credentials in the store here, as opposed to directly modifying the image. we need to
      // set credentials on the image outside of this function so that they can be for example
      // overridden by properties
      credentialStore.put("image#" + drive.getUuid(), LoginCredentials.builder().user(input.getLoginUser()).build());
      return new ImageBuilder()
            .ids(drive.getUuid())
            .userMetadata(
                  ImmutableMap.<String, String> builder().putAll(drive.getUserMetadata())
                        .put("size", input.getSize() + "").build())
            .location(locationSupplier.get())
            .name(input.getDescription())
            .description(drive.getName())
            .status(Status.AVAILABLE)
            .operatingSystem(
                  new OperatingSystem.Builder().family(input.getOsFamily()).version(input.getOsVersion())
                        .name(input.getDescription()).description(drive.getName()).is64Bit(input.is64bit()).build())
            .version("").build();
   }
View Full Code Here

Examples of org.jclouds.elasticstack.domain.WellKnownImage

      this.credentialStore = credentialStore;
   }

   @Override
   public Image apply(DriveInfo drive) {
      WellKnownImage input = preinstalledImages.get(drive.getUuid());
      // set credentials in the store here, as opposed to directly modifying the image. we need to
      // set credentials on the image outside of this function so that they can be for example
      // overridden by properties
      credentialStore.put("image#" + drive.getUuid(), LoginCredentials.builder().user(input.getLoginUser()).build());
      return new ImageBuilder()
            .ids(drive.getUuid())
            .userMetadata(
                  ImmutableMap.<String, String> builder().putAll(drive.getUserMetadata())
                        .put("size", input.getSize() + "").build())
            .location(locationSupplier.get())
            .name(input.getDescription())
            .description(drive.getName())
            .status(Status.AVAILABLE)
            .operatingSystem(
                  new OperatingSystem.Builder().family(input.getOsFamily()).version(input.getOsVersion())
                        .name(input.getDescription()).description(drive.getName()).is64Bit(input.is64bit()).build())
            .version("").build();
   }
View Full Code Here

Examples of org.jclouds.elasticstack.domain.WellKnownImage

      this.credentialStore = checkNotNull(credentialStore, "credentialStore cannot be null");
   }

   @Override
   public Image apply(DriveInfo drive) {
      WellKnownImage input = preinstalledImages.get().get(drive.getUuid());
      // set credentials in the store here, as opposed to directly modifying the image. we need to
      // set credentials on the image outside of this function so that they can be for example
      // overridden by properties
      credentialStore.put("image#" + drive.getUuid(), LoginCredentials.builder().user(input.getLoginUser()).build());
      return new ImageBuilder()
            .ids(drive.getUuid())
            .userMetadata(
                  ImmutableMap.<String, String> builder().putAll(drive.getUserMetadata())
                        .put("size", input.getSize() + "").build())
            .location(locationSupplier.get())
            .name(input.getDescription())
            .description(drive.getName())
            .status(Status.AVAILABLE)
            .operatingSystem(
                  new OperatingSystem.Builder().family(input.getOsFamily()).version(input.getOsVersion())
                        .name(input.getDescription()).description(drive.getName()).is64Bit(input.is64bit()).build())
            .version("").build();
   }
View Full Code Here

Examples of org.jclouds.elasticstack.domain.WellKnownImage

            "2008 R2 SP1 with SQL Server 2008 R2 Web Edition", true);
   }

   private void assertOS(String name, OsFamily expectedFamily, String expectedVersion, boolean expectedIs64bit) {
      StandardDrive drive = standardDrive(name);
      WellKnownImage image = function.apply(drive);

      assertEquals(image.getOsFamily(), expectedFamily, String.format("Parsing family for [%s]:", name));
      assertEquals(image.getOsVersion(), expectedVersion, String.format("Parsing version for [%s]:", name));
      assertEquals(image.is64bit(), expectedIs64bit, String.format("Parsing arch for [%s]:", name));
   }
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.