From 059b58ed9e7923a148c56a07c171d55b42bbfed6 Mon Sep 17 00:00:00 2001 From: Phil Pennock Date: Mon, 29 Mar 2021 10:04:36 -0400 Subject: [PATCH] GANDI_V5: supports DS records already (#1112) * Simply mark DS as supported, let existing tests handle it. * Fix trivial typo in diagnostic feedback from model SetTargetDSString() * The support matrix includes more changes because it was stale. --- docs/_includes/matrix.html | 52 ++++++++++++++++++++++++++- models/t_ds.go | 2 +- providers/gandiv5/convert.go | 2 +- providers/gandiv5/gandi_v5Provider.go | 1 + 4 files changed, 54 insertions(+), 3 deletions(-) diff --git a/docs/_includes/matrix.html b/docs/_includes/matrix.html index ac5da03e7..04981317f 100644 --- a/docs/_includes/matrix.html +++ b/docs/_includes/matrix.html @@ -16,6 +16,7 @@
DESEC
DIGITALOCEAN
DNSIMPLE
+
DNSMADEEASY
DNSOVERHTTPS
EXOSCALE
GANDI_V5
@@ -84,6 +85,9 @@ + + + @@ -180,6 +184,9 @@ + + + @@ -285,6 +292,9 @@ + + + @@ -382,6 +392,9 @@ + + + @@ -463,6 +476,7 @@ + @@ -522,6 +536,9 @@ + + + @@ -607,6 +624,9 @@ + + + @@ -694,6 +714,7 @@ + @@ -755,6 +776,9 @@ + + + @@ -846,6 +870,9 @@ + + + @@ -917,6 +944,9 @@ + + + @@ -1006,6 +1036,7 @@ + R53_ALIAS @@ -1025,6 +1056,7 @@ + @@ -1071,6 +1103,7 @@ + @@ -1111,9 +1144,14 @@ + + + - + + + @@ -1176,6 +1214,9 @@ + + + @@ -1269,6 +1310,9 @@ + + + @@ -1380,6 +1424,9 @@ + + + @@ -1477,6 +1524,9 @@ + + + diff --git a/models/t_ds.go b/models/t_ds.go index ac7e633e5..38553ed83 100644 --- a/models/t_ds.go +++ b/models/t_ds.go @@ -46,7 +46,7 @@ func (rc *RecordConfig) SetTargetDSStrings(keytag, algorithm, digesttype, digest func (rc *RecordConfig) SetTargetDSString(s string) error { part := strings.Fields(s) if len(part) != 4 { - return errors.Errorf("DS value does not contain 5 fields: (%#v)", s) + return errors.Errorf("DS value does not contain 4 fields: (%#v)", s) } return rc.SetTargetDSStrings(part[0], part[1], part[2], part[3]) } diff --git a/providers/gandiv5/convert.go b/providers/gandiv5/convert.go index 598594183..209ef0e92 100644 --- a/providers/gandiv5/convert.go +++ b/providers/gandiv5/convert.go @@ -29,7 +29,7 @@ func nativeToRecords(n livedns.DomainRecord, origin string) (rcs []*models.Recor case "ALIAS": rc.Type = "ALIAS" rc.SetTarget(value) - default: // "A", "AAAA", "CAA", "NS", "CNAME", "MX", "PTR", "SRV", "TXT" + default: // "A", "AAAA", "CAA", "DS", "NS", "CNAME", "MX", "PTR", "SRV", "TXT" if err := rc.PopulateFromString(rtype, value, origin); err != nil { panic(fmt.Errorf("unparsable record received from gandi: %w", err)) } diff --git a/providers/gandiv5/gandi_v5Provider.go b/providers/gandiv5/gandi_v5Provider.go index 21679f661..c3e3f9fcc 100644 --- a/providers/gandiv5/gandi_v5Provider.go +++ b/providers/gandiv5/gandi_v5Provider.go @@ -47,6 +47,7 @@ func init() { var features = providers.DocumentationNotes{ providers.CanUseAlias: providers.Can("Only on the bare domain. Otherwise CNAME will be substituted"), providers.CanUseCAA: providers.Can(), + providers.CanUseDS: providers.Can(), providers.CanUsePTR: providers.Can(), providers.CanUseSRV: providers.Can(), providers.CanUseSSHFP: providers.Can(),