use of com.emc.sa.service.vipr.file.tasks.CreateFileSnapshot in project coprhd-controller by CoprHD.
the class FileStorageUtils method createFileSnapshot.
public static URI createFileSnapshot(URI fileSystemId, String name) {
Task<FileSnapshotRestRep> task = execute(new CreateFileSnapshot(fileSystemId, name));
addAffectedResource(task);
return task.getResourceId();
}
use of com.emc.sa.service.vipr.file.tasks.CreateFileSnapshot in project coprhd-controller by CoprHD.
the class CreateFileSnapshotService method execute.
@Override
public void execute() {
for (FileShareRestRep fs : fileSystems) {
String fileSystemId = fs.getId().toString();
checkAndPurgeObsoleteSnapshot(fileSystemId);
Task<FileSnapshotRestRep> task = ViPRExecutionUtils.execute(new CreateFileSnapshot(fileSystemId, name));
addAffectedResource(task);
// record file snapshots for retention
List<Task<FileSnapshotRestRep>> tasks = new ArrayList<Task<FileSnapshotRestRep>>();
tasks.add(task);
addRetainedReplicas(fs.getId(), tasks);
}
}
Aggregations