@Test(dependsOnMethods = "testCreateVolume") public void testCreateSnapshot() { if (volumeOption.isPresent()) { testSnapshot = volumeOption.get().createSnapshot( testVolume.getId(), CreateVolumeSnapshotOptions.Builder.name("jclouds-live-test").description( "jclouds live test snapshot").force()); assertNotNull(testSnapshot); assertNotNull(testSnapshot.getId()); final String snapshotId = testSnapshot.getId(); assertNotNull(testSnapshot.getStatus()); assertTrue(testSnapshot.getSize() > -1); assertNotNull(testSnapshot.getCreated()); assertTrue(retry(new Predicate<VolumeApi>() { public boolean apply(VolumeApi volumeApi) { return volumeOption.get().getSnapshot(snapshotId).getStatus() == Volume.Status.AVAILABLE; } }, 30 * 1000L).apply(volumeOption.get())); } }
@Test(dependsOnMethods = "testCreateVolume") public void testCreateSnapshot() { if (volumeOption.isPresent()) { testSnapshot = volumeOption.get().createSnapshot( testVolume.getId(), CreateVolumeSnapshotOptions.Builder.name("jclouds-live-test").description( "jclouds live test snapshot").force()); assertNotNull(testSnapshot); assertNotNull(testSnapshot.getId()); final String snapshotId = testSnapshot.getId(); assertNotNull(testSnapshot.getStatus()); assertTrue(testSnapshot.getSize() > -1); assertNotNull(testSnapshot.getCreated()); assertTrue(retry(new Predicate<VolumeApi>() { public boolean apply(VolumeApi volumeApi) { return volumeOption.get().getSnapshot(snapshotId).getStatus() == Volume.Status.AVAILABLE; } }, 30 * 1000L).apply(volumeOption.get())); } }
public T fromVolumeSnapshot(VolumeSnapshot in) { return this .id(in.getId()) .volumeId(in.getVolumeId()) .status(in.getStatus()) .size(in.getSize()) .created(in.getCreated()) .name(in.getName()) .description(in.getDescription()); } }
public T fromVolumeSnapshot(VolumeSnapshot in) { return this .id(in.getId()) .volumeId(in.getVolumeId()) .status(in.getStatus()) .size(in.getSize()) .created(in.getCreated()) .name(in.getName()) .description(in.getDescription()); } }
public T fromVolumeSnapshot(VolumeSnapshot in) { return this .id(in.getId()) .volumeId(in.getVolumeId()) .status(in.getStatus()) .size(in.getSize()) .created(in.getCreated()) .name(in.getName()) .description(in.getDescription()); } }
public T fromVolumeSnapshot(VolumeSnapshot in) { return this .id(in.getId()) .volumeId(in.getVolumeId()) .status(in.getStatus()) .size(in.getSize()) .created(in.getCreated()) .name(in.getName()) .description(in.getDescription()); } }
public T fromVolumeSnapshot(VolumeSnapshot in) { return this .id(in.getId()) .volumeId(in.getVolumeId()) .status(in.getStatus()) .size(in.getSize()) .created(in.getCreated()) .name(in.getName()) .description(in.getDescription()); } }
public T fromVolumeSnapshot(VolumeSnapshot in) { return this .id(in.getId()) .volumeId(in.getVolumeId()) .status(in.getStatus()) .size(in.getSize()) .created(in.getCreated()) .name(in.getName()) .description(in.getDescription()); } }