octodns.source.tinydns

octodns.source.tinydns._unique(values)[source]
class octodns.source.tinydns.TinyDnsBaseSource(id, default_ttl=3600)[source]

Bases: BaseSource

SUPPORTS_GEO = False
SUPPORTS_DYNAMIC = False
__init__(id, default_ttl=3600)[source]
property SUPPORTS
_ttl_for(lines, index)[source]
_records_for_at(zone, name, lines, arpa=False)[source]
_records_for_C(zone, name, lines, arpa=False)[source]
_records_for_caret(zone, name, lines, arpa=False)[source]
_records_for_equal(zone, name, lines, arpa=False)[source]
_records_for_dot(zone, name, lines, arpa=False)[source]
_records_for_amp(zone, name, lines, arpa=False)
_records_for_plus(zone, name, lines, arpa=False)[source]
_records_for_quote(zone, name, lines, arpa=False)[source]
_records_for_three(zone, name, lines, arpa=False)[source]
_records_for_S(zone, name, lines, arpa=False)[source]
_records_for_colon(zone, name, lines, arpa=False)[source]
_records_for_six(zone, name, lines, arpa=False)[source]
SYMBOL_MAP = {'&': <function TinyDnsBaseSource._records_for_dot>, "'": <function TinyDnsBaseSource._records_for_quote>, '+': <function TinyDnsBaseSource._records_for_plus>, '.': <function TinyDnsBaseSource._records_for_dot>, '3': <function TinyDnsBaseSource._records_for_three>, '6': <function TinyDnsBaseSource._records_for_six>, ':': <function TinyDnsBaseSource._records_for_colon>, '=': <function TinyDnsBaseSource._records_for_equal>, '@': <function TinyDnsBaseSource._records_for_at>, 'C': <function TinyDnsBaseSource._records_for_C>, 'S': <function TinyDnsBaseSource._records_for_S>, '^': <function TinyDnsBaseSource._records_for_caret>}
_process_lines(zone, lines)[source]
_process_symbols(zone, symbols, arpa)[source]
populate(zone, target=False, lenient=False)[source]

Loads all records the provider knows about for the provided zone

When target is True the populate call is being made to load the current state of the provider.

When lenient is True the populate call may skip record validation and do a “best effort” load of data. That will allow through some common, but not best practices stuff that we otherwise would reject. E.g. no trailing . or missing escapes for ;.

When target is True (loading current state) this method should return True if the zone exists or False if it does not.

class octodns.source.tinydns.TinyDnsFileSource(id, directory, default_ttl=3600)[source]

Bases: TinyDnsBaseSource

A basic TinyDNS zonefile importer created to import legacy data.

tinydns:
    class: octodns.source.tinydns.TinyDnsFileSource
    # The location of the TinyDNS zone files
    directory: ./zones
    # The ttl to use for records when not specified in the data
    # (optional, default 3600)
    default_ttl: 3600

Note

timestamps & lo fields are ignored if present.

The source intends to conform to and fully support the official spec, https://cr.yp.to/djbdns/tinydns-data.html and the common patch/extensions to support IPv6 and a few other record types, https://docs.bytemark.co.uk/article/tinydns-format/.

__init__(id, directory, default_ttl=3600)[source]
_lines()[source]