Support parameters of container_sync middleware
Change-Id: I876c0ab20677976f5ebb54fdd15de0906b6ca323
This commit is contained in:
@@ -1,15 +1,32 @@
|
|||||||
#
|
#
|
||||||
# Configure Swift Container Sync
|
# Configure Swift Container Sync
|
||||||
#
|
#
|
||||||
|
# == Parameters
|
||||||
|
#
|
||||||
|
# [*allow_full_urls*]
|
||||||
|
# (Optional) Allow full URL values to be set for new X-Container-Sync-To
|
||||||
|
# headers.
|
||||||
|
# Defaults to $::os_service_default
|
||||||
|
#
|
||||||
|
# [*current*]
|
||||||
|
# (Optional) Set this to specify this clusters //realm/cluster as "current" in
|
||||||
|
# /info.
|
||||||
|
# Defaults to $::os_service_default
|
||||||
|
#
|
||||||
# == Authors
|
# == Authors
|
||||||
#
|
#
|
||||||
# Denis Egorenko <degorenko@mirantis.com>
|
# Denis Egorenko <degorenko@mirantis.com>
|
||||||
#
|
#
|
||||||
class swift::proxy::container_sync() {
|
class swift::proxy::container_sync(
|
||||||
|
$allow_full_urls = $::os_service_default,
|
||||||
|
$current = $::os_service_default,
|
||||||
|
) {
|
||||||
|
|
||||||
include swift::deps
|
include swift::deps
|
||||||
|
|
||||||
swift_proxy_config {
|
swift_proxy_config {
|
||||||
'filter:container_sync/use': value => 'egg:swift#container_sync';
|
'filter:container_sync/use': value => 'egg:swift#container_sync';
|
||||||
|
'filter:container_sync/allow_full_urls': value => $allow_full_urls;
|
||||||
|
'filter:container_sync/current': value => $current;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
features:
|
||||||
|
- |
|
||||||
|
The ``swift::proxy::container_sync`` class now supports the following two
|
||||||
|
parameters of the ``container_sync`` middleware.
|
||||||
|
|
||||||
|
- ``allow_full_urls``
|
||||||
|
- ``current``
|
@@ -7,7 +7,24 @@ require 'spec_helper'
|
|||||||
|
|
||||||
describe 'swift::proxy::container_sync' do
|
describe 'swift::proxy::container_sync' do
|
||||||
shared_examples 'swift::proxy::container_sync' do
|
shared_examples 'swift::proxy::container_sync' do
|
||||||
it { should contain_swift_proxy_config('filter:container_sync/use').with_value('egg:swift#container_sync') }
|
context 'when using default parameters' do
|
||||||
|
it { is_expected.to contain_swift_proxy_config('filter:container_sync/use').with_value('egg:swift#container_sync') }
|
||||||
|
it { is_expected.to contain_swift_proxy_config('filter:container_sync/allow_full_urls').with_value('<SERVICE DEFAULT>') }
|
||||||
|
it { is_expected.to contain_swift_proxy_config('filter:container_sync/current').with_value('<SERVICE DEFAULT>') }
|
||||||
|
end
|
||||||
|
|
||||||
|
context 'when overriding default parameters' do
|
||||||
|
let :params do
|
||||||
|
{
|
||||||
|
:allow_full_urls => true,
|
||||||
|
:current => '//REALM/CLUSTER',
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
it { is_expected.to contain_swift_proxy_config('filter:container_sync/use').with_value('egg:swift#container_sync') }
|
||||||
|
it { is_expected.to contain_swift_proxy_config('filter:container_sync/allow_full_urls').with_value(true) }
|
||||||
|
it { is_expected.to contain_swift_proxy_config('filter:container_sync/current').with_value('//REALM/CLUSTER') }
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
on_supported_os({
|
on_supported_os({
|
||||||
|
Reference in New Issue
Block a user