mirror of
https://github.com/kubernetes-sigs/external-dns.git
synced 2025-08-05 17:16:59 +02:00
Update references to UKFast to ANS group
Signed-off-by: Rick Henry <rick.henry@assureddigitaltech.com>
This commit is contained in:
parent
e58a901d5c
commit
aab63ec4f7
@ -21,10 +21,10 @@ import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
log "github.com/sirupsen/logrus"
|
||||
ukfClient "github.com/ans-group/sdk-go/pkg/client"
|
||||
ukfConnection "github.com/ans-group/sdk-go/pkg/connection"
|
||||
ansClient "github.com/ans-group/sdk-go/pkg/client"
|
||||
ansConnection "github.com/ans-group/sdk-go/pkg/connection"
|
||||
"github.com/ans-group/sdk-go/pkg/service/safedns"
|
||||
log "github.com/sirupsen/logrus"
|
||||
|
||||
"sigs.k8s.io/external-dns/endpoint"
|
||||
"sigs.k8s.io/external-dns/plan"
|
||||
@ -38,8 +38,8 @@ type SafeDNS interface {
|
||||
DeleteZoneRecord(zoneName string, recordID int) error
|
||||
GetZone(zoneName string) (safedns.Zone, error)
|
||||
GetZoneRecord(zoneName string, recordID int) (safedns.Record, error)
|
||||
GetZoneRecords(zoneName string, parameters ukfConnection.APIRequestParameters) ([]safedns.Record, error)
|
||||
GetZones(parameters ukfConnection.APIRequestParameters) ([]safedns.Zone, error)
|
||||
GetZoneRecords(zoneName string, parameters ansConnection.APIRequestParameters) ([]safedns.Record, error)
|
||||
GetZones(parameters ansConnection.APIRequestParameters) ([]safedns.Zone, error)
|
||||
PatchZoneRecord(zoneName string, recordID int, patch safedns.PatchRecordRequest) (int, error)
|
||||
UpdateZoneRecord(zoneName string, record safedns.Record) (int, error)
|
||||
}
|
||||
@ -51,7 +51,7 @@ type SafeDNSProvider struct {
|
||||
// Only consider hosted zones managing domains ending in this suffix
|
||||
domainFilter endpoint.DomainFilter
|
||||
DryRun bool
|
||||
APIRequestParams ukfConnection.APIRequestParameters
|
||||
APIRequestParams ansConnection.APIRequestParameters
|
||||
}
|
||||
|
||||
// ZoneRecord is a datatype to simplify management of a record in a zone.
|
||||
@ -70,15 +70,15 @@ func NewSafeDNSProvider(domainFilter endpoint.DomainFilter, dryRun bool) (*SafeD
|
||||
return nil, fmt.Errorf("no SAFEDNS_TOKEN found in environment")
|
||||
}
|
||||
|
||||
ukfAPIConnection := ukfConnection.NewAPIKeyCredentialsAPIConnection(token)
|
||||
ukfClient := ukfClient.NewClient(ukfAPIConnection)
|
||||
safeDNS := ukfClient.SafeDNSService()
|
||||
ukfAPIConnection := ansConnection.NewAPIKeyCredentialsAPIConnection(token)
|
||||
ansClient := ansClient.NewClient(ukfAPIConnection)
|
||||
safeDNS := ansClient.SafeDNSService()
|
||||
|
||||
provider := &SafeDNSProvider{
|
||||
Client: safeDNS,
|
||||
domainFilter: domainFilter,
|
||||
DryRun: dryRun,
|
||||
APIRequestParams: *ukfConnection.NewAPIRequestParameters(),
|
||||
APIRequestParams: *ansConnection.NewAPIRequestParameters(),
|
||||
}
|
||||
return provider, nil
|
||||
}
|
||||
|
@ -21,11 +21,11 @@ import (
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
ansConnection "github.com/ans-group/sdk-go/pkg/connection"
|
||||
"github.com/ans-group/sdk-go/pkg/service/safedns"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/mock"
|
||||
"github.com/stretchr/testify/require"
|
||||
ukfConnection "github.com/ans-group/sdk-go/pkg/connection"
|
||||
"github.com/ans-group/sdk-go/pkg/service/safedns"
|
||||
|
||||
"sigs.k8s.io/external-dns/endpoint"
|
||||
"sigs.k8s.io/external-dns/plan"
|
||||
@ -56,12 +56,12 @@ func (m *MockSafeDNSService) GetZoneRecord(zoneName string, recordID int) (safed
|
||||
return args.Get(0).(safedns.Record), args.Error(1)
|
||||
}
|
||||
|
||||
func (m *MockSafeDNSService) GetZoneRecords(zoneName string, parameters ukfConnection.APIRequestParameters) ([]safedns.Record, error) {
|
||||
func (m *MockSafeDNSService) GetZoneRecords(zoneName string, parameters ansConnection.APIRequestParameters) ([]safedns.Record, error) {
|
||||
args := m.Called(zoneName, parameters)
|
||||
return args.Get(0).([]safedns.Record), args.Error(1)
|
||||
}
|
||||
|
||||
func (m *MockSafeDNSService) GetZones(parameters ukfConnection.APIRequestParameters) ([]safedns.Zone, error) {
|
||||
func (m *MockSafeDNSService) GetZones(parameters ansConnection.APIRequestParameters) ([]safedns.Zone, error) {
|
||||
args := m.Called(parameters)
|
||||
return args.Get(0).([]safedns.Zone), args.Error(1)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user