mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2024-05-11 05:55:12 +00:00
Fix for incomplete results from Azure DNS in fetchRecordSets (#791)
This commit is contained in:
@@ -518,16 +518,19 @@ func (a *azureDNSProvider) fetchRecordSets(zoneName string) ([]*adns.RecordSet,
|
|||||||
var records []*adns.RecordSet
|
var records []*adns.RecordSet
|
||||||
ctx, cancel := context.WithTimeout(context.Background(), 6000*time.Second)
|
ctx, cancel := context.WithTimeout(context.Background(), 6000*time.Second)
|
||||||
defer cancel()
|
defer cancel()
|
||||||
recordsIterator, recordsErr := a.recordsClient.ListAllByDNSZoneComplete(ctx, *a.resourceGroup, zoneName, to.Int32Ptr(1000), "")
|
recordsIterator, recordsErr := a.recordsClient.ListAllByDNSZone(ctx, *a.resourceGroup, zoneName, to.Int32Ptr(1000), "")
|
||||||
if recordsErr != nil {
|
if recordsErr != nil {
|
||||||
return nil, recordsErr
|
return nil, recordsErr
|
||||||
}
|
}
|
||||||
recordsResult := recordsIterator.Response()
|
|
||||||
|
|
||||||
|
for recordsIterator.NotDone() {
|
||||||
|
recordsResult := recordsIterator.Response()
|
||||||
for _, r := range *recordsResult.Value {
|
for _, r := range *recordsResult.Value {
|
||||||
record := r
|
record := r
|
||||||
records = append(records, &record)
|
records = append(records, &record)
|
||||||
}
|
}
|
||||||
|
recordsIterator.NextWithContext(ctx)
|
||||||
|
}
|
||||||
|
|
||||||
return records, nil
|
return records, nil
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user