Search in sources :

Example 1 with ListHDisksCommand

use of com.emc.aix.command.ListHDisksCommand in project coprhd-controller by CoprHD.

the class FindHDiskForVolume method tryExecute.

@Override
protected String tryExecute() {
    List<PowerPathDevice> devices = executeCommand(new ListHDisksCommand(usePowerPath, false));
    for (PowerPathDevice device : devices) {
        if (VolumeWWNUtils.wwnMatches(device.getWwn(), volume.getWwn())) {
            return device.getDevice();
        }
    }
    devices = executeCommand(new ListHDisksCommand(usePowerPath, true));
    for (PowerPathDevice device : devices) {
        if (VolumeWWNUtils.wwnMatches(device.getWwn(), volume.getWwn())) {
            return device.getDevice();
        }
    }
    // could not find associated hdisk for volume
    throw new HDiskNotFoundException(volume.getWwn());
}
Also used : PowerPathDevice(com.iwave.ext.linux.model.PowerPathDevice) ListHDisksCommand(com.emc.aix.command.ListHDisksCommand)

Aggregations

ListHDisksCommand (com.emc.aix.command.ListHDisksCommand)1 PowerPathDevice (com.iwave.ext.linux.model.PowerPathDevice)1