diff --git a/manifests/pool.pp b/manifests/pool.pp deleted file mode 100644 index ec3110e7..00000000 --- a/manifests/pool.pp +++ /dev/null @@ -1,32 +0,0 @@ -# == Define: designate::pool -# -# Define a pool. -# -# === Parameters -# -# [*nameservers*] -# (required) An array of UUID's of the nameservers in this pool -# -# [*targets*] -# (required) An array of UUID's of the targets in this pool -# -# [*also_notifies*] -# (optional) List of hostnames and port numbers to also notify on zone changes. -# Defaults to [] -# -define designate::pool( - Array[String[1]] $nameservers, - Array[String[1]] $targets, - Array[String[1]] $also_notifies = [], -){ - - warning('Support for pool-manager was deprecated.') - - include designate::deps - - designate_config { - "pool:${name}/nameservers": value => join($nameservers,','); - "pool:${name}/targets": value => join($targets,','); - "pool:${name}/also-notifies": value => join($also_notifies,','); - } -} diff --git a/manifests/pool_nameserver.pp b/manifests/pool_nameserver.pp deleted file mode 100644 index a4c53def..00000000 --- a/manifests/pool_nameserver.pp +++ /dev/null @@ -1,26 +0,0 @@ -# Define: designate::pool_nameserver -# -# === Parameters -# -# [*port*] -# (optional) Port number of the DNS server. -# Defaults to 53. -# -# [*host*] -# (optional) IP address or hostname of the DNS server. -# Defaults to '127.0.0.1' -# -define designate::pool_nameserver( - $port = 53, - $host = '127.0.0.1', -){ - - warning('Support for pool-manager was deprecated.') - - include designate::deps - - designate_config { - "pool_nameserver:${name}/port": value => $port; - "pool_nameserver:${name}/host": value => $host; - } -} diff --git a/manifests/pool_target.pp b/manifests/pool_target.pp deleted file mode 100644 index 712957b4..00000000 --- a/manifests/pool_target.pp +++ /dev/null @@ -1,42 +0,0 @@ -# == Define: designate::pool_target -# -# Configure a target for the Designate Pool Manager. -# -# == Parameters -# -# [*options*] -# (required) Options to be passed to the backend DNS server. This should -# include host and port. For instance for a bind9 target this could be: -# {'rndc_host' => '192.168.27.100', -# 'rndc_port' => 953, -# 'rndc_config_file' => '/etc/bind/rndc.conf', -# 'rndc_key_file' => '/etc/bind/rndc.key', -# 'port' => 53, -# 'host' => '192.168.27.100'} -# -# [*type*] -# (required) Port number of the target DNS server. -# -# [*masters*] -# (optional) IP addresses and ports of the master DNS server. This should point -# to the Designate mDNS servers and ports. -# Defaults to ['127.0.0.1:5354'] -# -define designate::pool_target ( - Hash $options, - $type, - Array[String[1]] $masters = ['127.0.0.1:5354'], -) { - - warning('Support for pool-manager was deprecated.') - - include designate::deps - - $options_real = join(join_keys_to_values($options,':'),',') - - designate_config { - "pool_target:${name}/options": value => $options_real; - "pool_target:${name}/type": value => $type; - "pool_target:${name}/masters": value => join($masters,','); - } -} diff --git a/releasenotes/notes/remove-pool-manager-536cc42ce32f0c77.yaml b/releasenotes/notes/remove-pool-manager-536cc42ce32f0c77.yaml new file mode 100644 index 00000000..5a01042b --- /dev/null +++ b/releasenotes/notes/remove-pool-manager-536cc42ce32f0c77.yaml @@ -0,0 +1,9 @@ +--- +upgrade: + - | + The following defined resource types have been removed. + + - ``designate::pool`` + - ``designate::pool_nameserver`` + - ``designate::pool_target`` + diff --git a/spec/defines/designate_pool_nameserver_spec.rb b/spec/defines/designate_pool_nameserver_spec.rb deleted file mode 100644 index 27f73cbb..00000000 --- a/spec/defines/designate_pool_nameserver_spec.rb +++ /dev/null @@ -1,50 +0,0 @@ -require 'spec_helper' - -describe 'designate::pool_nameserver' do - shared_examples_for 'designate::pool_nameserver' do - let :params do - { - } - end - - let :pre_condition do - 'include designate' - end - - let :title do - '0f66b842-96c2-4189-93fc-1dc95a08b012' - end - - context 'without parameters' do - it { is_expected.to contain_designate__pool_nameserver('0f66b842-96c2-4189-93fc-1dc95a08b012') } - - it 'configures designate pool-nameserver with default parameters' do - is_expected.to contain_designate_config("pool_nameserver:0f66b842-96c2-4189-93fc-1dc95a08b012/host").with_value('127.0.0.1') - is_expected.to contain_designate_config("pool_nameserver:0f66b842-96c2-4189-93fc-1dc95a08b012/port").with_value(53) - end - end - - context 'with all parameters' do - before { params.merge!( { :host => '192.168.0.1', :port => 5353 } ) } - - it { is_expected.to contain_designate__pool_nameserver('0f66b842-96c2-4189-93fc-1dc95a08b012') } - - it 'configures designate pool-nameserver with default parameters' do - is_expected.to contain_designate_config("pool_nameserver:0f66b842-96c2-4189-93fc-1dc95a08b012/host").with_value('192.168.0.1') - is_expected.to contain_designate_config("pool_nameserver:0f66b842-96c2-4189-93fc-1dc95a08b012/port").with_value(5353) - end - end - end - - on_supported_os({ - :supported_os => OSDefaults.get_supported_os - }).each do |os,facts| - context "on #{os}" do - let (:facts) do - facts.merge!(OSDefaults.get_facts()) - end - - it_behaves_like 'designate::pool_nameserver' - end - end -end diff --git a/spec/defines/designate_pool_spec.rb b/spec/defines/designate_pool_spec.rb deleted file mode 100644 index 45c9c301..00000000 --- a/spec/defines/designate_pool_spec.rb +++ /dev/null @@ -1,54 +0,0 @@ -require 'spec_helper' - -describe 'designate::pool' do - shared_examples_for 'designate::pool' do - let :params do - { - :nameservers => ['0f66b842-96c2-4189-93fc-1dc95a08b012'], - :targets => ['f26e0b32-736f-4f0a-831b-039a415c481e'], - } - end - - let :pre_condition do - 'include designate' - end - - let :title do - '794ccc2c-d751-44fe-b57f-8894c9f5c842' - end - - context 'with only required parameters' do - it { is_expected.to contain_designate__pool('794ccc2c-d751-44fe-b57f-8894c9f5c842') } - - it 'configures designate pool with default parameters' do - is_expected.to contain_designate_config("pool:794ccc2c-d751-44fe-b57f-8894c9f5c842/nameservers").with_value( params[:nameservers]) - is_expected.to contain_designate_config("pool:794ccc2c-d751-44fe-b57f-8894c9f5c842/targets").with_value( params[:targets] ) - is_expected.to contain_designate_config("pool:794ccc2c-d751-44fe-b57f-8894c9f5c842/also-notifies").with_value( "" ) - end - end - - context 'with all parameters' do - before { params.merge!( { :also_notifies => ["192.168.0.1"] } ) } - - it { is_expected.to contain_designate__pool('794ccc2c-d751-44fe-b57f-8894c9f5c842') } - - it 'configures designate pool with default parameters' do - is_expected.to contain_designate_config("pool:794ccc2c-d751-44fe-b57f-8894c9f5c842/nameservers").with_value( params[:nameservers]) - is_expected.to contain_designate_config("pool:794ccc2c-d751-44fe-b57f-8894c9f5c842/targets").with_value( params[:targets] ) - is_expected.to contain_designate_config("pool:794ccc2c-d751-44fe-b57f-8894c9f5c842/also-notifies").with_value( ["192.168.0.1"] ) - end - end - end - - on_supported_os({ - :supported_os => OSDefaults.get_supported_os - }).each do |os,facts| - context "on #{os}" do - let (:facts) do - facts.merge!(OSDefaults.get_facts()) - end - - it_behaves_like 'designate::pool' - end - end -end diff --git a/spec/defines/designate_pool_target_spec.rb b/spec/defines/designate_pool_target_spec.rb deleted file mode 100644 index bbe66c45..00000000 --- a/spec/defines/designate_pool_target_spec.rb +++ /dev/null @@ -1,56 +0,0 @@ -require 'spec_helper' - -describe 'designate::pool_target' do - shared_examples_for 'designate::pool_target' do - let :params do - { - :options => {'rndc_host' => '192.168.27.100', 'rndc_port' => 953, 'rndc_config_file' => '/etc/bind/rndc.conf', - 'rndc_key_file' => '/etc/bind/rndc.key', 'port' => 53, 'host' => '192.168.27.100'}, - :type => 'bind9', - :masters => ['127.0.0.1:5354'], - } - end - - let :pre_condition do - 'include designate' - end - - let :title do - 'f26e0b32-736f-4f0a-831b-039a415c481e' - end - - context 'with only required parameters' do - it { is_expected.to contain_designate__pool_target('f26e0b32-736f-4f0a-831b-039a415c481e') } - - it 'configures designate pool-manager pool with default parameters' do - is_expected.to contain_designate_config('pool_target:f26e0b32-736f-4f0a-831b-039a415c481e/options').with_value(params[:options].map{|k,v|"#{k}:#{v}"}.join(',')) - is_expected.to contain_designate_config('pool_target:f26e0b32-736f-4f0a-831b-039a415c481e/type').with_value(params[:type]) - is_expected.to contain_designate_config('pool_target:f26e0b32-736f-4f0a-831b-039a415c481e/masters').with_value(params[:masters]) - end - end - - context 'with all parameters' do - before { params.merge!( { :masters => ['192.168.0.1'] } ) } - - it { is_expected.to contain_designate__pool_target('f26e0b32-736f-4f0a-831b-039a415c481e') } - - it 'configures designate pool-manager pool with default parameters' do - is_expected.to contain_designate_config('pool_target:f26e0b32-736f-4f0a-831b-039a415c481e/options').with_value(params[:options].map{|k,v|"#{k}:#{v}"}.join(',')) - is_expected.to contain_designate_config('pool_target:f26e0b32-736f-4f0a-831b-039a415c481e/type').with_value(params[:type]) - is_expected.to contain_designate_config('pool_target:f26e0b32-736f-4f0a-831b-039a415c481e/masters').with_value(params[:masters]) - end - end - end - - on_supported_os({ - :supported_os => OSDefaults.get_supported_os - }).each do |os,facts| - context "on #{os}" do - let (:facts) do - facts.merge!(OSDefaults.get_facts()) - end - - it_behaves_like 'designate::pool_target' - end - end -end