use of com.emc.aix.model.MultiPathDevice in project coprhd-controller by CoprHD.
the class FindMultiPathEntriesForMountPoint method executeTask.
@Override
public Void executeTask() throws Exception {
List<MultiPathDevice> multiPathDevices = executeCommand(new MultiPathInquiry());
for (VolumeSpec volume : volumes) {
volume.multipathEntries = Lists.newArrayList();
String device = volume.mountPoint.getDevice();
for (MultiPathDevice multiPathDevice : multiPathDevices) {
if (StringUtils.equals(device, multiPathDevice.getDevice())) {
volume.multipathEntries.add(multiPathDevice);
break;
}
}
if (volume.multipathEntries.size() == 0) {
warn("No MultiPath devices for %s", volume.mountPoint.getPath());
}
}
return null;
}
use of com.emc.aix.model.MultiPathDevice in project coprhd-controller by CoprHD.
the class MultiPathInquiryParser method parseDevice.
private MultiPathDevice parseDevice(String deviceBlock) {
Matcher deviceMatcher = DEVICE_PATTERN.matcher(deviceBlock);
if (deviceMatcher.find()) {
MultiPathDevice device = new MultiPathDevice();
device.setDevice(deviceMatcher.group(1));
device.setVendor(deviceMatcher.group(2));
device.setProduct(deviceMatcher.group(3));
device.setWwn(deviceMatcher.group(4));
return device;
}
return null;
}
Aggregations