Deprecate client class

The python-keystoneclient package removed CLI long ago so installing
the package is now useless. It provides only library implementations
and should be installed by package dependencies.

Change-Id: I46b09092847eeb821f97172e1a912ad8a1b8a2e3
This commit is contained in:
Takashi Kajinami
2023-05-26 10:59:14 +09:00
parent c207af4a90
commit f271472b48
4 changed files with 25 additions and 16 deletions

View File

@@ -19,6 +19,9 @@ class keystone::client (
include keystone::deps include keystone::deps
warning("The keystone::client class has been deprecated and will be removed \
in a future release.")
package { 'python-keystoneclient': package { 'python-keystoneclient':
ensure => $ensure, ensure => $ensure,
name => $client_package_name, name => $client_package_name,

View File

@@ -8,11 +8,6 @@
# accepts latest or specific versions. # accepts latest or specific versions.
# Defaults to present. # Defaults to present.
# #
# [*client_package_ensure*]
# (Optional) Desired ensure state of the client package.
# accepts latest or specific versions.
# Defaults to present.
#
# [*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 false.
@@ -329,6 +324,11 @@
# This accepts sql or template. # This accepts sql or template.
# Defaults to undef. # Defaults to undef.
# #
# [*client_package_ensure*]
# (Optional) Desired ensure state of the client package.
# accepts latest or specific versions.
# Defaults to present.
#
# == Authors # == Authors
# #
# Dan Bode dan@puppetlabs.com # Dan Bode dan@puppetlabs.com
@@ -339,7 +339,6 @@
# #
class keystone( class keystone(
$package_ensure = 'present', $package_ensure = 'present',
$client_package_ensure = 'present',
$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',
@@ -396,6 +395,7 @@ class keystone(
$amqp_durable_queues = $facts['os_service_default'], $amqp_durable_queues = $facts['os_service_default'],
# DEPRECATED PARAMETERS # DEPRECATED PARAMETERS
$catalog_type = undef, $catalog_type = undef,
$client_package_ensure = undef,
) inherits keystone::params { ) inherits keystone::params {
include keystone::deps include keystone::deps
@@ -417,6 +417,10 @@ class keystone(
} }
} }
if $client_package_ensure != undef {
warning('The client_package_ensure parameter is deprecated and has no effect.')
}
if $manage_policyrcd { if $manage_policyrcd {
# openstacklib policy_rcd only affects debian based systems. # openstacklib policy_rcd only affects debian based systems.
Policy_rcd <| title == 'keystone' |> -> Package['keystone'] Policy_rcd <| title == 'keystone' |> -> Package['keystone']
@@ -437,13 +441,7 @@ class keystone(
name => $::keystone::params::package_name, name => $::keystone::params::package_name,
tag => ['openstack', 'keystone-package'], tag => ['openstack', 'keystone-package'],
} }
if $client_package_ensure == 'present' { include openstacklib::openstackclient
include keystone::client
} else {
class { 'keystone::client':
ensure => $client_package_ensure,
}
}
resources { 'keystone_config': resources { 'keystone_config':
purge => $purge_config, purge => $purge_config,

View File

@@ -0,0 +1,10 @@
---
deprecations:
- |
The ``keystone::client_package_ensure`` parameter has been deprecated and
has no effect.
- |
The ``keystone::client`` class has been deprecated, because
the python-keystoneclient package no longer provides CLI. Use
the ``openstacklib::openstackclient`` class instead.

View File

@@ -15,9 +15,7 @@ describe 'keystone' do
:tag => ['openstack', 'keystone-package'], :tag => ['openstack', 'keystone-package'],
) } ) }
it { is_expected.to contain_class('keystone::client').with( it { is_expected.to contain_class('openstacklib::openstackclient') }
'ensure' => 'present'
) }
it 'should synchronize the db if $sync_db is true' do it 'should synchronize the db if $sync_db is true' do
is_expected.to contain_exec('keystone-manage db_sync').with( is_expected.to contain_exec('keystone-manage db_sync').with(