From 97425d5b649c996b6f6994be4a5302e3b9e246f2 Mon Sep 17 00:00:00 2001 From: ZhongShengping Date: Thu, 24 May 2018 10:42:40 +0800 Subject: [PATCH] Remove deprecated rabbit params Remove the deprecated rabbit params which has been deprecated for two years. The default_transport_url has been present for a while now and should be used. Change-Id: Iffed46781ef7c9daee5155dffa381c2a86dc8dcf --- manifests/init.pp | 56 ------------------- ...ecated-rabbit-params-987b59530e476762.yaml | 6 ++ spec/classes/mistral_api_spec.rb | 1 - spec/classes/mistral_init_spec.rb | 32 ----------- 4 files changed, 6 insertions(+), 89 deletions(-) create mode 100644 releasenotes/notes/remove-deprecated-rabbit-params-987b59530e476762.yaml diff --git a/manifests/init.pp b/manifests/init.pp index 57fe0a7..44f1414 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -179,36 +179,6 @@ # # === DEPRECATED PARAMTERS # -# [*rabbit_host*] -# (Optional) IP or hostname of the rabbit server. -# Defaults to $::os_service_default -# -# [*rabbit_port*] -# (Optional) Port of the rabbit server. -# 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_userid*] -# (Optional) User to connect to the rabbit server. -# Defaults to $::os_service_default -# -# [*rabbit_password*] -# (Required) Password to connect to the rabbit_server. -# Required if using the Rabbit (kombu) backend. -# Default to $::os_service_default -# -# [*rabbit_virtual_host*] -# (Optional) Virtual_host to use. -# Defaults to $::os_service_default -# -# [*rpc_backend*] -# (optional) The rpc backend. -# Defaults to $::os_service_default. -# # [*auth_uri*] # (optional) Specifies the public Identity URI for Mistral to use. # Default undef. @@ -262,13 +232,6 @@ class mistral( $purge_config = false, $sync_db = true, # DEPRECATED PARAMETERS - $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 = $::os_service_default, $keystone_password = undef, $keystone_user = undef, $keystone_tenant = undef, @@ -284,19 +247,6 @@ class mistral( validate_string($keystone_password) - 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 - !is_service_default($rabbit_virtual_host) or - !is_service_default($rpc_backend) { - warning("mistral::rabbit_host, mistral::rabbit_hosts, mistral::rabbit_password, \ -mistral::rabbit_port, mistral::rabbit_userid, mistral::rabbit_virtual_host and \ -mistral::rpc_backend are deprecated. Please use mistral::default_transport_url \ -instead.") - } - package { 'mistral-common': ensure => $package_ensure, name => $::mistral::params::common_package_name, @@ -328,12 +278,6 @@ instead.") } oslo::messaging::rabbit {'mistral_config': - rabbit_host => $rabbit_host, - rabbit_port => $rabbit_port, - rabbit_hosts => $rabbit_hosts, - rabbit_password => $rabbit_password, - rabbit_userid => $rabbit_userid, - rabbit_virtual_host => $rabbit_virtual_host, rabbit_ha_queues => $rabbit_ha_queues, rabbit_use_ssl => $rabbit_use_ssl, kombu_failover_strategy => $kombu_failover_strategy, diff --git a/releasenotes/notes/remove-deprecated-rabbit-params-987b59530e476762.yaml b/releasenotes/notes/remove-deprecated-rabbit-params-987b59530e476762.yaml new file mode 100644 index 0000000..dbaa835 --- /dev/null +++ b/releasenotes/notes/remove-deprecated-rabbit-params-987b59530e476762.yaml @@ -0,0 +1,6 @@ +--- +upgrade: + - | + The deprecated mistral::rabbit_host, mistral::rabbit_hosts, mistral::rabbit_password, + mistral::rabbit_port, mistral::rabbit_userid and mistral::rabit_virtual_host are now + removed. Please use mistral::default_transport_url instead. diff --git a/spec/classes/mistral_api_spec.rb b/spec/classes/mistral_api_spec.rb index a1fcd52..9bda0e2 100644 --- a/spec/classes/mistral_api_spec.rb +++ b/spec/classes/mistral_api_spec.rb @@ -91,7 +91,6 @@ describe 'mistral::api' do include ::mistral::db class { '::mistral': keystone_password => 'foo', - rabbit_password => 'bar', }" end diff --git a/spec/classes/mistral_init_spec.rb b/spec/classes/mistral_init_spec.rb index aa616a2..0e94e1a 100644 --- a/spec/classes/mistral_init_spec.rb +++ b/spec/classes/mistral_init_spec.rb @@ -40,15 +40,9 @@ describe 'mistral' do is_expected.to contain_mistral_config('oslo_messaging_notifications/transport_url').with(:value => '') is_expected.to contain_mistral_config('oslo_messaging_notifications/driver').with(:value => '') is_expected.to contain_mistral_config('oslo_messaging_notifications/topics').with(:value => '') - is_expected.to contain_mistral_config('oslo_messaging_rabbit/rabbit_password').with(:value => '', :secret => true) - is_expected.to contain_mistral_config('oslo_messaging_rabbit/rabbit_host').with(:value => '') - is_expected.to contain_mistral_config('oslo_messaging_rabbit/rabbit_port').with(:value => '') - is_expected.to contain_mistral_config('oslo_messaging_rabbit/rabbit_hosts').with(:value => '') is_expected.to contain_mistral_config('oslo_messaging_rabbit/rabbit_ha_queues').with(:value => '') - is_expected.to contain_mistral_config('oslo_messaging_rabbit/rabbit_virtual_host').with(:value => '') is_expected.to contain_mistral_config('oslo_messaging_rabbit/heartbeat_timeout_threshold').with_value('') is_expected.to contain_mistral_config('oslo_messaging_rabbit/heartbeat_rate').with_value('') - is_expected.to contain_mistral_config('oslo_messaging_rabbit/rabbit_userid').with(:value => '') is_expected.to contain_mistral_config('oslo_messaging_rabbit/kombu_reconnect_delay').with(:value => '') is_expected.to contain_mistral_config('oslo_messaging_rabbit/kombu_failover_strategy').with(:value => '') is_expected.to contain_mistral_config('coordination/backend_url').with(:value => '') @@ -74,31 +68,6 @@ describe 'mistral' do end end - describe 'with modified rabbit_hosts' do - let :params do - req_params.merge({'rabbit_hosts' => ['rabbit1:5672', 'rabbit2:5672']}) - end - - it 'should contain many' do - is_expected.to contain_mistral_config('oslo_messaging_rabbit/rabbit_host').with(:value => '') - is_expected.to contain_mistral_config('oslo_messaging_rabbit/rabbit_port').with(:value => '') - is_expected.to contain_mistral_config('oslo_messaging_rabbit/rabbit_hosts').with(:value => 'rabbit1:5672,rabbit2:5672') - is_expected.to contain_mistral_config('oslo_messaging_rabbit/rabbit_ha_queues').with(:value => true) - end - end - - describe 'with a single rabbit_hosts entry' do - let :params do - req_params.merge({'rabbit_hosts' => ['rabbit1:5672']}) - end - - it 'should contain many' do - is_expected.to contain_mistral_config('oslo_messaging_rabbit/rabbit_host').with(:value => '') - is_expected.to contain_mistral_config('oslo_messaging_rabbit/rabbit_port').with(:value => '') - is_expected.to contain_mistral_config('oslo_messaging_rabbit/rabbit_hosts').with(:value => 'rabbit1:5672') - is_expected.to contain_mistral_config('oslo_messaging_rabbit/rabbit_ha_queues').with(:value => '') - end - end describe 'a single rabbit_host with enable ha queues' do let :params do @@ -213,7 +182,6 @@ describe 'mistral' do let :params do req_params.merge({ :database_connection => 'postgresql://user:drowssap@host/database', - :rabbit_password => 'guest', }) end