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':
catalog_type => 'sql',
catalog_driver => 'sql',
}
class { 'keystone::bootstrap':

View File

@ -28,9 +28,9 @@ class { 'keystone::db':
database_connection => 'mysql://keystone:keystone@127.0.0.1/keystone',
}
class { 'keystone':
debug => true,
catalog_type => 'sql',
enabled => false,
debug => true,
catalog_driver => 'sql',
enabled => false,
}
class { 'keystone::bootstrap':
password => 'ChangeMe',

View File

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

View File

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

View File

@ -13,17 +13,12 @@
# accepts latest or specific versions.
# Defaults to present.
#
# [*catalog_type*]
# (Optional) Type of catalog that keystone uses to store endpoints,services.
# Defaults to sql. (Also accepts template)
#
# [*catalog_driver*]
# (Optional) Catalog driver used by Keystone to store endpoints and services.
# Setting this value will override and ignore catalog_type.
# Defaults to false.
#
# [*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'
#
# [*token_provider*]
@ -374,6 +369,11 @@
# Sample value: 'http://localhost:5000/'
# 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
#
# Dan Bode dan@puppetlabs.com
@ -387,7 +387,6 @@ class keystone(
$client_package_ensure = 'present',
$log_dir = undef,
$log_file = undef,
$catalog_type = 'sql',
$catalog_driver = false,
$catalog_template_file = '/etc/keystone/default_catalog.templates',
$token_provider = 'fernet',
@ -450,14 +449,18 @@ class keystone(
$member_role_id = undef,
$member_role_name = undef,
$admin_endpoint = undef,
$catalog_type = undef,
) inherits keystone::params {
include keystone::deps
include keystone::logging
include keystone::policy
if ! $catalog_driver {
validate_legacy(Enum['template', 'sql'], 'validate_re', $catalog_type)
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 $manage_policyrcd {
@ -566,7 +569,7 @@ class keystone(
elsif ($catalog_type == 'template') {
$catalog_driver_real = 'templated'
}
elsif ($catalog_type == 'sql') {
else {
$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,
:enable_proxy_headers_parsing => true,
:max_request_body_size => 114688,
:catalog_type => 'template',
:catalog_driver => 'templated',
:catalog_template_file => '/some/template_file',
:token_provider => 'uuid',
:max_token_size => 255,