Remove deprecated parameters
Removes deprecated parameters that has been deprecated for one cycle or more. Change-Id: I01e33221ef4f2c3afd5277dbc3f1787feee31f37
This commit is contained in:
parent
732a222103
commit
25f07ee1e1
|
@ -92,16 +92,6 @@
|
|||
# (optional) Admin API extensions.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# DEPRECATED PARAMETERS
|
||||
#
|
||||
# [*api_host*]
|
||||
# (optional) Address to bind the API server
|
||||
# Defaults to undef
|
||||
#
|
||||
# [*api_port*]
|
||||
# (optional) Port the bind the API server to
|
||||
# Defaults to undef
|
||||
#
|
||||
class designate::api (
|
||||
$package_ensure = present,
|
||||
$api_package_name = $::designate::params::api_package_name,
|
||||
|
@ -125,27 +115,17 @@ class designate::api (
|
|||
$enabled_extensions_v1 = $::os_service_default,
|
||||
$enabled_extensions_v2 = $::os_service_default,
|
||||
$enabled_extensions_admin = $::os_service_default,
|
||||
# DEPRECATED PARAMETERS
|
||||
$api_host = undef,
|
||||
$api_port = undef,
|
||||
) inherits designate {
|
||||
|
||||
include ::designate::deps
|
||||
|
||||
if $api_host and $api_port {
|
||||
warning('api_host and api_port parameters have been deprecated, please use listen instead.')
|
||||
$listen_real = "${api_host}:${api_port}"
|
||||
} else {
|
||||
$listen_real = $listen
|
||||
}
|
||||
|
||||
if !is_service_default($enable_api_v1) {
|
||||
warning('Version 1 of API is deprecated.')
|
||||
}
|
||||
|
||||
# API Service
|
||||
designate_config {
|
||||
'service:api/listen' : value => $listen_real;
|
||||
'service:api/listen' : value => $listen;
|
||||
'service:api/auth_strategy' : value => $auth_strategy;
|
||||
'service:api/enable_api_v1' : value => $enable_api_v1;
|
||||
'service:api/enable_api_v2' : value => $enable_api_v2;
|
||||
|
|
|
@ -1,25 +0,0 @@
|
|||
# == Class designate::dns
|
||||
#
|
||||
# Configure dns for designate service
|
||||
# This class is deprecated, use designate::backend::bind9
|
||||
#
|
||||
# == Parameters
|
||||
#
|
||||
# DEPRECATED PARAMETERS
|
||||
#
|
||||
# [*designatepath*]
|
||||
# (optional) Directory for maintaining designate's state
|
||||
# Defaults to $designate::params::designatepath
|
||||
#
|
||||
# [*designatefile*]
|
||||
# (optional) File for maintaining designate's state
|
||||
# Defaults to $designate::params::designatefile
|
||||
#
|
||||
class designate::dns (
|
||||
# DEPRECRATED PARAMETERS
|
||||
$designatepath = undef,
|
||||
$designatefile = undef,
|
||||
) {
|
||||
warning('The class designate::dns is depecrated. Use designate::backend::bind9 instead.')
|
||||
include ::designate::backend::bind9
|
||||
}
|
|
@ -122,42 +122,6 @@
|
|||
# (optional) Endpoint type to use.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# DEPRECATED PARAMETER
|
||||
#
|
||||
# [*rabbit_virtualhost*]
|
||||
# (optional) DEPRECATED. Use rabbit_virtual_host
|
||||
# Defaults to undef.
|
||||
#
|
||||
# [*rabbit_host*]
|
||||
# (optional) Location of rabbitmq installation.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*rabbit_port*]
|
||||
# (optional) Port for rabbitmq instance.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*rabbit_hosts*]
|
||||
# (Optional) Array of host:port (used with HA queues).
|
||||
# If defined, will remove rabbit_host & rabbit_port parameters from config
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*rabbit_password*]
|
||||
# (optional) Password used to connect to rabbitmq.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*rabbit_userid*]
|
||||
# (optional) User used to connect to rabbitmq.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*rabbit_virtual_host*]
|
||||
# (optional) The RabbitMQ virtual host.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*rpc_backend*]
|
||||
# (optional) The messaging driver to use. Currently only rabbit is support
|
||||
# by this puppet module.
|
||||
# Defaults to 'rabbit'.
|
||||
#
|
||||
class designate(
|
||||
$package_ensure = present,
|
||||
$common_package_name = $::designate::params::common_package_name,
|
||||
|
@ -184,24 +148,8 @@ class designate(
|
|||
$purge_config = false,
|
||||
$amqp_durable_queues = $::os_service_default,
|
||||
$neutron_endpoint_type = $::os_service_default,
|
||||
#DEPRECATED PARAMETER
|
||||
$rabbit_virtualhost = undef,
|
||||
$rabbit_host = $::os_service_default,
|
||||
$rabbit_port = $::os_service_default,
|
||||
$rabbit_hosts = $::os_service_default,
|
||||
$rabbit_userid = $::os_service_default,
|
||||
$rabbit_password = $::os_service_default,
|
||||
$rabbit_virtual_host = $::os_service_default,
|
||||
$rpc_backend = 'rabbit',
|
||||
) inherits designate::params {
|
||||
|
||||
if $rabbit_virtualhost {
|
||||
warning('The parameter rabbit_virtualhost is deprecated, use rabbit_virtual_host.')
|
||||
$rabbit_virtual_host_real = $rabbit_virtualhost
|
||||
} else {
|
||||
$rabbit_virtual_host_real = $rabbit_virtual_host
|
||||
}
|
||||
|
||||
if !is_service_default($kombu_ssl_ca_certs) and !$rabbit_use_ssl {
|
||||
fail('The kombu_ssl_ca_certs parameter requires rabbit_use_ssl to be set to true')
|
||||
}
|
||||
|
@ -216,31 +164,6 @@ class designate(
|
|||
fail('The kombu_ssl_certfile and kombu_ssl_keyfile parameters must be used together')
|
||||
}
|
||||
|
||||
if !is_service_default($rabbit_host) or
|
||||
!is_service_default($rabbit_hosts) or
|
||||
!is_service_default($rabbit_password) or
|
||||
!is_service_default($rabbit_port) or
|
||||
!is_service_default($rabbit_userid) or
|
||||
$rpc_backend or !is_service_default($rabbit_virtual_host) {
|
||||
warning("designate::rabbit_host, designate::rabbit_hosts, designate::rabbit_password, \
|
||||
designate::rabbit_port, designate::rabbit_userid and designate::rabbit_virtual_host and \
|
||||
designate::rpc_backend are deprecated. Please use designate::default_transport_url instead.")
|
||||
}
|
||||
|
||||
if is_service_default($rabbit_ha_queues) {
|
||||
warning("designate::rabbit_ha_queues will be changed to use the service default \
|
||||
durring the Pike cycle. Currently it is automatically configured based on the setting of \
|
||||
designate::rabbit_hosts which has been deprecated. Please consider defining this variable \
|
||||
to your desired configuration.")
|
||||
if !is_service_default($rabbit_hosts) {
|
||||
$rabbit_ha_queues_real = true
|
||||
} else {
|
||||
$rabbit_ha_queues_real = false
|
||||
}
|
||||
} else {
|
||||
$rabbit_ha_queues_real = $rabbit_ha_queues
|
||||
}
|
||||
|
||||
include ::designate::deps
|
||||
include ::designate::logging
|
||||
|
||||
|
@ -268,14 +191,8 @@ to your desired configuration.")
|
|||
kombu_ssl_ca_certs => $kombu_ssl_ca_certs,
|
||||
kombu_reconnect_delay => $kombu_reconnect_delay,
|
||||
kombu_failover_strategy => $kombu_failover_strategy,
|
||||
rabbit_host => $rabbit_host,
|
||||
rabbit_port => $rabbit_port,
|
||||
rabbit_hosts => $rabbit_hosts,
|
||||
rabbit_use_ssl => $rabbit_use_ssl,
|
||||
rabbit_userid => $rabbit_userid,
|
||||
rabbit_password => $rabbit_password,
|
||||
rabbit_virtual_host => $rabbit_virtual_host,
|
||||
rabbit_ha_queues => $rabbit_ha_queues_real,
|
||||
rabbit_ha_queues => $rabbit_ha_queues,
|
||||
amqp_durable_queues => $amqp_durable_queues,
|
||||
}
|
||||
|
||||
|
|
|
@ -52,16 +52,6 @@
|
|||
# (Optional) mDNS host:port pairs to listen on.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# DEPRECATED PARAMETERS
|
||||
#
|
||||
# [*host*]
|
||||
# (Optional) mDNS Bind Host.
|
||||
# Defaults to undef.
|
||||
#
|
||||
# [*port*]
|
||||
# (Optional) mDNS Port Number.
|
||||
# Defaults to undef.
|
||||
#
|
||||
class designate::mdns (
|
||||
$package_ensure = present,
|
||||
$mdns_package_name = $::designate::params::mdns_package_name,
|
||||
|
@ -75,20 +65,10 @@ class designate::mdns (
|
|||
$storage_driver = $::os_service_default,
|
||||
$max_message_size = $::os_service_default,
|
||||
$listen = $::os_service_default,
|
||||
# DEPRECATED PARAMETERS
|
||||
$host = undef,
|
||||
$port = undef,
|
||||
) inherits designate {
|
||||
|
||||
include ::designate::deps
|
||||
|
||||
if $host and $port {
|
||||
warning('host and port parameters have been deprecated, please use listen instead.')
|
||||
$listen_real = "${host}:${port}"
|
||||
} else {
|
||||
$listen_real = $listen
|
||||
}
|
||||
|
||||
designate_config {
|
||||
'service:mdns/workers' : value => $workers;
|
||||
'service:mdns/threads' : value => $threads;
|
||||
|
@ -97,7 +77,7 @@ class designate::mdns (
|
|||
'service:mdns/query_enforce_tsig' : value => $query_enforce_tsig;
|
||||
'service:mdns/storage_driver' : value => $storage_driver;
|
||||
'service:mdns/max_message_size' : value => $max_message_size;
|
||||
'service:mdns/listen' : value => $listen_real;
|
||||
'service:mdns/listen' : value => $listen;
|
||||
}
|
||||
|
||||
designate::generic_service { 'mdns':
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
---
|
||||
upgrade:
|
||||
- |
|
||||
The deprecated parameters designate::rabbit_host, designate::rabbit_hosts, designate::rabbit_password,
|
||||
designate::rabbit_port, designate::rabbit_userid, designate::rabbit_virtual_host and
|
||||
designate::rpc_backend is removed.
|
||||
Please use designate::default_transport_url instead.
|
||||
- |
|
||||
The designate::rabbit_ha_queues is not automatically set to true if designate::rabbit_hosts is set
|
||||
since this parameter does not exist anymore. Please explicitly set designate::rabbit_ha_queues to
|
||||
true.
|
||||
- |
|
||||
The deprecated parameters designate::api_host and designate::api_port is removed.
|
||||
Please use designate::listen instead.
|
||||
- |
|
||||
The deprecated parameters designate::mdns::host and designate::mdns::port is removed.
|
||||
Please use designate::mdns::listen instead.
|
||||
- |
|
||||
The deprecated class designate::dns is removed.
|
||||
Please use designate::backend::bind9 instead.
|
|
@ -15,39 +15,8 @@ describe 'designate' do
|
|||
}
|
||||
end
|
||||
|
||||
let :rabbit_ha_params do
|
||||
{
|
||||
:rabbit_hosts => [ '10.0.0.1:5672', '10.0.0.2:5672', '10.0.0.3:5672' ],
|
||||
:rabbit_userid => 'guest',
|
||||
:rabbit_password => '',
|
||||
:rabbit_virtual_host => '/',
|
||||
:amqp_durable_queues => true
|
||||
}
|
||||
end
|
||||
|
||||
let :rabbit_non_ha_params do
|
||||
{
|
||||
:rabbit_host => '127.0.0.1',
|
||||
:rabbit_port => 5672,
|
||||
:rabbit_userid => 'guest',
|
||||
:rabbit_password => '',
|
||||
:rabbit_virtual_host => '/'
|
||||
}
|
||||
end
|
||||
|
||||
let :rabbit_deprecated_params do
|
||||
{
|
||||
:rabbit_virtualhost => '/'
|
||||
}
|
||||
end
|
||||
|
||||
let :rabbit_use_ssl do
|
||||
{
|
||||
:rabbit_host => '127.0.0.1',
|
||||
:rabbit_port => 5672,
|
||||
:rabbit_userid => 'guest',
|
||||
:rabbit_password => '',
|
||||
:rabbit_virtual_host => '/',
|
||||
:rabbit_use_ssl => true,
|
||||
:kombu_ssl_ca_certs => 'ca goes here',
|
||||
:kombu_ssl_certfile => 'cert goes here',
|
||||
|
@ -60,11 +29,6 @@ describe 'designate' do
|
|||
|
||||
let :rabbit_use_ssl_cert_no_key do
|
||||
{
|
||||
:rabbit_host => '127.0.0.1',
|
||||
:rabbit_port => 5672,
|
||||
:rabbit_userid => 'guest',
|
||||
:rabbit_password => '',
|
||||
:rabbit_virtual_host => '/',
|
||||
:rabbit_use_ssl => true,
|
||||
:kombu_ssl_ca_certs => 'ca goes here',
|
||||
:kombu_ssl_certfile => 'cert goes here',
|
||||
|
@ -76,11 +40,6 @@ describe 'designate' do
|
|||
|
||||
let :rabbit_use_ssl_key_no_cert do
|
||||
{
|
||||
:rabbit_host => '127.0.0.1',
|
||||
:rabbit_port => 5672,
|
||||
:rabbit_userid => 'guest',
|
||||
:rabbit_password => '',
|
||||
:rabbit_virtual_host => '/',
|
||||
:rabbit_use_ssl => true,
|
||||
:kombu_ssl_ca_certs => 'ca goes here',
|
||||
:kombu_ssl_keyfile => 'key goes here',
|
||||
|
@ -92,10 +51,9 @@ describe 'designate' do
|
|||
|
||||
shared_examples_for 'designate' do
|
||||
|
||||
context 'with rabbit_host parameter' do
|
||||
context 'with transport parameter' do
|
||||
it_configures 'a designate base installation'
|
||||
it_configures 'rabbit without HA support'
|
||||
it_configures 'rabbit with HA support'
|
||||
it_configures 'rabbit transport'
|
||||
it_configures 'rabbit with SSL support'
|
||||
it_configures 'rabbit with SSL no key'
|
||||
it_configures 'rabbit with SSL no cert'
|
||||
|
@ -154,50 +112,24 @@ describe 'designate' do
|
|||
|
||||
end
|
||||
|
||||
shared_examples_for 'rabbit without HA support' do
|
||||
before { params.merge!( rabbit_non_ha_params ) }
|
||||
|
||||
it 'configures rabbit' do
|
||||
is_expected.to contain_designate_config('oslo_messaging_rabbit/rabbit_userid').with_value( params[:rabbit_userid] )
|
||||
is_expected.to contain_designate_config('oslo_messaging_rabbit/rabbit_password').with_value( params[:rabbit_password] )
|
||||
is_expected.to contain_designate_config('oslo_messaging_rabbit/rabbit_password').with_value( params[:rabbit_password] ).with_secret(true)
|
||||
is_expected.to contain_designate_config('oslo_messaging_rabbit/rabbit_virtual_host').with_value( params[:rabbit_virtual_host] )
|
||||
shared_examples_for 'rabbit transport' do
|
||||
before do
|
||||
params.merge!({
|
||||
:default_transport_url => 'rabbit://designate:secret@127.0.0.1:5672/designate',
|
||||
:rabbit_ha_queues => true,
|
||||
})
|
||||
end
|
||||
|
||||
it { is_expected.to contain_designate_config('oslo_messaging_rabbit/rabbit_host').with_value( params[:rabbit_host] ) }
|
||||
it { is_expected.to contain_designate_config('oslo_messaging_rabbit/rabbit_hosts').with_value('<SERVICE DEFAULT>') }
|
||||
it { is_expected.to contain_designate_config('oslo_messaging_rabbit/rabbit_port').with_value( params[:rabbit_port] ) }
|
||||
it { is_expected.to contain_designate_config('oslo_messaging_rabbit/rabbit_ha_queues').with_value( 'false' ) }
|
||||
it { is_expected.to contain_designate_config('DEFAULT/transport_url').with_value('rabbit://designate:secret@127.0.0.1:5672/designate') }
|
||||
it { is_expected.to contain_designate_config('oslo_messaging_rabbit/rabbit_ha_queues').with_value(true) }
|
||||
it { is_expected.to contain_designate_config('oslo_messaging_rabbit/amqp_durable_queues').with_value('<SERVICE DEFAULT>') }
|
||||
|
||||
end
|
||||
|
||||
shared_examples_for 'rabbit with HA support' do
|
||||
before { params.merge!( rabbit_ha_params ) }
|
||||
|
||||
it 'configures rabbit' do
|
||||
is_expected.to contain_designate_config('oslo_messaging_rabbit/rabbit_userid').with_value( params[:rabbit_userid] )
|
||||
is_expected.to contain_designate_config('oslo_messaging_rabbit/rabbit_password').with_value( params[:rabbit_password] )
|
||||
is_expected.to contain_designate_config('oslo_messaging_rabbit/rabbit_password').with_value( params[:rabbit_password] ).with_secret(true)
|
||||
is_expected.to contain_designate_config('oslo_messaging_rabbit/rabbit_virtual_host').with_value( params[:rabbit_virtual_host] )
|
||||
end
|
||||
|
||||
it { is_expected.to contain_designate_config('oslo_messaging_rabbit/rabbit_host').with_value('<SERVICE DEFAULT>') }
|
||||
it { is_expected.to contain_designate_config('oslo_messaging_rabbit/rabbit_hosts').with_value( '10.0.0.1:5672,10.0.0.2:5672,10.0.0.3:5672' ) }
|
||||
it { is_expected.to contain_designate_config('oslo_messaging_rabbit/rabbit_port').with_value('<SERVICE DEFAULT>') }
|
||||
it { is_expected.to contain_designate_config('oslo_messaging_rabbit/rabbit_ha_queues').with_value( 'true' ) }
|
||||
it { is_expected.to contain_designate_config('oslo_messaging_rabbit/amqp_durable_queues').with_value( 'true' ) }
|
||||
|
||||
end
|
||||
|
||||
shared_examples_for 'rabbit with SSL support' do
|
||||
before { params.merge!( rabbit_use_ssl ) }
|
||||
|
||||
it 'configures rabbit with ssl' do
|
||||
is_expected.to contain_designate_config('oslo_messaging_rabbit/rabbit_userid').with_value( params[:rabbit_userid] )
|
||||
is_expected.to contain_designate_config('oslo_messaging_rabbit/rabbit_password').with_value( params[:rabbit_password] )
|
||||
is_expected.to contain_designate_config('oslo_messaging_rabbit/rabbit_password').with_value( params[:rabbit_password] ).with_secret(true)
|
||||
is_expected.to contain_designate_config('oslo_messaging_rabbit/rabbit_virtual_host').with_value( params[:rabbit_virtual_host] )
|
||||
is_expected.to contain_designate_config('oslo_messaging_rabbit/kombu_reconnect_delay').with_value( params[:kombu_reconnect_delay] )
|
||||
is_expected.to contain_designate_config('oslo_messaging_rabbit/kombu_failover_strategy').with_value( params[:kombu_failover_strategy] )
|
||||
is_expected.to contain_oslo__messaging__rabbit('designate_config').with(
|
||||
|
@ -226,14 +158,6 @@ describe 'designate' do
|
|||
end
|
||||
end
|
||||
|
||||
shared_examples_for 'rabbit with deprecated option' do
|
||||
before { params.merge!( rabbit_deprecated_params ) }
|
||||
|
||||
it 'configures rabbit' do
|
||||
is_expected.to contain_designate_config('oslo_messaging_rabbit/rabbit_virtual_host').with_value( params[:rabbit_virtualhost] )
|
||||
end
|
||||
end
|
||||
|
||||
on_supported_os({
|
||||
:supported_os => OSDefaults.get_supported_os
|
||||
}).each do |os,facts|
|
||||
|
|
Loading…
Reference in New Issue