Remove swauth support
It was deprecated during zed cycle[1], because swauth was already
retired at that time.
[1] 0eda2a0a50
Change-Id: I4567f6339f277c0cc2d0c3ee91671067af65a156
This commit is contained in:
@@ -21,7 +21,7 @@
|
|||||||
# [*pipeline*]
|
# [*pipeline*]
|
||||||
# (optional) The list of elements of the swift proxy pipeline.
|
# (optional) The list of elements of the swift proxy pipeline.
|
||||||
# Currently supports healthcheck, cache, proxy-server, and
|
# 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
|
# Each of the specified elements also need to be declared externally
|
||||||
# as a puppet class with the exception of proxy-server.
|
# as a puppet class with the exception of proxy-server.
|
||||||
# Defaults to ['catch_errors', 'gatekeeper', 'healthcheck', 'proxy-logging',
|
# Defaults to ['catch_errors', 'gatekeeper', 'healthcheck', 'proxy-logging',
|
||||||
@@ -247,8 +247,6 @@ class swift::proxy(
|
|||||||
|
|
||||||
if(member($pipeline, 'tempauth')) {
|
if(member($pipeline, 'tempauth')) {
|
||||||
$auth_type = 'tempauth'
|
$auth_type = 'tempauth'
|
||||||
} elsif(member($pipeline, 'swauth')) {
|
|
||||||
$auth_type = 'swauth'
|
|
||||||
} elsif(member($pipeline, 'keystone')) {
|
} elsif(member($pipeline, 'keystone')) {
|
||||||
$auth_type = 'keystone'
|
$auth_type = 'keystone'
|
||||||
} else {
|
} else {
|
||||||
|
@@ -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;
|
|
||||||
}
|
|
||||||
}
|
|
4
releasenotes/notes/remove-swauth-f2316eab90d0549b.yaml
Normal file
4
releasenotes/notes/remove-swauth-f2316eab90d0549b.yaml
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
---
|
||||||
|
upgrade:
|
||||||
|
- |
|
||||||
|
The ``swift::proxy::swauth`` class has been removed.
|
@@ -130,8 +130,7 @@ describe 'swift::proxy' do
|
|||||||
describe 'when more parameters are set' do
|
describe 'when more parameters are set' do
|
||||||
let :pre_condition do
|
let :pre_condition do
|
||||||
"class { memcached: max_memory => 1}
|
"class { memcached: max_memory => 1}
|
||||||
class { swift: swift_hash_path_suffix => string }
|
class { swift: swift_hash_path_suffix => string }"
|
||||||
include swift::proxy::swauth"
|
|
||||||
end
|
end
|
||||||
|
|
||||||
let :params do
|
let :params do
|
||||||
@@ -141,7 +140,7 @@ describe 'swift::proxy' do
|
|||||||
:cert_file => '/path/to/cert',
|
:cert_file => '/path/to/cert',
|
||||||
:key_file => '/path/to/key',
|
:key_file => '/path/to/key',
|
||||||
:workers => 3,
|
:workers => 3,
|
||||||
:pipeline => ['swauth', 'proxy-server'],
|
:pipeline => ['proxy-server'],
|
||||||
:allow_account_management => false,
|
:allow_account_management => false,
|
||||||
:account_autocreate => false,
|
:account_autocreate => false,
|
||||||
:log_level => 'DEBUG',
|
:log_level => 'DEBUG',
|
||||||
@@ -181,7 +180,7 @@ describe 'swift::proxy' do
|
|||||||
it { should contain_swift_proxy_config('DEFAULT/log_address').with_value('/dev/log') }
|
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/client_timeout').with_value('120') }
|
||||||
it { should contain_swift_proxy_config('DEFAULT/keepalive_timeout').with_value('121') }
|
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/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_name').with_value('swift-proxy-server') }
|
||||||
it { should contain_swift_proxy_config('app:proxy-server/set log_facility').with_value('LOG_LOCAL2') }
|
it { should contain_swift_proxy_config('app:proxy-server/set log_facility').with_value('LOG_LOCAL2') }
|
||||||
@@ -214,7 +213,7 @@ describe 'swift::proxy' do
|
|||||||
let :params do
|
let :params do
|
||||||
{
|
{
|
||||||
:proxy_local_net_ip => '10.0.0.2',
|
:proxy_local_net_ip => '10.0.0.2',
|
||||||
:pipeline => ['swauth', 'proxy-server'],
|
:pipeline => ['tempauth', 'proxy-server'],
|
||||||
:log_level => 'DEBUG',
|
:log_level => 'DEBUG',
|
||||||
:log_name => 'swift-proxy-server',
|
:log_name => 'swift-proxy-server',
|
||||||
:log_udp_host => '127.0.0.1',
|
:log_udp_host => '127.0.0.1',
|
||||||
@@ -226,7 +225,8 @@ describe 'swift::proxy' do
|
|||||||
let :pre_condition do
|
let :pre_condition do
|
||||||
"class { memcached: max_memory => 1}
|
"class { memcached: max_memory => 1}
|
||||||
class { swift: swift_hash_path_suffix => string }
|
class { swift: swift_hash_path_suffix => string }
|
||||||
include swift::proxy::swauth"
|
include swift::proxy::tempauth
|
||||||
|
"
|
||||||
end
|
end
|
||||||
|
|
||||||
it { should contain_swift_proxy_config('DEFAULT/bind_ip').with_value('10.0.0.2') }
|
it { should contain_swift_proxy_config('DEFAULT/bind_ip').with_value('10.0.0.2') }
|
||||||
@@ -237,7 +237,7 @@ describe 'swift::proxy' do
|
|||||||
it { should contain_swift_proxy_config('DEFAULT/log_address').with_value('/dev/log') }
|
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_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('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/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_name').with_value('swift-proxy-server') }
|
||||||
it { should contain_swift_proxy_config('app:proxy-server/set log_facility').with_value('LOG_LOCAL2') }
|
it { should contain_swift_proxy_config('app:proxy-server/set log_facility').with_value('LOG_LOCAL2') }
|
||||||
|
@@ -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
|
|
||||||
|
|
Reference in New Issue
Block a user