'Returns the correct connection id for the initiator.
This parses the cli output from the command
\'volume select <volumename> access show\'
and returns the correct connection id.'

def _parse_connection(self, connector, out):

    lines = [line for line in out if (line != '')]
    for i in range(0, len(lines), 2):
        try:
            int(lines[i][0])
            if (len(lines[(i + 1)].split()) == 1):
                check = (lines[i].split()[1] + lines[(i + 1)].strip())
                if (connector['initiator'] == check):
                    return lines[i].split()[0]
        except (IndexError, ValueError):
            pass
    return None
