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());
}
Aggregations