use of com.iwave.ext.linux.model.PowerPathDevice in project coprhd-controller by CoprHD.
the class FindPowerPathEntryForVolume method executeTask.
@Override
public PowerPathDevice executeTask() throws Exception {
PowerPathDevice entry = findPowerPathEntry(volume);
if (entry == null) {
throw stateException("FindPowerPathEntryForVolume.illegalState.noEntries", volume.getWwn().toLowerCase());
}
logInfo("find.powerpath.wwn", entry);
return entry;
}
use of com.iwave.ext.linux.model.PowerPathDevice 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;
}
use of com.iwave.ext.linux.model.PowerPathDevice in project coprhd-controller by CoprHD.
the class PowerPathHDSInquiryParser method parseDevice.
private PowerPathDevice parseDevice(String deviceBlock) {
Matcher deviceMatcher = DEVICE_PATTERN.matcher(deviceBlock);
if (deviceMatcher.find()) {
PowerPathDevice device = new PowerPathDevice();
device.setDevice(deviceMatcher.group(1));
device.setVendor("HITACHI");
device.setProduct("HDS");
device.setWwn(deviceMatcher.group(3));
return device;
}
return null;
}
use of com.iwave.ext.linux.model.PowerPathDevice in project coprhd-controller by CoprHD.
the class PowerPathInvistaInquiryParser method parseDevice.
private PowerPathDevice parseDevice(String deviceBlock) {
Matcher deviceMatcher = DEVICE_PATTERN.matcher(deviceBlock);
if (deviceMatcher.find()) {
PowerPathDevice device = new PowerPathDevice();
device.setDevice(deviceMatcher.group(1));
device.setVendor("EMC");
device.setProduct("Invista");
device.setWwn(deviceMatcher.group(5));
return device;
}
return null;
}
Aggregations