Codota Logo
Image.getEbsBlockDevices
Code IndexAdd Codota 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)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
StringBuilder s =
  • Codota Iconnew StringBuilder()
  • Codota Iconnew StringBuilder(32)
  • Codota IconString str;new StringBuilder(str)
  • Smart code suggestions by Codota
}
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

  • Making http requests using okhttp
  • getApplicationContext (Context)
  • getResourceAsStream (ClassLoader)
    Returns a stream for the resource with the specified name. See #getResource(String) for a descriptio
  • setRequestProperty (URLConnection)
    Sets the general request property. If a property with the key already exists, overwrite its value wi
  • Graphics2D (java.awt)
    This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • BitSet (java.util)
    This class implements a vector of bits that grows as needed. Each component of the bit set has a boo
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
  • BoxLayout (javax.swing)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now