Drop redundant default of cache_tls_enabled
The tls_enabled option defaults to false, so we don't have to make the class parameter default to false explicitly but can use the service default. Change-Id: I023855904460280e86073c0301e420255b25e6f2
This commit is contained in:
parent
9c10d867f3
commit
d0b20eb5d9
|
@ -51,7 +51,7 @@
|
||||||
# [*cache_tls_enabled*]
|
# [*cache_tls_enabled*]
|
||||||
# (Optional) Global toggle for TLS usage when communicating with
|
# (Optional) Global toggle for TLS usage when communicating with
|
||||||
# the caching servers.
|
# the caching servers.
|
||||||
# Default to false
|
# Defaults to $facts['os_service_default']
|
||||||
#
|
#
|
||||||
# [*cache_tls_cafile*]
|
# [*cache_tls_cafile*]
|
||||||
# (Optional) Path to a file of concatenated CA certificates in PEM
|
# (Optional) Path to a file of concatenated CA certificates in PEM
|
||||||
|
@ -84,7 +84,7 @@ class swift::containerreconciler(
|
||||||
$request_tries = $facts['os_service_default'],
|
$request_tries = $facts['os_service_default'],
|
||||||
$service_provider = $::swift::params::service_provider,
|
$service_provider = $::swift::params::service_provider,
|
||||||
$memcache_servers = ['127.0.0.1:11211'],
|
$memcache_servers = ['127.0.0.1:11211'],
|
||||||
$cache_tls_enabled = false,
|
$cache_tls_enabled = $facts['os_service_default'],
|
||||||
$cache_tls_cafile = $facts['os_service_default'],
|
$cache_tls_cafile = $facts['os_service_default'],
|
||||||
$cache_tls_certfile = $facts['os_service_default'],
|
$cache_tls_certfile = $facts['os_service_default'],
|
||||||
$cache_tls_keyfile = $facts['os_service_default'],
|
$cache_tls_keyfile = $facts['os_service_default'],
|
||||||
|
|
|
@ -7,13 +7,13 @@
|
||||||
# [*tls_enabled*]
|
# [*tls_enabled*]
|
||||||
# (Optional) Global toggle for TLS usage when communicating with
|
# (Optional) Global toggle for TLS usage when communicating with
|
||||||
# the caching servers.
|
# the caching servers.
|
||||||
# Default to false
|
# Defaults to $facts['os_service_default'].
|
||||||
#
|
#
|
||||||
# [*tls_cafile*]
|
# [*tls_cafile*]
|
||||||
# (Optional) Path to a file of concatenated CA certificates in PEM
|
# (Optional) Path to a file of concatenated CA certificates in PEM
|
||||||
# format necessary to establish the caching server's authenticity.
|
# format necessary to establish the caching server's authenticity.
|
||||||
# If tls_enabled is False, this option is ignored.
|
# If tls_enabled is False, this option is ignored.
|
||||||
# Defaults to undef
|
# Defaults to $facts['os_service_default'].
|
||||||
#
|
#
|
||||||
# [*tls_certfile*]
|
# [*tls_certfile*]
|
||||||
# (Optional) Path to a single file in PEM format containing the
|
# (Optional) Path to a single file in PEM format containing the
|
||||||
|
@ -21,14 +21,14 @@
|
||||||
# needed to establish the certificate's authenticity. This file
|
# needed to establish the certificate's authenticity. This file
|
||||||
# is only required when client side authentication is necessary.
|
# is only required when client side authentication is necessary.
|
||||||
# If tls_enabled is False, this option is ignored.
|
# If tls_enabled is False, this option is ignored.
|
||||||
# Defaults to undef
|
# Defaults to $facts['os_service_default'].
|
||||||
#
|
#
|
||||||
# [*tls_keyfile*]
|
# [*tls_keyfile*]
|
||||||
# (Optional) Path to a single file containing the client's private
|
# (Optional) Path to a single file containing the client's private
|
||||||
# key in. Otherwise the private key will be taken from the file
|
# key in. Otherwise the private key will be taken from the file
|
||||||
# specified in tls_certfile. If tls_enabled is False, this option
|
# specified in tls_certfile. If tls_enabled is False, this option
|
||||||
# is ignored.
|
# is ignored.
|
||||||
# Defaults to undef
|
# Defaults to $facts['os_service_default'].
|
||||||
#
|
#
|
||||||
# [*memcache_max_connections*] Sets the maximum number of connections to
|
# [*memcache_max_connections*] Sets the maximum number of connections to
|
||||||
# each memcached server per worker
|
# each memcached server per worker
|
||||||
|
@ -49,10 +49,10 @@
|
||||||
#
|
#
|
||||||
class swift::internal_client::cache(
|
class swift::internal_client::cache(
|
||||||
$memcache_servers = ['127.0.0.1:11211'],
|
$memcache_servers = ['127.0.0.1:11211'],
|
||||||
$tls_enabled = false,
|
$tls_enabled = $facts['os_service_default'],
|
||||||
$tls_cafile = undef,
|
$tls_cafile = $facts['os_service_default'],
|
||||||
$tls_certfile = undef,
|
$tls_certfile = $facts['os_service_default'],
|
||||||
$tls_keyfile = undef,
|
$tls_keyfile = $facts['os_service_default'],
|
||||||
$memcache_max_connections = '2'
|
$memcache_max_connections = '2'
|
||||||
) {
|
) {
|
||||||
|
|
||||||
|
|
|
@ -70,13 +70,13 @@
|
||||||
# [*cache_tls_enabled*]
|
# [*cache_tls_enabled*]
|
||||||
# (Optional) Global toggle for TLS usage when communicating with
|
# (Optional) Global toggle for TLS usage when communicating with
|
||||||
# the caching servers.
|
# the caching servers.
|
||||||
# Default to false
|
# Defaults to $facts['os_service_default'].
|
||||||
#
|
#
|
||||||
# [*cache_tls_cafile*]
|
# [*cache_tls_cafile*]
|
||||||
# (Optional) Path to a file of concatenated CA certificates in PEM
|
# (Optional) Path to a file of concatenated CA certificates in PEM
|
||||||
# format necessary to establish the caching server's authenticity.
|
# format necessary to establish the caching server's authenticity.
|
||||||
# If tls_enabled is False, this option is ignored.
|
# If tls_enabled is False, this option is ignored.
|
||||||
# Defaults to undef
|
# Defaults to $facts['os_service_default'].
|
||||||
#
|
#
|
||||||
# [*cache_tls_certfile*]
|
# [*cache_tls_certfile*]
|
||||||
# (Optional) Path to a single file in PEM format containing the
|
# (Optional) Path to a single file in PEM format containing the
|
||||||
|
@ -84,14 +84,14 @@
|
||||||
# needed to establish the certificate's authenticity. This file
|
# needed to establish the certificate's authenticity. This file
|
||||||
# is only required when client side authentication is necessary.
|
# is only required when client side authentication is necessary.
|
||||||
# If tls_enabled is False, this option is ignored.
|
# If tls_enabled is False, this option is ignored.
|
||||||
# Defaults to undef
|
# Defaults to $facts['os_service_default'].
|
||||||
#
|
#
|
||||||
# [*cache_tls_keyfile*]
|
# [*cache_tls_keyfile*]
|
||||||
# (Optional) Path to a single file containing the client's private
|
# (Optional) Path to a single file containing the client's private
|
||||||
# key in. Otherwise the private key will be taken from the file
|
# key in. Otherwise the private key will be taken from the file
|
||||||
# specified in tls_certfile. If tls_enabled is False, this option
|
# specified in tls_certfile. If tls_enabled is False, this option
|
||||||
# is ignored.
|
# is ignored.
|
||||||
# Defaults to undef
|
# Defaults to $facts['os_service_default'].
|
||||||
#
|
#
|
||||||
# [*log_level*]
|
# [*log_level*]
|
||||||
# (optional) Log level.
|
# (optional) Log level.
|
||||||
|
@ -116,10 +116,10 @@ class swift::objectexpirer(
|
||||||
$report_interval = $facts['os_service_default'],
|
$report_interval = $facts['os_service_default'],
|
||||||
$service_provider = $::swift::params::service_provider,
|
$service_provider = $::swift::params::service_provider,
|
||||||
$memcache_servers = ['127.0.0.1:11211'],
|
$memcache_servers = ['127.0.0.1:11211'],
|
||||||
$cache_tls_enabled = false,
|
$cache_tls_enabled = $facts['os_service_default'],
|
||||||
$cache_tls_cafile = undef,
|
$cache_tls_cafile = $facts['os_service_default'],
|
||||||
$cache_tls_certfile = undef,
|
$cache_tls_certfile = $facts['os_service_default'],
|
||||||
$cache_tls_keyfile = undef,
|
$cache_tls_keyfile = $facts['os_service_default'],
|
||||||
$log_level = 'INFO',
|
$log_level = 'INFO',
|
||||||
$log_facility = 'LOG_LOCAL2',
|
$log_facility = 'LOG_LOCAL2',
|
||||||
) inherits swift::params {
|
) inherits swift::params {
|
||||||
|
|
|
@ -7,13 +7,13 @@
|
||||||
# [*tls_enabled*]
|
# [*tls_enabled*]
|
||||||
# (Optional) Global toggle for TLS usage when communicating with
|
# (Optional) Global toggle for TLS usage when communicating with
|
||||||
# the caching servers.
|
# the caching servers.
|
||||||
# Default to false
|
# Default to $facts['os_service_default']
|
||||||
#
|
#
|
||||||
# [*tls_cafile*]
|
# [*tls_cafile*]
|
||||||
# (Optional) Path to a file of concatenated CA certificates in PEM
|
# (Optional) Path to a file of concatenated CA certificates in PEM
|
||||||
# format necessary to establish the caching server's authenticity.
|
# format necessary to establish the caching server's authenticity.
|
||||||
# If tls_enabled is False, this option is ignored.
|
# If tls_enabled is False, this option is ignored.
|
||||||
# Defaults to undef
|
# Default to $facts['os_service_default']
|
||||||
#
|
#
|
||||||
# [*tls_certfile*]
|
# [*tls_certfile*]
|
||||||
# (Optional) Path to a single file in PEM format containing the
|
# (Optional) Path to a single file in PEM format containing the
|
||||||
|
@ -21,14 +21,14 @@
|
||||||
# needed to establish the certificate's authenticity. This file
|
# needed to establish the certificate's authenticity. This file
|
||||||
# is only required when client side authentication is necessary.
|
# is only required when client side authentication is necessary.
|
||||||
# If tls_enabled is False, this option is ignored.
|
# If tls_enabled is False, this option is ignored.
|
||||||
# Defaults to undef
|
# Default to $facts['os_service_default']
|
||||||
#
|
#
|
||||||
# [*tls_keyfile*]
|
# [*tls_keyfile*]
|
||||||
# (Optional) Path to a single file containing the client's private
|
# (Optional) Path to a single file containing the client's private
|
||||||
# key in. Otherwise the private key will be taken from the file
|
# key in. Otherwise the private key will be taken from the file
|
||||||
# specified in tls_certfile. If tls_enabled is False, this option
|
# specified in tls_certfile. If tls_enabled is False, this option
|
||||||
# is ignored.
|
# is ignored.
|
||||||
# Defaults to undef
|
# Default to $facts['os_service_default']
|
||||||
#
|
#
|
||||||
# [*memcache_max_connections*] Sets the maximum number of connections to
|
# [*memcache_max_connections*] Sets the maximum number of connections to
|
||||||
# each memcached server per worker
|
# each memcached server per worker
|
||||||
|
@ -49,10 +49,10 @@
|
||||||
#
|
#
|
||||||
class swift::proxy::cache(
|
class swift::proxy::cache(
|
||||||
$memcache_servers = ['127.0.0.1:11211'],
|
$memcache_servers = ['127.0.0.1:11211'],
|
||||||
$tls_enabled = false,
|
$tls_enabled = $facts['os_service_default'],
|
||||||
$tls_cafile = undef,
|
$tls_cafile = $facts['os_service_default'],
|
||||||
$tls_certfile = undef,
|
$tls_certfile = $facts['os_service_default'],
|
||||||
$tls_keyfile = undef,
|
$tls_keyfile = $facts['os_service_default'],
|
||||||
$memcache_max_connections = '2'
|
$memcache_max_connections = '2'
|
||||||
) {
|
) {
|
||||||
|
|
||||||
|
|
|
@ -76,7 +76,7 @@ describe 'swift::containerreconciler' do
|
||||||
is_expected.to contain_swift_container_reconciler_config(
|
is_expected.to contain_swift_container_reconciler_config(
|
||||||
'filter:cache/memcache_servers').with_value('127.0.0.1:11211')
|
'filter:cache/memcache_servers').with_value('127.0.0.1:11211')
|
||||||
is_expected.to contain_swift_container_reconciler_config(
|
is_expected.to contain_swift_container_reconciler_config(
|
||||||
'filter:cache/tls_enabled').with_value(false)
|
'filter:cache/tls_enabled').with_value('<SERVICE DEFAULT>')
|
||||||
is_expected.to contain_swift_container_reconciler_config(
|
is_expected.to contain_swift_container_reconciler_config(
|
||||||
'filter:cache/tls_cafile').with_value('<SERVICE DEFAULT>')
|
'filter:cache/tls_cafile').with_value('<SERVICE DEFAULT>')
|
||||||
is_expected.to contain_swift_container_reconciler_config(
|
is_expected.to contain_swift_container_reconciler_config(
|
||||||
|
|
|
@ -22,7 +22,10 @@ describe 'swift::internal_client::cache' do
|
||||||
|
|
||||||
it { is_expected.to contain_swift_internal_client_config('filter:cache/use').with_value('egg:swift#memcache') }
|
it { is_expected.to contain_swift_internal_client_config('filter:cache/use').with_value('egg:swift#memcache') }
|
||||||
it { is_expected.to contain_swift_internal_client_config('filter:cache/memcache_servers').with_value('127.0.0.1:11211') }
|
it { is_expected.to contain_swift_internal_client_config('filter:cache/memcache_servers').with_value('127.0.0.1:11211') }
|
||||||
it { is_expected.to contain_swift_internal_client_config('filter:cache/tls_enabled').with_value(false) }
|
it { is_expected.to contain_swift_internal_client_config('filter:cache/tls_enabled').with_value('<SERVICE DEFAULT>') }
|
||||||
|
it { is_expected.to contain_swift_internal_client_config('filter:cache/tls_cafile').with_value('<SERVICE DEFAULT>') }
|
||||||
|
it { is_expected.to contain_swift_internal_client_config('filter:cache/tls_certfile').with_value('<SERVICE DEFAULT>') }
|
||||||
|
it { is_expected.to contain_swift_internal_client_config('filter:cache/tls_keyfile').with_value('<SERVICE DEFAULT>') }
|
||||||
it { is_expected.to contain_swift_internal_client_config('filter:cache/memcache_max_connections').with_value(2) }
|
it { is_expected.to contain_swift_internal_client_config('filter:cache/memcache_max_connections').with_value(2) }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,13 @@ describe 'swift::objectexpirer' do
|
||||||
is_expected.to contain_swift_object_expirer_config(
|
is_expected.to contain_swift_object_expirer_config(
|
||||||
'filter:cache/memcache_servers').with_value('127.0.0.1:11211')
|
'filter:cache/memcache_servers').with_value('127.0.0.1:11211')
|
||||||
is_expected.to contain_swift_object_expirer_config(
|
is_expected.to contain_swift_object_expirer_config(
|
||||||
'filter:cache/tls_enabled').with_value(false)
|
'filter:cache/tls_enabled').with_value('<SERVICE DEFAULT>')
|
||||||
|
is_expected.to contain_swift_object_expirer_config(
|
||||||
|
'filter:cache/tls_cafile').with_value('<SERVICE DEFAULT>')
|
||||||
|
is_expected.to contain_swift_object_expirer_config(
|
||||||
|
'filter:cache/tls_certfile').with_value('<SERVICE DEFAULT>')
|
||||||
|
is_expected.to contain_swift_object_expirer_config(
|
||||||
|
'filter:cache/tls_keyfile').with_value('<SERVICE DEFAULT>')
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'configures object-expirer service' do
|
it 'configures object-expirer service' do
|
||||||
|
|
|
@ -22,7 +22,10 @@ describe 'swift::proxy::cache' do
|
||||||
|
|
||||||
it { is_expected.to contain_swift_proxy_config('filter:cache/use').with_value('egg:swift#memcache') }
|
it { is_expected.to contain_swift_proxy_config('filter:cache/use').with_value('egg:swift#memcache') }
|
||||||
it { is_expected.to contain_swift_proxy_config('filter:cache/memcache_servers').with_value('127.0.0.1:11211') }
|
it { is_expected.to contain_swift_proxy_config('filter:cache/memcache_servers').with_value('127.0.0.1:11211') }
|
||||||
it { is_expected.to contain_swift_proxy_config('filter:cache/tls_enabled').with_value(false) }
|
it { is_expected.to contain_swift_proxy_config('filter:cache/tls_enabled').with_value('<SERVICE DEFAULT>') }
|
||||||
|
it { is_expected.to contain_swift_proxy_config('filter:cache/tls_cafile').with_value('<SERVICE DEFAULT>') }
|
||||||
|
it { is_expected.to contain_swift_proxy_config('filter:cache/tls_certfile').with_value('<SERVICE DEFAULT>') }
|
||||||
|
it { is_expected.to contain_swift_proxy_config('filter:cache/tls_keyfile').with_value('<SERVICE DEFAULT>') }
|
||||||
it { is_expected.to contain_swift_proxy_config('filter:cache/memcache_max_connections').with_value(2) }
|
it { is_expected.to contain_swift_proxy_config('filter:cache/memcache_max_connections').with_value(2) }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue