Clean up deprecated parameters
This removes a few parameters deprecated in favor of the new
cloudkitty::fetcher::keystone class.
[1] 4e6806f54f
Change-Id: I0e363d7269bfea31464d8d74b07828bebd792c3a
This commit is contained in:
parent
48b65769ae
commit
9869a67a9d
|
@ -54,7 +54,7 @@
|
|||
# Defaults to $facts['os_service_default'].
|
||||
#
|
||||
class cloudkitty::fetcher::keystone (
|
||||
$auth_section = undef,
|
||||
$auth_section = $facts['os_service_default'],
|
||||
$auth_url = $facts['os_service_default'],
|
||||
$username = $facts['os_service_default'],
|
||||
$password = $facts['os_service_default'],
|
||||
|
@ -70,16 +70,6 @@ class cloudkitty::fetcher::keystone (
|
|||
|
||||
include cloudkitty::deps
|
||||
|
||||
if defined('$::cloudkitty::auth_section') and $::cloudkitty::auth_section {
|
||||
$auth_section_real = $::cloudkitty::auth_section
|
||||
} else {
|
||||
if $auth_section == undef {
|
||||
warning('Default of the auth_section parameter will be changed in a future release')
|
||||
}
|
||||
$auth_section_real = pick($auth_section, 'keystone_authtoken')
|
||||
}
|
||||
$keystone_version_real = pick($::cloudkitty::keystone_version, $keystone_version)
|
||||
|
||||
if is_service_default($system_scope) {
|
||||
$project_name_real = $project_name
|
||||
$project_domain_name_real = $project_domain_name
|
||||
|
@ -89,7 +79,7 @@ class cloudkitty::fetcher::keystone (
|
|||
}
|
||||
|
||||
cloudkitty_config {
|
||||
'fetcher_keystone/auth_section': value => $auth_section_real;
|
||||
'fetcher_keystone/auth_section': value => $auth_section;
|
||||
'fetcher_keystone/username': value => $username;
|
||||
'fetcher_keystone/password': value => $password, secret => true;
|
||||
'fetcher_keystone/project_name': value => $project_name_real;
|
||||
|
@ -97,7 +87,7 @@ class cloudkitty::fetcher::keystone (
|
|||
'fetcher_keystone/project_domain_name': value => $project_domain_name_real;
|
||||
'fetcher_keystone/system_scope': value => $system_scope;
|
||||
'fetcher_keystone/auth_url': value => $auth_url;
|
||||
'fetcher_keystone/keystone_version': value => $keystone_version_real;
|
||||
'fetcher_keystone/keystone_version': value => $keystone_version;
|
||||
'fetcher_keystone/ignore_rating_role': value => $ignore_rating_role;
|
||||
'fetcher_keystone/ignore_disabled_tenants': value => $ignore_disabled_tenants;
|
||||
}
|
||||
|
|
|
@ -224,16 +224,6 @@
|
|||
# (Optional) A hash of the metrics.yaml configuration.
|
||||
# Defaults to undef
|
||||
#
|
||||
# DEPRECATED PARAMETERS
|
||||
#
|
||||
# [*auth_section*]
|
||||
# (Optional) Config Section from which to load plugin specific options
|
||||
# Defaults to undef
|
||||
#
|
||||
# [*keystone_version*]
|
||||
# (Optional) Keystone version to use.
|
||||
# Defaults to undef
|
||||
#
|
||||
class cloudkitty(
|
||||
$package_ensure = 'present',
|
||||
$rabbit_use_ssl = $facts['os_service_default'],
|
||||
|
@ -283,19 +273,8 @@ class cloudkitty(
|
|||
$storage_version = $facts['os_service_default'],
|
||||
$fetcher_backend = $facts['os_service_default'],
|
||||
Optional[Hash] $metrics_config = undef,
|
||||
# DEPRECATED PARAMETERS
|
||||
$auth_section = undef,
|
||||
$keystone_version = undef,
|
||||
) {
|
||||
|
||||
if $auth_section != undef {
|
||||
warning('The cloudkitty::auth_section parameter is deprecated. Use the cloudkitty::fetcher_keystone class')
|
||||
}
|
||||
if $keystone_version != undef {
|
||||
warning('The cloudkitty::keystone_version parameter is deprecated. Use the cloudkitty::fetcher_keystone class')
|
||||
}
|
||||
include cloudkitty::fetcher::keystone
|
||||
|
||||
include cloudkitty::params
|
||||
include cloudkitty::db
|
||||
include cloudkitty::deps
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
---
|
||||
upgrade:
|
||||
- |
|
||||
Default of the ``cloudkitty::fetcher::keystone`` parameter has been
|
||||
changed.
|
||||
|
||||
- |
|
||||
The following two parameters of the ``cloudkitty`` class have been removed.
|
||||
|
||||
- ``auth_section``
|
||||
- ``keystone_version``
|
|
@ -9,7 +9,7 @@ describe 'cloudkitty::fetcher::keystone' do
|
|||
end
|
||||
|
||||
it 'configures the fetcher_keystone parameters' do
|
||||
is_expected.to contain_cloudkitty_config('fetcher_keystone/auth_section').with_value('keystone_authtoken')
|
||||
is_expected.to contain_cloudkitty_config('fetcher_keystone/auth_section').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_cloudkitty_config('fetcher_keystone/username').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_cloudkitty_config('fetcher_keystone/password').with_value('<SERVICE DEFAULT>').with_secret(true)
|
||||
is_expected.to contain_cloudkitty_config('fetcher_keystone/project_name').with_value('<SERVICE DEFAULT>')
|
||||
|
@ -26,7 +26,7 @@ describe 'cloudkitty::fetcher::keystone' do
|
|||
context 'with parameters set' do
|
||||
let :params do
|
||||
{
|
||||
:auth_section => '<SERVICE DEFAULT>',
|
||||
:auth_section => 'keystone_authtoken',
|
||||
:username => 'cloudkitty',
|
||||
:password => 'cloudkitty_password',
|
||||
:project_name => 'service',
|
||||
|
@ -40,7 +40,7 @@ describe 'cloudkitty::fetcher::keystone' do
|
|||
end
|
||||
|
||||
it 'configures the fetcher_keystone parameters' do
|
||||
is_expected.to contain_cloudkitty_config('fetcher_keystone/auth_section').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_cloudkitty_config('fetcher_keystone/auth_section').with_value('keystone_authtoken')
|
||||
is_expected.to contain_cloudkitty_config('fetcher_keystone/username').with_value('cloudkitty')
|
||||
is_expected.to contain_cloudkitty_config('fetcher_keystone/password').with_value('cloudkitty_password').with_secret(true)
|
||||
is_expected.to contain_cloudkitty_config('fetcher_keystone/project_name').with_value('service')
|
||||
|
|
|
@ -100,8 +100,6 @@ describe 'cloudkitty' do
|
|||
:control_exchange => 'cloudkitty',
|
||||
:storage_backend => 'gnocchi',
|
||||
:storage_version => '1',
|
||||
:auth_section => 'keystone_authtoken',
|
||||
:keystone_version => '3',
|
||||
}
|
||||
end
|
||||
|
||||
|
@ -130,8 +128,6 @@ describe 'cloudkitty' do
|
|||
it 'configures various things' do
|
||||
is_expected.to contain_cloudkitty_config('storage/backend').with_value('gnocchi')
|
||||
is_expected.to contain_cloudkitty_config('storage/version').with_value('1')
|
||||
is_expected.to contain_cloudkitty_config('fetcher_keystone/auth_section').with_value('keystone_authtoken')
|
||||
is_expected.to contain_cloudkitty_config('fetcher_keystone/keystone_version').with_value('3')
|
||||
end
|
||||
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue