Merge "Do not hard-code defaults of [filter:slo] parameters"
This commit is contained in:
commit
5f25f95b1d
|
@ -9,11 +9,11 @@
|
||||||
#
|
#
|
||||||
# [*max_manifest_segments*]
|
# [*max_manifest_segments*]
|
||||||
# (Optional) Max manifest segments.
|
# (Optional) Max manifest segments.
|
||||||
# Defaults to 1000.
|
# Defaults to $::os_service_default.
|
||||||
#
|
#
|
||||||
# [*max_manifest_size*]
|
# [*max_manifest_size*]
|
||||||
# (Optional) Max manifest size.
|
# (Optional) Max manifest size.
|
||||||
# Defaults to 8388608.
|
# Defaults to $::os_service_default.
|
||||||
#
|
#
|
||||||
# [*rate_limit_under_size*]
|
# [*rate_limit_under_size*]
|
||||||
# (Optional) Rate limiting applies only to segments smaller than this size.
|
# (Optional) Rate limiting applies only to segments smaller than this size.
|
||||||
|
@ -22,16 +22,16 @@
|
||||||
# [*rate_limit_after_segment*]
|
# [*rate_limit_after_segment*]
|
||||||
# (Optional) Start rate-limiting SLO segment serving after the Nth segment of
|
# (Optional) Start rate-limiting SLO segment serving after the Nth segment of
|
||||||
# a segmented object.
|
# a segmented object.
|
||||||
# Defaults to 10.
|
# Defaults to $::os_service_default.
|
||||||
#
|
#
|
||||||
# [*rate_limit_segments_per_sec*]
|
# [*rate_limit_segments_per_sec*]
|
||||||
# (Optional) Once segment rate-limiting kicks in for an object, limit segments
|
# (Optional) Once segment rate-limiting kicks in for an object, limit segments
|
||||||
# served to N per second. 0 means no rate-limiting.
|
# served to N per second. 0 means no rate-limiting.
|
||||||
# Defaults to 1.
|
# Defaults to $::os_service_default.
|
||||||
#
|
#
|
||||||
# [*max_get_time*]
|
# [*max_get_time*]
|
||||||
# (Optional) Time limit on GET requests (seconds).
|
# (Optional) Time limit on GET requests (seconds).
|
||||||
# Defaults to 86400.
|
# Defaults to $::os_service_default.
|
||||||
#
|
#
|
||||||
# [*concurrency*]
|
# [*concurrency*]
|
||||||
# (Optional) Limit how many subrequests may be executed concurrently.
|
# (Optional) Limit how many subrequests may be executed concurrently.
|
||||||
|
@ -68,12 +68,12 @@
|
||||||
# Copyright 2014 UnitedStack licensing@unitedstack.com
|
# Copyright 2014 UnitedStack licensing@unitedstack.com
|
||||||
#
|
#
|
||||||
class swift::proxy::slo (
|
class swift::proxy::slo (
|
||||||
$max_manifest_segments = '1000',
|
$max_manifest_segments = $::os_service_default,
|
||||||
$max_manifest_size = '8388608',
|
$max_manifest_size = $::os_service_default,
|
||||||
$rate_limit_under_size = $::os_service_default,
|
$rate_limit_under_size = $::os_service_default,
|
||||||
$rate_limit_after_segment = '10',
|
$rate_limit_after_segment = $::os_service_default,
|
||||||
$rate_limit_segments_per_sec = '1',
|
$rate_limit_segments_per_sec = $::os_service_default,
|
||||||
$max_get_time = '86400',
|
$max_get_time = $::os_service_default,
|
||||||
$concurrency = $::os_service_default,
|
$concurrency = $::os_service_default,
|
||||||
$delete_concurrency = $::os_service_default,
|
$delete_concurrency = $::os_service_default,
|
||||||
$yield_frequency = $::os_service_default,
|
$yield_frequency = $::os_service_default,
|
||||||
|
|
|
@ -4,12 +4,12 @@ describe 'swift::proxy::slo' do
|
||||||
shared_examples 'swift::proxy::slo' do
|
shared_examples 'swift::proxy::slo' do
|
||||||
describe "when using default parameters" do
|
describe "when using default parameters" do
|
||||||
it { is_expected.to contain_swift_proxy_config('filter:slo/use').with_value('egg:swift#slo') }
|
it { is_expected.to contain_swift_proxy_config('filter:slo/use').with_value('egg:swift#slo') }
|
||||||
it { is_expected.to contain_swift_proxy_config('filter:slo/max_manifest_segments').with_value('1000') }
|
it { is_expected.to contain_swift_proxy_config('filter:slo/max_manifest_segments').with_value('<SERVICE DEFAULT>') }
|
||||||
it { is_expected.to contain_swift_proxy_config('filter:slo/max_manifest_size').with_value('8388608') }
|
it { is_expected.to contain_swift_proxy_config('filter:slo/max_manifest_size').with_value('<SERVICE DEFAULT>') }
|
||||||
it { is_expected.to contain_swift_proxy_config('filter:slo/rate_limit_under_size').with_value('<SERVICE DEFAULT>') }
|
it { is_expected.to contain_swift_proxy_config('filter:slo/rate_limit_under_size').with_value('<SERVICE DEFAULT>') }
|
||||||
it { is_expected.to contain_swift_proxy_config('filter:slo/rate_limit_after_segment').with_value('10') }
|
it { is_expected.to contain_swift_proxy_config('filter:slo/rate_limit_after_segment').with_value('<SERVICE DEFAULT>') }
|
||||||
it { is_expected.to contain_swift_proxy_config('filter:slo/rate_limit_segments_per_sec').with_value('1') }
|
it { is_expected.to contain_swift_proxy_config('filter:slo/rate_limit_segments_per_sec').with_value('<SERVICE DEFAULT>') }
|
||||||
it { is_expected.to contain_swift_proxy_config('filter:slo/max_get_time').with_value('86400') }
|
it { is_expected.to contain_swift_proxy_config('filter:slo/max_get_time').with_value('<SERVICE DEFAULT>') }
|
||||||
it { is_expected.to contain_swift_proxy_config('filter:slo/concurrency').with_value('<SERVICE DEFAULT>') }
|
it { is_expected.to contain_swift_proxy_config('filter:slo/concurrency').with_value('<SERVICE DEFAULT>') }
|
||||||
it { is_expected.to contain_swift_proxy_config('filter:slo/delete_concurrency').with_value('<SERVICE DEFAULT>') }
|
it { is_expected.to contain_swift_proxy_config('filter:slo/delete_concurrency').with_value('<SERVICE DEFAULT>') }
|
||||||
it { is_expected.to contain_swift_proxy_config('filter:slo/yield_frequency').with_value('<SERVICE DEFAULT>') }
|
it { is_expected.to contain_swift_proxy_config('filter:slo/yield_frequency').with_value('<SERVICE DEFAULT>') }
|
||||||
|
@ -19,23 +19,25 @@ describe 'swift::proxy::slo' do
|
||||||
describe "when overriding default parameters" do
|
describe "when overriding default parameters" do
|
||||||
let :params do
|
let :params do
|
||||||
{
|
{
|
||||||
:max_manifest_segments => 2000,
|
:max_manifest_segments => 1000,
|
||||||
:max_manifest_size => 500000,
|
:max_manifest_size => 8388608,
|
||||||
:rate_limit_under_size => 1048576,
|
:rate_limit_under_size => 1048576,
|
||||||
:rate_limit_after_segment => 30,
|
:rate_limit_after_segment => 10,
|
||||||
:max_get_time => 6400,
|
:rate_limit_segments_per_sec => 1,
|
||||||
:concurrency => 2,
|
:max_get_time => 86400,
|
||||||
:delete_concurrency => 4,
|
:concurrency => 2,
|
||||||
:yield_frequency => 10,
|
:delete_concurrency => 4,
|
||||||
:allow_async_delete => false,
|
:yield_frequency => 10,
|
||||||
|
:allow_async_delete => false,
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
it { is_expected.to contain_swift_proxy_config('filter:slo/max_manifest_segments').with_value(2000) }
|
it { is_expected.to contain_swift_proxy_config('filter:slo/max_manifest_segments').with_value(1000) }
|
||||||
it { is_expected.to contain_swift_proxy_config('filter:slo/max_manifest_size').with_value(500000) }
|
it { is_expected.to contain_swift_proxy_config('filter:slo/max_manifest_size').with_value(8388608) }
|
||||||
it { is_expected.to contain_swift_proxy_config('filter:slo/rate_limit_under_size').with_value(1048576) }
|
it { is_expected.to contain_swift_proxy_config('filter:slo/rate_limit_under_size').with_value(1048576) }
|
||||||
it { is_expected.to contain_swift_proxy_config('filter:slo/rate_limit_after_segment').with_value(30) }
|
it { is_expected.to contain_swift_proxy_config('filter:slo/rate_limit_after_segment').with_value(10) }
|
||||||
it { is_expected.to contain_swift_proxy_config('filter:slo/max_get_time').with_value(6400) }
|
it { is_expected.to contain_swift_proxy_config('filter:slo/rate_limit_segments_per_sec').with_value(1) }
|
||||||
|
it { is_expected.to contain_swift_proxy_config('filter:slo/max_get_time').with_value(86400) }
|
||||||
it { is_expected.to contain_swift_proxy_config('filter:slo/concurrency').with_value(2) }
|
it { is_expected.to contain_swift_proxy_config('filter:slo/concurrency').with_value(2) }
|
||||||
it { is_expected.to contain_swift_proxy_config('filter:slo/delete_concurrency').with_value(4) }
|
it { is_expected.to contain_swift_proxy_config('filter:slo/delete_concurrency').with_value(4) }
|
||||||
it { is_expected.to contain_swift_proxy_config('filter:slo/yield_frequency').with_value(10) }
|
it { is_expected.to contain_swift_proxy_config('filter:slo/yield_frequency').with_value(10) }
|
||||||
|
|
Loading…
Reference in New Issue