Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Plural
platform
external-dns
Commits
32ce01e7
Commit
32ce01e7
authored
7 years ago
by
Nick Jüttner
Committed by
Henning Jacobs
7 years ago
Browse files
Options
Download
Email Patches
Plain Diff
Fix multi targets PowerDNS (#532)
parent
8819ed62
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
provider/pdns.go
+1
-1
provider/pdns.go
provider/pdns_test.go
+19
-19
provider/pdns_test.go
with
20 additions
and
20 deletions
+20
-20
provider/pdns.go
+
1
-
1
View file @
32ce01e7
...
...
@@ -194,7 +194,7 @@ func (p *PDNSProvider) convertRRSetToEndpoints(rr pgo.RrSet) (endpoints []*endpo
for
_
,
record
:=
range
rr
.
Records
{
// If a record is "Disabled", it's not supposed to be "visible"
if
!
record
.
Disabled
{
endpoints
=
append
(
endpoints
,
endpoint
.
NewEndpointWithTTL
(
rr
.
Name
,
record
.
Content
,
rr
.
Type_
,
endpoint
.
TTL
(
rr
.
Ttl
)))
endpoints
=
append
(
endpoints
,
endpoint
.
NewEndpointWithTTL
(
rr
.
Name
,
rr
.
Type_
,
endpoint
.
TTL
(
rr
.
Ttl
)
,
record
.
Content
))
}
}
...
...
This diff is collapsed.
Click to expand it.
provider/pdns_test.go
+
19
-
19
View file @
32ce01e7
...
...
@@ -107,42 +107,42 @@ var (
}
endpointsDisabledRecord
=
[]
*
endpoint
.
Endpoint
{
endpoint
.
NewEndpointWithTTL
(
"example.com"
,
"8.8.8.8"
,
endpoint
.
RecordTypeA
,
endpoint
.
TTL
(
300
)),
endpoint
.
NewEndpointWithTTL
(
"example.com"
,
endpoint
.
RecordTypeA
,
endpoint
.
TTL
(
300
)
,
"8.8.8.8"
),
}
endpointsSimpleRecord
=
[]
*
endpoint
.
Endpoint
{
endpoint
.
NewEndpointWithTTL
(
"example.com"
,
"8.8.8.8"
,
endpoint
.
RecordTypeA
,
endpoint
.
TTL
(
300
)),
endpoint
.
NewEndpointWithTTL
(
"example.com"
,
"
\"
heritage=external-dns,external-dns/owner=tower-pdns
\"
"
,
endpoint
.
RecordTypeTXT
,
endpoint
.
TTL
(
300
)
),
endpoint
.
NewEndpointWithTTL
(
"example.com"
,
endpoint
.
RecordTypeA
,
endpoint
.
TTL
(
300
)
,
"8.8.8.8"
),
endpoint
.
NewEndpointWithTTL
(
"example.com"
,
endpoint
.
RecordTypeTXT
,
endpoint
.
TTL
(
300
),
"
\"
heritage=external-dns,external-dns/owner=tower-pdns
\"
"
),
}
endpointsLongRecord
=
[]
*
endpoint
.
Endpoint
{
endpoint
.
NewEndpointWithTTL
(
"a.very.long.domainname.example.com"
,
"8.8.8.8"
,
endpoint
.
RecordTypeA
,
endpoint
.
TTL
(
300
)),
endpoint
.
NewEndpointWithTTL
(
"a.very.long.domainname.example.com"
,
"
\"
heritage=external-dns,external-dns/owner=tower-pdns
\"
"
,
endpoint
.
RecordTypeTXT
,
endpoint
.
TTL
(
300
)
),
endpoint
.
NewEndpointWithTTL
(
"a.very.long.domainname.example.com"
,
endpoint
.
RecordTypeA
,
endpoint
.
TTL
(
300
)
,
"8.8.8.8"
),
endpoint
.
NewEndpointWithTTL
(
"a.very.long.domainname.example.com"
,
endpoint
.
RecordTypeTXT
,
endpoint
.
TTL
(
300
),
"
\"
heritage=external-dns,external-dns/owner=tower-pdns
\"
"
),
}
endpointsNonexistantZone
=
[]
*
endpoint
.
Endpoint
{
endpoint
.
NewEndpointWithTTL
(
"does.not.exist.com"
,
"8.8.8.8"
,
endpoint
.
RecordTypeA
,
endpoint
.
TTL
(
300
)),
endpoint
.
NewEndpointWithTTL
(
"does.not.exist.com"
,
"
\"
heritage=external-dns,external-dns/owner=tower-pdns
\"
"
,
endpoint
.
RecordTypeTXT
,
endpoint
.
TTL
(
300
)
),
endpoint
.
NewEndpointWithTTL
(
"does.not.exist.com"
,
endpoint
.
RecordTypeA
,
endpoint
.
TTL
(
300
)
,
"8.8.8.8"
),
endpoint
.
NewEndpointWithTTL
(
"does.not.exist.com"
,
endpoint
.
RecordTypeTXT
,
endpoint
.
TTL
(
300
),
"
\"
heritage=external-dns,external-dns/owner=tower-pdns
\"
"
),
}
endpointsMultipleRecords
=
[]
*
endpoint
.
Endpoint
{
endpoint
.
NewEndpointWithTTL
(
"example.com"
,
"8.8.8.8"
,
endpoint
.
RecordTypeA
,
endpoint
.
TTL
(
300
)),
endpoint
.
NewEndpointWithTTL
(
"example.com"
,
"8.8.4.4"
,
endpoint
.
RecordTypeA
,
endpoint
.
TTL
(
300
)),
endpoint
.
NewEndpointWithTTL
(
"example.com"
,
"4.4.4.4"
,
endpoint
.
RecordTypeA
,
endpoint
.
TTL
(
300
)),
endpoint
.
NewEndpointWithTTL
(
"example.com"
,
endpoint
.
RecordTypeA
,
endpoint
.
TTL
(
300
)
,
"8.8.8.8"
),
endpoint
.
NewEndpointWithTTL
(
"example.com"
,
endpoint
.
RecordTypeA
,
endpoint
.
TTL
(
300
)
,
"8.8.4.4"
),
endpoint
.
NewEndpointWithTTL
(
"example.com"
,
endpoint
.
RecordTypeA
,
endpoint
.
TTL
(
300
)
,
"4.4.4.4"
),
}
endpointsMixedRecords
=
[]
*
endpoint
.
Endpoint
{
endpoint
.
NewEndpointWithTTL
(
"cname.example.com"
,
"example.by.any.other.name.com"
,
endpoint
.
RecordTypeCNAME
,
endpoint
.
TTL
(
300
)),
endpoint
.
NewEndpointWithTTL
(
"example.com"
,
"'would smell as sweet'"
,
endpoint
.
RecordTypeTXT
,
endpoint
.
TTL
(
300
)),
endpoint
.
NewEndpointWithTTL
(
"example.com"
,
"8.8.8.8"
,
endpoint
.
RecordTypeA
,
endpoint
.
TTL
(
300
)),
endpoint
.
NewEndpointWithTTL
(
"example.com"
,
"8.8.4.4"
,
endpoint
.
RecordTypeA
,
endpoint
.
TTL
(
300
)),
endpoint
.
NewEndpointWithTTL
(
"example.com"
,
"4.4.4.4"
,
endpoint
.
RecordTypeA
,
endpoint
.
TTL
(
300
)),
endpoint
.
NewEndpointWithTTL
(
"cname.example.com"
,
endpoint
.
RecordTypeCNAME
,
endpoint
.
TTL
(
300
)
,
"example.by.any.other.name.com"
),
endpoint
.
NewEndpointWithTTL
(
"example.com"
,
endpoint
.
RecordTypeTXT
,
endpoint
.
TTL
(
300
)
,
"'would smell as sweet'"
),
endpoint
.
NewEndpointWithTTL
(
"example.com"
,
endpoint
.
RecordTypeA
,
endpoint
.
TTL
(
300
)
,
"8.8.8.8"
),
endpoint
.
NewEndpointWithTTL
(
"example.com"
,
endpoint
.
RecordTypeA
,
endpoint
.
TTL
(
300
)
,
"8.8.4.4"
),
endpoint
.
NewEndpointWithTTL
(
"example.com"
,
endpoint
.
RecordTypeA
,
endpoint
.
TTL
(
300
)
,
"4.4.4.4"
),
}
endpointsMultipleZones
=
[]
*
endpoint
.
Endpoint
{
endpoint
.
NewEndpointWithTTL
(
"example.com"
,
"8.8.8.8"
,
endpoint
.
RecordTypeA
,
endpoint
.
TTL
(
300
)),
endpoint
.
NewEndpointWithTTL
(
"example.com"
,
"
\"
heritage=external-dns,external-dns/owner=tower-pdns
\"
"
,
endpoint
.
RecordTypeTXT
,
endpoint
.
TTL
(
300
)
),
endpoint
.
NewEndpointWithTTL
(
"mock.test"
,
"9.9.9.9"
,
endpoint
.
RecordTypeA
,
endpoint
.
TTL
(
300
)),
endpoint
.
NewEndpointWithTTL
(
"mock.test"
,
"
\"
heritage=external-dns,external-dns/owner=tower-pdns
\"
"
,
endpoint
.
RecordTypeTXT
,
endpoint
.
TTL
(
300
)
),
endpoint
.
NewEndpointWithTTL
(
"example.com"
,
endpoint
.
RecordTypeA
,
endpoint
.
TTL
(
300
)
,
"8.8.8.8"
),
endpoint
.
NewEndpointWithTTL
(
"example.com"
,
endpoint
.
RecordTypeTXT
,
endpoint
.
TTL
(
300
),
"
\"
heritage=external-dns,external-dns/owner=tower-pdns
\"
"
),
endpoint
.
NewEndpointWithTTL
(
"mock.test"
,
endpoint
.
RecordTypeA
,
endpoint
.
TTL
(
300
)
,
"9.9.9.9"
),
endpoint
.
NewEndpointWithTTL
(
"mock.test"
,
endpoint
.
RecordTypeTXT
,
endpoint
.
TTL
(
300
),
"
\"
heritage=external-dns,external-dns/owner=tower-pdns
\"
"
),
}
ZoneEmpty
=
pgo
.
Zone
{
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment