Merge remote-tracking branch 'nerdlich/sshfp' into 6.0-prerelease

This commit is contained in:
Nate Riffe
2016-01-29 07:30:37 -06:00
2 changed files with 12 additions and 3 deletions
+1 -1
View File
@@ -30,7 +30,7 @@ Puppet::Type.newtype(:resource_record) do
newparam(:type) do
desc 'The record type'
isrequired
newvalues 'A', 'AAAA', 'CNAME', 'NS', 'MX', 'SPF', 'SRV', 'NAPTR', 'PTR', 'TXT', 'DS'
newvalues 'A', 'AAAA', 'CNAME', 'NS', 'MX', 'SPF', 'SRV', 'NAPTR', 'PTR', 'TXT', 'DS', 'TLSA', 'SSHFP'
end
newparam(:record) do
+11 -2
View File
@@ -81,7 +81,7 @@ module PuppetBind
end
def spaced_type?(type)
%w(DS TLSA).include?(type)
%w(DS TLSA SSHFP).include?(type)
end
def maybe_quote(type, datum)
@@ -97,7 +97,16 @@ module PuppetBind
end
def maybe_unspace(type, datum)
spaced_type?(type) ? datum.gsub(/^(\d+)\s+(\d+)\s+(\d+)\s+(\w+)\s+(\w+)$/, '\1 \2 \3 \4\5') : datum
if spaced_type?(type)
case type
when 'DS', 'TLSA'
datum.gsub(/^(\d+)\s+(\d+)\s+(\d+)\s+(\w+)\s+(\w+)$/, '\1 \2 \3 \4\5')
when 'SSHFP'
datum.gsub(/^(\d+)\s+(\d+)\s+(\w+)\s+(\w+)$/, '\1 \2 \3\4')
end
else
datum
end
end
def rrdata_adds