def targets(self):
        '''
        Return ip addrs based on netmask, sitting in the "glob" spot because
        it is the default
        '''
        addrs = ()
        ret = {}
        ports = __opts__['ssh_scan_ports']
        if not isinstance(ports, list):
            # Comma-separate list of integers
            ports = list(map(int, str(ports).split(',')))
        try:
            addrs = [ipaddress.ip_address(self.tgt)]
        except ValueError:
            try:
                addrs = ipaddress.ip_network(self.tgt).hosts()
            except __HOLE__:
                pass
        for addr in addrs:
            addr = str(addr)
            log.trace('Scanning host: {0}'.format(addr))
            for port in ports:
                log.trace('Scanning port: {0}'.format(port))
                try:
                    sock = salt.utils.network.get_socket(addr, socket.SOCK_STREAM)
                    sock.settimeout(float(__opts__['ssh_scan_timeout']))
                    sock.connect((addr, port))
                    sock.shutdown(socket.SHUT_RDWR)
                    sock.close()
                    ret[addr] = {'host': addr, 'port': port}
                except socket.error:
                    pass
        return ret
dataset/ETHPy150Open saltstack/salt/salt/roster/scan.py/RosterMatcher.targets