Commit graph

159 commits

Author SHA1 Message Date
Tom Limoncelli
61a00a7d7e
Check for duplicate records much earlier (#467)
* Check for duplicate records much earlier.

* Change GetTargetDiffable to ToDiffable

* fixup!
2019-04-22 15:41:39 -04:00
Peter Dunaskin
e2726dda64 Fix NAPTR record support. 2019-03-29 12:01:52 +01:00
Peter Dunaskin
7566c0428e Attempt to add NAPTR support. 2019-03-28 15:40:13 +01:00
Pierre-Emmanuel Jacquier
511c0bf7de NEW PROVIDER: Exoscale (#390)
* Add exoscale provider

Signed-off-by: Pierre-Emmanuel Jacquier <pierre-emmanuel.jacquier@epitech.eu>

* Fix validation

Signed-off-by: Pierre-Emmanuel Jacquier <pierre-emmanuel.jacquier@epitech.eu>

* Fix DualProvider

Signed-off-by: Pierre-Emmanuel Jacquier <pierre-emmanuel.jacquier@epitech.eu>
2019-02-22 09:10:23 -05:00
Craig Peterson
9a6af836dc
Activedirectory: Full support for managing NS records. (#450)
* condense AD 'unsupported record type' warnings

* active directory provider can create/modify/delete NS records!

* ad passes more of the tests now

* skip root NS records for safety

* clarifying comment
2019-02-20 12:30:35 -05:00
Riley Berton
82d4660816 ROUTE53/GCLOUD: Add Delegation/nameserver Sets (#448)
- Support DelegationSet for Route53 (create-domains only)
- Retry Route53 operations which fail for rate limits under large numbers of domains
- Support for name_server_set for GCloud (create-domains only)
- Docs for both
2019-02-19 12:30:39 -05:00
karlism
f9fc6243d4 Add SSHFP DNS record support. (#439)
* Add SSHFP DNS record support.
* Fix integration test.
2019-01-28 17:26:20 -05:00
Bart S
5594904f3d CLOUDFLARE: Added options to set the target account for new domains (#430) 2018-12-19 09:48:27 -05:00
Tom Limoncelli
bb8d0cacb6
Warn (but don't fail) if creds.json file does not exist (#425) 2018-12-11 11:56:06 -05:00
Tom Limoncelli
38074df158
BIND: Warn if output directory does not exist. (#424) 2018-12-10 14:05:01 -05:00
Brice Figureau
292ea28208 Populate ovh zones cache as early as possible (#412) (#417)
* Maint: run generate for missing documentation

Apparently current master is missing some generated documentation.

* Populate ovh zones cache as early as possible (#412)

We are caching the OVH zones in GetNameservers.
It turns out it isn’t a good idea, because GetNameServers will not be called
if the user selects no name servers for a given domain by using for example:

```
D(‘my domain’, DnsProvider(ovh, 0)) {
}
```

The subsequent GetDomainCorrections would automatically fail
with an unknown domain error, because the zones cache hasn’t been
filled in.

To solve the issue, the ovh provider now populates the zones cache during
initialisation.
2018-10-16 15:42:54 -04:00
Tom Limoncelli
93a36cbba9
GCLOUD: Support TXTMulti (#415)
* GCLOUD: Support TXTMulti
* Testing: Test max TXT record length
2018-10-14 10:53:11 -04:00
Amy Aronsohn
a2c54c85af Update DNSimple-go to v0.20.0 and fix provider (#414)
Signed-off-by: Amy Aronsohn <WagThatTail@Me.com>
2018-10-14 00:30:58 -04:00
Amy Aronsohn
4e417eaa06 Fix DNSimple SRV and MX records (#413)
* Fix SRV and MX records, update knownFailures

This gets us back to tests passing

Signed-off-by: Amy Aronsohn <WagThatTail@Me.com>

* Better comment

Signed-off-by: Amy Aronsohn <WagThatTail@Me.com>
2018-10-14 00:30:13 -04:00
Ed Bardsley
06ee4d6fb1 Verbose debug logging via the ConsolePrinter and printer package. (#404)
This:
 * adds a global -v flag for verbosity
 * refactors the "printer" package to have a DefaultPrinter and package
   functions that call it, similar to net/http's DefaultServeMux
 * adds printer tests
 * moves current users of Debugf to Printf
 * moves most users of the "log" package to use "printer"
 * demotes noticably noisy log messages to "Debugf", like "IGNORE"-
   and "NO_PURGE"-related messages
2018-10-08 16:10:44 -04:00
Craig Peterson
d006f62f8f make sure key/value grouping always uses fqdn 2018-09-07 13:46:44 -04:00
ashleyhull-versent
e616cd7979 Update route53Provider.go (#401) 2018-09-04 12:58:02 -04:00
Ed Bardsley
61281d7046 Add NAMESERVER_TTL and associated documentation. (#398) 2018-09-04 10:57:11 -04:00
Ed Bardsley
61c92c9215 Correctly group R53_ALIAS records during IncrementalDiff. (#399)
Previously, unnecessary corrections were possible if both an R53_ALIAS
pointing to an A record and to an AAAA record existed for the same label,
and map iteration over existing and desired found them in different orders.
(This is a common configuration for IPv6-enabled records.)

This commit:
 * mirrors key logic in the R53 provider
 * centralizes logic around keys in the models package
 * adds tests
2018-09-04 10:55:27 -04:00
Kai Schwarz
3e5d223675 new provider module HEXONET (#373) 2018-08-30 08:54:42 -04:00
Craig Peterson
e680fb9a46 ROUTE53: Bug: fix corner case when deleting alias (#394) 2018-08-23 17:46:50 -04:00
Yoan Blanc
18f47d3291 dnsimple: gofmt (#388)
Signed-off-by: Yoan Blanc <yoan.blanc@exoscale.ch>
2018-08-13 10:41:54 -04:00
Tom Limoncelli
b0f86bc007
Documentation: Clarify the when to implement certain interfaces (#376) 2018-07-25 12:59:04 -04:00
Kieran Jacobsen
6ace5e2b4b Cloudflare: Add support for MX priorities of "" (0) (#374)
* Cloudflare: Add support for MX priorities of "" (0)
2018-07-24 08:51:10 -04:00
Koen Rouwhorst
921fa98490 Include record set type in record key. (#336) 2018-06-25 14:15:21 -04:00
Amy Aronsohn
a6536264b5 sort returned nameservers (#369)
The API isn't sorting the name servers so even when they match they
would report being different. This will prevent it trying to update them
every time

Signed-off-by: Amy Aronsohn <WagThatTail@Me.com>
2018-06-24 23:37:16 -04:00
Patrick G
9d0f9a1531 Cloudflare: Fix parsing of priority field in record (fixes #367) (#368) 2018-06-22 14:11:05 -04:00
Craig Peterson
17e64ca28d
fix names for internal transformed records (#358)
* fix names for internal transformed records

* activedirectory use standard messaged

* add test for fqdn consistency in final validation pass
2018-04-26 14:45:10 -04:00
Craig Peterson
554e8a40e1
Update AD integration failures (#353) 2018-03-29 14:03:34 -04:00
Tom Limoncelli
acaa77dc22
BIND: Fix panic on CNAME (#347)
* BIND: Fix panic on CNAME
* Improve tests
2018-03-22 09:25:40 -04:00
Brice Figureau
f9d748011e OVH: panic on SPF and DKIM record types (#340)
OVH uses special SPF and DKIM invalid types for records added with
the web ui (or default zone records).
The ovh provider didn't correctly handle those invalid record types
and was panic'ing.
This change prevents the panic by converting such records to TXT
(which is what they are in fact), but also auto-corrects any SPF
or DKIM records to TXT ones.
2018-03-21 14:49:54 -04:00
Tom Limoncelli
a7eba97ada
Refactor in preparation to unexport RecordConfig.{Name,NameFQDN,Target} (#337)
* Preparing for the unexport of Name/NameFQDN/Target
* Cleanups
2018-03-19 17:18:58 -04:00
Tom Limoncelli
2579336cdb GCLOUD: create-zones breaks if domain starts with digit 2018-03-09 07:01:13 -05:00
Koen Vlaswinkel
afa80c24bd LINODE: Fix Linode provider (#333) 2018-03-08 13:48:11 -05:00
domelu
8db97d1132 BUG: ROUTE53 crashes if traffic flow policy records exist (#330)
* skip traffic policy records
2018-03-08 11:59:40 -05:00
Brice Figureau
2d7a48950c Fix 312 - rewrite IGNORE to use GetLabel (#331)
As discussed after the refactor to generalize the use of `GetLabel`,
this change makes IGNORE also use `GetLabel`.
2018-03-08 09:43:54 -05:00
Philipp Hug
dfd015e5cd NEW REGISTRAR: OpenSRS (#275)
* Initial commit for OpenSRS registrar support #272
* sort existing name servers before comparing.
* vendor philhug/opensrs-go
* Update docs for OpenSRS #272
* Cache OpenSRS client to prevent http connection leak
* run go fmt
2018-03-04 23:07:22 -05:00
Tom Limoncelli
20f0c984e4
GCLOUD: Differentiate two modules name dns (#328)
* fix import
2018-03-01 10:20:34 -05:00
Craig Peterson
19ca760072 fix for deleting wildcard from r53. includes failing integration test 2018-03-01 10:09:02 -05:00
Tom Limoncelli
54de1ff698
NEW PROVIDER: OctoDNS (#309)
* govendor gopkg.in/yaml.v2
* Ignore YAML and BIND test data litter.  Create README.txt files to force git to create subdirectories.
* Update convertzone to also read OctoDNS files
2018-02-27 17:36:47 -05:00
Tom Limoncelli
32a481b85f
BUG: dnssimple URL broke during refactor (#325) 2018-02-27 16:50:34 -05:00
Tom Limoncelli
e266e953d9
Fix DNSimple crashes on Alias: (#322)
* Fix https://github.com/StackExchange/dnscontrol/issues/321
2018-02-27 09:38:39 -05:00
Tom Limoncelli
1097c96fcc
New Provider: GANDI-LIVEDNS (API v5) (#320)
* Add gandi LiveDNS api provider
* vendor testify and gandi live DNS
* govendor update github.com/prasmussen/gandi-api/{client,live_dns}
* Fix Gandi-livedns TXT unit test
* TravisCI should use go 1.10
2018-02-24 13:40:18 -05:00
Tom Limoncelli
86914b0696 Fix broken test 2018-02-24 13:03:31 -05:00
Tom Limoncelli
de4455942b
Refactor RecordConfig: Add getters/setters (#314)
* Replace RecordConfig.Name and .NameFQDN with getters and setters.
* Replace RecordConfig.Target with getters and setters.
* Eliminate the CombinedTarget concept.
* Add RecordConfig.PopulateFromString to reduce code in all providers.
* encode and decode name.com txt records (#315)
* Replace fmt.Errorf with errors.Errorf
2018-02-15 12:02:50 -05:00
Tom Limoncelli
4b1dc82c9b
Switch from fmt.Error* to errors.Error* (#317) 2018-02-05 16:17:20 -05:00
Craig Peterson
7a4dca5ad5 Refactor: Prelink providers to domains (#305) 2018-02-01 11:45:53 -05:00
Brice Figureau
b7c6efaa53 Make IGNORE work with all providers (#313)
the `differ.matchIgnored` function was comparing only with the `Name`
field of `RecordConfig`.

Most providers don't set `RecordConfig.Name`, only `RecordConfig.NameFQDN`
and for those `IGNORE` doesn't work at all.

This patch converts `IGNORE` to use `NameFQDN` instead since it seems
all providers provides it.
2018-02-01 10:32:38 -05:00
Brice Figureau
4c80526860 Fix R53_ALIAS not being registered as custom type (#310) (#311)
Apparently I've forgot to register the R53_ALIAS custom record
type, thus preventing to use R53_ALIAS in a js file.
The integration still worked fine because they probably don't run
the validation.
2018-02-01 07:39:11 -05:00
Pat Moroney
d5adb3faf6 trim trailing '.' from FQDN (#307) 2018-01-24 18:41:10 -05:00