use of com.iwave.ext.linux.command.powerpath.PowerPathInquiry in project coprhd-controller by CoprHD.
the class FindPowerPathEntriesForMountPoint method executeTask.
@Override
public Void executeTask() throws Exception {
List<PowerPathDevice> powerPathDevices = executeCommand(new PowerPathInquiry());
for (VolumeSpec volume : volumes) {
volume.powerpathDevices = Lists.newArrayList();
String device = volume.mountPoint.getDevice();
for (PowerPathDevice powerpathDevice : powerPathDevices) {
logDebug("FindPowerPathEntriesForMountPoint.checking", powerpathDevice.getDeviceName(), powerpathDevice.getDevice(), device);
if (StringUtils.equals(device, powerpathDevice.getDevice())) {
volume.powerpathDevices.add(powerpathDevice);
break;
}
}
if (volume.powerpathDevices.size() == 0) {
logWarn("FindPowerPathEntriesForMountPoint.noDevices", volume.mountPoint.getPath());
}
}
return null;
}
use of com.iwave.ext.linux.command.powerpath.PowerPathInquiry 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