Add missing parameters for ACL feature of s3api middleware
Change-Id: I4e6643d3c48e5d5591d60d26abd2ea037e0a6b31
This commit is contained in:
parent
cf0fa5d679
commit
c006f0adb3
|
@ -5,10 +5,18 @@
|
|||
#
|
||||
# == Parameters
|
||||
#
|
||||
# [*allow_no_owner*]
|
||||
# Whether objects without owner information should be visible or not
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*location*]
|
||||
# A region name of the swift cluster.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*s3_acl*]
|
||||
# Use own metadata for ACLs.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*auth_pipeline_check*]
|
||||
# Enable pipeline order check
|
||||
# Defaults to 'false'
|
||||
|
@ -17,6 +25,11 @@
|
|||
# Max upload per num
|
||||
# Default to 1000.
|
||||
#
|
||||
# [*check_bucket_owner*]
|
||||
# Enable returning only buckets which owner are the user who requested
|
||||
# GET Service operation.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# DEPRECATED PARAMETERS
|
||||
#
|
||||
# [*ensure*]
|
||||
|
@ -24,9 +37,12 @@
|
|||
# Defaults to undef
|
||||
#
|
||||
class swift::proxy::s3api(
|
||||
$allow_no_owner = $::os_service_default,
|
||||
$location = $::os_service_default,
|
||||
$s3_acl = $::os_service_default,
|
||||
$auth_pipeline_check = false,
|
||||
$max_upload_part_num = 1000,
|
||||
$check_bucket_owner = $::os_service_default,
|
||||
# DEPRECATED PARAMETERS
|
||||
$ensure = undef,
|
||||
) {
|
||||
|
@ -39,8 +55,11 @@ class swift::proxy::s3api(
|
|||
|
||||
swift_proxy_config {
|
||||
'filter:s3api/use': value => 'egg:swift#s3api';
|
||||
'filter:s3api/allow_no_owner': value => $allow_no_owner;
|
||||
'filter:s3api/location': value => $location;
|
||||
'filter:s3api/s3_acl': value => $s3_acl;
|
||||
'filter:s3api/auth_pipeline_check': value => $auth_pipeline_check;
|
||||
'filter:s3api/max_upload_part_num': value => $max_upload_part_num;
|
||||
'filter:s3api/check_bucket_owner': value => $check_bucket_owner;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
---
|
||||
features:
|
||||
- |
|
||||
The following parameters have been added to the ``swift::proxy::s3api``
|
||||
class to support more ACL parameters of s3api middleware.
|
||||
|
||||
- ``allow_no_owner``
|
||||
- ``s3_acl``
|
||||
- ``check_bucket_owner``
|
|
@ -10,25 +10,34 @@ 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/allow_no_owner').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_swift_proxy_config('filter:s3api/location').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_swift_proxy_config('filter:s3api/s3_acl').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')
|
||||
is_expected.to contain_swift_proxy_config('filter:s3api/check_bucket_owner').with_value('<SERVICE DEFAULT>')
|
||||
end
|
||||
end
|
||||
|
||||
context 'with overriding parameters' do
|
||||
before do
|
||||
params.merge!({
|
||||
:allow_no_owner => true,
|
||||
:location => 'regionOne',
|
||||
:s3_acl => false,
|
||||
:auth_pipeline_check => true,
|
||||
:check_bucket_owner => false,
|
||||
: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/allow_no_owner').with_value(true)
|
||||
is_expected.to contain_swift_proxy_config('filter:s3api/location').with_value('regionOne')
|
||||
is_expected.to contain_swift_proxy_config('filter:s3api/s3_acl').with_value(false)
|
||||
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')
|
||||
is_expected.to contain_swift_proxy_config('filter:s3api/check_bucket_owner').with_value(false)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue