use of com.emc.storageos.model.file.FileSnapshotRestRep in project coprhd-controller by CoprHD.
the class FileSnapshots method deleteSnapshotExport.
@FlashException(referrer = { "snapshot" })
public static void deleteSnapshotExport(String snapshotId, String security, String exportPath) {
ViPRCoreClient client = BourneUtil.getViprClient();
ExportRule rule = new ExportRule();
rule.setSecFlavor(security);
List<ExportRule> list = Lists.newArrayList();
list.add(rule);
ExportRules exportRules = new ExportRules();
exportRules.setExportRules(list);
SnapshotExportUpdateParams params = new SnapshotExportUpdateParams();
params.setExportRulesToDelete(exportRules);
FileSnapshotRestRep snapshot = client.fileSnapshots().get(uri(snapshotId));
String subDir = FileUtils.findSubDirectory(snapshot.getMountPath(), exportPath);
client.fileSnapshots().updateExport(uri(snapshotId), subDir, params);
flash.put("info", MessagesUtils.get("resources.filesnapshot.export.deactivate"));
snapshot(snapshotId);
}
use of com.emc.storageos.model.file.FileSnapshotRestRep in project coprhd-controller by CoprHD.
the class FileSystems method fileSystemSnapshots.
public static void fileSystemSnapshots(String fileSystemId) {
ViPRCoreClient client = BourneUtil.getViprClient();
List<NamedRelatedResourceRep> refs = client.fileSnapshots().listByFileSystem(uri(fileSystemId));
List<FileSnapshotRestRep> snapshots = client.fileSnapshots().getByRefs(refs);
render(snapshots);
}
use of com.emc.storageos.model.file.FileSnapshotRestRep 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);
}
}
use of com.emc.storageos.model.file.FileSnapshotRestRep in project coprhd-controller by CoprHD.
the class FileStorageUtils method deactivateSnapshotExport.
public static void deactivateSnapshotExport(URI fileSnapshotId, Boolean allDir, String subDir) {
Task<FileSnapshotRestRep> task = execute(new DeactivateFileSnapshotExportRule(fileSnapshotId, allDir, subDir));
addAffectedResource(task);
}
use of com.emc.storageos.model.file.FileSnapshotRestRep in project coprhd-controller by CoprHD.
the class FileStorageUtils method deactivateFileSnapshot.
public static void deactivateFileSnapshot(URI snapshotId) {
Task<FileSnapshotRestRep> task = execute(new DeactivateFileSnapshot(snapshotId));
addAffectedResource(task);
}
Aggregations