aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Aquifoliales <103569748+Aquifoliales@users.noreply.github.com> 2022-06-08 10:39:10 +0200
committerGravatar Aquifoliales <103569748+Aquifoliales@users.noreply.github.com> 2022-06-08 10:39:10 +0200
commitd5f1c3193c9ef2aff0b60816c462c867f41137bd (patch)
treee87bc93d8620a97ad0408c60cd0075cdd6359298
parentc988a3eda9eb833d18cc8c583854c22f23f44672 (diff)
downloadoctodns-custom-provider-d5f1c3193c9ef2aff0b60816c462c867f41137bd.tar.gz
Fixed SSHFP-Record, Added NAPTR
-rw-r--r--octodns-custom-providers/provider/zonefile.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/octodns-custom-providers/provider/zonefile.py b/octodns-custom-providers/provider/zonefile.py
index dd36c65..6462376 100644
--- a/octodns-custom-providers/provider/zonefile.py
+++ b/octodns-custom-providers/provider/zonefile.py
@@ -25,6 +25,7 @@ def _create_rdata( rdclass, rdtype, data ):
data['value'] = bytes(data['value'], 'utf-8')
if rdtype == 44: # SSHFP-Record
+ data['algorithm'] = data.pop('algorithm')
data['fp_type'] = data.pop('fingerprint_type')
data['fingerprint'] = bytes.fromhex(data['fingerprint'])
@@ -33,6 +34,13 @@ def _create_rdata( rdclass, rdtype, data ):
data['mtype'] = data.pop('matching_type')
data['cert'] = bytes.fromhex(data.pop('certificate_association_data'))
+ if rdtype == 35: # NAPTR-Record
+ data['order'] = data.pop('order')
+ data['preference'] = data.pop('preference')
+ data['flags'] = data.pop('flags')
+ data['regexp'] = data.pop('regexp')
+ data['replacement'] = data.pop('replacement')
+
for slot in cls.__slots__:
if not slot in data:
raise RdataParameterException('{} is missing'.format(slot))
@@ -42,8 +50,8 @@ def _create_rdata( rdclass, rdtype, data ):
class ZoneFileProvider(BaseProvider):
SUPPORTS_MULTIVALUE_PTR = True
SUPPORTS_GEO = False
- SUPPORTS = set(('A', 'AAAA', 'CAA', 'CNAME', 'MX', 'NS', 'PTR', 'SPF',
- 'SRV', 'SSHFP', 'TLSA', 'TXT'))
+ SUPPORTS = set(('A', 'AAAA', 'CAA', 'CNAME', 'MX', 'NAPTR', 'NS', 'PTR',
+ 'SPF', 'SRV', 'SSHFP', 'TLSA', 'TXT'))
'''
SOA dict