Search in sources :

Example 6 with FileSystemDeleteParam

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

the class DeactivateFileSystem method doExecute.

@Override
protected Task<FileShareRestRep> doExecute() throws Exception {
    FileSystemDeleteParam param = new FileSystemDeleteParam();
    // force delete is applicable only for Inventory delete only!!
    if (fileDeletionType != null && fileDeletionType.equals(FileControllerConstants.DeleteTypeEnum.VIPR_ONLY)) {
        param.setForceDelete(true);
    } else {
        param.setForceDelete(false);
    }
    param.setDeleteType(fileDeletionType.toString());
    return getClient().fileSystems().deactivate(fileSystemId, param);
}
Also used : FileSystemDeleteParam(com.emc.storageos.model.file.FileSystemDeleteParam)

Example 7 with FileSystemDeleteParam

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

the class FileSystems method deleteFileSystem.

@FlashException(referrer = { "fileSystem" })
public static void deleteFileSystem(String fileSystemId, String deleteType) {
    if (StringUtils.isNotBlank(fileSystemId)) {
        ViPRCoreClient client = BourneUtil.getViprClient();
        boolean forceDelete = false;
        Task<FileShareRestRep> task = client.fileSystems().deactivate(uri(fileSystemId), new FileSystemDeleteParam(forceDelete, deleteType));
        flash.put("info", MessagesUtils.get("resources.filesystem.deactivate"));
    }
    fileSystem(fileSystemId);
}
Also used : ViPRCoreClient(com.emc.vipr.client.ViPRCoreClient) FileShareRestRep(com.emc.storageos.model.file.FileShareRestRep) FileSystemDeleteParam(com.emc.storageos.model.file.FileSystemDeleteParam) FlashException(controllers.util.FlashException)

Aggregations

FileSystemDeleteParam (com.emc.storageos.model.file.FileSystemDeleteParam)7 URI (java.net.URI)4 TaskResourceRep (com.emc.storageos.model.TaskResourceRep)3 FileShareRestRep (com.emc.storageos.model.file.FileShareRestRep)3 FileSystemParam (com.emc.storageos.model.file.FileSystemParam)3 ClientResponse (com.sun.jersey.api.client.ClientResponse)3 Test (org.junit.Test)3 FileSystemExportParam (com.emc.storageos.model.file.FileSystemExportParam)2 ViPRCoreClient (com.emc.vipr.client.ViPRCoreClient)2 WebResource (com.sun.jersey.api.client.WebResource)2 BulkIdParam (com.emc.storageos.model.BulkIdParam)1 FileShareBulkRep (com.emc.storageos.model.file.FileShareBulkRep)1 ProjectElement (com.emc.storageos.model.project.ProjectElement)1 ProjectParam (com.emc.storageos.model.project.ProjectParam)1 TenantResponse (com.emc.storageos.model.tenant.TenantResponse)1 StorageOSUser (com.emc.storageos.security.authentication.StorageOSUser)1 Task (com.emc.vipr.client.Task)1 FlashException (controllers.util.FlashException)1