mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2024-05-11 05:55:12 +00:00
oracle: fix nameserver trailing dot issue, and resolve staticcheck warnings (#1341)
* fix nameserver trailing dot issue, and resolve staticcheck warnings * ToNameservers Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>
This commit is contained in:
@@ -146,7 +146,7 @@ func (o *oracleProvider) GetNameservers(domain string) ([]*models.Nameserver, er
|
||||
nss[i] = *ns.Hostname
|
||||
}
|
||||
|
||||
return models.ToNameserversStripTD(nss)
|
||||
return models.ToNameservers(nss)
|
||||
}
|
||||
|
||||
func (o *oracleProvider) GetZoneRecords(domain string) (models.Records, error) {
|
||||
@@ -224,12 +224,9 @@ func (o *oracleProvider) GetDomainCorrections(dc *models.DomainConfig) ([]*model
|
||||
models.PostProcessRecords(existingRecords)
|
||||
txtutil.SplitSingleLongTxt(dc.Records) // Autosplit long TXT records
|
||||
|
||||
filteredNewRecords := models.Records{}
|
||||
|
||||
// Ensure we don't emit changes for attempted modification of built-in apex NSs
|
||||
for _, rec := range dc.Records {
|
||||
if rec.Type != "NS" {
|
||||
filteredNewRecords = append(filteredNewRecords, rec)
|
||||
continue
|
||||
}
|
||||
|
||||
@@ -243,7 +240,6 @@ func (o *oracleProvider) GetDomainCorrections(dc *models.DomainConfig) ([]*model
|
||||
printer.Warnf("Oracle Cloud forces TTL=86400 for NS records. Ignoring configured TTL of %d for %s\n", rec.TTL, recNS)
|
||||
rec.TTL = 86400
|
||||
}
|
||||
filteredNewRecords = append(filteredNewRecords, rec)
|
||||
}
|
||||
|
||||
differ := diff.New(dc)
|
||||
|
Reference in New Issue
Block a user