Search in sources :

Example 6 with FileShareRestRep

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

the class FileStorageUtils method failbackFileSystem.

public static void failbackFileSystem(URI fileId, URI targetId, boolean replicationConf) {
    Tasks<FileShareRestRep> tasks = execute(new FailbackFileSystem(fileId, targetId, FileTechnologyType.REMOTE_MIRROR.name(), replicationConf));
    addAffectedResources(tasks);
}
Also used : FailbackFileSystem(com.emc.sa.service.vipr.file.tasks.FailbackFileSystem) FileShareRestRep(com.emc.storageos.model.file.FileShareRestRep)

Example 7 with FileShareRestRep

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

the class FileStorageUtils method deactivateFileSystemExport.

public static URI deactivateFileSystemExport(URI fileSystemId, Boolean allDir, String subDir, Boolean unmountExport) {
    Task<FileShareRestRep> task = execute(new DeactivateFileSystemExportRule(fileSystemId, allDir, subDir, unmountExport));
    addAffectedResource(task);
    return task.getResourceId();
}
Also used : FileShareRestRep(com.emc.storageos.model.file.FileShareRestRep) DeactivateFileSystemExportRule(com.emc.sa.service.vipr.file.tasks.DeactivateFileSystemExportRule)

Example 8 with FileShareRestRep

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

the class FileStorageUtils method createCifsShare.

public static String createCifsShare(URI fileSystemId, String shareName, String shareComment, String subDirectory) {
    Task<FileShareRestRep> task = execute(new CreateFileSystemShare(shareName, shareComment, fileSystemId, subDirectory));
    addAffectedResource(task);
    String shareId = task.getResourceId().toString();
    addRollback(new DeactivateFileSystemShare(fileSystemId, shareId));
    logInfo("file.storage.share.task", shareId, task.getOpId());
    return shareId;
}
Also used : CreateFileSystemShare(com.emc.sa.service.vipr.file.tasks.CreateFileSystemShare) DeactivateFileSystemShare(com.emc.sa.service.vipr.file.tasks.DeactivateFileSystemShare) FileShareRestRep(com.emc.storageos.model.file.FileShareRestRep)

Example 9 with FileShareRestRep

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

the class FileStorageUtils method mountNFSExport.

public static Task<FileShareRestRep> mountNFSExport(URI hostId, URI fileSystemId, String subDirectory, String mountPath, String security, String fsType) {
    FileSystemMountParam param = new FileSystemMountParam(hostId, subDirectory, security, mountPath, fsType);
    Task<FileShareRestRep> task = execute(new MountFSExport(fileSystemId, param));
    addAffectedResource(task);
    return task;
}
Also used : MountFSExport(com.emc.sa.service.vipr.file.tasks.MountFSExport) FileSystemMountParam(com.emc.storageos.model.file.FileSystemMountParam) FileShareRestRep(com.emc.storageos.model.file.FileShareRestRep)

Example 10 with FileShareRestRep

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

the class FileStorageUtils method reduceFileSystem.

public static void reduceFileSystem(URI fileSystemId, double sizeInGb) {
    String newSize = String.valueOf(DiskSizeConversionUtils.gbToBytes(sizeInGb));
    Task<FileShareRestRep> response = execute(new ReduceFileSystem(fileSystemId, newSize));
    addAffectedResource(response);
    logInfo("file.storage.task", response.getOpId());
}
Also used : ReduceFileSystem(com.emc.sa.service.vipr.file.tasks.ReduceFileSystem) 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