rthalley / dnspython

a powerful DNS toolkit for python
http://www.dnspython.org
Other
2.46k stars 519 forks source link

Support for PoewrDNS Alias Records #1162

Closed alainstucki closed 4 weeks ago

alainstucki commented 1 month ago

Motivation As a user of the netbox-dns plugin (https://github.com/peteeckel/netbox-plugin-dns) which relies heavy on dnspython, i would like to use the ALIAS RecordType for PowerDNS (https://doc.powerdns.com/authoritative/guides/alias.html). According to the owner of the netbox-dns plugin, dnspython need to support/add ALIAS in the RecordTypeChoices List.

rthalley commented 1 month ago

The ALIAS pseudo record type is PowerDNS-only bit of zonefile magic, not a standard DNS type. Dnspython implements standard types, so this is not something we'd ship.

For your purposes, you could probably pick some unused high type code and make your own type with code that looked like dns/rdtypes/ANY/CNAME.py and register it with dns.rdatatype.register_type() and it would do what you wanted as far as zonefiles are concerned. It wouldn't work right for the rest of the protocol (e.g. DNS messages) nor would the zonefiles be valid for non-PowerDNS software. I can give you an example if that wasn't detailed enough, let me know.

rthalley commented 1 month ago

Brian tells me that there is a type code I just didn't find, 65401, and that the format is indeed the same as CNAME, so the advice I gave is really the right way to go.