Remove deprecated rgw keystone params

Removes the parameters for keystone auth
that has been deprecated in last release
and doesn't do anything.

Depends-On: https://review.opendev.org/#/c/679031/
Change-Id: I64af103b93177bff60411ff484aad0f6506a9d13
This commit is contained in:
Tobias Urdin 2019-08-28 12:03:59 +02:00
parent a09926aa2d
commit 0377da4e08
3 changed files with 6 additions and 65 deletions

View File

@ -59,33 +59,6 @@
# (Optional) Set 'true' for a private tenant for each user. # (Optional) Set 'true' for a private tenant for each user.
# Defaults to true # Defaults to true
# #
## DEPRECATED PARAMS
#
# [*rgw_keystone_version*]
# (Optional) The api version for keystone.
# Defaults to undef
#
# [*rgw_keystone_admin_token*]
# (Optional) The keystone admin token.
# Defaults to undef
#
# [*use_pki*]
# (Optional) Whether to use PKI related configuration.
# Defaults to undef
#
# [*rgw_keystone_revocation_interval*]
# (Optional) Interval to check for expired tokens.
# Not useful if not using PKI tokens (if not, set to high value).
# Defaults to undef
#
# [*nss_db_path*]
# (Optional) Path to NSS < - > keystone tokens db files.
# Defaults to undef
#
# [*user*]
# (Optional) User running the web frontend.
# Defaults to undef
#
define ceph::rgw::keystone ( define ceph::rgw::keystone (
$rgw_keystone_admin_domain, $rgw_keystone_admin_domain,
$rgw_keystone_admin_project, $rgw_keystone_admin_project,
@ -96,38 +69,12 @@ define ceph::rgw::keystone (
$rgw_keystone_token_cache_size = 500, $rgw_keystone_token_cache_size = 500,
$rgw_s3_auth_use_keystone = true, $rgw_s3_auth_use_keystone = true,
$rgw_keystone_implicit_tenants = true, $rgw_keystone_implicit_tenants = true,
## DEPRECATED PARAMS
$rgw_keystone_version = undef,
$rgw_keystone_admin_token = undef,
$use_pki = undef,
$rgw_keystone_revocation_interval = undef,
$nss_db_path = undef,
$user = undef,
) { ) {
unless $name =~ /^radosgw\..+/ { unless $name =~ /^radosgw\..+/ {
fail("Define name must be started with 'radosgw.'") fail("Define name must be started with 'radosgw.'")
} }
if $rgw_keystone_version {
warning('ceph::rgw::keystone::rgw_keystone_version is deprecated')
}
if $rgw_keystone_admin_token {
warning('ceph::rgw::keystone::rgw_keystone_admin_token is deprecated')
}
if $use_pki {
warning('ceph::rgw::keystone::use_pki is deprecated')
}
if $rgw_keystone_revocation_interval {
warning('ceph::rgw::keystone::rgw_keystone_revocation_interval is deprecated')
}
if $nss_db_path {
warning('ceph::rgw::keystone::nss_db_path is deprecated')
}
if $user {
warning('ceph::rgw::keystone::user is deprecated')
}
ceph_config { ceph_config {
"client.${name}/rgw_keystone_url": value => $rgw_keystone_url; "client.${name}/rgw_keystone_url": value => $rgw_keystone_url;
"client.${name}/rgw_keystone_accepted_roles": value => join(any2array($rgw_keystone_accepted_roles), ','); "client.${name}/rgw_keystone_accepted_roles": value => join(any2array($rgw_keystone_accepted_roles), ',');
@ -150,11 +97,5 @@ define ceph::rgw::keystone (
"client.${name}/rgw_keystone_admin_project": value => $rgw_keystone_admin_project; "client.${name}/rgw_keystone_admin_project": value => $rgw_keystone_admin_project;
"client.${name}/rgw_keystone_admin_user": value => $rgw_keystone_admin_user; "client.${name}/rgw_keystone_admin_user": value => $rgw_keystone_admin_user;
"client.${name}/rgw_keystone_admin_password": value => $rgw_keystone_admin_password; "client.${name}/rgw_keystone_admin_password": value => $rgw_keystone_admin_password;
"client.${name}/rgw_keystone_admin_token": ensure => absent;
}
ceph_config {
"client.${name}/nss_db_path": ensure => absent;
"client.${name}/rgw_keystone_revocation_interval": ensure => absent;
} }
} }

View File

@ -0,0 +1,6 @@
---
upgrade:
- |
The deprecated parameters rgw_keystone_version, rgw_keystone_admin_token,
use_pki, rgw_keystone_revocation_interval, nss_db_path and user in
ceph::rgw::keystone is removed.

View File

@ -47,14 +47,11 @@ describe 'ceph::rgw::keystone' do
it { should contain_ceph_config('client.radosgw.gateway/rgw_keystone_admin_project').with_value('openstack') } it { should contain_ceph_config('client.radosgw.gateway/rgw_keystone_admin_project').with_value('openstack') }
it { should contain_ceph_config('client.radosgw.gateway/rgw_keystone_admin_user').with_value('rgwuser') } it { should contain_ceph_config('client.radosgw.gateway/rgw_keystone_admin_user').with_value('rgwuser') }
it { should contain_ceph_config('client.radosgw.gateway/rgw_keystone_admin_password').with_value('123456') } it { should contain_ceph_config('client.radosgw.gateway/rgw_keystone_admin_password').with_value('123456') }
it { should contain_ceph_config('client.radosgw.gateway/rgw_keystone_admin_token').with_ensure('absent') }
it { should contain_ceph_config('client.radosgw.gateway/rgw_keystone_url').with_value('http://127.0.0.1:5000') } it { should contain_ceph_config('client.radosgw.gateway/rgw_keystone_url').with_value('http://127.0.0.1:5000') }
it { should contain_ceph_config('client.radosgw.gateway/rgw_keystone_accepted_roles').with_value('member') } it { should contain_ceph_config('client.radosgw.gateway/rgw_keystone_accepted_roles').with_value('member') }
it { should contain_ceph_config('client.radosgw.gateway/rgw_keystone_token_cache_size').with_value(500) } it { should contain_ceph_config('client.radosgw.gateway/rgw_keystone_token_cache_size').with_value(500) }
it { should contain_ceph_config('client.radosgw.gateway/rgw_s3_auth_use_keystone').with_value(true) } it { should contain_ceph_config('client.radosgw.gateway/rgw_s3_auth_use_keystone').with_value(true) }
it { should contain_ceph_config('client.radosgw.gateway/rgw_keystone_implicit_tenants').with_value(true) } it { should contain_ceph_config('client.radosgw.gateway/rgw_keystone_implicit_tenants').with_value(true) }
it { should contain_ceph_config('client.radosgw.gateway/rgw_keystone_revocation_interval').with_ensure('absent') }
it { should contain_ceph_config('client.radosgw.gateway/nss_db_path').with_ensure('absent') }
end end
context 'create with custom params' do context 'create with custom params' do
@ -88,14 +85,11 @@ describe 'ceph::rgw::keystone' do
it { should contain_ceph_config('client.radosgw.custom/rgw_keystone_admin_project').with_value('openstack') } it { should contain_ceph_config('client.radosgw.custom/rgw_keystone_admin_project').with_value('openstack') }
it { should contain_ceph_config('client.radosgw.custom/rgw_keystone_admin_user').with_value('rgwuser') } it { should contain_ceph_config('client.radosgw.custom/rgw_keystone_admin_user').with_value('rgwuser') }
it { should contain_ceph_config('client.radosgw.custom/rgw_keystone_admin_password').with_value('123456') } it { should contain_ceph_config('client.radosgw.custom/rgw_keystone_admin_password').with_value('123456') }
it { should contain_ceph_config('client.radosgw.custom/rgw_keystone_admin_token').with_ensure('absent') }
it { should contain_ceph_config('client.radosgw.custom/rgw_keystone_url').with_value('http://keystone.custom:5000') } it { should contain_ceph_config('client.radosgw.custom/rgw_keystone_url').with_value('http://keystone.custom:5000') }
it { should contain_ceph_config('client.radosgw.custom/rgw_keystone_accepted_roles').with_value('_role1_,role2') } it { should contain_ceph_config('client.radosgw.custom/rgw_keystone_accepted_roles').with_value('_role1_,role2') }
it { should contain_ceph_config('client.radosgw.custom/rgw_keystone_token_cache_size').with_value(100) } it { should contain_ceph_config('client.radosgw.custom/rgw_keystone_token_cache_size').with_value(100) }
it { should contain_ceph_config('client.radosgw.custom/rgw_s3_auth_use_keystone').with_value(false) } it { should contain_ceph_config('client.radosgw.custom/rgw_s3_auth_use_keystone').with_value(false) }
it { should contain_ceph_config('client.radosgw.custom/rgw_keystone_implicit_tenants').with_value(false) } it { should contain_ceph_config('client.radosgw.custom/rgw_keystone_implicit_tenants').with_value(false) }
it { should contain_ceph_config('client.radosgw.custom/rgw_keystone_revocation_interval').with_ensure('absent') }
it { should contain_ceph_config('client.radosgw.custom/nss_db_path').with_ensure('absent') }
end end
end end