'Return the IP of DNS found in a given text.'

@staticmethod
def textToIp(text, useDns):

    ipList = list()
    plainIP = IPAddr.searchIP(text)
    if (plainIP is not None):
        ip = IPAddr(plainIP)
        if ip.isValid:
            ipList.append(ip)
    if ((useDns in ('yes', 'warn')) and (not ipList)):
        ip = DNSUtils.dnsToIp(text)
        ipList.extend(ip)
        if (ip and (useDns == 'warn')):
            logSys.warning('Determined    IP    using    DNS    Lookup:    %s    =    %s', text, ipList)
    return ipList
