use of com.iwave.ext.linux.command.ListMultiPathEntriesCommand in project coprhd-controller by CoprHD.
the class FindMultiPathEntriesForMountPoint method executeTask.
@Override
public Void executeTask() throws Exception {
List<MultiPathEntry> allMultiPathEntries = executeCommand(new ListMultiPathEntriesCommand(), SHORT_TIMEOUT);
for (VolumeSpec volume : volumes) {
volume.multipathEntries = Lists.newArrayList();
String device = volume.mountPoint.getDevice();
if (StringUtils.startsWith(device, "/dev/mapper/")) {
String deviceName = StringUtils.substringAfterLast(device, "/");
for (MultiPathEntry entry : allMultiPathEntries) {
if (StringUtils.equals(deviceName, entry.getName())) {
volume.multipathEntries.add(entry);
break;
}
}
}
if (volume.multipathEntries.size() == 0) {
warn("FindMultiPathEntriesForMountPoint.noMultipathEntries", volume.mountPoint.getPath());
}
}
return null;
}
use of com.iwave.ext.linux.command.ListMultiPathEntriesCommand in project coprhd-controller by CoprHD.
the class FindMultiPathEntryForDmName method executeTask.
@Override
public MultiPathEntry executeTask() throws Exception {
List<MultiPathEntry> entries = executeCommand(new ListMultiPathEntriesCommand(), SHORT_TIMEOUT);
MultiPathEntry entry = findMultiPathEntry(dmName, entries);
if (entry == null) {
throw stateException("FindMultiPathEntryForDmName.illegalState.couldNotFindEntry", dmName);
}
logInfo("find.multipath.dm.name", entry.toString());
checkStatus(entry);
return entry;
}
use of com.iwave.ext.linux.command.ListMultiPathEntriesCommand in project coprhd-controller by CoprHD.
the class FindMultiPathEntryForVolume method executeTask.
@Override
public MultiPathEntry executeTask() throws Exception {
List<MultiPathEntry> entries = executeCommand(new ListMultiPathEntriesCommand(), SHORT_TIMEOUT);
MultiPathEntry entry = findMultiPathEntry(volume, entries);
if (entry == null) {
throw stateException("FindMultiPathEntryForVolume.illegalState.couldNotFindEntry", volume.getWwn().toLowerCase());
}
logInfo("find.multipath.wwn", entry.toString());
checkStatus(entry);
return entry;
}
use of com.iwave.ext.linux.command.ListMultiPathEntriesCommand in project coprhd-controller by CoprHD.
the class LinuxSystemCLI method listMultiPathEntries.
public List<MultiPathEntry> listMultiPathEntries() {
ListMultiPathEntriesCommand command = new ListMultiPathEntriesCommand();
executeCommand(command);
return command.getResults();
}
Aggregations