Add support for the location parameter of s3api middleware
This change introduces support for the location parameter of s3api middleware which is required for v4 signatures calculation. Change-Id: I2b626c3077d037a209b2717962136ce0dddcac80
This commit is contained in:
parent
42d74471dd
commit
cf0fa5d679
|
@ -5,6 +5,10 @@
|
|||
#
|
||||
# == Parameters
|
||||
#
|
||||
# [*location*]
|
||||
# A region name of the swift cluster.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*auth_pipeline_check*]
|
||||
# Enable pipeline order check
|
||||
# Defaults to 'false'
|
||||
|
@ -20,6 +24,7 @@
|
|||
# Defaults to undef
|
||||
#
|
||||
class swift::proxy::s3api(
|
||||
$location = $::os_service_default,
|
||||
$auth_pipeline_check = false,
|
||||
$max_upload_part_num = 1000,
|
||||
# DEPRECATED PARAMETERS
|
||||
|
@ -34,6 +39,7 @@ class swift::proxy::s3api(
|
|||
|
||||
swift_proxy_config {
|
||||
'filter:s3api/use': value => 'egg:swift#s3api';
|
||||
'filter:s3api/location': value => $location;
|
||||
'filter:s3api/auth_pipeline_check': value => $auth_pipeline_check;
|
||||
'filter:s3api/max_upload_part_num': value => $max_upload_part_num;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
features:
|
||||
- |
|
||||
The new ``swift::proxy::s3api::location`` parameter has been added to set
|
||||
a region of the Swift cluster.
|
|
@ -10,6 +10,7 @@ describe 'swift::proxy::s3api' do
|
|||
context 'with default parameters' do
|
||||
it 'configures with default' do
|
||||
is_expected.to contain_swift_proxy_config('filter:s3api/use').with_value('egg:swift#s3api')
|
||||
is_expected.to contain_swift_proxy_config('filter:s3api/location').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_swift_proxy_config('filter:s3api/auth_pipeline_check').with_value('false')
|
||||
is_expected.to contain_swift_proxy_config('filter:s3api/max_upload_part_num').with_value('1000')
|
||||
end
|
||||
|
@ -18,12 +19,14 @@ describe 'swift::proxy::s3api' do
|
|||
context 'with overriding parameters' do
|
||||
before do
|
||||
params.merge!({
|
||||
:location => 'regionOne',
|
||||
:auth_pipeline_check => true,
|
||||
:max_upload_part_num => '2000'
|
||||
})
|
||||
end
|
||||
it 'configures with overridden parameters' do
|
||||
is_expected.to contain_swift_proxy_config('filter:s3api/use').with_value('egg:swift#s3api')
|
||||
is_expected.to contain_swift_proxy_config('filter:s3api/location').with_value('regionOne')
|
||||
is_expected.to contain_swift_proxy_config('filter:s3api/auth_pipeline_check').with_value('true')
|
||||
is_expected.to contain_swift_proxy_config('filter:s3api/max_upload_part_num').with_value('2000')
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue