diff --git a/manifests/client.pp b/manifests/client.pp index 79b8f3eb..7014f122 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -9,20 +9,14 @@ # Defaults to 'present'. # class swift::client ( - $ensure = $::swift::client_package_ensure + $ensure = 'present', ) { - if $ensure { - $real_ensure = $ensure - } else { - $real_ensure = 'present' - } - include ::swift::deps include ::swift::params package { 'swiftclient': - ensure => $real_ensure, + ensure => $ensure, name => $::swift::params::client_package, tag => ['openstack','swift-support-package'] } diff --git a/manifests/init.pp b/manifests/init.pp index 936868e9..67367e6c 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -27,15 +27,17 @@ # (Optional) The ensure state for the swift package. # Defaults to present. # -# [*client_package_ensure*] -# (Optional) The ensure state for the swift client package. -# Defaults to present. -# # [*max_header_size*] # (Optional) Max HTTP header size for incoming requests for all swift # services. Recommended size is 32768 for PKI keystone tokens. # Defaults to 8192 # +## DEPRECATED +# +# [*client_package_ensure*] +# (Optional) The ensure state for the swift client package. +# Defaults to undef +# # == Dependencies # # None @@ -52,14 +54,19 @@ class swift( $swift_hash_path_suffix = undef, $swift_hash_path_prefix = undef, $package_ensure = 'present', - $client_package_ensure = 'present', $max_header_size = '8192', + # DEPRECATED + $client_package_ensure = undef, ) { include ::swift::deps include ::swift::params include ::swift::client + if $client_package_ensure { + warning('swift::client_package_ensure is deprecated and has no effect') + } + if ($swift_hash_path_prefix == undef and $swift_hash_path_suffix == undef) { fail('You must specify at least swift_hash_path_prefix or swift_hash_path_suffix') } diff --git a/releasenotes/notes/init-client-package-ensure-6daa722ad33783c4.yaml b/releasenotes/notes/init-client-package-ensure-6daa722ad33783c4.yaml new file mode 100644 index 00000000..af703b96 --- /dev/null +++ b/releasenotes/notes/init-client-package-ensure-6daa722ad33783c4.yaml @@ -0,0 +1,9 @@ +--- +upgrade: + - | + The swift::client_ensure_package parameter is deprecated and has no effect + if you use the swift::client class please define the ensure parameter there. +deprecations: + - | + The swift::client_ensure_package parameter is deprecated, if you use the + swift::client class please define the ensure parameter there. diff --git a/spec/classes/swift_client_spec.rb b/spec/classes/swift_client_spec.rb index ec505f62..20d50b21 100644 --- a/spec/classes/swift_client_spec.rb +++ b/spec/classes/swift_client_spec.rb @@ -7,7 +7,7 @@ describe 'swift::client' do end let :default_params do - { :package_ensure => 'present' } + { :ensure => 'present' } end shared_examples 'swift::client' do @@ -21,7 +21,7 @@ describe 'swift::client' do it 'installs swift client package' do is_expected.to contain_package('swiftclient').with( :name => platform_params[:client_package_name], - :ensure => p[:package_ensure], + :ensure => p[:ensure], :tag => ['openstack','swift-support-package'], ) end diff --git a/spec/classes/swift_spec.rb b/spec/classes/swift_spec.rb index 787f2e89..eefcbfd9 100644 --- a/spec/classes/swift_spec.rb +++ b/spec/classes/swift_spec.rb @@ -79,13 +79,6 @@ describe 'swift' do 'swift-hash/swift_hash_path_prefix').with_value('myprefix') end end - - describe 'when overriding client_package_ensure parameter' do - it 'should effect ensure state of swift package' do - params[:client_package_ensure] = '2.0.2-1' - is_expected.to contain_package('swiftclient').with_ensure(params[:client_package_ensure]) - end - end end on_supported_os({