use of com.emc.storageos.vasa.data.internal.Volume.Itls.Itl.Device in project coprhd-controller by CoprHD.
the class SyncManager method fetchPortToVolumeTable.
private Hashtable<String, List<String>> fetchPortToVolumeTable(String csvSeparatedInitiatorList) throws SOSFailure {
final String methodName = "fetchPortToVolumeTable(): ";
log.trace(methodName + "Entry with input: csvSeparatedInitiatorList[" + csvSeparatedInitiatorList + "]");
// Hashtable<String, String> table = new Hashtable<String, String>();
Hashtable<String, List<String>> table2 = new Hashtable<String, List<String>>();
for (Itls itlObj : this.fetchExportITLS(csvSeparatedInitiatorList)) {
if (itlObj != null) {
for (Itl itl : itlObj.getItls()) {
Target target = itl.getTarget();
String portId = target.getId();
if (portId != null) {
Set<String> volIds = new HashSet<String>();
for (Itl itl2 : itlObj.getItls()) {
Target port = itl2.getTarget();
Device volume = itl2.getDevice();
if (portId.equals(port.getId())) {
volIds.add(volume.getId());
}
}
table2.put(portId, new ArrayList<String>(volIds));
}
}
}
}
log.trace(methodName + "Exit returning port-volume table of size[" + table2.size() + "]");
return table2;
}
use of com.emc.storageos.vasa.data.internal.Volume.Itls.Itl.Device in project coprhd-controller by CoprHD.
the class SyncManager method fetchVolumeIdsByHostInitiators.
private List<String> fetchVolumeIdsByHostInitiators(String csvSeparatedInitiatorList) throws SOSFailure {
final String methodName = "fetchVolumeIdsByHostInitiators(): ";
log.trace(methodName + "Entry with input: csvSeparatedInitiatorList[" + csvSeparatedInitiatorList + "]");
Set<String> volumeIdSet = new HashSet<String>();
for (Itls itlObj : this.fetchExportITLS(csvSeparatedInitiatorList)) {
if (itlObj != null) {
for (Itl itl : itlObj.getItls()) {
Device device = itl.getDevice();
if (device != null && device.getId() != null) {
volumeIdSet.add(device.getId());
}
}
}
}
log.trace(methodName + "Exit returning volume ID list of size[" + volumeIdSet.size() + "]");
return new ArrayList<String>(volumeIdSet);
}
Aggregations