use of com.iwave.ext.linux.command.powerpath.PowerPathInvistaInquiry in project coprhd-controller by CoprHD.
the class FindPowerPathEntryForVolume method findPowerPathEntry.
private PowerPathDevice findPowerPathEntry(BlockObjectRestRep blockVolume) {
List<PowerPathDevice> entries = executeCommand(new PowerPathInquiry(), SHORT_TIMEOUT);
for (PowerPathDevice device : entries) {
String deviceWwn = device.getWwn();
logDebug("FindPowerPathEntryForVolume.checking", device.getDevice(), deviceWwn, blockVolume.getWwn());
if (VolumeWWNUtils.wwnMatches(deviceWwn, blockVolume.getWwn())) {
return device;
}
}
entries = executeCommand(new PowerPathInvistaInquiry(), SHORT_TIMEOUT);
for (PowerPathDevice device : entries) {
String deviceWwn = device.getWwn();
logDebug("FindPowerPathEntryForVolume.checking", device.getDevice(), deviceWwn, blockVolume.getWwn());
if (VolumeWWNUtils.wwnMatches(deviceWwn, blockVolume.getWwn())) {
return device;
}
}
entries = executeCommand(new PowerPathHDSInquiry(), SHORT_TIMEOUT);
for (PowerPathDevice device : entries) {
String deviceWwn = device.getWwn();
logDebug("FindPowerPathEntryForVolume.checking", device.getDevice(), deviceWwn, blockVolume.getWwn());
if (VolumeWWNUtils.wwnHDSMatches(deviceWwn, blockVolume.getWwn())) {
return device;
}
}
logDebug("FindMultiPathEntryForVolume.noEntries", blockVolume.getWwn());
return null;
}
Aggregations