Module netutils :: Class DNSResolver
[hide private]

Class DNSResolver

source code

Class responsible for getting nslookup results on a client's machine

Instance Methods [hide private]
 
__init__(self, shell) source code
list
resolveIpByNsLookup(self, dnsName)
Resolves (or not) IP addresses by given machine name
source code
string
resolveFQDNByNsLookup(self, dnsName)
Resolves (or not) FQDN by given machine name
source code
string
resolveDnsNameByNslookup(self, ipAddr, dnsServer='')
Resolves (or not) machine DNS name by given IP
source code
string
resolveHostIpByHostsFile(self, dnsName)
Resolves (or not) machine DNS name by given IP using system's "hosts" file
source code
Method Details [hide private]

resolveIpByNsLookup(self, dnsName)

source code 

Resolves (or not) IP addresses by given machine name

Parameters:
  • dnsName (string) - the machine name to resolve IPs
Returns: list

resolveFQDNByNsLookup(self, dnsName)

source code 

Resolves (or not) FQDN by given machine name

Parameters:
  • dnsName (string) - the machine name to resolve FQDN
Returns: string

resolveDnsNameByNslookup(self, ipAddr, dnsServer='')

source code 

Resolves (or not) machine DNS name by given IP

Parameters:
  • dnsName (string) - the machine name to resolve IPs
Returns: string
IP address if resolved; None if not resolved

resolveHostIpByHostsFile(self, dnsName)

source code 

Resolves (or not) machine DNS name by given IP using system's "hosts" file

Parameters:
  • dnsName (string) - the machine name to resolve IPs
Returns: string
IP address if resolved; None if not resolved