Add missing parameters for ACL feature of s3api middleware
Change-Id: I4e6643d3c48e5d5591d60d26abd2ea037e0a6b31
This commit is contained in:
@@ -5,10 +5,18 @@
|
|||||||
#
|
#
|
||||||
# == Parameters
|
# == Parameters
|
||||||
#
|
#
|
||||||
|
# [*allow_no_owner*]
|
||||||
|
# Whether objects without owner information should be visible or not
|
||||||
|
# Defaults to $::os_service_default.
|
||||||
|
#
|
||||||
# [*location*]
|
# [*location*]
|
||||||
# A region name of the swift cluster.
|
# A region name of the swift cluster.
|
||||||
# Defaults to $::os_service_default.
|
# Defaults to $::os_service_default.
|
||||||
#
|
#
|
||||||
|
# [*s3_acl*]
|
||||||
|
# Use own metadata for ACLs.
|
||||||
|
# Defaults to $::os_service_default.
|
||||||
|
#
|
||||||
# [*auth_pipeline_check*]
|
# [*auth_pipeline_check*]
|
||||||
# Enable pipeline order check
|
# Enable pipeline order check
|
||||||
# Defaults to 'false'
|
# Defaults to 'false'
|
||||||
@@ -17,6 +25,11 @@
|
|||||||
# Max upload per num
|
# Max upload per num
|
||||||
# Default to 1000.
|
# 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
|
# DEPRECATED PARAMETERS
|
||||||
#
|
#
|
||||||
# [*ensure*]
|
# [*ensure*]
|
||||||
@@ -24,9 +37,12 @@
|
|||||||
# Defaults to undef
|
# Defaults to undef
|
||||||
#
|
#
|
||||||
class swift::proxy::s3api(
|
class swift::proxy::s3api(
|
||||||
|
$allow_no_owner = $::os_service_default,
|
||||||
$location = $::os_service_default,
|
$location = $::os_service_default,
|
||||||
|
$s3_acl = $::os_service_default,
|
||||||
$auth_pipeline_check = false,
|
$auth_pipeline_check = false,
|
||||||
$max_upload_part_num = 1000,
|
$max_upload_part_num = 1000,
|
||||||
|
$check_bucket_owner = $::os_service_default,
|
||||||
# DEPRECATED PARAMETERS
|
# DEPRECATED PARAMETERS
|
||||||
$ensure = undef,
|
$ensure = undef,
|
||||||
) {
|
) {
|
||||||
@@ -39,8 +55,11 @@ class swift::proxy::s3api(
|
|||||||
|
|
||||||
swift_proxy_config {
|
swift_proxy_config {
|
||||||
'filter:s3api/use': value => 'egg:swift#s3api';
|
'filter:s3api/use': value => 'egg:swift#s3api';
|
||||||
|
'filter:s3api/allow_no_owner': value => $allow_no_owner;
|
||||||
'filter:s3api/location': value => $location;
|
'filter:s3api/location': value => $location;
|
||||||
|
'filter:s3api/s3_acl': value => $s3_acl;
|
||||||
'filter:s3api/auth_pipeline_check': value => $auth_pipeline_check;
|
'filter:s3api/auth_pipeline_check': value => $auth_pipeline_check;
|
||||||
'filter:s3api/max_upload_part_num': value => $max_upload_part_num;
|
'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
|
context 'with default parameters' do
|
||||||
it 'configures with default' 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/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/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/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/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
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'with overriding parameters' do
|
context 'with overriding parameters' do
|
||||||
before do
|
before do
|
||||||
params.merge!({
|
params.merge!({
|
||||||
|
:allow_no_owner => true,
|
||||||
:location => 'regionOne',
|
:location => 'regionOne',
|
||||||
|
:s3_acl => false,
|
||||||
:auth_pipeline_check => true,
|
:auth_pipeline_check => true,
|
||||||
|
:check_bucket_owner => false,
|
||||||
:max_upload_part_num => '2000'
|
:max_upload_part_num => '2000'
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
it 'configures with overridden parameters' do
|
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/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/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/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/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
|
end
|
||||||
end
|
end
|
||||||
|
Reference in New Issue
Block a user