use of com.iwave.ext.linux.command.ListHBAInfoCommand in project coprhd-controller by CoprHD.
the class FindHBAs method executeTask.
@Override
public List<HBAInfo> executeTask() throws Exception {
List<HBAInfo> results = executeCommand(new ListHBAInfoCommand(), SHORT_TIMEOUT);
debug("FindHBAs.lookingForWWNs", pwwns);
Iterator<HBAInfo> iter = results.iterator();
while (iter.hasNext()) {
HBAInfo hba = iter.next();
String wwn = LinuxUtils.normalizeWWN(hba.getWwpn());
if (!pwwns.contains(wwn)) {
logDebug("FindHBAs.ignoringHBA", hba);
iter.remove();
}
}
if (results.isEmpty()) {
throw stateException("FindHBAs.illegalState.couldNotFindHBAs", pwwns);
}
return results;
}
use of com.iwave.ext.linux.command.ListHBAInfoCommand in project coprhd-controller by CoprHD.
the class LinuxSystemCLI method listHBAs.
public List<HBAInfo> listHBAs() {
ListHBAInfoCommand command = new ListHBAInfoCommand();
executeCommand(command);
return command.getResults();
}
use of com.iwave.ext.linux.command.ListHBAInfoCommand in project coprhd-controller by CoprHD.
the class LinuxSystemCLI method rescan.
@Override
public void rescan() throws Exception {
ListHBAInfoCommand hbaCommand = new ListHBAInfoCommand();
executeCommand(hbaCommand, SecureShellSupport.SHORT_TIMEOUT);
RescanHBAsCommand command = new RescanHBAsCommand();
command.setHbas(hbaCommand.getResults());
executeCommand(command, SecureShellSupport.SHORT_TIMEOUT);
}
Aggregations