Examples of ImageBuilder


Examples of org.jclouds.compute.domain.ImageBuilder

          failedNodes.put(nodeMeta, new Exception("Simulated failing node"));
          LOG.info("{} - Node failing to start: {}", roles, nodeMeta.getId());
        }
      }
      if (failedNodes.size() > 0) {
        Image image = new ImageBuilder().providerId("ec2").name("test").id("testId").location(location)
              .uri(URI.create("http://node")).operatingSystem(OperatingSystem.builder().description("op").build())
              .description("description").status(Image.Status.AVAILABLE).defaultCredentials(loginCredentials).build();
        Hardware hardware = new HardwareBuilder().providerId("ec2").name("test").id("testId").location(location)
              .uri(URI.create("http://node")).ram(1).hypervisor("xen").build();
        Template template = new TemplateImpl(image, hardware, location, TemplateOptions.NONE);
View Full Code Here

Examples of org.jclouds.compute.domain.ImageBuilder

   @Test
   public void testWhenNoHardwareOrImageMatchServerScopedIdsImageIdIsStillSet() {

      Hardware existingHardware = new HardwareBuilder().id("az-1.region-a.geo-1/FOOOOOOOO").providerId("FOOOOOOOO")
            .location(zone).build();
      Image existingImage = new ImageBuilder().id("az-1.region-a.geo-1/FOOOOOOOO")
            .operatingSystem(OperatingSystem.builder().family(OsFamily.LINUX).description("foobuntu").build())
            .providerId("FOOOOOOOO").description("foobuntu").location(zone).status(Image.Status.AVAILABLE).build();

      checkHardwareAndImageStatus(null, existingHardware, "az-1.region-a.geo-1/52415800-8b69-11e0-9b19-734f6f006e54",
            null, existingImage);
View Full Code Here

Examples of org.jclouds.compute.domain.ImageBuilder

   @Test
   public void testWhenNoHardwareAndImageMatchServerScopedIdsHardwareOperatingSystemAndImageIdAreSet() {

      Hardware existingHardware = new HardwareBuilder().id("az-1.region-a.geo-1/52415800-8b69-11e0-9b19-734f216543fd")
            .providerId("52415800-8b69-11e0-9b19-734f216543fd").location(zone).build();
      Image existingImage = new ImageBuilder().id("az-1.region-a.geo-1/52415800-8b69-11e0-9b19-734f6f006e54")
            .operatingSystem(OperatingSystem.builder().family(OsFamily.LINUX).description("foobuntu").build())
            .providerId("52415800-8b69-11e0-9b19-734f6f006e54").description("foobuntu").status(Image.Status.AVAILABLE)
            .location(zone).build();

      checkHardwareAndImageStatus(existingHardware, existingHardware, existingImage.getId(),
View Full Code Here

Examples of org.jclouds.compute.domain.ImageBuilder

   @Test
   public void testNullAccessIPs() {
      Hardware existingHardware = new HardwareBuilder().id("az-1.region-a.geo-1/52415800-8b69-11e0-9b19-734f216543fd")
            .providerId("52415800-8b69-11e0-9b19-734f216543fd").location(zone).build();
      Image existingImage = new ImageBuilder().id("az-1.region-a.geo-1/52415800-8b69-11e0-9b19-734f6f006e54")
            .operatingSystem(OperatingSystem.builder().family(OsFamily.LINUX).description("foobuntu").build())
            .providerId("52415800-8b69-11e0-9b19-734f6f006e54").description("foobuntu").status(Image.Status.AVAILABLE)
            .location(zone).build();

      Set<Image> images = existingImage == null ? ImmutableSet.<Image> of() : ImmutableSet.of(existingImage);
View Full Code Here

Examples of org.jclouds.compute.domain.ImageBuilder

   @Test
   public void testDuplicateAccessIPs() {
      Hardware existingHardware = new HardwareBuilder().id("az-1.region-a.geo-1/52415800-8b69-11e0-9b19-734f216543fd")
            .providerId("52415800-8b69-11e0-9b19-734f216543fd").location(zone).build();
      Image existingImage = new ImageBuilder().id("az-1.region-a.geo-1/52415800-8b69-11e0-9b19-734f6f006e54")
            .operatingSystem(OperatingSystem.builder().family(OsFamily.LINUX).description("foobuntu").build())
            .providerId("52415800-8b69-11e0-9b19-734f6f006e54").description("foobuntu").status(Image.Status.AVAILABLE)
            .location(zone).build();

      Set<Image> images = existingImage == null ? ImmutableSet.<Image> of() : ImmutableSet.of(existingImage);
View Full Code Here

Examples of org.jclouds.compute.domain.ImageBuilder

   @Test
   public void testAlternateAccessIPs() {
      Hardware existingHardware = new HardwareBuilder().id("az-1.region-a.geo-1/52415800-8b69-11e0-9b19-734f216543fd")
            .providerId("52415800-8b69-11e0-9b19-734f216543fd").location(zone).build();
      Image existingImage = new ImageBuilder().id("az-1.region-a.geo-1/52415800-8b69-11e0-9b19-734f6f006e54")
            .operatingSystem(OperatingSystem.builder().family(OsFamily.LINUX).description("foobuntu").build())
            .providerId("52415800-8b69-11e0-9b19-734f6f006e54").description("foobuntu").status(Image.Status.AVAILABLE)
            .location(zone).build();

      Set<Image> images = existingImage == null ? ImmutableSet.<Image> of() : ImmutableSet.of(existingImage);
View Full Code Here

Examples of org.jclouds.compute.domain.ImageBuilder

      final Supplier<Set<? extends Location>> locations = Suppliers.<Set<? extends Location>> ofInstance(ImmutableSet
            .<Location> of(region));
      final Supplier<Set<? extends Image>> images = Suppliers.<Set<? extends Image>> ofInstance(ImmutableSet
            .<Image> of(
                  new ImageBuilder()
                        .ids("Ubuntu 11.04 x64")
                        .name("Ubuntu 11.04 x64")
                        .description("Ubuntu 11.04 x64")
                        .location(region)
                        .status(Status.AVAILABLE)
                        .operatingSystem(
                              OperatingSystem.builder().name("Ubuntu 11.04 x64").description("Ubuntu 11.04 x64")
                                    .is64Bit(true).version("11.04").family(OsFamily.UBUNTU).build()).build(),
                  new ImageBuilder()
                        .ids("Ubuntu 11.04 64-bit")
                        .name("Ubuntu 11.04 64-bit")
                        .description("Ubuntu 11.04 64-bit")
                        .location(region)
                        .status(Status.AVAILABLE)
View Full Code Here

Examples of org.jclouds.compute.domain.ImageBuilder

      final Supplier<Set<? extends Location>> locations = Suppliers.<Set<? extends Location>> ofInstance(ImmutableSet
            .<Location> of(region));
      final Supplier<Set<? extends Image>> images = Suppliers.<Set<? extends Image>> ofInstance(ImmutableSet
            .<Image> of(
                  new ImageBuilder()
                        .id("us-east-2/ami-ffff")
                        .providerId("ami-ffff")
                        .name("Ubuntu 11.04 x64")
                        .description("Ubuntu 11.04 x64")
                        .location(region2)
View Full Code Here

Examples of org.jclouds.compute.domain.ImageBuilder

      final Supplier<Set<? extends Location>> locations = Suppliers.<Set<? extends Location>> ofInstance(ImmutableSet
            .<Location> of(region));
      final Supplier<Set<? extends Image>> images = Suppliers.<Set<? extends Image>> ofInstance(ImmutableSet
            .<Image> of(
                  new ImageBuilder()
                        .id("us-east-2/ami-ffff")
                        .providerId("ami-ffff")
                        .name("Ubuntu 11.04 x64")
                        .description("Ubuntu 11.04 x64")
                        .location(region2)
View Full Code Here

Examples of org.jclouds.compute.domain.ImageBuilder

         super(null);
      }

      @Override
      public Image getImage(VirtualGuest guest) {
         return new ImageBuilder().ids("123").description("mocked image")
               .operatingSystem(OperatingSystem.builder().description("foo os").build())
               .status(Image.Status.AVAILABLE).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.