Search in sources :

Example 6 with QuotaDirectoryRestRep

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

the class FileSystems method fileSystemQuotaDirectories.

@FlashException(referrer = { "fileSystem" })
public static void fileSystemQuotaDirectories(String fileSystemId) {
    ViPRCoreClient client = BourneUtil.getViprClient();
    List<QuotaDirectoryRestRep> quotas = client.quotaDirectories().getByFileSystem(uri(fileSystemId));
    render(quotas);
}
Also used : ViPRCoreClient(com.emc.vipr.client.ViPRCoreClient) QuotaDirectoryRestRep(com.emc.storageos.model.file.QuotaDirectoryRestRep) FlashException(controllers.util.FlashException)

Example 7 with QuotaDirectoryRestRep

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

the class FileSystems method deleteFileSystemQuotaDirectory.

@FlashException(referrer = { "fileSystem" })
public static void deleteFileSystemQuotaDirectory(String fileSystemId, String quotaDirectoryId) {
    ViPRCoreClient client = BourneUtil.getViprClient();
    // Avoid force delete for quota directory!!
    QuotaDirectoryDeleteParam param = new QuotaDirectoryDeleteParam(false);
    Task<QuotaDirectoryRestRep> task = client.quotaDirectories().deleteQuotaDirectory(uri(quotaDirectoryId), param);
    flash.put("info", MessagesUtils.get("resources.filesystem.quota.deactivate"));
    fileSystem(fileSystemId);
}
Also used : ViPRCoreClient(com.emc.vipr.client.ViPRCoreClient) QuotaDirectoryDeleteParam(com.emc.storageos.model.file.QuotaDirectoryDeleteParam) QuotaDirectoryRestRep(com.emc.storageos.model.file.QuotaDirectoryRestRep) FlashException(controllers.util.FlashException)

Aggregations

QuotaDirectoryRestRep (com.emc.storageos.model.file.QuotaDirectoryRestRep)7 ViPRCoreClient (com.emc.vipr.client.ViPRCoreClient)3 FlashException (controllers.util.FlashException)2 CreateFileSystemQuotaDirectory (com.emc.sa.service.vipr.file.tasks.CreateFileSystemQuotaDirectory)1 DeactivateQuotaDirectory (com.emc.sa.service.vipr.file.tasks.DeactivateQuotaDirectory)1 QuotaDirectoryDeleteParam (com.emc.storageos.model.file.QuotaDirectoryDeleteParam)1 URI (java.net.URI)1