diff options
Diffstat (limited to 'dns/asyncresolver.py')
| -rw-r--r-- | dns/asyncresolver.py | 76 |
1 files changed, 10 insertions, 66 deletions
diff --git a/dns/asyncresolver.py b/dns/asyncresolver.py index a6582b2..90d1a6c 100644 --- a/dns/asyncresolver.py +++ b/dns/asyncresolver.py @@ -45,53 +45,12 @@ class Resolver(dns.resolver.Resolver): backend=None): """Query nameservers asynchronously to find the answer to the question. - The *qname*, *rdtype*, and *rdclass* parameters may be objects - of the appropriate type, or strings that can be converted into objects - of the appropriate type. - - *qname*, a ``dns.name.Name`` or ``str``, the query name. - - *rdtype*, an ``int`` or ``str``, the query type. - - *rdclass*, an ``int`` or ``str``, the query class. - - *tcp*, a ``bool``. If ``True``, use TCP to make the query. - - *source*, a ``str`` or ``None``. If not ``None``, bind to this IP - address when making queries. - - *raise_on_no_answer*, a ``bool``. If ``True``, raise - ``dns.resolver.NoAnswer`` if there's no answer to the question. - - *source_port*, an ``int``, the port from which to send the message. - - *lifetime*, a ``float``, how many seconds a query should run - before timing out. - - *search*, a ``bool`` or ``None``, determines whether the - search list configured in the system's resolver configuration - are used for relative names, and whether the resolver's domain - may be added to relative names. The default is ``None``, - which causes the value of the resolver's - ``use_search_by_default`` attribute to be used. - *backend*, a ``dns.asyncbackend.Backend``, or ``None``. If ``None``, the default, then dnspython will use the default backend. - Raises ``dns.resolver.NXDOMAIN`` if the query name does not exist. - - Raises ``dns.resolver.YXDOMAIN`` if the query name is too long after - DNAME substitution. - - Raises ``dns.resolver.NoAnswer`` if *raise_on_no_answer* is - ``True`` and the query name exists but has no RRset of the - desired type and class. - - Raises ``dns.resolver.NoNameservers`` if no non-broken - nameservers are available to answer the question. - - Returns a ``dns.resolver.Answer`` instance. - + See :py:func:`dns.resolver.Resolver.resolve()` for the + documentation of the other parameters, exceptions, and return + type of this method. """ resolution = dns.resolver._Resolution(self, qname, rdtype, rdclass, tcp, @@ -224,8 +183,8 @@ async def resolve(qname, rdtype=dns.rdatatype.A, rdclass=dns.rdataclass.IN, This is a convenience function that uses the default resolver object to make the query. - See ``dns.asyncresolver.Resolver.resolve`` for more information on the - parameters. + See :py:func:`dns.asyncresolver.Resolver.resolve` for more + information on the parameters. """ return await get_default_resolver().resolve(qname, rdtype, rdclass, tcp, @@ -237,7 +196,7 @@ async def resolve(qname, rdtype=dns.rdatatype.A, rdclass=dns.rdataclass.IN, async def resolve_address(ipaddr, *args, **kwargs): """Use a resolver to run a reverse query for PTR records. - See ``dns.asyncresolver.Resolver.resolve_address`` for more + See :py:func:`dns.asyncresolver.Resolver.resolve_address` for more information on the parameters. """ @@ -246,8 +205,8 @@ async def resolve_address(ipaddr, *args, **kwargs): async def canonical_name(name): """Determine the canonical name of *name*. - See ``dns.resolver.Resolver.canonical_name`` for more information on the - parameters and possible exceptions. + See :py:func:`dns.resolver.Resolver.canonical_name` for more + information on the parameters and possible exceptions. """ return await get_default_resolver().canonical_name(name) @@ -256,23 +215,8 @@ async def zone_for_name(name, rdclass=dns.rdataclass.IN, tcp=False, resolver=None, backend=None): """Find the name of the zone which contains the specified name. - *name*, an absolute ``dns.name.Name`` or ``str``, the query name. - - *rdclass*, an ``int``, the query class. - - *tcp*, a ``bool``. If ``True``, use TCP to make the query. - - *resolver*, a ``dns.asyncresolver.Resolver`` or ``None``, the - resolver to use. If ``None``, the default resolver is used. - - *backend*, a ``dns.asyncbackend.Backend``, or ``None``. If ``None``, - the default, then dnspython will use the default backend. - - Raises ``dns.resolver.NoRootSOA`` if there is no SOA RR at the DNS - root. (This is only likely to happen if you're using non-default - root servers in your network and they are misconfigured.) - - Returns a ``dns.name.Name``. + See :py:func:`dns.resolver.Resolver.zone_for_name` for more + information on the parameters and possible exceptions. """ if isinstance(name, str): |
