AKAMAIEDGEDNS: Fix AKAMAICDN add/modify. Fix integrationTest. (#2722)

This commit is contained in:
svernick 2023-12-13 16:31:40 -05:00 committed by GitHub
parent 0da3f75729
commit 7ce2eb4e7e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 5 deletions

View file

@ -557,10 +557,10 @@ func CanonicalizeTargets(recs []*RecordConfig, origin string) {
for _, r := range recs {
switch r.Type { // #rtype_variations
case "AKAMAICDN", "ANAME", "CNAME", "DS", "MX", "NS", "NAPTR", "PTR", "SRV":
case "ANAME", "CNAME", "DS", "MX", "NS", "NAPTR", "PTR", "SRV":
// Target is a hostname that might be a shortname. Turn it into a FQDN.
r.target = dnsutil.AddOrigin(r.target, originFQDN)
case "A", "ALIAS", "CAA", "DHCID", "CF_REDIRECT", "CF_TEMP_REDIRECT", "CF_WORKER_ROUTE", "IMPORT_TRANSFORM", "LOC", "SSHFP", "TLSA", "TXT":
case "A", "AKAMAICDN", "ALIAS", "CAA", "DHCID", "CF_REDIRECT", "CF_TEMP_REDIRECT", "CF_WORKER_ROUTE", "IMPORT_TRANSFORM", "LOC", "SSHFP", "TLSA", "TXT":
// Do nothing.
case "SOA":
if r.target != "DEFAULT_NOT_SET." {

View file

@ -22,7 +22,7 @@ import (
var features = providers.DocumentationNotes{
// The default for unlisted capabilities is 'Cannot'.
// See providers/capabilities.go for the entire list of capabilties.
// See providers/capabilities.go for the entire list of capabilities.
providers.CanAutoDNSSEC: providers.Can(),
providers.CanGetZones: providers.Can(),
providers.CanUseAKAMAICDN: providers.Can(),

View file

@ -1,10 +1,17 @@
package akamaiedgedns
import "github.com/StackExchange/dnscontrol/v4/models"
import (
"github.com/StackExchange/dnscontrol/v4/models"
"github.com/StackExchange/dnscontrol/v4/pkg/rejectif"
)
// AuditRecords returns a list of errors corresponding to the records
// that aren't supported by this provider. If all records are
// supported, an empty list is returned.
func AuditRecords(records []*models.RecordConfig) []error {
return nil
a := rejectif.Auditor{}
a.Add("TXT", rejectif.TxtHasDoubleQuotes) // Last verified 2023-12-12
a.Add("TXT", rejectif.TxtHasBackslash) // Last verified 2023-12-12
return a.Audit(records)
}