Search in sources :

Example 51 with FileShareRestRep

use of com.emc.storageos.model.file.FileShareRestRep in project coprhd-controller by CoprHD.

the class FileStorageUtils method createFileContinuousCopy.

public static Task<FileShareRestRep> createFileContinuousCopy(URI fileId, String name) {
    Task<FileShareRestRep> copy = execute(new CreateFileContinuousCopy(fileId, name, FileTechnologyType.LOCAL_MIRROR.name()));
    addAffectedResource(copy);
    return copy;
}
Also used : FileShareRestRep(com.emc.storageos.model.file.FileShareRestRep) CreateFileContinuousCopy(com.emc.sa.service.vipr.file.tasks.CreateFileContinuousCopy)

Example 52 with FileShareRestRep

use of com.emc.storageos.model.file.FileShareRestRep in project coprhd-controller by CoprHD.

the class FileStorageUtils method changeFileVirtualPool.

public static void changeFileVirtualPool(URI fileId, URI targetVirtualPool, URI filePolicy, URI targetVirtualArray) {
    Task<FileShareRestRep> task = execute(new ChangeFileVirtualPool(fileId, targetVirtualPool, filePolicy, targetVirtualArray));
    addAffectedResource(task);
}
Also used : ChangeFileVirtualPool(com.emc.sa.service.vipr.file.tasks.ChangeFileVirtualPool) FileShareRestRep(com.emc.storageos.model.file.FileShareRestRep)

Example 53 with FileShareRestRep

use of com.emc.storageos.model.file.FileShareRestRep in project coprhd-controller by CoprHD.

the class FileStorageUtils method createFileSystem.

public static URI createFileSystem(URI project, URI virtualArray, URI virtualPool, String label, double sizeInGb) {
    Task<FileShareRestRep> task = execute(new CreateFileSystem(label, sizeInGb, virtualPool, virtualArray, project));
    addAffectedResource(task);
    URI fileSystemId = task.getResourceId();
    addRollback(new DeactivateFileSystem(fileSystemId, FileControllerConstants.DeleteTypeEnum.FULL));
    logInfo("file.storage.filesystem.task", fileSystemId, task.getOpId());
    return fileSystemId;
}
Also used : DeactivateFileSystem(com.emc.sa.service.vipr.file.tasks.DeactivateFileSystem) FileShareRestRep(com.emc.storageos.model.file.FileShareRestRep) CreateFileSystem(com.emc.sa.service.vipr.file.tasks.CreateFileSystem) URI(java.net.URI)

Example 54 with FileShareRestRep

use of com.emc.storageos.model.file.FileShareRestRep in project coprhd-controller by CoprHD.

the class FileStorageUtils method createFileSystemExport.

public static String createFileSystemExport(URI fileSystemId, String comment, String security, String permissions, String rootUser, List<String> exportHosts, String subDirectory, boolean bypassDnsCheck) {
    Task<FileShareRestRep> task = createFileSystemExportWithoutRollBack(fileSystemId, comment, security, permissions, rootUser, exportHosts, subDirectory, bypassDnsCheck);
    addRollback(new DeactivateFileSystemExportRule(fileSystemId, false, subDirectory, false));
    String exportId = task.getResourceId().toString();
    logInfo("file.storage.export.task", exportId, task.getOpId());
    return exportId;
}
Also used : FileShareRestRep(com.emc.storageos.model.file.FileShareRestRep) DeactivateFileSystemExportRule(com.emc.sa.service.vipr.file.tasks.DeactivateFileSystemExportRule)

Example 55 with FileShareRestRep

use of com.emc.storageos.model.file.FileShareRestRep in project coprhd-controller by CoprHD.

the class FileStorageUtils method deactivateFileSystem.

public static void deactivateFileSystem(URI fileSystemId, FileControllerConstants.DeleteTypeEnum fileDeletionType) {
    Task<FileShareRestRep> response = execute(new DeactivateFileSystem(fileSystemId, fileDeletionType));
    addAffectedResource(response);
    logInfo("file.storage.task", response.getOpId());
}
Also used : DeactivateFileSystem(com.emc.sa.service.vipr.file.tasks.DeactivateFileSystem) FileShareRestRep(com.emc.storageos.model.file.FileShareRestRep)

Aggregations

FileShareRestRep (com.emc.storageos.model.file.FileShareRestRep)66 ViPRCoreClient (com.emc.vipr.client.ViPRCoreClient)27 URI (java.net.URI)15 Asset (com.emc.sa.asset.annotation.Asset)13 AssetDependencies (com.emc.sa.asset.annotation.AssetDependencies)13 AssetOption (com.emc.vipr.model.catalog.AssetOption)10 ArrayList (java.util.ArrayList)7 VirtualArrayRelatedResourceRep (com.emc.storageos.model.VirtualArrayRelatedResourceRep)6 FileProtectionRestRep (com.emc.storageos.model.file.FileShareRestRep.FileProtectionRestRep)5 FilePolicyRestRep (com.emc.storageos.model.file.policy.FilePolicyRestRep)5 Task (com.emc.vipr.client.Task)4 FlashException (controllers.util.FlashException)4 CreateFileSystem (com.emc.sa.service.vipr.file.tasks.CreateFileSystem)3 DeactivateFileSystem (com.emc.sa.service.vipr.file.tasks.DeactivateFileSystem)3 DeactivateFileSystemExportRule (com.emc.sa.service.vipr.file.tasks.DeactivateFileSystemExportRule)3 FileSystemDeleteParam (com.emc.storageos.model.file.FileSystemDeleteParam)3 VirtualArrayRestRep (com.emc.storageos.model.varray.VirtualArrayRestRep)3 FileVirtualPoolRestRep (com.emc.storageos.model.vpool.FileVirtualPoolRestRep)3 MachineTagsCollection (com.emc.sa.machinetags.MachineTagsCollection)2 DeactivateFileSystemShare (com.emc.sa.service.vipr.file.tasks.DeactivateFileSystemShare)2