Remove deprecated parameters

Removes deprecated parameters that has been
deprecated for one cycle or more.

Change-Id: Ie6a6003d667c8c6045439ca3d35f0f121097bddc
This commit is contained in:
Tobias Urdin 2018-06-12 22:12:45 +02:00
parent 39f2929f4c
commit 6117cf1066
6 changed files with 31 additions and 65 deletions

View File

@ -28,15 +28,6 @@
# (Optional) The version of the executor. (string value)
# Defaults to $::os_service_default.
#
# [*evaluation_interval*]
# (Deprecated) This should now be set via
# mistral::engine::evaluation_interval.
# Defaults to false.
#
# [*older_than*]
# (Deprecated) This should now be set via mistral::engine::older_than.
# Defaults to false.
#
class mistral::executor (
$package_ensure = present,
$manage_service = true,
@ -44,21 +35,11 @@ class mistral::executor (
$host = $::os_service_default,
$topic = $::os_service_default,
$version = $::os_service_default,
#DEPRECATED
$evaluation_interval = false,
$older_than = false,
) {
include ::mistral::deps
include ::mistral::params
if $evaluation_interval {
warning('evaluation_interval is deprecated here. Please use mistral::engine::evaluation_interval instead.')
}
if $older_than {
warning('older_than is deprecated here. Please use mistral::engine::older_than instead.')
}
package { 'mistral-executor':
ensure => $package_ensure,
name => $::mistral::params::executor_package_name,

View File

@ -177,28 +177,6 @@
# (Optional) Enable dbsync
# Defaults to true.
#
# === DEPRECATED PARAMTERS
#
# [*auth_uri*]
# (optional) Specifies the public Identity URI for Mistral to use.
# Default undef.
#
# [*identity_uri*]
# (optional) Specifies the admin Identity URI for Mistral to use.
# Default undef.
#
# [*keystone_user*]
# (optional) The name of the auth user
# Defaults to undef.
#
# [*keystone_tenant*]
# (optional) The tenant of the auth user
# Defaults to undef.
#
# [*keystone_password*]
# (optional) The password of the auth user.
# Defaults to undef.
#
class mistral(
$package_ensure = 'present',
$database_connection = $::os_service_default,
@ -231,21 +209,12 @@ class mistral(
$coordination_heartbeat_interval = $::os_service_default,
$purge_config = false,
$sync_db = true,
# DEPRECATED PARAMETERS
$keystone_password = undef,
$keystone_user = undef,
$keystone_tenant = undef,
$auth_uri = undef,
$identity_uri = undef,
){
include ::mistral::deps
include ::mistral::params
include ::mistral::db
include ::mistral::logging
include ::mistral::keystone::authtoken
validate_string($keystone_password)
package { 'mistral-common':
ensure => $package_ensure,

View File

@ -225,7 +225,7 @@ class mistral::keystone::authtoken(
include ::mistral::deps
if is_service_default($password) and ! $::mistral::keystone_password {
if is_service_default($password) {
fail('Please set password for mistral service user')
}
@ -233,18 +233,14 @@ class mistral::keystone::authtoken(
warning('The auth_uri parameter is deprecated. Please use www_authenticate_uri instead.')
}
#NOTE(emilien): Use pick to keep backward compatibility
$username_real = pick($::mistral::keystone_user,$username)
$password_real = pick($::mistral::keystone_password,$password)
$project_name_real = pick($::mistral::keystone_tenant,$project_name)
$auth_url_real = pick($::mistral::identity_uri,$auth_url)
$www_authenticate_uri_real = pick($::mistral::auth_uri,$auth_uri,$www_authenticate_uri)
# TODO(tobasco): Remove this pick when auth_uri is removed.
$www_authenticate_uri_real = pick($auth_uri,$www_authenticate_uri)
keystone::resource::authtoken { 'mistral_config':
username => $username_real,
password => $password_real,
project_name => $project_name_real,
auth_url => $auth_url_real,
username => $username,
password => $password,
project_name => $project_name,
auth_url => $auth_url,
www_authenticate_uri => $www_authenticate_uri_real,
auth_version => $auth_version,
auth_type => $auth_type,

View File

@ -0,0 +1,11 @@
---
upgrade:
- |
The deprecated parameters evaluation_interval and older_than in
mistral::executor is now removed.
Please use evaluation_interval and older_than in mistral::engine instead.
- |
The deprecated parameters keystone_user, keystone_password, keystone_tenant,
identity_uri and auth_uri in ::mistral is now removed.
Please use username, password, project_name, auth_url and www_authenticate_uri
in ::mistral::keystone::authtoken instead.

View File

@ -12,6 +12,12 @@ describe 'mistral::api' do
:allow_action_execution_deletion => false}
end
let :pre_condition do
"class { '::mistral::keystone::authtoken':
password => 'foo',
}"
end
shared_examples_for 'mistral-api' do
context 'config params' do
@ -89,9 +95,7 @@ describe 'mistral::api' do
let :pre_condition do
"include ::apache
include ::mistral::db
class { '::mistral':
keystone_password => 'foo',
}"
class { '::mistral': }"
end
it 'configures mistral-api service with Apache' do

View File

@ -3,7 +3,6 @@ describe 'mistral' do
let :req_params do
{
:database_connection => 'mysql://user:password@host/database',
:keystone_password => 'foo',
:purge_config => false,
}
end
@ -16,6 +15,12 @@ describe 'mistral' do
})
end
let :pre_condition do
"class { '::mistral::keystone::authtoken':
password => 'foo',
}"
end
describe 'with only required params' do
let :params do
req_params