From d0caf589164bb729493637a4c24cb24c83d8ca5e Mon Sep 17 00:00:00 2001 From: Francesco Vollero Date: Tue, 25 Feb 2014 17:21:10 +0100 Subject: [PATCH] Support for allow_versions in swift containers The previous patch (37493) was just implementing the feature partially Change-Id: I0adc55a22161fa3768d941e5ae996cc47048efa5 --- manifests/storage/all.pp | 4 ++++ spec/classes/swift_storage_all_spec.rb | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/manifests/storage/all.pp b/manifests/storage/all.pp index df5979ab..c1a77bb0 100644 --- a/manifests/storage/all.pp +++ b/manifests/storage/all.pp @@ -9,6 +9,8 @@ # Optional. Defaults to /srv/node/ # [*object_port*] Port where object storage server should be hosted. # Optional. Defaults to 6000. +# [*allow_versions*] Boolean to enable the versioning in swift container +# Optional. Default to false. # [*container_port*] Port where the container storage server should be hosted. # Optional. Defaults to 6001. # [*account_port*] Port where the account storage server should be hosted. @@ -23,6 +25,7 @@ class swift::storage::all( $account_port = '6002', $object_pipeline = undef, $container_pipeline = undef, + $allow_versions = false, $mount_check = false, $account_pipeline = undef, $log_facility = 'LOG_LOCAL2' @@ -50,6 +53,7 @@ class swift::storage::all( config_file_path => 'container-server.conf', pipeline => $container_pipeline, log_facility => $log_facility, + allow_versions => $allow_versions, } swift::storage::server { $object_port: diff --git a/spec/classes/swift_storage_all_spec.rb b/spec/classes/swift_storage_all_spec.rb index 3c1fbc94..ada844ff 100644 --- a/spec/classes/swift_storage_all_spec.rb +++ b/spec/classes/swift_storage_all_spec.rb @@ -44,6 +44,7 @@ describe 'swift::storage::all' do :object_pipeline => ["1", "2"], :container_pipeline => ["3", "4"], :account_pipeline => ["5", "6"], + :allow_versions => true, :log_facility => ['LOG_LOCAL2', 'LOG_LOCAL3'], } ].each do |param_set| @@ -99,7 +100,8 @@ describe 'swift::storage::all' do it { should contain_swift__storage__server(param_hash[:container_port]).with( {:type => 'container', :config_file_path => 'container-server.conf', - :pipeline => param_hash[:container_pipeline] || 'container-server' }.merge(storage_server_defaults) + :pipeline => param_hash[:container_pipeline] || 'container-server', + :allow_versions => param_hash[:allow_versions] || false }.merge(storage_server_defaults) )} it { should contain_class('rsync::server').with(