Remove deprecated catalog_type parameter

... because it was deprecated a few cycles ago[1].

This also removes the hard-coded default of [catalog] driver because
the value currently hard-coded is same as the service default.

[1] cd9f931c45

Change-Id: Ifeadb331d118e2c6e61048b6ace6d6b3d8afcf3e
This commit is contained in:
Takashi Kajinami
2023-06-20 14:17:17 +09:00
parent 80da0affca
commit b50bfe61d0
3 changed files with 9 additions and 36 deletions

View File

@@ -10,7 +10,7 @@
# #
# [*catalog_driver*] # [*catalog_driver*]
# (Optional) Catalog driver used by Keystone to store endpoints and services. # (Optional) Catalog driver used by Keystone to store endpoints and services.
# Defaults to false. # Defaults to $facts['os_service_default'].
# #
# [*catalog_template_file*] # [*catalog_template_file*]
# (Optional) Path to the catalog used if 'templated' catalog driver is used. # (Optional) Path to the catalog used if 'templated' catalog driver is used.
@@ -319,11 +319,6 @@
# #
# DEPRECATED PARAMETERS # DEPRECATED PARAMETERS
# #
# [*catalog_type*]
# (Optional) Type of catalog that keystone uses to store endpoints, services.
# This accepts sql or template.
# Defaults to undef.
#
# [*client_package_ensure*] # [*client_package_ensure*]
# (Optional) Desired ensure state of the client package. # (Optional) Desired ensure state of the client package.
# accepts latest or specific versions. # accepts latest or specific versions.
@@ -339,7 +334,7 @@
# #
class keystone( class keystone(
$package_ensure = 'present', $package_ensure = 'present',
$catalog_driver = false, $catalog_driver = $facts['os_service_default'],
$catalog_template_file = '/etc/keystone/default_catalog.templates', $catalog_template_file = '/etc/keystone/default_catalog.templates',
$token_provider = 'fernet', $token_provider = 'fernet',
$token_expiration = 3600, $token_expiration = 3600,
@@ -394,7 +389,6 @@ class keystone(
$purge_config = false, $purge_config = false,
$amqp_durable_queues = $facts['os_service_default'], $amqp_durable_queues = $facts['os_service_default'],
# DEPRECATED PARAMETERS # DEPRECATED PARAMETERS
$catalog_type = undef,
$client_package_ensure = undef, $client_package_ensure = undef,
) inherits keystone::params { ) inherits keystone::params {
@@ -410,13 +404,6 @@ class keystone(
validate_legacy(Boolean, 'validate_bool', $using_domain_config) validate_legacy(Boolean, 'validate_bool', $using_domain_config)
validate_legacy(Boolean, 'validate_bool', $manage_policyrcd) validate_legacy(Boolean, 'validate_bool', $manage_policyrcd)
if $catalog_type != undef {
warning('The catalog_type parameter is deprecated. Use the catalog_driver parameter instead.')
if ! $catalog_driver {
validate_legacy(Enum['template', 'sql'], 'validate_re', $catalog_type)
}
}
if $client_package_ensure != undef { if $client_package_ensure != undef {
warning('The client_package_ensure parameter is deprecated and has no effect.') warning('The client_package_ensure parameter is deprecated and has no effect.')
} }
@@ -474,19 +461,8 @@ class keystone(
max_request_body_size => $max_request_body_size, max_request_body_size => $max_request_body_size,
} }
# configure based on the catalog backend
if $catalog_driver {
$catalog_driver_real = $catalog_driver
}
elsif ($catalog_type == 'template') {
$catalog_driver_real = 'templated'
}
else {
$catalog_driver_real = 'sql'
}
keystone_config { keystone_config {
'catalog/driver': value => $catalog_driver_real; 'catalog/driver': value => $catalog_driver;
'catalog/template_file': value => $catalog_template_file; 'catalog/template_file': value => $catalog_template_file;
} }

View File

@@ -0,0 +1,5 @@
---
upgrade:
- |
The ``keystone::catalog_type`` parameter has been removed. Use
the ``catalog_driver`` parameter instead.

View File

@@ -44,7 +44,7 @@ describe 'keystone' do
:max_request_body_size => '<SERVICE DEFAULT>', :max_request_body_size => '<SERVICE DEFAULT>',
) )
is_expected.to contain_keystone_config('catalog/driver').with_value('sql') is_expected.to contain_keystone_config('catalog/driver').with_value('<SERVICE DEFAULT>')
is_expected.to contain_keystone_config('catalog/template_file').with_value('/etc/keystone/default_catalog.templates') is_expected.to contain_keystone_config('catalog/template_file').with_value('/etc/keystone/default_catalog.templates')
is_expected.to contain_keystone_config('token/provider').with_value('fernet') is_expected.to contain_keystone_config('token/provider').with_value('fernet')
is_expected.to contain_keystone_config('DEFAULT/max_token_size').with_value('<SERVICE DEFAULT>') is_expected.to contain_keystone_config('DEFAULT/max_token_size').with_value('<SERVICE DEFAULT>')
@@ -212,14 +212,6 @@ describe 'keystone' do
it { is_expected.to_not contain_service('keystone') } it { is_expected.to_not contain_service('keystone') }
end end
context 'with invalid catalog_type' do
let :params do
{ :catalog_type => 'invalid' }
end
it { should raise_error(Puppet::Error) }
end
context 'when sync_db is set to false' do context 'when sync_db is set to false' do
let :params do let :params do
{ {