Skip to content

Commit

Permalink
New Provider: GANDI-LIVEDNS (API v5) (StackExchange#320)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
Tom Limoncelli authored Feb 24, 2018
1 parent d05c94e commit f1e0c6b
Show file tree
Hide file tree
Showing 133 changed files with 28,395 additions and 21 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
language: go

go:
- 1.8.x
- 1.10.x

install: pwd

Expand All @@ -18,4 +18,4 @@ notifications:
- https://webhooks.gitter.im/e/4f27a4a85d6f4475be19
on_success: always
on_failure: always
on_start: always
on_start: always
30 changes: 30 additions & 0 deletions docs/_includes/matrix.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
<th class="rotate"><div><span>DIGITALOCEAN</span></div></th>
<th class="rotate"><div><span>DNSIMPLE</span></div></th>
<th class="rotate"><div><span>GANDI</span></div></th>
<th class="rotate"><div><span>GANDI-LIVEDNS</span></div></th>
<th class="rotate"><div><span>GCLOUD</span></div></th>
<th class="rotate"><div><span>LINODE</span></div></th>
<th class="rotate"><div><span>NAMECHEAP</span></div></th>
Expand Down Expand Up @@ -44,6 +45,9 @@
<td class="danger">
<i class="fa fa-times text-danger" aria-hidden="true"></i>
</td>
<td class="danger">
<i class="fa fa-times text-danger" aria-hidden="true"></i>
</td>
<td class="success">
<i class="fa fa-check text-success" aria-hidden="true"></i>
</td>
Expand Down Expand Up @@ -119,6 +123,9 @@
<td class="success">
<i class="fa fa-check text-success" aria-hidden="true"></i>
</td>
<td class="success">
<i class="fa fa-check text-success" aria-hidden="true"></i>
</td>
</tr>
<tr>
<th class="row-header" style="text-decoration: underline;" data-toggle="tooltip" data-container="body" data-placement="top" title="The provider has registrar capabilities to set nameservers for zones">Registrar</th>
Expand Down Expand Up @@ -146,6 +153,9 @@
<td class="danger">
<i class="fa fa-times text-danger" aria-hidden="true"></i>
</td>
<td class="danger">
<i class="fa fa-times text-danger" aria-hidden="true"></i>
</td>
<td class="success">
<i class="fa fa-check text-success" aria-hidden="true"></i>
</td>
Expand Down Expand Up @@ -184,6 +194,7 @@
<td><i class="fa fa-minus dim"></i></td>
<td><i class="fa fa-minus dim"></i></td>
<td><i class="fa fa-minus dim"></i></td>
<td><i class="fa fa-minus dim"></i></td>
<td class="danger">
<i class="fa fa-times text-danger" aria-hidden="true"></i>
</td>
Expand Down Expand Up @@ -223,6 +234,9 @@
<td class="success">
<i class="fa fa-check text-success" aria-hidden="true"></i>
</td>
<td class="success">
<i class="fa fa-check text-success" aria-hidden="true"></i>
</td>
<td><i class="fa fa-minus dim"></i></td>
<td class="danger">
<i class="fa fa-times text-danger" aria-hidden="true"></i>
Expand Down Expand Up @@ -259,6 +273,9 @@
<td class="success">
<i class="fa fa-check text-success" aria-hidden="true"></i>
</td>
<td class="success">
<i class="fa fa-check text-success" aria-hidden="true"></i>
</td>
<td><i class="fa fa-minus dim"></i></td>
<td class="danger">
<i class="fa fa-times text-danger" aria-hidden="true"></i>
Expand Down Expand Up @@ -301,6 +318,9 @@
<td class="success">
<i class="fa fa-check text-success" aria-hidden="true"></i>
</td>
<td class="success">
<i class="fa fa-check text-success" aria-hidden="true"></i>
</td>
<td><i class="fa fa-minus dim"></i></td>
<td class="danger" data-toggle="tooltip" data-container="body" data-placement="top" title="The namecheap web console allows you to make SRV records, but their api does not let you read or set them">
<i class="fa has-tooltip fa-times text-danger" aria-hidden="true"></i>
Expand Down Expand Up @@ -338,6 +358,7 @@
<td><i class="fa fa-minus dim"></i></td>
<td><i class="fa fa-minus dim"></i></td>
<td><i class="fa fa-minus dim"></i></td>
<td><i class="fa fa-minus dim"></i></td>
<td class="danger">
<i class="fa fa-times text-danger" aria-hidden="true"></i>
</td>
Expand Down Expand Up @@ -365,6 +386,7 @@
<td><i class="fa fa-minus dim"></i></td>
<td><i class="fa fa-minus dim"></i></td>
<td><i class="fa fa-minus dim"></i></td>
<td><i class="fa fa-minus dim"></i></td>
<td class="success">
<i class="fa fa-check text-success" aria-hidden="true"></i>
</td>
Expand All @@ -390,6 +412,7 @@
<td><i class="fa fa-minus dim"></i></td>
<td><i class="fa fa-minus dim"></i></td>
<td><i class="fa fa-minus dim"></i></td>
<td><i class="fa fa-minus dim"></i></td>
<td class="success">
<i class="fa fa-check text-success" aria-hidden="true"></i>
</td>
Expand All @@ -412,6 +435,7 @@
<i class="fa has-tooltip fa-times text-danger" aria-hidden="true"></i>
</td>
<td><i class="fa fa-minus dim"></i></td>
<td><i class="fa fa-minus dim"></i></td>
<td class="success">
<i class="fa fa-check text-success" aria-hidden="true"></i>
</td>
Expand Down Expand Up @@ -456,6 +480,9 @@
<td class="danger" data-toggle="tooltip" data-container="body" data-placement="top" title="Can only manage domains registered through their service">
<i class="fa has-tooltip fa-times text-danger" aria-hidden="true"></i>
</td>
<td class="danger" data-toggle="tooltip" data-container="body" data-placement="top" title="Can only manage domains registered through their service">
<i class="fa has-tooltip fa-times text-danger" aria-hidden="true"></i>
</td>
<td class="success">
<i class="fa fa-check text-success" aria-hidden="true"></i>
</td>
Expand Down Expand Up @@ -504,6 +531,9 @@
<td class="danger">
<i class="fa fa-times text-danger" aria-hidden="true"></i>
</td>
<td class="danger">
<i class="fa fa-times text-danger" aria-hidden="true"></i>
</td>
<td class="success">
<i class="fa fa-check text-success" aria-hidden="true"></i>
</td>
Expand Down
3 changes: 2 additions & 1 deletion integrationTest/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import (
_ "github.com/StackExchange/dnscontrol/providers/_all"
"github.com/StackExchange/dnscontrol/providers/config"
"github.com/miekg/dns/dnsutil"
"github.com/pkg/errors"
)

var providerToRun = flag.String("provider", "", "Provider to run")
Expand Down Expand Up @@ -118,7 +119,7 @@ func runTests(t *testing.T, prv providers.DNSServiceProvider, domainName string,
// get corrections for first time
corrections, err := prv.GetDomainCorrections(dom)
if err != nil {
t.Fatal(err)
t.Fatal(errors.Wrap(err, "decode gandi-live"))
}
if !skipVal && i != *startIdx && len(corrections) == 0 {
if tst.Desc != "Empty" {
Expand Down
6 changes: 6 additions & 0 deletions integrationTest/providers.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@
"domain": "$GANDI_DOMAIN",
"knownFailures": "5"
},
"GANDI-LIVEDNS": {
"COMMENT": "5: gandi does not accept TTLs less than 300",
"apikey": "$GANDILIVE_KEY",
"domain": "$GANDILIVE_DOMAIN",
"knownFailures": "5"
},
"GCLOUD": {
"type": "$GCLOUD_TYPE",
"client_email": "$GCLOUD_EMAIL",
Expand Down
3 changes: 2 additions & 1 deletion models/t_txt.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ func (rc *RecordConfig) SetTargetTXTs(s []string) error {
return nil
}

// SetTargetTXTString is like SetTargetTXT but accepts one big string.
// SetTargetTXTString is like SetTargetTXT but accepts one big string,
// which must be parsed into one or more strings based on how it is quoted.
// Ex: foo << 1 string
// foo bar << 1 string
// "foo" "bar" << 2 strings
Expand Down
Loading

0 comments on commit f1e0c6b

Please # to comment.