use of org.jclouds.openstack.cinder.v1.options.CreateSnapshotOptions in project legacy-jclouds-examples by jclouds.
the class CreateSnapshot method createSnapshot.
private void createSnapshot(Volume volume) throws TimeoutException {
System.out.println("Create Snapshot");
CreateSnapshotOptions options = CreateSnapshotOptions.Builder.name(Constants.NAME).description("Snapshot of " + volume.getId());
Snapshot snapshot = snapshotApi.create(volume.getId(), options);
// /jclouds-example/rackspace/src/main/java/org/jclouds/examples/rackspace/Logging.java
if (!SnapshotPredicates.awaitAvailable(snapshotApi).apply(snapshot)) {
throw new TimeoutException("Timeout on volume: " + volume);
}
System.out.println(" " + snapshot);
}
Aggregations