Skip to content

Commit

Permalink
Remove explicit 'none' pseudo update policy
Browse files Browse the repository at this point in the history
  • Loading branch information
Damian Lukowski committed Apr 30, 2020
1 parent 92d1e38 commit 194bb11
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 19 deletions.
15 changes: 0 additions & 15 deletions spec/defines/dns_zone_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -398,21 +398,6 @@
])
end
end

context 'update_policy set to none' do
let(:params) { {
:update_policy => 'none',
} }

it "should have valid zone configuration" do
verify_concat_fragment_exact_contents(catalogue, 'dns_zones+10__GLOBAL__example.com.dns', [
'zone "example.com" {',
' type master;',
" file \"#{zonefilepath}/db.example.com\";",
'};',
])
end
end
end
end
end
4 changes: 1 addition & 3 deletions templates/named.zone.erb
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,8 @@ zone "<%= @zone %>" {
<% end -%>
<% if @zonetype == 'master' -%>
<% if @update_policy.is_a? String -%>
<% if @update_policy != 'none' -%>
update-policy <%= @update_policy %>;
<% end -%>
<% else -%>
<% elsif @update_policy -%>
update-policy {
<%- @update_policy.sort_by {|k, v| k}.each do |key, key_hash| -%>
<%= key_hash['action'] || 'grant' %> <%= key %> <%= key_hash['matchtype'] %> <% if key_hash['tname'] %><%= key_hash['tname'] %> <% end %><%= key_hash['rr'] %>;
Expand Down
2 changes: 1 addition & 1 deletion types/updatepolicy.pp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Validate update-policy parameter
type Dns::UpdatePolicy = Variant[
Enum['none', 'local'],
Enum['local'],
Hash[
String,
Struct[{
Expand Down

0 comments on commit 194bb11

Please sign in to comment.