octodns.source.tinydns
¶
- class octodns.source.tinydns.TinyDnsBaseSource(id, default_ttl=3600)[source]¶
Bases:
BaseSource
- SUPPORTS_GEO = False¶
- SUPPORTS_DYNAMIC = False¶
- property SUPPORTS¶
- _records_for_amp(zone, name, lines, arpa=False)¶
- 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>}¶
- 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/.