mirror of
https://github.com/kubernetes-sigs/external-dns.git
synced 2025-08-06 17:46:57 +02:00
feat: add move from dynectsoap to dynsoap
This commit is contained in:
parent
425e8773cc
commit
ca3d3f81e2
2
go.mod
2
go.mod
@ -30,6 +30,7 @@ require (
|
||||
github.com/google/go-cmp v0.4.1
|
||||
github.com/gophercloud/gophercloud v0.1.0
|
||||
github.com/gorilla/mux v1.7.4 // indirect
|
||||
github.com/hooklift/gowsdl v0.4.0
|
||||
github.com/infobloxopen/infoblox-go-client v0.0.0-20180606155407-61dc5f9b0a65
|
||||
github.com/linki/instrumented_http v0.2.0
|
||||
github.com/linode/linodego v0.19.0
|
||||
@ -41,7 +42,6 @@ require (
|
||||
github.com/openshift/client-go v0.0.0-20200608144219-584632b8fc73
|
||||
github.com/oracle/oci-go-sdk v21.4.0+incompatible
|
||||
github.com/ovh/go-ovh v0.0.0-20181109152953-ba5adb4cf014
|
||||
github.com/pg2000/dynsoap v0.0.0-20210302131910-d513cf169ae8
|
||||
github.com/pkg/errors v0.9.1
|
||||
github.com/projectcontour/contour v1.5.0
|
||||
github.com/prometheus/client_golang v1.7.1
|
||||
|
2
go.sum
2
go.sum
@ -713,8 +713,6 @@ github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtP
|
||||
github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
|
||||
github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac=
|
||||
github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU=
|
||||
github.com/pg2000/dynsoap v0.0.0-20210302131910-d513cf169ae8 h1:9LDPod2FvUWpuyIa+CbmHZ9MX+sY65sVzlGMdixdZrs=
|
||||
github.com/pg2000/dynsoap v0.0.0-20210302131910-d513cf169ae8/go.mod h1:Q5lQc3H1nziGjQSmVSWjDS13pOkDnqZH/6Qli1GygSo=
|
||||
github.com/phayes/freeport v0.0.0-20180830031419-95f893ade6f2/go.mod h1:iIss55rKnNBTvrwdmkUpLnDpZoAHvWaiq5+iMmen4AE=
|
||||
github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc=
|
||||
github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY=
|
||||
|
@ -24,8 +24,6 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/pg2000/dynsoap/pkg/dynsoap"
|
||||
|
||||
log "github.com/sirupsen/logrus"
|
||||
|
||||
"github.com/nesv/go-dynect/dynect"
|
||||
@ -33,6 +31,7 @@ import (
|
||||
"sigs.k8s.io/external-dns/endpoint"
|
||||
"sigs.k8s.io/external-dns/plan"
|
||||
"sigs.k8s.io/external-dns/provider"
|
||||
dynsoap "sigs.k8s.io/external-dns/provider/dyn/soap"
|
||||
)
|
||||
|
||||
const (
|
||||
|
44
provider/dyn/soap/client.go
Normal file
44
provider/dyn/soap/client.go
Normal file
@ -0,0 +1,44 @@
|
||||
/*
|
||||
Copyright 2020 The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package dynsoap
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/hooklift/gowsdl/soap"
|
||||
)
|
||||
|
||||
// Returns a Dynect Client with a configured http.Client
|
||||
// The default settings for the http.client are a timeout of
|
||||
// 10 seconds and reading proxy variables from http.ProxyFromEnvironment
|
||||
func NewDynectClient(url string) Dynect {
|
||||
client := &http.Client{
|
||||
Timeout: time.Second * 10,
|
||||
Transport: &http.Transport{
|
||||
Proxy: http.ProxyFromEnvironment,
|
||||
},
|
||||
}
|
||||
soapClient := soap.NewClient(url, soap.WithHTTPClient(client))
|
||||
return NewDynect(soapClient)
|
||||
}
|
||||
|
||||
// Returns a Dynect Client without a configured http.Client
|
||||
func NewCustomDynectClient(url string, client http.Client) Dynect {
|
||||
soapClient := soap.NewClient(url, soap.WithHTTPClient(&client))
|
||||
return NewDynect(soapClient)
|
||||
}
|
32865
provider/dyn/soap/services.go
Normal file
32865
provider/dyn/soap/services.go
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user