mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2025-10-17 17:25:58 +08:00
AKAMAIEDGEDNS: Adopt diff2 in compatibility mode (#1872)
This commit is contained in:
parent
ec1d91ae88
commit
22c6797f83
1 changed files with 98 additions and 99 deletions
|
@ -123,9 +123,13 @@ func (a *edgeDNSProvider) GetDomainCorrections(dc *models.DomainConfig) ([]*mode
|
|||
txtutil.SplitSingleLongTxt(dc.Records)
|
||||
|
||||
var corrections []*models.Correction
|
||||
if !diff2.EnableDiff2 || true { // Remove "|| true" when diff2 version arrives
|
||||
|
||||
keysToUpdate, err := (diff.New(dc)).ChangedGroups(existingRecords)
|
||||
var keysToUpdate map[models.RecordKey][]string
|
||||
if !diff2.EnableDiff2 {
|
||||
keysToUpdate, err = (diff.New(dc)).ChangedGroups(existingRecords)
|
||||
} else {
|
||||
keysToUpdate, err = (diff.NewCompat(dc)).ChangedGroups(existingRecords)
|
||||
// TODO(tlim): In the future please adopt `pkg/diff2/By*()`
|
||||
}
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -220,11 +224,6 @@ func (a *edgeDNSProvider) GetDomainCorrections(dc *models.DomainConfig) ([]*mode
|
|||
printer.Debugf("autoDNSSecEnable: Disable AutoDnsSec for zone %s\n", dc.Name)
|
||||
}
|
||||
|
||||
return corrections, nil
|
||||
}
|
||||
|
||||
// Insert Future diff2 version here.
|
||||
|
||||
return corrections, nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue