Search in sources :

Example 1 with ListIScsiSessionsCommand

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

the class FindIScsiSessions method executeTask.

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

Aggregations

ListIScsiSessionsCommand (com.iwave.ext.linux.command.iscsi.ListIScsiSessionsCommand)1 IScsiSession (com.iwave.ext.linux.model.IScsiSession)1