AKAMAIEDGEDNS: Adopt diff2 in compatibility mode
@@ -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
}
@@ -223,11 +227,6 @@ func (a *edgeDNSProvider) GetDomainCorrections(dc *models.DomainConfig) ([]*mode
return corrections, nil
}
- // Insert Future diff2 version here.
-
- return corrections, nil
-}
-
// GetNameservers returns the nameservers for a domain.
func (a *edgeDNSProvider) GetNameservers(domain string) ([]*models.Nameserver, error) {
authorities, err := getAuthorities(a.contractID)
