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;
}
Aggregations