mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2025-10-06 20:05:50 +08:00
ACTIVEDIRECTORY: Implement get-zones (#643)
* activedir: implement get-zones
This commit is contained in:
parent
386275fde1
commit
7c0e02539c
1 changed files with 6 additions and 4 deletions
|
@ -39,10 +39,12 @@ var supportedTypes = map[string]bool{
|
||||||
|
|
||||||
// GetZoneRecords gets the records of a zone and returns them in RecordConfig format.
|
// GetZoneRecords gets the records of a zone and returns them in RecordConfig format.
|
||||||
func (client *adProvider) GetZoneRecords(domain string) (models.Records, error) {
|
func (client *adProvider) GetZoneRecords(domain string) (models.Records, error) {
|
||||||
return nil, fmt.Errorf("not implemented")
|
// Read foundRecords:
|
||||||
// This enables the get-zones subcommand.
|
foundRecords, err := c.getExistingRecords(dc.Name)
|
||||||
// Implement this by extracting the code from GetDomainCorrections into
|
if err != nil {
|
||||||
// a single function. For most providers this should be relatively easy.
|
return nil, fmt.Errorf("c.getExistingRecords(%q) failed: %v", dc.Name, err)
|
||||||
|
}
|
||||||
|
return foundRecords, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetDomainCorrections gets existing records, diffs them against existing, and returns corrections.
|
// GetDomainCorrections gets existing records, diffs them against existing, and returns corrections.
|
||||||
|
|
Loading…
Add table
Reference in a new issue