Tabnine Logo
Image.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
org.jclouds.ec2.domain.Image
constructor

Best Java code snippets using org.jclouds.ec2.domain.Image.<init> (Showing top 15 results out of 315)

origin: apache/jclouds

  private static Image newImage(String imageOwnerId, String imageName) {
    String region = "us-east-1";
    Image.Architecture architecture = Image.Architecture.X86_64;
    String description = "";
    String imageId = "";
    Image.ImageState imageState = Image.ImageState.AVAILABLE;
    Image.ImageType imageType = Image.ImageType.MACHINE;
    boolean isPublic = true;
    Iterable<String> productCodes = ImmutableSet.of();
    String kernelId = "";
    String platform = "";
    String ramdiskId = "";
    RootDeviceType rootDeviceType = RootDeviceType.EBS;
    String rootDeviceName = "";
    Map<String, Image.EbsBlockDevice> ebsBlockDevices = ImmutableMap.of();
    Map<String, String> tags = ImmutableMap.of();
    VirtualizationType virtualizationType = VirtualizationType.HVM;
    Hypervisor hypervisor = Hypervisor.XEN;
   Image from = new Image(region, architecture, imageName, description, imageId, imageOwnerId + "/" + imageName,
      imageOwnerId, imageState, "available", imageType, isPublic, productCodes, kernelId, platform, ramdiskId,
      rootDeviceType, rootDeviceName, ebsBlockDevices, tags, virtualizationType, hypervisor);
    return from;
  }
}
origin: jclouds/legacy-jclouds

public void testUNIX() {
 Set<Image> contents = ImmutableSet.of(new Image("us-east-1", Architecture.I386, null, null, "ami-be3adfd7",
      "ec2-public-images/fedora-8-i386-base-v1.04.manifest.xml", "206029621532", ImageState.AVAILABLE, "available",
      ImageType.MACHINE, false, Sets.<String> newHashSet("9961934F"), "aki-4438dd2d", null, "ari-4538dd2c",
      RootDeviceType.INSTANCE_STORE, null, ImmutableMap.<String, EbsBlockDevice> of(),
      VirtualizationType.PARAVIRTUAL, Hypervisor.XEN));
 Set<Image> result = parseImages("/describe_images.xml");
 assertEquals(result.toString(), contents.toString());
 assertEquals(get(result, 0).getImageState(), ImageState.AVAILABLE);
 assertEquals(get(result, 0).getRawState(), "available");
}
origin: jclouds/legacy-jclouds

if (region == null)
 region = defaultRegion.get();
contents.add(new Image(region, architecture, this.name, description, imageId, imageLocation,
    imageOwnerId, imageState, rawState, imageType, isPublic, productCodes, kernelId, platform,
    ramdiskId, rootDeviceType, rootDeviceName, ebsBlockDevices, virtualizationType, hypervisor));
origin: org.jclouds.api/ec2

if (region == null)
 region = defaultRegion.get();
contents.add(new Image(region, architecture, this.name, description, imageId, imageLocation,
    imageOwnerId, imageState, rawState, imageType, isPublic, productCodes, kernelId, platform,
    ramdiskId, rootDeviceType, rootDeviceName, ebsBlockDevices, virtualizationType, hypervisor));
origin: jclouds/legacy-jclouds

public void testDiabloWithIncorrectDisplayNameField() {
 Set<Image> contents = ImmutableSet.of(new Image("us-east-1", Architecture.X86_64, "CentOS 6.2 Server 64-bit 20120125", "", "ami-0000054e",
      "local (CentOS 6.2 Server 64-bit 20120125)", "", ImageState.AVAILABLE, "available",
      ImageType.MACHINE, true, Sets.<String> newHashSet(), "aki-0000054c", null, "ari-0000054d",
      RootDeviceType.INSTANCE_STORE, "/dev/sda1", ImmutableMap.<String, EbsBlockDevice> of(),
      VirtualizationType.PARAVIRTUAL, Hypervisor.XEN));
 
 Set<Image> result = parseImages("/describe_images_nova.xml");
 assertEquals(result.toString(), contents.toString());
 assertEquals(get(result, 0).getImageState(), ImageState.AVAILABLE);
 assertEquals(get(result, 0).getRawState(), "available");
}
origin: org.apache.jclouds.api/ec2

if (region == null)
 region = defaultRegion.get();
contents.add(new Image(region, architecture, this.name, description, imageId, imageLocation,
    imageOwnerId, imageState, rawState, imageType, isPublic, productCodes, kernelId, platform,
    ramdiskId, rootDeviceType, rootDeviceName, ebsBlockDevices, tags, virtualizationType, hypervisor));
origin: com.amysta.jclouds.api/ec2

if (region == null)
 region = defaultRegion.get();
contents.add(new Image(region, architecture, this.name, description, imageId, imageLocation,
    imageOwnerId, imageState, rawState, imageType, isPublic, productCodes, kernelId, platform,
    ramdiskId, rootDeviceType, rootDeviceName, ebsBlockDevices, tags, virtualizationType, hypervisor));
origin: jclouds/legacy-jclouds

public void testWindows() {
 Set<Image> contents = ImmutableSet.of(new Image("us-east-1", Architecture.X86_64, null, null, "ami-02eb086b",
      "aws-solutions-amis/SqlSvrStd2003r2-x86_64-Win_SFWBasic5.1-v1.0.manifest.xml", "771350841976",
      ImageState.AVAILABLE, "available", ImageType.MACHINE, true, Sets.<String> newHashSet("5771E9A6"), null, "windows",
      null, RootDeviceType.INSTANCE_STORE, null, ImmutableMap.<String, EbsBlockDevice> of(),
      VirtualizationType.PARAVIRTUAL, Hypervisor.XEN));
 Set<Image> result = parseImages("/describe_images_windows.xml");
 assertEquals(result.toString(), contents.toString());
 assertEquals(get(result, 0).getImageState(), ImageState.AVAILABLE);
 assertEquals(get(result, 0).getRawState(), "available");
}
origin: apache/jclouds

public void testUNIX() {
 Set<Image> contents = ImmutableSet.of(new Image("us-east-1", Architecture.I386, null, null, "ami-be3adfd7",
      "ec2-public-images/fedora-8-i386-base-v1.04.manifest.xml", "206029621532", ImageState.AVAILABLE, "available",
      ImageType.MACHINE, false, Sets.<String> newHashSet("9961934F"), "aki-4438dd2d", null, "ari-4538dd2c",
      RootDeviceType.INSTANCE_STORE, null, ImmutableMap.<String, EbsBlockDevice> of(),
      ImmutableMap.<String, String> of(), VirtualizationType.PARAVIRTUAL, Hypervisor.XEN));
 Set<Image> result = parseImages("/describe_images.xml");
 assertEquals(result.toString(), contents.toString());
 assertEquals(get(result, 0).getImageState(), ImageState.AVAILABLE);
 assertEquals(get(result, 0).getRawState(), "available");
}
origin: apache/jclouds

if (region == null)
 region = defaultRegion.get();
contents.add(new Image(region, architecture, this.name, description, imageId, imageLocation,
    imageOwnerId, imageState, rawState, imageType, isPublic, productCodes, kernelId, platform,
    ramdiskId, rootDeviceType, rootDeviceName, ebsBlockDevices, tags, virtualizationType, hypervisor));
origin: apache/jclouds

public void testWindows() {
 Set<Image> contents = ImmutableSet.of(new Image("us-east-1", Architecture.X86_64, null, null, "ami-02eb086b",
      "aws-solutions-amis/SqlSvrStd2003r2-x86_64-Win_SFWBasic5.1-v1.0.manifest.xml", "771350841976",
      ImageState.AVAILABLE, "available", ImageType.MACHINE, true, Sets.<String> newHashSet("5771E9A6"), null, "windows",
      null, RootDeviceType.INSTANCE_STORE, null, ImmutableMap.<String, EbsBlockDevice> of(),
      ImmutableMap.<String, String> of(), VirtualizationType.PARAVIRTUAL, Hypervisor.XEN));
 Set<Image> result = parseImages("/describe_images_windows.xml");
 assertEquals(result.toString(), contents.toString());
 assertEquals(get(result, 0).getImageState(), ImageState.AVAILABLE);
 assertEquals(get(result, 0).getRawState(), "available");
}
origin: apache/jclouds

public void testDiabloWithIncorrectDisplayNameField() {
 Set<Image> contents = ImmutableSet.of(new Image("us-east-1", Architecture.X86_64, "CentOS 6.2 Server 64-bit 20120125", "", "ami-0000054e",
      "local (CentOS 6.2 Server 64-bit 20120125)", "", ImageState.AVAILABLE, "available",
      ImageType.MACHINE, true, Sets.<String> newHashSet(), "aki-0000054c", null, "ari-0000054d",
      RootDeviceType.INSTANCE_STORE, "/dev/sda1", ImmutableMap.<String, EbsBlockDevice> of(),
      ImmutableMap.<String, String> of(), VirtualizationType.PARAVIRTUAL, Hypervisor.XEN));
 
 Set<Image> result = parseImages("/describe_images_nova.xml");
 assertEquals(result.toString(), contents.toString());
 assertEquals(get(result, 0).getImageState(), ImageState.AVAILABLE);
 assertEquals(get(result, 0).getRawState(), "available");
}
origin: apache/jclouds

public void testTags() {
 Set<Image> contents = ImmutableSet.of(new Image("us-east-1", Architecture.I386, null, null, "ami-be3adfd7",
    "ec2-public-images/fedora-8-i386-base-v1.04.manifest.xml", "206029621532", ImageState.AVAILABLE, "available",
    ImageType.MACHINE, false, Sets.<String> newHashSet("9961934F"), "aki-4438dd2d", null, "ari-4538dd2c",
    RootDeviceType.INSTANCE_STORE, null, ImmutableMap.<String, EbsBlockDevice> of(),
    ImmutableMap.<String, String> of("Name", "Some machine name", "Second", "Second value"),
    VirtualizationType.PARAVIRTUAL, Hypervisor.XEN));
 Set<Image> result = parseImages("/describe_images_tags.xml");
 assertEquals(result.toString(), contents.toString());
 assertEquals(get(result, 0).getImageState(), ImageState.AVAILABLE);
 assertEquals(get(result, 0).getRawState(), "available");
 assertEquals(get(result, 0).getTags().get("Name"), "Some machine name");
 assertEquals(get(result, 0).getTags().get("Second"), "Second value");
}
origin: jclouds/legacy-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), "xvdf", new EbsBlockDevice("snap-d31272ba", 250,
               false)), 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");
}
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());
}
org.jclouds.ec2.domainImage<init>

Popular methods of Image

  • getId
    The ID of the AMI.
  • getImageType
    The type of image (machine, kernel, or ramdisk).
  • getName
  • 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
  • getImageOwnerId
    AWS Access Key ID of the image owner.
  • getHypervisor,
  • getImageOwnerId,
  • getPlatform,
  • getVirtualizationType,
  • getEbsBlockDevices,
  • getKernelId,
  • getRamdiskId,
  • getRootDeviceName,
  • getTags

Popular in Java

  • Reactive rest calls using spring rest template
  • getSystemService (Context)
  • requestLocationUpdates (LocationManager)
  • getExternalFilesDir (Context)
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • MalformedURLException (java.net)
    This exception is thrown when a program attempts to create an URL from an incorrect specification.
  • Collectors (java.util.stream)
  • JCheckBox (javax.swing)
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
  • Top 17 Free Sublime Text Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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