From 294972d8fca90fe851cf68992fcd4c1457fd8886 Mon Sep 17 00:00:00 2001 From: Thomas Goirand Date: Thu, 12 Mar 2020 11:09:06 +0100 Subject: [PATCH] Add max_upload_part_num param The default in swift is 1000, though in S3, it is 10 000. Therefore, it is necessary to be able to configure it, so that a deployment can be set with the same limits as S3. Change-Id: Ib6105f3a06fe2e42864039356bf58dbe83749897 --- manifests/proxy/s3api.pp | 8 +++++++- spec/classes/swift_proxy_s3api_spec.rb | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/manifests/proxy/s3api.pp b/manifests/proxy/s3api.pp index a1cef1e5..d6622b05 100644 --- a/manifests/proxy/s3api.pp +++ b/manifests/proxy/s3api.pp @@ -13,9 +13,14 @@ # Enable pipeline order check # Defaults to 'false' # +# [*max_upload_part_num*] +# Max upload per num +# Default to 1000. +# class swift::proxy::s3api( $ensure = 'present', - $auth_pipeline_check = false + $auth_pipeline_check = false, + $max_upload_part_num = 1000, ) { include swift::deps @@ -23,5 +28,6 @@ class swift::proxy::s3api( swift_proxy_config { 'filter:s3api/use': value => 'egg:swift#s3api'; 'filter:s3api/auth_pipeline_check': value => $auth_pipeline_check; + 'filter:s3api/max_upload_part_num': value => $max_upload_part_num; } } diff --git a/spec/classes/swift_proxy_s3api_spec.rb b/spec/classes/swift_proxy_s3api_spec.rb index dd1087a1..9fe899d2 100644 --- a/spec/classes/swift_proxy_s3api_spec.rb +++ b/spec/classes/swift_proxy_s3api_spec.rb @@ -4,6 +4,7 @@ describe 'swift::proxy::s3api' do shared_examples 'swift::proxy::s3api' do it { is_expected.to contain_swift_proxy_config('filter:s3api/use').with_value('egg:swift#s3api') } it { is_expected.to contain_swift_proxy_config('filter:s3api/auth_pipeline_check').with_value('false') } + it { is_expected.to contain_swift_proxy_config('filter:s3api/max_upload_part_num').with_value('1000') } end on_supported_os({