use of com.emc.sa.service.vipr.block.tasks.ExportPathsPreview in project coprhd-controller by CoprHD.
the class ExportPathAdjustmentService method runExportPathsPreview.
private void runExportPathsPreview() {
ExportPathsAdjustmentPreviewRestRep previewRestRep = execute(new ExportPathsPreview(host, virtualArray, exportId, minPaths, maxPaths, pathsPerInitiator, storageSystem, ports));
List<InitiatorPortMapRestRep> affectedPaths = previewRestRep.getAdjustedPaths();
List<InitiatorPortMapRestRep> removedPaths = previewRestRep.getRemovedPaths();
// build the affected path
for (InitiatorPortMapRestRep ipm : affectedPaths) {
List<URI> portList = new ArrayList<URI>();
for (NamedRelatedResourceRep port : ipm.getStoragePorts()) {
portList.add(port.getId());
}
resultingPathsMap.put(ipm.getInitiator().getId(), portList);
}
// build the removed path
for (InitiatorPortMapRestRep ipm : removedPaths) {
List<URI> portList = new ArrayList<URI>();
for (NamedRelatedResourceRep port : ipm.getStoragePorts()) {
portList.add(port.getId());
}
removedPathsMap.put(ipm.getInitiator().getId(), portList);
}
}
Aggregations