provider/pdns.go
func (p *PDNSProvider) Records() (endpoints []*endpoint.Endpoint, _ error) {

	zones, _, err := p.client.ListZones()
	if err != nil {
		return nil, err
	}
	filteredZones, _ := p.client.PartitionZones(zones)

	for _, zone := range filteredZones {
		z, _, err := p.client.ListZone(zone.Id)
		if err != nil {
			log.Warnf("Unable to fetch Records")
			return nil, err
		}

		for _, rr := range z.Rrsets {
			e, err := p.convertRRSetToEndpoints(rr)
			if err != nil {
				return nil, err
			}
			endpoints = append(endpoints, e...)
		}
	}

	log.Debugf("Records fetched:\n%+v", endpoints)
	return endpoints, nil
}
func (p *PDNSProvider) Records() (endpoints []*endpoint.Endpoint, _ error) {

	zones, _, err := p.client.ListZones()
	if err != nil {
		return nil, err
	}
	filteredZones, _ := p.client.PartitionZones(zones)

	for _, zone := range filteredZones {
		z, _, err := p.client.ListZone(zone.Id)
		if err != nil {
			log.Warnf("Unable to fetch Records")
			return nil, err
		}

		for _, rr := range z.Rrsets {
			e, err := p.convertRRSetToEndpoints(rr)
			if err != nil {
				return nil, err
			}
			endpoints = append(endpoints, e...)
		}
	}

	log.Debugf("Records fetched:\n%+v", endpoints)
	return endpoints, nil
}
// Records returns all DNS records controlled by the configured PDNS server (for all zones)