Search in sources :

Example 1 with MultiPathDevice

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;
}
Also used : VolumeSpec(com.emc.sa.service.aix.UnmountBlockVolumeHelper.VolumeSpec) MultiPathDevice(com.emc.aix.model.MultiPathDevice) MultiPathInquiry(com.emc.aix.command.MultiPathInquiry)

Example 2 with MultiPathDevice

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;
}
Also used : MultiPathDevice(com.emc.aix.model.MultiPathDevice) Matcher(java.util.regex.Matcher)

Aggregations

MultiPathDevice (com.emc.aix.model.MultiPathDevice)2 MultiPathInquiry (com.emc.aix.command.MultiPathInquiry)1 VolumeSpec (com.emc.sa.service.aix.UnmountBlockVolumeHelper.VolumeSpec)1 Matcher (java.util.regex.Matcher)1