Merge "Add incoming/outgoing chmod params to storage/all"
This commit is contained in:
commit
554b3a6ec1
@ -58,6 +58,16 @@
|
||||
# (optional) Port value for UDP receiver, if enabled.
|
||||
# Defaults to undef.
|
||||
#
|
||||
# [*incoming_chmod*] Incoming chmod to set in the rsync server.
|
||||
# Optional. Defaults to 0644 for maintaining backwards compatibility.
|
||||
# *NOTE*: Recommended parameter: 'Du=rwx,g=rx,o=rx,Fu=rw,g=r,o=r'
|
||||
# This mask translates to 0755 for directories and 0644 for files.
|
||||
#
|
||||
# [*outgoing_chmod*] Outgoing chmod to set in the rsync server.
|
||||
# Optional. Defaults to 0644 for maintaining backwards compatibility.
|
||||
# *NOTE*: Recommended parameter: 'Du=rwx,g=rx,o=rx,Fu=rw,g=r,o=r'
|
||||
# This mask translates to 0755 for directories and 0644 for files.
|
||||
#
|
||||
class swift::storage::all(
|
||||
$storage_local_net_ip,
|
||||
$devices = '/srv/node',
|
||||
@ -73,6 +83,8 @@ class swift::storage::all(
|
||||
$log_level = 'INFO',
|
||||
$log_udp_host = undef,
|
||||
$log_udp_port = undef,
|
||||
$incoming_chmod = '0644',
|
||||
$outgoing_chmod = '0644',
|
||||
) {
|
||||
|
||||
class { '::swift::storage':
|
||||
@ -93,6 +105,8 @@ class swift::storage::all(
|
||||
config_file_path => 'account-server.conf',
|
||||
pipeline => $account_pipeline,
|
||||
log_facility => $log_facility,
|
||||
incoming_chmod => $incoming_chmod,
|
||||
outgoing_chmod => $outgoing_chmod,
|
||||
}
|
||||
|
||||
swift::storage::server { $container_port:
|
||||
@ -101,6 +115,8 @@ class swift::storage::all(
|
||||
pipeline => $container_pipeline,
|
||||
log_facility => $log_facility,
|
||||
allow_versions => $allow_versions,
|
||||
incoming_chmod => $incoming_chmod,
|
||||
outgoing_chmod => $outgoing_chmod,
|
||||
}
|
||||
|
||||
swift::storage::server { $object_port:
|
||||
@ -108,5 +124,7 @@ class swift::storage::all(
|
||||
config_file_path => 'object-server.conf',
|
||||
pipeline => $object_pipeline,
|
||||
log_facility => $log_facility,
|
||||
incoming_chmod => $incoming_chmod,
|
||||
outgoing_chmod => $outgoing_chmod,
|
||||
}
|
||||
}
|
||||
|
@ -20,7 +20,9 @@ describe 'swift::storage::all' do
|
||||
:object_port => '6000',
|
||||
:container_port => '6001',
|
||||
:account_port => '6002',
|
||||
:log_facility => 'LOG_LOCAL2'
|
||||
:log_facility => 'LOG_LOCAL2',
|
||||
:incoming_chmod => '0644',
|
||||
:outgoing_chmod => '0644'
|
||||
}
|
||||
end
|
||||
|
||||
@ -40,6 +42,8 @@ describe 'swift::storage::all' do
|
||||
:account_pipeline => ["5", "6"],
|
||||
:allow_versions => true,
|
||||
:log_facility => ['LOG_LOCAL2', 'LOG_LOCAL3'],
|
||||
:incoming_chmod => 'Du=rwx,g=rx,o=rx,Fu=rw,g=r,o=r',
|
||||
:outgoing_chmod => 'Du=rwx,g=rx,o=rx,Fu=rw,g=r,o=r',
|
||||
}
|
||||
].each do |param_set|
|
||||
|
||||
@ -77,6 +81,8 @@ describe 'swift::storage::all' do
|
||||
let :storage_server_defaults do
|
||||
{:devices => param_hash[:devices],
|
||||
:storage_local_net_ip => param_hash[:storage_local_net_ip],
|
||||
:incoming_chmod => param_hash[:incoming_chmod],
|
||||
:outgoing_chmod => param_hash[:outgoing_chmod],
|
||||
:log_facility => param_hash[:log_facility]
|
||||
}
|
||||
end
|
||||
@ -84,16 +90,22 @@ describe 'swift::storage::all' do
|
||||
it { is_expected.to contain_swift__storage__server(param_hash[:account_port]).with(
|
||||
{:type => 'account',
|
||||
:config_file_path => 'account-server.conf',
|
||||
:incoming_chmod => param_hash[:incoming_chmod],
|
||||
:outgoing_chmod => param_hash[:outgoing_chmod],
|
||||
:pipeline => param_hash[:account_pipeline] || ['account-server'] }.merge(storage_server_defaults)
|
||||
)}
|
||||
it { is_expected.to contain_swift__storage__server(param_hash[:object_port]).with(
|
||||
{:type => 'object',
|
||||
:config_file_path => 'object-server.conf',
|
||||
:incoming_chmod => param_hash[:incoming_chmod],
|
||||
:outgoing_chmod => param_hash[:outgoing_chmod],
|
||||
:pipeline => param_hash[:object_pipeline] || ['object-server'] }.merge(storage_server_defaults)
|
||||
)}
|
||||
it { is_expected.to contain_swift__storage__server(param_hash[:container_port]).with(
|
||||
{:type => 'container',
|
||||
:config_file_path => 'container-server.conf',
|
||||
:incoming_chmod => param_hash[:incoming_chmod],
|
||||
:outgoing_chmod => param_hash[:outgoing_chmod],
|
||||
:pipeline => param_hash[:container_pipeline] || ['container-server'],
|
||||
:allow_versions => param_hash[:allow_versions] || false }.merge(storage_server_defaults)
|
||||
)}
|
||||
|
Loading…
x
Reference in New Issue
Block a user