@Test(dependsOnMethods = "testCreateSnapshotInRegion") public void testGetCreateVolumePermissionForSnapshot() { client.getCreateVolumePermissionForSnapshotInRegion(snapshot.getRegion(), snapshot.getId()); }
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; }
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; }
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; }
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; }
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; }
@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; }
@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()); }
@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()); }
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
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
client.getElasticBlockStoreApi().get().deleteSnapshotInRegion(snapshot.getRegion(), snapshot.getId()); } catch (Exception e) { e.printStackTrace();
client.getElasticBlockStoreServices().deleteSnapshotInRegion(snapshot.getRegion(), snapshot.getId()); } catch (Exception e) { e.printStackTrace();
ebsClient.deleteSnapshotInRegion(snapshot.getRegion(), snapshot.getId());
ebsClient.deleteSnapshotInRegion(snapshot.getRegion(), snapshot.getId());