Add missing s3api parameters
This change introduces some parameters to swift::proxy::s3api, to improve support coverage about s3api parameters. Note that this change also removes redundant default definition about the max_upload_part_num parameter. Change-Id: I88a136115ea454bc6e3dcb32dc72407799899c59
This commit is contained in:
@@ -13,23 +13,65 @@
|
||||
# A region name of the swift cluster.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*dns_compliant_bucket_names*]
|
||||
# Enforce DNS-compliant bucket names
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*max_bucket_listing*]
|
||||
# The default maximum nuber of objects returned in the GET Bucket response.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*max_parts_listing*]
|
||||
# The maximum number of parts returned in the List Parts operation.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*max_multi_delete_objects*]
|
||||
# The maximum number of objects deleted with the Multi-Object Delete
|
||||
# operation.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*multi_delete_concurrency*]
|
||||
# The number of objects to delete at a time with the Multi-Object Delete
|
||||
# operation.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*s3_acl*]
|
||||
# Use own metadata for ACLs.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*storage_domain*]
|
||||
# A host name of the Swift cluster
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*auth_pipeline_check*]
|
||||
# Enable pipeline order check
|
||||
# Defaults to 'false'
|
||||
#
|
||||
# [*allow_multipart_uploads*]
|
||||
# Enable multi-part uploads.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*max_upload_part_num*]
|
||||
# Max upload per num
|
||||
# Default to 1000.
|
||||
# Default to $::os_service_default.
|
||||
#
|
||||
# [*check_bucket_owner*]
|
||||
# Enable returning only buckets which owner are the user who requested
|
||||
# GET Service operation.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*force_swift_request_proxy_log*]
|
||||
# Output Swift style log in addition to S3 style log.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*min_segment_size*]
|
||||
# Minimum size of each part in a multipart upload
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*log_name*]
|
||||
# Override the default log routing for s3api middleware
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# DEPRECATED PARAMETERS
|
||||
#
|
||||
# [*ensure*]
|
||||
@@ -37,14 +79,24 @@
|
||||
# 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,
|
||||
$allow_no_owner = $::os_service_default,
|
||||
$location = $::os_service_default,
|
||||
$dns_compliant_bucket_names = $::os_service_default,
|
||||
$max_bucket_listing = $::os_service_default,
|
||||
$max_parts_listing = $::os_service_default,
|
||||
$max_multi_delete_objects = $::os_service_default,
|
||||
$multi_delete_concurrency = $::os_service_default,
|
||||
$s3_acl = $::os_service_default,
|
||||
$storage_domain = $::os_service_default,
|
||||
$auth_pipeline_check = false,
|
||||
$allow_multipart_uploads = $::os_service_default,
|
||||
$max_upload_part_num = $::os_service_default,
|
||||
$check_bucket_owner = $::os_service_default,
|
||||
$force_swift_request_proxy_log = $::os_service_default,
|
||||
$min_segment_size = $::os_service_default,
|
||||
$log_name = $::os_service_default,
|
||||
# DEPRECATED PARAMETERS
|
||||
$ensure = undef,
|
||||
$ensure = undef,
|
||||
) {
|
||||
|
||||
include swift::deps
|
||||
@@ -54,12 +106,22 @@ 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;
|
||||
'filter:s3api/use': value => 'egg:swift#s3api';
|
||||
'filter:s3api/allow_no_owner': value => $allow_no_owner;
|
||||
'filter:s3api/location': value => $location;
|
||||
'filter:s3api/dns_compliant_bucket_names': value => $dns_compliant_bucket_names;
|
||||
'filter:s3api/max_bucket_listing': value => $max_bucket_listing;
|
||||
'filter:s3api/max_parts_listing': value => $max_parts_listing;
|
||||
'filter:s3api/max_multi_delete_objects': value => $max_multi_delete_objects;
|
||||
'filter:s3api/multi_delete_concurrency': value => $multi_delete_concurrency;
|
||||
'filter:s3api/s3_acl': value => $s3_acl;
|
||||
'filter:s3api/storage_domain': value => $storage_domain;
|
||||
'filter:s3api/allow_multipart_uploads': value => $allow_multipart_uploads;
|
||||
'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;
|
||||
'filter:s3api/force_swift_request_proxy_log': value => $force_swift_request_proxy_log;
|
||||
'filter:s3api/min_segment_size': value => $min_segment_size;
|
||||
'filter:s3api/log_name': value => $log_name;
|
||||
}
|
||||
}
|
||||
|
@@ -0,0 +1,16 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
The following parameters have been added to the ``swift::proxy::s3api``
|
||||
class.
|
||||
|
||||
- ``dns_compliant_bucket_names``
|
||||
- ``max_bucket_listing``
|
||||
- ``max_parts_listing``
|
||||
- ``max_multi_delete_objects``
|
||||
- ``multi_delete_concurrency``
|
||||
- ``storage_domain``
|
||||
- ``allow_multipart_uploads``
|
||||
- ``force_swift_request_proxy_log``
|
||||
- ``min_segment_size``
|
||||
- ``log_name``
|
@@ -12,32 +12,62 @@ describe 'swift::proxy::s3api' 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/dns_compliant_bucket_names').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_swift_proxy_config('filter:s3api/max_bucket_listing').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_swift_proxy_config('filter:s3api/max_parts_listing').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_swift_proxy_config('filter:s3api/max_multi_delete_objects').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_swift_proxy_config('filter:s3api/multi_delete_concurrency').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/storage_domain').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/allow_multipart_uploads').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_swift_proxy_config('filter:s3api/max_upload_part_num').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_swift_proxy_config('filter:s3api/check_bucket_owner').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_swift_proxy_config('filter:s3api/force_swift_request_proxy_log').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_swift_proxy_config('filter:s3api/min_segment_size').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_swift_proxy_config('filter:s3api/log_name').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'
|
||||
:allow_no_owner => true,
|
||||
:location => 'regionOne',
|
||||
:dns_compliant_bucket_names => true,
|
||||
:max_bucket_listing => 1000,
|
||||
:max_parts_listing => 1000,
|
||||
:max_multi_delete_objects => 1000,
|
||||
:multi_delete_concurrency => 2,
|
||||
:s3_acl => false,
|
||||
:storage_domain => 'swift.openstack.org',
|
||||
:auth_pipeline_check => true,
|
||||
:allow_multipart_uploads => true,
|
||||
:max_upload_part_num => 1000,
|
||||
:check_bucket_owner => false,
|
||||
:force_swift_request_proxy_log => false,
|
||||
:min_segment_size => 5242880,
|
||||
:log_name => 's3api',
|
||||
})
|
||||
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/dns_compliant_bucket_names').with_value(true)
|
||||
is_expected.to contain_swift_proxy_config('filter:s3api/max_bucket_listing').with_value(1000)
|
||||
is_expected.to contain_swift_proxy_config('filter:s3api/max_parts_listing').with_value(1000)
|
||||
is_expected.to contain_swift_proxy_config('filter:s3api/max_multi_delete_objects').with_value(1000)
|
||||
is_expected.to contain_swift_proxy_config('filter:s3api/multi_delete_concurrency').with_value(2)
|
||||
is_expected.to contain_swift_proxy_config('filter:s3api/s3_acl').with_value(false)
|
||||
is_expected.to contain_swift_proxy_config('filter:s3api/storage_domain').with_value('swift.openstack.org')
|
||||
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/allow_multipart_uploads').with_value(true)
|
||||
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(false)
|
||||
is_expected.to contain_swift_proxy_config('filter:s3api/force_swift_request_proxy_log').with_value(false)
|
||||
is_expected.to contain_swift_proxy_config('filter:s3api/min_segment_size').with_value(5242880)
|
||||
is_expected.to contain_swift_proxy_config('filter:s3api/log_name').with_value('s3api')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user