mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2024-05-11 05:55:12 +00:00
CLOUDNS: Fix WR type (#2288)
Co-authored-by: Tom Limoncelli <tal@whatexit.org>
This commit is contained in:
@@ -60,7 +60,7 @@ func init() {
|
|||||||
RecordAuditor: AuditRecords,
|
RecordAuditor: AuditRecords,
|
||||||
}
|
}
|
||||||
providers.RegisterDomainServiceProviderType("CLOUDNS", fns, features)
|
providers.RegisterDomainServiceProviderType("CLOUDNS", fns, features)
|
||||||
providers.RegisterCustomRecordType("CLOUDNS_WR", "CLOUDNS", "WR")
|
providers.RegisterCustomRecordType("CLOUDNS_WR", "CLOUDNS", "")
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetNameservers returns the nameservers for a domain.
|
// GetNameservers returns the nameservers for a domain.
|
||||||
@@ -302,6 +302,9 @@ func toRc(domain string, r *domainRecord) *models.RecordConfig {
|
|||||||
rc.DsDigestType = uint8(dsDigestType)
|
rc.DsDigestType = uint8(dsDigestType)
|
||||||
rc.DsDigest = r.Target
|
rc.DsDigest = r.Target
|
||||||
rc.SetTarget(r.Target)
|
rc.SetTarget(r.Target)
|
||||||
|
case "CLOUD_WR":
|
||||||
|
rc.Type = "WR"
|
||||||
|
rc.SetTarget(r.Target)
|
||||||
default:
|
default:
|
||||||
rc.SetTarget(r.Target)
|
rc.SetTarget(r.Target)
|
||||||
}
|
}
|
||||||
@@ -326,6 +329,8 @@ func toReq(rc *models.RecordConfig) (requestParams, error) {
|
|||||||
switch rc.Type { // #rtype_variations
|
switch rc.Type { // #rtype_variations
|
||||||
case "A", "AAAA", "NS", "PTR", "TXT", "SOA", "ALIAS", "CNAME", "WR":
|
case "A", "AAAA", "NS", "PTR", "TXT", "SOA", "ALIAS", "CNAME", "WR":
|
||||||
// Nothing special.
|
// Nothing special.
|
||||||
|
case "CLOUDNS_WR":
|
||||||
|
req["record-type"] = "WR"
|
||||||
case "MX":
|
case "MX":
|
||||||
req["priority"] = strconv.Itoa(int(rc.MxPreference))
|
req["priority"] = strconv.Itoa(int(rc.MxPreference))
|
||||||
case "SRV":
|
case "SRV":
|
||||||
|
Reference in New Issue
Block a user