Search in sources :

Example 1 with GetNfsExportsForFileSystem

use of com.emc.sa.service.vipr.file.tasks.GetNfsExportsForFileSystem in project coprhd-controller by CoprHD.

the class FileStorageUtils method getExport.

public static FileSystemExportParam getExport(URI fileSystemId, String protocol, String security, String permissions, String rootUser) {
    List<FileSystemExportParam> exports = execute(new GetNfsExportsForFileSystem(fileSystemId));
    for (FileSystemExportParam export : exports) {
        boolean protocolMatch = StringUtils.equals(export.getProtocol(), protocol);
        boolean securityMatch = StringUtils.equals(export.getSecurityType(), security);
        boolean permissionMatch = StringUtils.equals(export.getPermissions(), permissions);
        boolean rootUserMatch = StringUtils.equals(export.getRootUserMapping(), rootUser);
        if (protocolMatch && securityMatch && permissionMatch && rootUserMatch) {
            return export;
        }
    }
    return null;
}
Also used : FileSystemExportParam(com.emc.storageos.model.file.FileSystemExportParam) GetNfsExportsForFileSystem(com.emc.sa.service.vipr.file.tasks.GetNfsExportsForFileSystem)

Aggregations

GetNfsExportsForFileSystem (com.emc.sa.service.vipr.file.tasks.GetNfsExportsForFileSystem)1 FileSystemExportParam (com.emc.storageos.model.file.FileSystemExportParam)1