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(defaultRegion, snapshotIds(snapshot.getId()))); assertEquals(result.getProgress(), 100); this.snapshot = result; }
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; }