mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2025-09-09 22:55:17 +08: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:
parent
d4956c225c
commit
9a915db5b8
1 changed files with 1 additions and 5 deletions
|
@ -146,7 +146,7 @@ func (o *oracleProvider) GetNameservers(domain string) ([]*models.Nameserver, er
|
||||||
nss[i] = *ns.Hostname
|
nss[i] = *ns.Hostname
|
||||||
}
|
}
|
||||||
|
|
||||||
return models.ToNameserversStripTD(nss)
|
return models.ToNameservers(nss)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *oracleProvider) GetZoneRecords(domain string) (models.Records, error) {
|
func (o *oracleProvider) GetZoneRecords(domain string) (models.Records, error) {
|
||||||
|
@ -224,12 +224,9 @@ func (o *oracleProvider) GetDomainCorrections(dc *models.DomainConfig) ([]*model
|
||||||
models.PostProcessRecords(existingRecords)
|
models.PostProcessRecords(existingRecords)
|
||||||
txtutil.SplitSingleLongTxt(dc.Records) // Autosplit long TXT records
|
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
|
// Ensure we don't emit changes for attempted modification of built-in apex NSs
|
||||||
for _, rec := range dc.Records {
|
for _, rec := range dc.Records {
|
||||||
if rec.Type != "NS" {
|
if rec.Type != "NS" {
|
||||||
filteredNewRecords = append(filteredNewRecords, rec)
|
|
||||||
continue
|
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)
|
printer.Warnf("Oracle Cloud forces TTL=86400 for NS records. Ignoring configured TTL of %d for %s\n", rec.TTL, recNS)
|
||||||
rec.TTL = 86400
|
rec.TTL = 86400
|
||||||
}
|
}
|
||||||
filteredNewRecords = append(filteredNewRecords, rec)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
differ := diff.New(dc)
|
differ := diff.New(dc)
|
||||||
|
|
Loading…
Add table
Reference in a new issue