use of com.emc.storageos.model.file.MountInfoList in project coprhd-controller by CoprHD.
the class FileService method getMountListForFS.
/**
* Get list of mounts for the specified file system.
*
* @param id
* the URN of a ViPR File system
* @brief List file system mounts
* @return List of file system mounts.
*/
@GET
@Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
@Path("/{id}/mount")
@CheckPermission(roles = { Role.SYSTEM_MONITOR, Role.TENANT_ADMIN }, acls = { ACL.ANY })
public MountInfoList getMountListForFS(@PathParam("id") URI id) {
ArgValidator.checkFieldUriType(id, FileShare.class, "id");
_log.info(String.format("Get list of file system mounts: %1$s", id));
MountInfoList mountList = new MountInfoList();
mountList.setMountList(FileOperationUtils.queryDBFSMounts(id, _dbClient));
return mountList;
}
use of com.emc.storageos.model.file.MountInfoList in project coprhd-controller by CoprHD.
the class FileSystems method getNfsMountsByHost.
/**
* Gets the NFS mounts for the given host
* <p>
* API Call: <tt>GET /compute/hosts/{id}/filesystem-mounts</tt>
*
* @param id
* the ID of the host.
* @return the list of NFS mounts for the host.
*/
public List<MountInfo> getNfsMountsByHost(URI id) {
MountInfoList response;
response = client.get(MountInfoList.class, getNfsHostMountsUrl(), id);
return defaultList(response.getMountList());
}
use of com.emc.storageos.model.file.MountInfoList in project coprhd-controller by CoprHD.
the class HostService method getHostNFSMounts.
/**
* Get list of file system mounts for the specified host.
*
* @param id
* the URN of a host
* @brief List file system mounts
* @return List of file system mounts.
*/
@GET
@Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
@Path("/{id}/filesystem-mounts")
@CheckPermission(roles = { Role.SYSTEM_MONITOR, Role.TENANT_ADMIN }, acls = { ACL.ANY })
public MountInfoList getHostNFSMounts(@PathParam("id") URI id) {
ArgValidator.checkFieldUriType(id, Host.class, "id");
_log.info(String.format("Get list of mounts for host %1$s", id));
Host host = queryObject(Host.class, id, false);
// check the user permissions
verifyAuthorizedInTenantOrg(host.getTenant(), getUserFromContext());
MountInfoList mountList = new MountInfoList();
mountList.setMountList(FileOperationUtils.queryDBHostMounts(id, _dbClient));
return mountList;
}
Aggregations