Remove support for pool-manager

It was deprecated during the previous cycle[1] because pool-manager was
already removed from Designate.

Ideally we should maintain this until 2024.1 release because of SLURP.
However the implementation has not been functioning for several cycles
so I propose removing it early,

[1] 8f4986cea4

Change-Id: I919883c7ee3dc2364378a2926ed12b378046128b
This commit is contained in:
Takashi Kajinami 2023-10-27 22:50:24 +09:00
parent d11f87554d
commit 24f58b208e
7 changed files with 9 additions and 260 deletions

View File

@ -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,',');
}
}

View File

@ -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;
}
}

View File

@ -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,',');
}
}

View File

@ -0,0 +1,9 @@
---
upgrade:
- |
The following defined resource types have been removed.
- ``designate::pool``
- ``designate::pool_nameserver``
- ``designate::pool_target``

View File

@ -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

View File

@ -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

View File

@ -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