Examples of ImageInRegion


Examples of org.jclouds.openstack.nova.v2_0.domain.regionscoped.ImageInRegion

         }
         builder.addAll(transform(active, new Function<Image, ImageInRegion>() {

            @Override
            public ImageInRegion apply(Image arg0) {
               return new ImageInRegion(arg0, regionId);
            }

         }));
      }
      return builder.build();
View Full Code Here

Examples of org.jclouds.openstack.nova.v2_0.domain.regionscoped.ImageInRegion

   @Override
   public ImageInRegion getImage(String id) {
      RegionAndId regionAndId = RegionAndId.fromSlashEncoded(id);
      Image image = novaApi.getImageApi(regionAndId.getRegion()).get(regionAndId.getId());
      return image == null ? null : new ImageInRegion(image, regionAndId.getRegion());
   }
View Full Code Here

Examples of org.jclouds.openstack.nova.v2_0.domain.regionscoped.ImageInRegion

      OperatingSystem operatingSystem = new OperatingSystem(OsFamily.UBUNTU, "My Test OS", "My Test Version", "x86",
               "My Test OS", true);
      ImageInRegionToImage converter = new ImageInRegionToImage(NovaComputeServiceContextModule.toPortableImageStatus,
               constant(operatingSystem), locationIndex);

      ImageInRegion novaImageInRegionToConvert = new ImageInRegion(novaImageToConvert, "az-1.region-a.geo-1");

      org.jclouds.compute.domain.Image convertedImage = converter.apply(novaImageInRegionToConvert);

      assertEquals(convertedImage.getId(), novaImageInRegionToConvert.slashEncode());
      assertEquals(convertedImage.getProviderId(), novaImageToConvert.getId());
      assertEquals(convertedImage.getLocation(), locationIndex.get().get("az-1.region-a.geo-1"));

      assertEquals(convertedImage.getName(), novaImageToConvert.getName());
      assertEquals(convertedImage.getStatus(), org.jclouds.compute.domain.Image.Status.DELETED);
View Full Code Here

Examples of org.jclouds.openstack.nova.v2_0.domain.regionscoped.ImageInRegion

      OperatingSystem operatingSystem = new OperatingSystem(OsFamily.UBUNTU, "My Test OS", "My Test Version", "x86",
               "My Test OS", true);
      ImageInRegionToImage converter = new ImageInRegionToImage(NovaComputeServiceContextModule.toPortableImageStatus,
               constant(operatingSystem), locationIndex);

      ImageInRegion novaImageInRegionToConvert = new ImageInRegion(novaImageToConvert, "South");

      converter.apply(novaImageInRegionToConvert);
   }
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.