use of com.emc.storageos.vasa.data.internal.Volume.Itls.Itl 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 in project coprhd-controller by CoprHD.
the class SyncManager method fetchStoragePortsByHostInitiators.
private List<StoragePort> fetchStoragePortsByHostInitiators(String csvSeparatedInitiatorList) throws SOSFailure {
final String methodName = "fetchStoragePortsByHostInitiators(): ";
log.trace(methodName + "Entry with input: csvSeparatedInitiatorList[" + csvSeparatedInitiatorList + "]");
Set<String> storagePortLinkSet = new HashSet<String>();
List<StoragePort> storagePortList = new ArrayList<StoragePort>();
for (Itls itlObj : this.fetchExportITLS(csvSeparatedInitiatorList)) {
if (itlObj != null) {
for (Itl itl : itlObj.getItls()) {
Target target = itl.getTarget();
if (target != null && target.getId() != null) {
storagePortLinkSet.add(target.getLink().getHref());
}
}
}
}
// try {
if (storagePortLinkSet != null) {
for (String storagePortLink : storagePortLinkSet) {
StoragePort storagePort = this.fetchStoragePortByHref(storagePortLink);
storagePortList.add(storagePort);
}
}
log.trace(methodName + "Exit returning storage port list of size[" + storagePortList.size() + "]");
return new ArrayList<StoragePort>(storagePortList);
}
use of com.emc.storageos.vasa.data.internal.Volume.Itls.Itl in project coprhd-controller by CoprHD.
the class SyncManager method fetchStoragePortsIdsByHostInitiators.
private List<String> fetchStoragePortsIdsByHostInitiators(String csvSeparatedInitiatorList) throws SOSFailure {
final String methodName = "fetchStoragePortsIdsByHostInitiators(): ";
log.trace(methodName + "Entry with input: csvSeparatedInitiatorList[" + csvSeparatedInitiatorList + "]");
Set<String> storagePortIdSet = new HashSet<String>();
for (Itls itlObj : this.fetchExportITLS(csvSeparatedInitiatorList)) {
if (itlObj != null) {
for (Itl itl : itlObj.getItls()) {
Target target = itl.getTarget();
if (target != null && target.getId() != null) {
storagePortIdSet.add(target.getId());
}
}
}
}
log.trace(methodName + "Exit returning storage port Id list of size[" + storagePortIdSet.size() + "]");
return new ArrayList<String>(storagePortIdSet);
}
use of com.emc.storageos.vasa.data.internal.Volume.Itls.Itl 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