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:
@@ -28,7 +28,7 @@ func (n *NameCom) GetNameservers(domain string) ([]*models.Nameserver, error) {
|
||||
toUse[idx] = matches[0]
|
||||
}
|
||||
}
|
||||
return models.StringsToNameservers(toUse), nil
|
||||
return models.ToNameservers(toUse)
|
||||
}
|
||||
|
||||
func (n *NameCom) getNameserversRaw(domain string) ([]string, error) {
|
||||
@@ -55,9 +55,6 @@ func (n *NameCom) GetRegistrarCorrections(dc *models.DomainConfig) ([]*models.Co
|
||||
expected := []string{}
|
||||
for _, ns := range dc.Nameservers {
|
||||
expected = append(expected, ns.Name)
|
||||
// FIXME(tlim): This should store a FQDN with no trailing ".".
|
||||
// See pkg/nameservers/nameservers.go for details.
|
||||
// Bug https://github.com/StackExchange/dnscontrol/issues/491
|
||||
}
|
||||
sort.Strings(expected)
|
||||
expectedNameservers := strings.Join(expected, ",")
|
||||
|
Reference in New Issue
Block a user