1
0
mirror of https://github.com/StackExchange/dnscontrol.git synced 2024-05-11 05:55:12 +00:00

GetNameservers is inconsistent across providers (#655)

* Warn if GetNameservers returns FQDN+dot strings
* Simplify logic that covers for the inconsistency
* Fix azuredns, gcloud, bind, route53
* Clean up cloudflare, digitalocean, dnsimple, gandi_v5, namedotcom
This commit is contained in:
Tom Limoncelli
2020-03-01 10:33:24 -05:00
committed by GitHub
parent ecac8f1c10
commit 3f68215841
14 changed files with 137 additions and 26 deletions

View File

@@ -172,13 +172,14 @@ func (r *route53Provider) GetNameservers(domain string) ([]*models.Nameserver, e
if err != nil {
return nil, err
}
ns := []*models.Nameserver{}
var nss []string
if z.DelegationSet != nil {
for _, nsPtr := range z.DelegationSet.NameServers {
ns = append(ns, &models.Nameserver{Name: *nsPtr})
nss = append(nss, *nsPtr)
}
}
return ns, nil
return models.ToNameservers(nss)
}
// GetZoneRecords gets the records of a zone and returns them in RecordConfig format.