From 49eaed8a2ca17e3c9a63b3aca80d42787f65ad05 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Thu, 2 Jan 2025 22:11:20 +0900 Subject: [PATCH] Remove deprecated client class It was deprecated during 2023.2 cycle[1]. [1] f271472b4824cdad1d0939c7c2d3a68556d1467d Change-Id: Ifb3cf39088983848e49c4625d9182958a1db4f7e --- manifests/client.pp | 32 ----------- manifests/init.pp | 10 ---- .../notes/remove-client-0218cc0d0e859003.yaml | 7 +++ spec/classes/keystone_client_spec.rb | 56 ------------------- 4 files changed, 7 insertions(+), 98 deletions(-) delete mode 100644 manifests/client.pp create mode 100644 releasenotes/notes/remove-client-0218cc0d0e859003.yaml delete mode 100644 spec/classes/keystone_client_spec.rb diff --git a/manifests/client.pp b/manifests/client.pp deleted file mode 100644 index d077f7f21..000000000 --- a/manifests/client.pp +++ /dev/null @@ -1,32 +0,0 @@ -# == Class: keystone::client -# -# Installs Keystone client. -# -# === Parameters -# -# [*client_package_name*] -# (optional) The name of python keystone client package -# Defaults to $keystone::params::client_package_name -# -# [*ensure*] -# (optional) Ensure state of the package. -# Defaults to 'present'. -# -class keystone::client ( - $client_package_name = $keystone::params::client_package_name, - $ensure = 'present' -) inherits keystone::params { - - include keystone::deps - - warning("The keystone::client class has been deprecated and will be removed \ -in a future release.") - - package { 'python-keystoneclient': - ensure => $ensure, - name => $client_package_name, - tag => 'openstack', - } - - include openstacklib::openstackclient -} diff --git a/manifests/init.pp b/manifests/init.pp index 28c8fff5b..18f943221 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -364,11 +364,6 @@ # # DEPRECATED PARAMETERS # -# [*client_package_ensure*] -# (Optional) Desired ensure state of the client package. -# accepts latest or specific versions. -# Defaults to present. -# # [*catalog_template_file*] # (Optional) Path to the catalog used if 'templated' catalog driver is used. # Defaults to '/etc/keystone/default_catalog.templates' @@ -448,7 +443,6 @@ class keystone( Boolean $purge_config = false, $amqp_durable_queues = $facts['os_service_default'], # DEPRECATED PARAMETERS - $client_package_ensure = undef, $catalog_template_file = undef, ) inherits keystone::params { @@ -456,10 +450,6 @@ class keystone( include keystone::logging include keystone::policy - if $client_package_ensure != undef { - warning('The client_package_ensure parameter is deprecated and has no effect.') - } - if $catalog_template_file != undef { warning('The catalog_template_file parameter is deprecated and will be removed in a future release') $catalog_template_file_real = $catalog_template_file diff --git a/releasenotes/notes/remove-client-0218cc0d0e859003.yaml b/releasenotes/notes/remove-client-0218cc0d0e859003.yaml new file mode 100644 index 000000000..136996b76 --- /dev/null +++ b/releasenotes/notes/remove-client-0218cc0d0e859003.yaml @@ -0,0 +1,7 @@ +--- +upgrade: + - | + The ``keystone::client`` class has been removed. + + - | + The ``keystone::client_package_ensure`` parameter has been removed. diff --git a/spec/classes/keystone_client_spec.rb b/spec/classes/keystone_client_spec.rb deleted file mode 100644 index ff49ee878..000000000 --- a/spec/classes/keystone_client_spec.rb +++ /dev/null @@ -1,56 +0,0 @@ -require 'spec_helper' - -describe 'keystone::client' do - shared_examples 'keystone::client' do - - it { is_expected.to contain_class('keystone::deps') } - - context 'with default parameters' do - it { should contain_package('python-keystoneclient').with( - :ensure => 'present', - :name => platform_params[:client_package_name], - :tag => 'openstack', - )} - - it { should contain_class('openstacklib::openstackclient') } - end - - context 'with specified parameters' do - let :params do - { - :client_package_name => 'package_name', - :ensure => '1.2.3', - } - end - - it { should contain_package('python-keystoneclient').with( - :ensure => '1.2.3', - :name => 'package_name', - :tag => 'openstack', - )} - - it { should contain_class('openstacklib::openstackclient') } - end - end - - on_supported_os({ - :supported_os => OSDefaults.get_supported_os - }).each do |os,facts| - context "on #{os}" do - let (:facts) do - facts.merge!(OSDefaults.get_facts()) - end - - let (:platform_params) do - case facts[:os]['family'] - when 'Debian' - { :client_package_name => 'python3-keystoneclient' } - when 'RedHat' - { :client_package_name => 'python3-keystoneclient' } - end - end - - it_behaves_like 'keystone::client' - end - end -end