diff --git a/manifests/proxy/s3api.pp b/manifests/proxy/s3api.pp index 9c7a6120..f45027f8 100644 --- a/manifests/proxy/s3api.pp +++ b/manifests/proxy/s3api.pp @@ -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; } diff --git a/releasenotes/notes/s3api-location-4f482f468f484861.yaml b/releasenotes/notes/s3api-location-4f482f468f484861.yaml new file mode 100644 index 00000000..397897cb --- /dev/null +++ b/releasenotes/notes/s3api-location-4f482f468f484861.yaml @@ -0,0 +1,5 @@ +--- +features: + - | + The new ``swift::proxy::s3api::location`` parameter has been added to set + a region of the Swift cluster. diff --git a/spec/classes/swift_proxy_s3api_spec.rb b/spec/classes/swift_proxy_s3api_spec.rb index 0324b6e2..2e6a0752 100644 --- a/spec/classes/swift_proxy_s3api_spec.rb +++ b/spec/classes/swift_proxy_s3api_spec.rb @@ -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('') 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