congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
Snapshot.getRegion
Code IndexAdd Tabnine to your IDE (free)

How to use
getRegion
method
in
org.jclouds.ec2.domain.Snapshot

Best Java code snippets using org.jclouds.ec2.domain.Snapshot.getRegion (Showing top 16 results out of 315)

origin: jclouds/legacy-jclouds

@Test(dependsOnMethods = "testCreateSnapshotInRegion")
public void testGetCreateVolumePermissionForSnapshot() {
 client.getCreateVolumePermissionForSnapshotInRegion(snapshot.getRegion(), snapshot.getId());
}
origin: jclouds/legacy-jclouds

@Test(dependsOnMethods = "testGetCreateVolumePermissionForSnapshot")
void testDeleteSnapshotInRegion() {
 client.deleteSnapshotInRegion(snapshot.getRegion(), snapshot.getId());
 assert client.describeSnapshotsInRegion(snapshot.getRegion(), snapshotIds(snapshot.getId())).size() == 0;
}
origin: com.amysta.jclouds.api/ec2

public boolean apply(Snapshot snapshot) {
 logger.trace("looking for status on snapshot %s", snapshot.getId());
 snapshot = Iterables.getOnlyElement(client.describeSnapshotsInRegion(snapshot.getRegion(),
      snapshotIds(snapshot.getId())));
 logger.trace("%s: looking for status %s: currently: %s; progress %d/100", snapshot,
      Snapshot.Status.COMPLETED, snapshot.getStatus(), snapshot.getProgress());
 return snapshot.getStatus() == Snapshot.Status.COMPLETED;
}
origin: jclouds/legacy-jclouds

public boolean apply(Snapshot snapshot) {
 logger.trace("looking for status on snapshot %s", snapshot.getId());
 snapshot = Iterables.getOnlyElement(client.describeSnapshotsInRegion(snapshot.getRegion(),
      snapshotIds(snapshot.getId())));
 logger.trace("%s: looking for status %s: currently: %s; progress %d/100", snapshot,
      Snapshot.Status.COMPLETED, snapshot.getStatus(), snapshot.getProgress());
 return snapshot.getStatus() == Snapshot.Status.COMPLETED;
}
origin: org.jclouds.api/ec2

public boolean apply(Snapshot snapshot) {
 logger.trace("looking for status on snapshot %s", snapshot.getId());
 snapshot = Iterables.getOnlyElement(client.describeSnapshotsInRegion(snapshot.getRegion(),
      snapshotIds(snapshot.getId())));
 logger.trace("%s: looking for status %s: currently: %s; progress %d/100", snapshot,
      Snapshot.Status.COMPLETED, snapshot.getStatus(), snapshot.getProgress());
 return snapshot.getStatus() == Snapshot.Status.COMPLETED;
}
origin: org.apache.jclouds.api/ec2

public boolean apply(Snapshot snapshot) {
 logger.trace("looking for status on snapshot %s", snapshot.getId());
 snapshot = Iterables.getOnlyElement(client.describeSnapshotsInRegion(snapshot.getRegion(),
      snapshotIds(snapshot.getId())));
 logger.trace("%s: looking for status %s: currently: %s; progress %d/100", snapshot,
      Snapshot.Status.COMPLETED, snapshot.getStatus(), snapshot.getProgress());
 return snapshot.getStatus() == Snapshot.Status.COMPLETED;
}
origin: apache/jclouds

public boolean apply(Snapshot snapshot) {
 logger.trace("looking for status on snapshot %s", snapshot.getId());
 snapshot = Iterables.getOnlyElement(client.describeSnapshotsInRegion(snapshot.getRegion(),
      snapshotIds(snapshot.getId())));
 logger.trace("%s: looking for status %s: currently: %s; progress %d/100", snapshot,
      Snapshot.Status.COMPLETED, snapshot.getStatus(), snapshot.getProgress());
 return snapshot.getStatus() == Snapshot.Status.COMPLETED;
}
origin: jclouds/legacy-jclouds

@Test(dependsOnMethods = "testCreateVolumeInAvailabilityZone")
void testCreateSnapshotInRegion() {
 Snapshot snapshot = client.createSnapshotInRegion(defaultRegion, volumeId);
 Predicate<Snapshot> snapshotted = retry(new SnapshotCompleted(client), 600, 10, SECONDS);
 assert snapshotted.apply(snapshot);
 Snapshot result = Iterables.getOnlyElement(client.describeSnapshotsInRegion(snapshot.getRegion(),
    snapshotIds(snapshot.getId())));
 assertEquals(result.getProgress(), 100);
 this.snapshot = result;
}
origin: jclouds/legacy-jclouds

@Test(dependsOnMethods = "testCreateSnapshotInRegion")
void testCreateVolumeFromSnapshotInAvailabilityZone() {
 Volume volume = client.createVolumeFromSnapshotInAvailabilityZone(defaultZone, snapshot.getId());
 assertNotNull(volume);
 Predicate<Volume> availabile = retry(new VolumeAvailable(client), 600, 10, SECONDS);
 assert availabile.apply(volume);
 Volume result = Iterables.getOnlyElement(client.describeVolumesInRegion(snapshot.getRegion(), volume.getId()));
 assertEquals(volume.getId(), result.getId());
 assertEquals(volume.getSnapshotId(), snapshot.getId());
 assertEquals(volume.getAvailabilityZone(), defaultZone);
 assertEquals(result.getStatus(), Volume.Status.AVAILABLE);
 client.deleteVolumeInRegion(snapshot.getRegion(), volume.getId());
}
origin: jclouds/legacy-jclouds

@Test(dependsOnMethods = "testCreateSnapshotInRegion")
void testCreateVolumeFromSnapshotInAvailabilityZoneWithSize() {
 Volume volume = client.createVolumeFromSnapshotInAvailabilityZone(defaultZone, 2, snapshot.getId());
 assertNotNull(volume);
 Predicate<Volume> availabile = retry(new VolumeAvailable(client), 600, 10, SECONDS);
 assert availabile.apply(volume);
 Volume result = Iterables.getOnlyElement(client.describeVolumesInRegion(snapshot.getRegion(), volume.getId()));
 assertEquals(volume.getId(), result.getId());
 assertEquals(volume.getSnapshotId(), snapshot.getId());
 assertEquals(volume.getAvailabilityZone(), defaultZone);
 assertEquals(volume.getSize(), 2);
 assertEquals(result.getStatus(), Volume.Status.AVAILABLE);
 client.deleteVolumeInRegion(snapshot.getRegion(), volume.getId());
}
origin: apache/jclouds

Image image = Iterables.getOnlyElement(client.getAMIApi().get().describeImagesInRegion(snapshot.getRegion(),
   imageIds(IMAGE_ID)));
String description = image.getDescription() == null ? "jclouds" : image.getDescription();
   snapshot.getRegion(),
   "ebsboot-" + image.getId(),
   snapshot.getId(),
      .asArchitecture(Architecture.I386));
try {
  ebsImage = Iterables.getOnlyElement(client.getAMIApi().get().describeImagesInRegion(snapshot.getRegion(),
     imageIds(amiId)));
} catch (AWSResponseException e) {
   ebsImage = Iterables.getOnlyElement(client.getAMIApi().get().describeImagesInRegion(snapshot.getRegion(),
      imageIds(amiId)));
  else
origin: jclouds/legacy-jclouds

Image image = Iterables.getOnlyElement(client.getAMIServices().describeImagesInRegion(snapshot.getRegion(),
   imageIds(IMAGE_ID)));
String description = image.getDescription() == null ? "jclouds" : image.getDescription();
   snapshot.getRegion(),
   "ebsboot-" + image.getId(),
   snapshot.getId(),
      .asArchitecture(Architecture.I386));
try {
  ebsImage = Iterables.getOnlyElement(client.getAMIServices().describeImagesInRegion(snapshot.getRegion(),
     imageIds(amiId)));
} catch (AWSResponseException e) {
   ebsImage = Iterables.getOnlyElement(client.getAMIServices().describeImagesInRegion(snapshot.getRegion(),
      imageIds(amiId)));
  else
origin: apache/jclouds

 client.getElasticBlockStoreApi().get().deleteSnapshotInRegion(snapshot.getRegion(), snapshot.getId());
} catch (Exception e) {
 e.printStackTrace();
origin: jclouds/legacy-jclouds

 client.getElasticBlockStoreServices().deleteSnapshotInRegion(snapshot.getRegion(), snapshot.getId());
} catch (Exception e) {
 e.printStackTrace();
origin: jclouds/legacy-jclouds

ebsClient.deleteSnapshotInRegion(snapshot.getRegion(), snapshot.getId());
origin: apache/jclouds

ebsClient.deleteSnapshotInRegion(snapshot.getRegion(), snapshot.getId());
org.jclouds.ec2.domainSnapshotgetRegion

Javadoc

To be removed in jclouds 1.6

Warning

Especially on EC2 clones that may not support regions, this value is fragile. Consider alternate means to determine context.

Popular methods of Snapshot

  • getId
    The ID of the snapshot.
  • <init>
  • getProgress
    The progress of the snapshot, in percentage.
  • getStatus
    Snapshot state (e.g., pending, completed, or error)
  • getVolumeSize
    The size of the volume, in GiB.

Popular in Java

  • Creating JSON documents from java classes using gson
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • getExternalFilesDir (Context)
  • findViewById (Activity)
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • KeyStore (java.security)
    KeyStore is responsible for maintaining cryptographic keys and their owners. The type of the syste
  • Set (java.util)
    A Set is a data structure which does not allow duplicate elements.
  • JCheckBox (javax.swing)
  • JLabel (javax.swing)
  • CodeWhisperer alternatives
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