Search in sources :

Example 1 with DeactivateFileSystem

use of com.emc.sa.service.vipr.file.tasks.DeactivateFileSystem 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, int advisoryLimit, int softLimit, int gracePeriod) {
    Task<FileShareRestRep> task = execute(new CreateFileSystem(label, sizeInGb, advisoryLimit, softLimit, gracePeriod, virtualPool, virtualArray, project));
    addAffectedResource(task);
    URI fileSystemId = task.getResourceId();
    addRollback(new DeactivateFileSystem(fileSystemId, FileControllerConstants.DeleteTypeEnum.FULL));
    logInfo("file.storage.filesystem.task", task.getResourceId(), 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 2 with DeactivateFileSystem

use of com.emc.sa.service.vipr.file.tasks.DeactivateFileSystem 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 3 with DeactivateFileSystem

use of com.emc.sa.service.vipr.file.tasks.DeactivateFileSystem 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

DeactivateFileSystem (com.emc.sa.service.vipr.file.tasks.DeactivateFileSystem)3 FileShareRestRep (com.emc.storageos.model.file.FileShareRestRep)3 CreateFileSystem (com.emc.sa.service.vipr.file.tasks.CreateFileSystem)2 URI (java.net.URI)2