diff --git a/manifests/proxy.pp b/manifests/proxy.pp index 6382ef57..6e150011 100644 --- a/manifests/proxy.pp +++ b/manifests/proxy.pp @@ -21,7 +21,7 @@ # [*pipeline*] # (optional) The list of elements of the swift proxy pipeline. # Currently supports healthcheck, cache, proxy-server, and -# one of the following auth_types: tempauth, swauth, keystone. +# one of the following auth_types: tempauth, keystone. # Each of the specified elements also need to be declared externally # as a puppet class with the exception of proxy-server. # Defaults to ['catch_errors', 'gatekeeper', 'healthcheck', 'proxy-logging', @@ -247,8 +247,6 @@ if(member($pipeline, 'tempauth')) { $auth_type = 'tempauth' - } elsif(member($pipeline, 'swauth')) { - $auth_type = 'swauth' } elsif(member($pipeline, 'keystone')) { $auth_type = 'keystone' } else { diff --git a/manifests/proxy/swauth.pp b/manifests/proxy/swauth.pp deleted file mode 100644 index 94744c0d..00000000 --- a/manifests/proxy/swauth.pp +++ /dev/null @@ -1,40 +0,0 @@ -# == Class: swift::proxy::swauth -# -# === Parameters: -# -# [*package_ensure*] -# The status of the python-swauth package. -# Defaults to 'present' -# -# [*swauth_endpoint*] -# (optional) The endpoint used to authenticate to Swauth WSGI. -# Defaults to '127.0.0.1' -# -# [*swauth_super_admin_key*] -# (optional) The Swauth WSGI filter admin key. -# Defaults to 'swauthkey' -# -# -class swift::proxy::swauth( - $swauth_endpoint = '127.0.0.1', - $swauth_super_admin_key = 'swauthkey', - $package_ensure = 'present' -) { - - include swift::deps - - warning('Support for swauth has been deprecaed and will be removed in a futue release.') - - package { 'python-swauth': - ensure => $package_ensure, - tag => 'swift-package', - } - - Package['python-swauth'] -> Package<| title == 'swift-proxy' |> - - swift_proxy_config { - 'filter:swauth/use': value => 'egg:swauth#swauth'; - 'filter:swauth/default_swift_cluster': value => "local#${swauth_endpoint}"; - 'filter:swauth/super_admin_key': value => $swauth_super_admin_key; - } -} diff --git a/releasenotes/notes/remove-swauth-f2316eab90d0549b.yaml b/releasenotes/notes/remove-swauth-f2316eab90d0549b.yaml new file mode 100644 index 00000000..5f80f8b6 --- /dev/null +++ b/releasenotes/notes/remove-swauth-f2316eab90d0549b.yaml @@ -0,0 +1,4 @@ +--- +upgrade: + - | + The ``swift::proxy::swauth`` class has been removed. diff --git a/spec/classes/swift_proxy_spec.rb b/spec/classes/swift_proxy_spec.rb index 0b2ac077..5e8fe4cf 100644 --- a/spec/classes/swift_proxy_spec.rb +++ b/spec/classes/swift_proxy_spec.rb @@ -130,8 +130,7 @@ class { swift: swift_hash_path_suffix => string } describe 'when more parameters are set' do let :pre_condition do "class { memcached: max_memory => 1} - class { swift: swift_hash_path_suffix => string } - include swift::proxy::swauth" + class { swift: swift_hash_path_suffix => string }" end let :params do @@ -141,7 +140,7 @@ class { swift: swift_hash_path_suffix => string } :cert_file => '/path/to/cert', :key_file => '/path/to/key', :workers => 3, - :pipeline => ['swauth', 'proxy-server'], + :pipeline => ['proxy-server'], :allow_account_management => false, :account_autocreate => false, :log_level => 'DEBUG', @@ -181,7 +180,7 @@ class { swift: swift_hash_path_suffix => string } it { should contain_swift_proxy_config('DEFAULT/log_address').with_value('/dev/log') } it { should contain_swift_proxy_config('DEFAULT/client_timeout').with_value('120') } it { should contain_swift_proxy_config('DEFAULT/keepalive_timeout').with_value('121') } - it { should contain_swift_proxy_config('pipeline:main/pipeline').with_value('swauth proxy-server') } + it { should contain_swift_proxy_config('pipeline:main/pipeline').with_value('proxy-server') } it { should contain_swift_proxy_config('app:proxy-server/use').with_value('egg:swift#proxy') } it { should contain_swift_proxy_config('app:proxy-server/set log_name').with_value('swift-proxy-server') } it { should contain_swift_proxy_config('app:proxy-server/set log_facility').with_value('LOG_LOCAL2') } @@ -214,7 +213,7 @@ class { swift: swift_hash_path_suffix => string } let :params do { :proxy_local_net_ip => '10.0.0.2', - :pipeline => ['swauth', 'proxy-server'], + :pipeline => ['tempauth', 'proxy-server'], :log_level => 'DEBUG', :log_name => 'swift-proxy-server', :log_udp_host => '127.0.0.1', @@ -226,7 +225,8 @@ class { swift: swift_hash_path_suffix => string } let :pre_condition do "class { memcached: max_memory => 1} class { swift: swift_hash_path_suffix => string } - include swift::proxy::swauth" + include swift::proxy::tempauth + " end it { should contain_swift_proxy_config('DEFAULT/bind_ip').with_value('10.0.0.2') } @@ -237,7 +237,7 @@ class { swift: swift_hash_path_suffix => string } it { should contain_swift_proxy_config('DEFAULT/log_address').with_value('/dev/log') } it { should contain_swift_proxy_config('DEFAULT/log_udp_host').with_value('127.0.0.1') } it { should contain_swift_proxy_config('DEFAULT/log_udp_port').with_value('514') } - it { should contain_swift_proxy_config('pipeline:main/pipeline').with_value('swauth proxy-server') } + it { should contain_swift_proxy_config('pipeline:main/pipeline').with_value('tempauth proxy-server') } it { should contain_swift_proxy_config('app:proxy-server/use').with_value('egg:swift#proxy') } it { should contain_swift_proxy_config('app:proxy-server/set log_name').with_value('swift-proxy-server') } it { should contain_swift_proxy_config('app:proxy-server/set log_facility').with_value('LOG_LOCAL2') } diff --git a/spec/classes/swift_proxy_swauth_spec.rb b/spec/classes/swift_proxy_swauth_spec.rb deleted file mode 100644 index 9b248b3b..00000000 --- a/spec/classes/swift_proxy_swauth_spec.rb +++ /dev/null @@ -1,39 +0,0 @@ -require 'spec_helper' - -describe 'swift::proxy::swauth' do - shared_examples 'swift::proxy::swauth' do - it { is_expected.to contain_package('python-swauth').with_ensure('present') } - it { is_expected.to contain_swift_proxy_config('filter:swauth/use').with_value('egg:swauth#swauth') } - - describe 'with defaults' do - it { is_expected.to contain_swift_proxy_config('filter:swauth/default_swift_cluster').with_value('local#127.0.0.1') } - it { is_expected.to contain_swift_proxy_config('filter:swauth/super_admin_key').with_value('swauthkey') } - end - - describe 'with overridden parameters' do - let :params do - {:swauth_endpoint => '10.0.0.1', - :swauth_super_admin_key => 'foo', - :package_ensure => 'latest' } - end - - it { is_expected.to contain_swift_proxy_config('filter:swauth/default_swift_cluster').with_value('local#10.0.0.1') } - it { is_expected.to contain_swift_proxy_config('filter:swauth/super_admin_key').with_value('foo') } - - it { is_expected.to contain_package('python-swauth').with_ensure('latest') } - 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 - - it_configures 'swift::proxy::swauth' - end - end -end -