mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2024-05-11 05:55:12 +00:00
wip!
This commit is contained in:
@ -125,7 +125,7 @@ func (a *edgeDNSProvider) GetDomainCorrections(dc *models.DomainConfig) ([]*mode
|
||||
}
|
||||
|
||||
func (a *edgeDNSProvider) GetZoneRecordsCorrections(dc *models.DomainConfig, existingRecords models.Records) ([]*models.Correction, error) {
|
||||
txtutil.SplitSingleLongTxt(records)
|
||||
txtutil.SplitSingleLongTxt(existingRecords)
|
||||
|
||||
var corrections []*models.Correction
|
||||
var keysToUpdate map[models.RecordKey][]string
|
||||
|
@ -189,7 +189,7 @@ func (c *hednsProvider) GetDomainCorrections(dc *models.DomainConfig) ([]*models
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
models.PostProcessRecords(prunedRecords)
|
||||
models.PostProcessRecords(records)
|
||||
|
||||
return c.GetZoneRecordsCorrections(dc, records)
|
||||
}
|
||||
|
@ -58,13 +58,13 @@ func (s *softlayerProvider) GetNameservers(domain string) ([]*models.Nameserver,
|
||||
return models.ToNameservers([]string{"ns1.softlayer.com", "ns2.softlayer.com"})
|
||||
}
|
||||
|
||||
// GetZoneRecords gets the records of a zone and returns them in RecordConfig format.
|
||||
func (s *softlayerProvider) GetZoneRecords(domain string) (models.Records, error) {
|
||||
return nil, fmt.Errorf("not implemented")
|
||||
// This enables the get-zones subcommand.
|
||||
// Implement this by extracting the code from GetDomainCorrections into
|
||||
// a single function. For most providers this should be relatively easy.
|
||||
}
|
||||
// // GetZoneRecords gets the records of a zone and returns them in RecordConfig format.
|
||||
// func (s *softlayerProvider) GetZoneRecords(domain string) (models.Records, error) {
|
||||
// return nil, fmt.Errorf("not implemented")
|
||||
// // This enables the get-zones subcommand.
|
||||
// // Implement this by extracting the code from GetDomainCorrections into
|
||||
// // a single function. For most providers this should be relatively easy.
|
||||
// }
|
||||
|
||||
// GetDomainCorrections returns corrections to update a domain.
|
||||
func (s *softlayerProvider) GetDomainCorrections(dc *models.DomainConfig) ([]*models.Correction, error) {
|
||||
@ -85,8 +85,8 @@ func (s *softlayerProvider) GetDomainCorrections(dc *models.DomainConfig) ([]*mo
|
||||
return s.GetZoneRecordsCorrections(dc, actual)
|
||||
}
|
||||
|
||||
func (s *softlayerProvider) GetZoneRecords(domain string) (*models.records, error) {
|
||||
domain, err := s.getDomain(&dc.Name)
|
||||
func (s *softlayerProvider) GetZoneRecords(domainName string) (*models.Records, error) {
|
||||
domain, err := s.getDomain(&domainName)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -163,7 +163,7 @@ func (s *softlayerProvider) getDomain(name *string) (*datatypes.Dns_Domain, erro
|
||||
return &domains[0], nil
|
||||
}
|
||||
|
||||
func (s *softlayerProvider) getExistingRecords(domain *datatypes.Dns_Domain) ([]*models.RecordConfig, error) {
|
||||
func (s *softlayerProvider) getExistingRecords(domain *datatypes.Dns_Domain) (models.Records, error) {
|
||||
actual := []*models.RecordConfig{}
|
||||
|
||||
for _, record := range domain.ResourceRecords {
|
||||
|
Reference in New Issue
Block a user