Search in sources :

Example 1 with ListIScsiHostsCommand

use of com.iwave.ext.linux.command.iscsi.ListIScsiHostsCommand in project coprhd-controller by CoprHD.

the class FindIScsiInitiators method executeTask.

@Override
public List<IScsiHost> executeTask() throws Exception {
    List<IScsiHost> hosts = executeCommand(new ListIScsiHostsCommand(), SHORT_TIMEOUT);
    Iterator<IScsiHost> iter = hosts.iterator();
    while (iter.hasNext()) {
        IScsiHost host = iter.next();
        if (!isMatch(host)) {
            iter.remove();
        }
    }
    return hosts;
}
Also used : IScsiHost(com.iwave.ext.linux.model.IScsiHost) ListIScsiHostsCommand(com.iwave.ext.linux.command.iscsi.ListIScsiHostsCommand)

Aggregations

ListIScsiHostsCommand (com.iwave.ext.linux.command.iscsi.ListIScsiHostsCommand)1 IScsiHost (com.iwave.ext.linux.model.IScsiHost)1