The HostResolver
class represents a utility class to access DNS services.
Do not instantiate HostResolver
with its constructor, rather use the from_config()
method.
-
classmethod
from_config
(plugin_configuration)
The from_config()
method creates an instance of HostResolver service.
-
resolve_hosts_by_ip
(ip_address)
The resolve_hosts_by_ip()
method uses the DNS service to resolve a given IP address into a list of the
primary fully qualified domain name and possible alias names.
Parameters: | ip_address (str) – the IP address to resolve |
Returns: | list of host names |
Raises: | socket.error |