use of com.emc.storageos.model.file.QuotaDirectoryList in project coprhd-controller by CoprHD.
the class FileService method getQuotaDirectoryList.
/**
* Get list of quota directories for the specified file system.
*
* @param id
* the URN of a ViPR File system
* @brief List file system quota directories
* @return List of file system quota directories.
*/
@GET
@Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
@Path("/{id}/quota-directories")
@CheckPermission(roles = { Role.SYSTEM_MONITOR, Role.TENANT_ADMIN }, acls = { ACL.ANY })
public QuotaDirectoryList getQuotaDirectoryList(@PathParam("id") URI id) {
_log.info(String.format("Get list of quota directories for file system: %1$s", id));
ArgValidator.checkFieldUriType(id, FileShare.class, "id");
FileShare fileShare = queryResource(id);
QuotaDirectoryList quotaDirList = new QuotaDirectoryList();
if (fileShare.getInactive()) {
return quotaDirList;
}
// Get SMB share map from file system
List<QuotaDirectory> quotaDirs = queryDBQuotaDirectories(fileShare);
// Process each share from the map and add its data to shares in response list.
for (QuotaDirectory quotaDir : quotaDirs) {
quotaDirList.getQuotaDirs().add(toNamedRelatedResource(quotaDir));
}
return quotaDirList;
}
Aggregations