diff --git a/manifests/proxy/s3api.pp b/manifests/proxy/s3api.pp index f45027f8..94bd598f 100644 --- a/manifests/proxy/s3api.pp +++ b/manifests/proxy/s3api.pp @@ -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; } } diff --git a/releasenotes/notes/s3api-acl-parameters-b0127aa19ece53a4.yaml b/releasenotes/notes/s3api-acl-parameters-b0127aa19ece53a4.yaml new file mode 100644 index 00000000..9a9163f5 --- /dev/null +++ b/releasenotes/notes/s3api-acl-parameters-b0127aa19ece53a4.yaml @@ -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`` diff --git a/spec/classes/swift_proxy_s3api_spec.rb b/spec/classes/swift_proxy_s3api_spec.rb index 2e6a0752..2b1b46c1 100644 --- a/spec/classes/swift_proxy_s3api_spec.rb +++ b/spec/classes/swift_proxy_s3api_spec.rb @@ -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('') is_expected.to contain_swift_proxy_config('filter:s3api/location').with_value('') + is_expected.to contain_swift_proxy_config('filter:s3api/s3_acl').with_value('') 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('') 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