use of com.emc.storageos.db.client.model.UnManagedDiscoveredObjects.UnManagedFSExport in project coprhd-controller by CoprHD.
the class NetAppFileCommunicationInterface method createExportMap.
private void createExportMap(ExportsRuleInfo export, UnManagedFSExportMap tempUnManagedExpMap, String storagePort) {
List<ExportsHostnameInfo> readonlyHosts = export.getSecurityRuleInfos().get(0).getReadOnly();
List<ExportsHostnameInfo> readwriteHosts = export.getSecurityRuleInfos().get(0).getReadWrite();
List<ExportsHostnameInfo> rootHosts = export.getSecurityRuleInfos().get(0).getRoot();
UnManagedFSExport tempUnManagedFSROExport = createUnManagedExport(export, readonlyHosts, RO, storagePort);
if (tempUnManagedFSROExport != null) {
tempUnManagedExpMap.put(tempUnManagedFSROExport.getFileExportKey(), tempUnManagedFSROExport);
}
UnManagedFSExport tempUnManagedFSRWExport = createUnManagedExport(export, readwriteHosts, RW, storagePort);
if (tempUnManagedFSRWExport != null) {
tempUnManagedExpMap.put(tempUnManagedFSRWExport.getFileExportKey(), tempUnManagedFSRWExport);
}
UnManagedFSExport tempUnManagedFSROOTExport = createUnManagedExport(export, rootHosts, ROOT, storagePort);
if (tempUnManagedFSROOTExport != null) {
tempUnManagedExpMap.put(tempUnManagedFSROOTExport.getFileExportKey(), tempUnManagedFSROOTExport);
}
}
use of com.emc.storageos.db.client.model.UnManagedDiscoveredObjects.UnManagedFSExport in project coprhd-controller by CoprHD.
the class PropertySetterUtil method convertUnManagedExportMapToManaged.
/**
* extract value from a String Set
* This method is used, to get value from a StringSet of size 1.
*
* @param key
* @param volumeInformation
* @return String
*/
public static FSExportMap convertUnManagedExportMapToManaged(UnManagedFSExportMap unManagedFSExportMap, StoragePort storagePort, StorageHADomain dataMover) {
FSExportMap fsExportMap = new FSExportMap();
if (unManagedFSExportMap == null) {
return fsExportMap;
}
for (UnManagedFSExport export : unManagedFSExportMap.values()) {
FileExport fsExport = new FileExport();
if (null != export.getIsilonId()) {
fsExport.setIsilonId(export.getIsilonId());
}
if (null != export.getNativeId()) {
fsExport.setNativeId(export.getNativeId());
}
if (null != storagePort) {
fsExport.setStoragePort(storagePort.getPortName());
if ((export.getMountPath() != null) && (export.getMountPath().length() > 0)) {
fsExport.setMountPoint(ExportUtils.getFileMountPoint(storagePort.getPortNetworkId(), export.getMountPath()));
} else {
fsExport.setMountPoint(ExportUtils.getFileMountPoint(storagePort.getPortNetworkId(), export.getPath()));
}
} else if (null != export.getStoragePort()) {
fsExport.setStoragePort(export.getStoragePort());
if (null != export.getMountPoint()) {
fsExport.setMountPoint(export.getMountPoint());
}
}
if (null != dataMover) {
fsExport.setStoragePortName(dataMover.getName());
} else if (null != storagePort) {
fsExport.setStoragePortName(storagePort.getPortName());
} else if (null != export.getStoragePortName()) {
fsExport.setStoragePortName(export.getStoragePortName());
}
if (null != export.getMountPath()) {
fsExport.setMountPath(export.getMountPath());
}
fsExport.setPath(export.getPath());
fsExport.setPermissions(export.getPermissions());
fsExport.setProtocol(export.getProtocol());
fsExport.setRootUserMapping(export.getRootUserMapping());
fsExport.setSecurityType(export.getSecurityType());
fsExport.setClients(export.getClients());
fsExportMap.put(fsExport.getFileExportKey(), fsExport);
}
return fsExportMap;
}
Aggregations