Deprecate the catalog_type parameter

... because the parameter is almost duplicate of catalog_driver which
more "natively" corresponds to the keystone parameter.

Change-Id: Id80495a191e3cd05507f732335b33b9a493c6d10
This commit is contained in:
Takashi Kajinami 2022-02-28 00:57:51 +09:00
parent b7396be571
commit cd9f931c45
7 changed files with 29 additions and 21 deletions

View File

@ -55,7 +55,7 @@ class { 'keystone::db':
} }
class { 'keystone': class { 'keystone':
catalog_type => 'sql', catalog_driver => 'sql',
} }
class { 'keystone::bootstrap': class { 'keystone::bootstrap':

View File

@ -29,7 +29,7 @@ class { 'keystone::db':
} }
class { 'keystone': class { 'keystone':
debug => true, debug => true,
catalog_type => 'sql', catalog_driver => 'sql',
enabled => false, enabled => false,
} }
class { 'keystone::bootstrap': class { 'keystone::bootstrap':

View File

@ -30,7 +30,7 @@ class { 'keystone::db':
class { 'keystone': class { 'keystone':
debug => true, debug => true,
catalog_type => 'sql', catalog_driver => 'sql',
enabled => true, enabled => true,
} }
class { 'keystone::bootstrap': class { 'keystone::bootstrap':

View File

@ -47,7 +47,7 @@ class { 'keystone::db':
class { 'keystone': class { 'keystone':
debug => true, debug => true,
catalog_type => 'sql', catalog_driver => 'sql',
enabled => false, enabled => false,
} }

View File

@ -13,17 +13,12 @@
# accepts latest or specific versions. # accepts latest or specific versions.
# Defaults to present. # Defaults to present.
# #
# [*catalog_type*]
# (Optional) Type of catalog that keystone uses to store endpoints,services.
# Defaults to sql. (Also accepts template)
#
# [*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.
# Setting this value will override and ignore catalog_type.
# Defaults to false. # Defaults to false.
# #
# [*catalog_template_file*] # [*catalog_template_file*]
# (Optional) Path to the catalog used if catalog_type equals 'template'. # (Optional) Path to the catalog used if 'templated' catalog driver is used.
# Defaults to '/etc/keystone/default_catalog.templates' # Defaults to '/etc/keystone/default_catalog.templates'
# #
# [*token_provider*] # [*token_provider*]
@ -374,6 +369,11 @@
# Sample value: 'http://localhost:5000/' # Sample value: 'http://localhost:5000/'
# Defaults to undef # Defaults to undef
# #
# [*catalog_type*]
# (Optional) Type of catalog that keystone uses to store endpoints, services.
# This accepts sql or template.
# Defaults to undef.
#
# == Authors # == Authors
# #
# Dan Bode dan@puppetlabs.com # Dan Bode dan@puppetlabs.com
@ -387,7 +387,6 @@ class keystone(
$client_package_ensure = 'present', $client_package_ensure = 'present',
$log_dir = undef, $log_dir = undef,
$log_file = undef, $log_file = undef,
$catalog_type = 'sql',
$catalog_driver = false, $catalog_driver = false,
$catalog_template_file = '/etc/keystone/default_catalog.templates', $catalog_template_file = '/etc/keystone/default_catalog.templates',
$token_provider = 'fernet', $token_provider = 'fernet',
@ -450,15 +449,19 @@ class keystone(
$member_role_id = undef, $member_role_id = undef,
$member_role_name = undef, $member_role_name = undef,
$admin_endpoint = undef, $admin_endpoint = undef,
$catalog_type = undef,
) inherits keystone::params { ) inherits keystone::params {
include keystone::deps include keystone::deps
include keystone::logging include keystone::logging
include keystone::policy include keystone::policy
if $catalog_type != undef {
warning('The catalog_type parameter is deprecated. Use the catalog_driver parameter instead.')
if ! $catalog_driver { if ! $catalog_driver {
validate_legacy(Enum['template', 'sql'], 'validate_re', $catalog_type) validate_legacy(Enum['template', 'sql'], 'validate_re', $catalog_type)
} }
}
if $manage_policyrcd { if $manage_policyrcd {
# openstacklib policy_rcd only affects debian based systems. # openstacklib policy_rcd only affects debian based systems.
@ -566,7 +569,7 @@ class keystone(
elsif ($catalog_type == 'template') { elsif ($catalog_type == 'template') {
$catalog_driver_real = 'templated' $catalog_driver_real = 'templated'
} }
elsif ($catalog_type == 'sql') { else {
$catalog_driver_real = 'sql' $catalog_driver_real = 'sql'
} }

View File

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

View File

@ -129,7 +129,7 @@ describe 'keystone' do
:revoke_by_id => true, :revoke_by_id => true,
:enable_proxy_headers_parsing => true, :enable_proxy_headers_parsing => true,
:max_request_body_size => 114688, :max_request_body_size => 114688,
:catalog_type => 'template', :catalog_driver => 'templated',
:catalog_template_file => '/some/template_file', :catalog_template_file => '/some/template_file',
:token_provider => 'uuid', :token_provider => 'uuid',
:max_token_size => 255, :max_token_size => 255,