Module netutils :: Class IpResolver
[hide private]

Class IpResolver

source code

Class responsible for resolving IP addresses on probe machine's side

Instance Methods [hide private]
 
__init__(self, remoteDnsAddress, framework) source code
string
resolveHostIpWithLocalDns(self, hostName)
Resolves (or not) IP address by given machine name
source code
string
resolveHostIpWithRemoteDns(self, hostName, remoteDns)
Resolves (or not) IP address by given machine name using nslookup command on probe machine
source code
string
resolveHostIp(self, hostName)
Tries to resolve host IP using resolveHostIpWithLocalDns and resolveHostIpWithRemoteDns methods (in fall-back order)
source code
 
getLocalShell(self)
Creates and caches local shell client.
source code
 
close(self)
Closes local shell client.
source code
Method Details [hide private]

resolveHostIpWithLocalDns(self, hostName)

source code 

Resolves (or not) IP address by given machine name

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

resolveHostIpWithRemoteDns(self, hostName, remoteDns)

source code 

Resolves (or not) IP address by given machine name using nslookup command on probe machine

Parameters:
  • hostName (string) - the machine name to resolve IP
  • remoteDns (string) - the remate DNS name (or IP) to resolve host IP
Returns: string

resolveHostIp(self, hostName)

source code 

Tries to resolve host IP using resolveHostIpWithLocalDns and resolveHostIpWithRemoteDns methods (in fall-back order)

Parameters:
  • hostName (string) - the machine name to resolve IP
Returns: string

getLocalShell(self)

source code 

Creates and caches local shell client. Must not be used outside of class.

close(self)

source code 

Closes local shell client. Have to be called after usage of IpResolver