Package org.jclouds.elasticstack.domain

Examples of org.jclouds.elasticstack.domain.WellKnownImage$Builder


      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


            "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

      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

      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

      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

            "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

Related Classes of org.jclouds.elasticstack.domain.WellKnownImage$Builder

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.