mirror of
https://github.com/github/octodns.git
synced 2024-05-11 05:55:00 +00:00
Merge branch 'master' into extract-dnsimple
This commit is contained in:
@@ -194,7 +194,7 @@ The table below lists the providers octoDNS supports. We're currently in the pro
|
||||
|--|--|--|--|--|--|
|
||||
| [AzureProvider](/octodns/provider/azuredns.py) | | azure-identity, azure-mgmt-dns, azure-mgmt-trafficmanager | A, AAAA, CAA, CNAME, MX, NS, PTR, SRV, TXT | Alpha (A, AAAA, CNAME) | |
|
||||
| [Akamai](/octodns/provider/edgedns.py) | | edgegrid-python | A, AAAA, CNAME, MX, NAPTR, NS, PTR, SPF, SRV, SSHFP, TXT | No | |
|
||||
| [CloudflareProvider](/octodns/provider/cloudflare.py) | | | A, AAAA, ALIAS, CAA, CNAME, LOC, MX, NS, PTR, SPF, SRV, TXT | No | CAA tags restricted |
|
||||
| [CloudflareProvider](/octodns/provider/cloudflare.py) | | | A, AAAA, ALIAS, CAA, CNAME, LOC, MX, NS, PTR, SPF, SRV, TXT, URLFWD | No | CAA tags restricted |
|
||||
| [ConstellixProvider](/octodns/provider/constellix.py) | | | A, AAAA, ALIAS (ANAME), CAA, CNAME, MX, NS, PTR, SPF, SRV, TXT | Yes | CAA tags restricted |
|
||||
| [DigitalOceanProvider](/octodns/provider/digitalocean.py) | | | A, AAAA, CAA, CNAME, MX, NS, TXT, SRV | No | CAA tags restricted |
|
||||
| [DnsMadeEasyProvider](/octodns/provider/dnsmadeeasy.py) | | | A, AAAA, ALIAS (ANAME), CAA, CNAME, MX, NS, PTR, SPF, SRV, TXT | No | CAA tags restricted |
|
||||
|
||||
@@ -124,6 +124,8 @@ class Record(EqualityTupleMixin):
|
||||
@classmethod
|
||||
def validate(cls, name, fqdn, data):
|
||||
reasons = []
|
||||
if name == '@':
|
||||
reasons.append('invalid name "@", use "" instead')
|
||||
n = len(fqdn)
|
||||
if n > 253:
|
||||
reasons.append(f'invalid fqdn, "{fqdn}" is too long at {n} '
|
||||
|
||||
@@ -1643,6 +1643,17 @@ class TestRecordValidation(TestCase):
|
||||
zone = Zone('unit.tests.', [])
|
||||
|
||||
def test_base(self):
|
||||
# name = '@'
|
||||
with self.assertRaises(ValidationError) as ctx:
|
||||
name = '@'
|
||||
Record.new(self.zone, name, {
|
||||
'ttl': 300,
|
||||
'type': 'A',
|
||||
'value': '1.2.3.4',
|
||||
})
|
||||
reason = ctx.exception.reasons[0]
|
||||
self.assertTrue(reason.startswith('invalid name "@", use "" instead'))
|
||||
|
||||
# fqdn length, DNS defins max as 253
|
||||
with self.assertRaises(ValidationError) as ctx:
|
||||
# The . will put this over the edge
|
||||
|
||||
Reference in New Issue
Block a user