Tabnine Logo
Image.getEbsBlockDevices
Code IndexAdd Tabnine to your IDE (free)

How to use
getEbsBlockDevices
method
in
org.jclouds.ec2.domain.Image

Best Java code snippets using org.jclouds.ec2.domain.Image.getEbsBlockDevices (Showing top 5 results out of 315)

origin: jclouds/legacy-jclouds

private void verifyImage() {
 assertEquals(ebsImage.getImageType(), ImageType.MACHINE);
 assertEquals(ebsImage.getRootDeviceType(), RootDeviceType.EBS);
 assertEquals(ebsImage.getRootDeviceName(), "/dev/sda1");
 assertEquals(ebsImage.getEbsBlockDevices().entrySet(),
    ImmutableMap.of("/dev/sda1", new Image.EbsBlockDevice(snapshot.getId(), VOLUME_SIZE, true)).entrySet());
}
origin: apache/jclouds

private void verifyImage() {
 assertEquals(ebsImage.getImageType(), ImageType.MACHINE);
 assertEquals(ebsImage.getRootDeviceType(), RootDeviceType.EBS);
 assertEquals(ebsImage.getRootDeviceName(), "/dev/sda1");
 assertEquals(ebsImage.getEbsBlockDevices().entrySet(),
    ImmutableMap.of("/dev/sda1", new Image.EbsBlockDevice(snapshot.getId(), VOLUME_SIZE, true, "standard", null, false)).entrySet());
}
origin: apache/jclouds

public void testEBS() {
 Set<Image> contents = ImmutableSet.of(new Image("us-east-1", Architecture.I386, "websrv_2009-12-10",
     "Web Server AMI", "ami-246f8d4d", "706093390852/websrv_2009-12-10", "706093390852",
     ImageState.AVAILABLE, "available", ImageType.MACHINE, true, Sets.<String> newHashSet(), null, "windows", null,
     RootDeviceType.EBS, "/dev/sda1",
     ImmutableMap.<String, EbsBlockDevice> of("/dev/sda1",
         new EbsBlockDevice("snap-d01272b9", 30, true, "standard", null, false),
         "xvdf", new EbsBlockDevice("snap-d31272ba", 250, false, "standard", null, false)),
     ImmutableMap.<String, String> of(), VirtualizationType.HVM, Hypervisor.XEN));
 Set<Image> result = parseImages("/describe_images_ebs.xml");
 assertEquals(result.toString(), contents.toString());
 assertEquals(get(result, 0).getImageState(), ImageState.AVAILABLE);
 assertEquals(get(result, 0).getRawState(), "available");
 assertEquals(get(result, 0).getEbsBlockDevices().get("/dev/sda1").getVolumeType(), "standard");
 assertEquals(get(result, 0).getEbsBlockDevices().get("/dev/sda1").isEncrypted(), false);
 assertNull(get(result, 0).getEbsBlockDevices().get("/dev/sda1").getIops());
}
origin: apache/jclouds

assertEquals(ebsBackedImage.getDescription(), "adrian");
assertEquals(
   ebsBackedImage.getEbsBlockDevices().entrySet(),
   ImmutableMap.of("/dev/sda1", new Image.EbsBlockDevice(snapshot.getId(), snapshot.getVolumeSize(), true, null, null, false),
      "/dev/sda2", newBlockDeviceInfo()).entrySet());
origin: jclouds/legacy-jclouds

@Test
public void testCreateAndListEBSBackedImage() throws Exception {
 Snapshot snapshot = createSnapshot();
 // List of images before...
 int sizeBefore = client.describeImagesInRegion(regionId).size();
 // Register a new image...
 ebsBackedImageId = client.registerUnixImageBackedByEbsInRegion(regionId, ebsBackedImageName, snapshot.getId(),
    addNewBlockDevice("/dev/sda2", "myvirtual", 1).withDescription("adrian"));
 imagesToDeregister.add(ebsBackedImageId);
 final Image ebsBackedImage = getOnlyElement(client.describeImagesInRegion(regionId, imageIds(ebsBackedImageId)));
 assertEquals(ebsBackedImage.getName(), ebsBackedImageName);
 assertEquals(ebsBackedImage.getImageType(), ImageType.MACHINE);
 assertEquals(ebsBackedImage.getRootDeviceType(), RootDeviceType.EBS);
 assertEquals(ebsBackedImage.getRootDeviceName(), "/dev/sda1");
 assertEquals(ebsBackedImage.getDescription(), "adrian");
 assertEquals(
    ebsBackedImage.getEbsBlockDevices().entrySet(),
    ImmutableMap.of("/dev/sda1", new Image.EbsBlockDevice(snapshot.getId(), snapshot.getVolumeSize(), true),
       "/dev/sda2", new Image.EbsBlockDevice(null, 1, false)).entrySet());
 // List of images after - should be one larger than before
 int after = client.describeImagesInRegion(regionId).size();
 assertEquals(after, sizeBefore + 1);
}
org.jclouds.ec2.domainImagegetEbsBlockDevices

Popular methods of Image

  • getId
    The ID of the AMI.
  • getImageType
    The type of image (machine, kernel, or ramdisk).
  • getName
  • <init>
  • getImageLocation
    The location of the AMI.
  • getDescription
  • getImageState
    Current state of the AMI. If the operation returns available, the image is successfully registered a
  • getRawState
    raw form of #getImageState() as taken directly from the api response xml document/
  • getRegion
    To be removed in jclouds 1.6 WARNING Especially on EC2 clones that may not support regions, this val
  • getRootDeviceType
  • getArchitecture
    The architecture of the image (i386 or x86_64).
  • getHypervisor
  • getArchitecture,
  • getHypervisor,
  • getImageOwnerId,
  • getPlatform,
  • getVirtualizationType,
  • getKernelId,
  • getRamdiskId,
  • getRootDeviceName,
  • getTags

Popular in Java

  • Reactive rest calls using spring rest template
  • compareTo (BigDecimal)
  • getContentResolver (Context)
  • getApplicationContext (Context)
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • StringTokenizer (java.util)
    Breaks a string into tokens; new code should probably use String#split.> // Legacy code: StringTo
  • TreeSet (java.util)
    TreeSet is an implementation of SortedSet. All optional operations (adding and removing) are support
  • Callable (java.util.concurrent)
    A task that returns a result and may throw an exception. Implementors define a single method with no
  • Stream (java.util.stream)
    A sequence of elements supporting sequential and parallel aggregate operations. The following exampl
  • ImageIO (javax.imageio)
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now