Replace legacy facts and use fact hash

... because the latest lint no longer allows usage of legacy facts and
top scope fact.

Change-Id: If6eb852b44673ea6b6a629aa1381b78bb6ae5646
This commit is contained in:
Takashi Kajinami 2023-03-02 12:47:57 +09:00
parent d72accf703
commit 9ae179cd51
22 changed files with 264 additions and 271 deletions

View File

@ -9,99 +9,99 @@
# the cache region. This should not need to be changed unless there
# is another dogpile.cache region with the same configuration name.
# (string value)
# Defaults to $::os_service_default
# Defaults to $facts['os_service_default']
#
# [*expiration_time*]
# (Optional) Default TTL, in seconds, for any cached item in the
# dogpile.cache region. This applies to any cached method that
# doesn't have an explicit cache expiration time defined for it.
# (integer value)
# Defaults to $::os_service_default
# Defaults to $facts['os_service_default']
#
# [*backend*]
# (Optional) Dogpile.cache backend module. It is recommended that
# Memcache with pooling (oslo_cache.memcache_pool) or Redis
# (dogpile.cache.redis) be used in production deployments. (string value)
# Defaults to $::os_service_default
# Defaults to $facts['os_service_default']
#
# [*backend_argument*]
# (Optional) Arguments supplied to the backend module. Specify this option
# once per argument to be passed to the dogpile.cache backend.
# Example format: "<argname>:<value>". (list value)
# Defaults to $::os_service_default
# Defaults to $facts['os_service_default']
#
# [*proxies*]
# (Optional) Proxy classes to import that will affect the way the
# dogpile.cache backend functions. See the dogpile.cache documentation on
# changing-backend-behavior. (list value)
# Defaults to $::os_service_default
# Defaults to $facts['os_service_default']
#
# [*enabled*]
# (Optional) Global toggle for caching. (boolean value)
# Defaults to $::os_service_default
# Defaults to $facts['os_service_default']
#
# [*debug_cache_backend*]
# (Optional) Extra debugging from the cache backend (cache keys,
# get/set/delete/etc calls). This is only really useful if you need
# to see the specific cache-backend get/set/delete calls with the keys/values.
# Typically this should be left set to false. (boolean value)
# Defaults to $::os_service_default
# Defaults to $facts['os_service_default']
#
# [*memcache_servers*]
# (Optional) Memcache servers in the format of "host:port".
# (dogpile.cache.memcache and oslo_cache.memcache_pool backends only).
# (list value)
# Defaults to $::os_service_default
# Defaults to $facts['os_service_default']
#
# [*memcache_dead_retry*]
# (Optional) Number of seconds memcached server is considered dead before
# it is tried again. (dogpile.cache.memcache and oslo_cache.memcache_pool
# backends only). (integer value)
# Defaults to $::os_service_default
# Defaults to $facts['os_service_default']
#
# [*memcache_socket_timeout*]
# (Optional) Timeout in seconds for every call to a server.
# (dogpile.cache.memcache and oslo_cache.memcache_pool backends only).
# (floating point value)
# Defaults to $::os_service_default
# Defaults to $facts['os_service_default']
#
# [*enable_socket_keepalive*]
# (Optional) Global toggle for the socket keepalive of dogpile's
# pymemcache backend
# Defaults to $::os_service_default
# Defaults to $facts['os_service_default']
#
# [*socket_keepalive_idle*]
# (Optional) The time (in seconds) the connection needs to remain idle
# before TCP starts sending keepalive probes. Should be a positive integer
# most greater than zero.
# Defaults to $::os_service_default
# Defaults to $facts['os_service_default']
#
# [*socket_keepalive_interval*]
# (Optional) The time (in seconds) between individual keepalive probes.
# Should be a positive integer most greater than zero.
# Defaults to $::os_service_default
# Defaults to $facts['os_service_default']
#
# [*socket_keepalive_count*]
# (Optional) The maximum number of keepalive probes TCP should send before
# dropping the connection. Should be a positive integer most greater than
# zero.
# Defaults to $::os_service_default
# Defaults to $facts['os_service_default']
#
# [*memcache_pool_maxsize*]
# (Optional) Max total number of open connections to every memcached server.
# (oslo_cache.memcache_pool backend only). (integer value)
# Defaults to $::os_service_default
# Defaults to $facts['os_service_default']
#
# [*memcache_pool_unused_timeout*]
# (Optional) Number of seconds a connection to memcached is held unused
# in the pool before it is closed. (oslo_cache.memcache_pool backend only)
# (integer value)
# Defaults to $::os_service_default
# Defaults to $facts['os_service_default']
#
# [*memcache_pool_connection_get_timeout*]
# (Optional) Number of seconds that an operation will wait to get a memcache
# client connection. (integer value)
# Defaults to $::os_service_default
# Defaults to $facts['os_service_default']
#
# [*manage_backend_package*]
# (Optional) Whether to install the backend package for the cache.
@ -110,13 +110,13 @@
# [*tls_enabled*]
# (Optional) Global toggle for TLS usage when comunicating with
# the caching servers.
# Default to $::os_service_default
# Default to $facts['os_service_default']
#
# [*tls_cafile*]
# (Optional) Path to a file of concatenated CA certificates in PEM
# format necessary to establish the caching server's authenticity.
# If tls_enabled is False, this option is ignored.
# Default to $::os_service_default
# Default to $facts['os_service_default']
#
# [*tls_certfile*]
# (Optional) Path to a single file in PEM format containing the
@ -124,46 +124,46 @@
# needed to establish the certificate's authenticity. This file
# is only required when client side authentication is necessary.
# If tls_enabled is False, this option is ignored.
# Default to $::os_service_default
# Default to $facts['os_service_default']
#
# [*tls_keyfile*]
# (Optional) Path to a single file containing the client's private
# key in. Otherwhise the private key will be taken from the file
# specified in tls_certfile. If tls_enabled is False, this option
# is ignored.
# Default to $::os_service_default
# Default to $facts['os_service_default']
#
# [*tls_allowed_ciphers*]
# (Optional) Set the available ciphers for sockets created with
# the TLS context. It should be a string in the OpenSSL cipher
# list format. If not specified, all OpenSSL enabled ciphers will
# be available.
# Default to $::os_service_default
# Default to $facts['os_service_default']
#
class zaqar::cache (
$config_prefix = $::os_service_default,
$expiration_time = $::os_service_default,
$backend = $::os_service_default,
$backend_argument = $::os_service_default,
$proxies = $::os_service_default,
$enabled = $::os_service_default,
$debug_cache_backend = $::os_service_default,
$memcache_servers = $::os_service_default,
$memcache_dead_retry = $::os_service_default,
$memcache_socket_timeout = $::os_service_default,
$enable_socket_keepalive = $::os_service_default,
$socket_keepalive_idle = $::os_service_default,
$socket_keepalive_interval = $::os_service_default,
$socket_keepalive_count = $::os_service_default,
$memcache_pool_maxsize = $::os_service_default,
$memcache_pool_unused_timeout = $::os_service_default,
$memcache_pool_connection_get_timeout = $::os_service_default,
$config_prefix = $facts['os_service_default'],
$expiration_time = $facts['os_service_default'],
$backend = $facts['os_service_default'],
$backend_argument = $facts['os_service_default'],
$proxies = $facts['os_service_default'],
$enabled = $facts['os_service_default'],
$debug_cache_backend = $facts['os_service_default'],
$memcache_servers = $facts['os_service_default'],
$memcache_dead_retry = $facts['os_service_default'],
$memcache_socket_timeout = $facts['os_service_default'],
$enable_socket_keepalive = $facts['os_service_default'],
$socket_keepalive_idle = $facts['os_service_default'],
$socket_keepalive_interval = $facts['os_service_default'],
$socket_keepalive_count = $facts['os_service_default'],
$memcache_pool_maxsize = $facts['os_service_default'],
$memcache_pool_unused_timeout = $facts['os_service_default'],
$memcache_pool_connection_get_timeout = $facts['os_service_default'],
$manage_backend_package = true,
$tls_enabled = $::os_service_default,
$tls_cafile = $::os_service_default,
$tls_certfile = $::os_service_default,
$tls_keyfile = $::os_service_default,
$tls_allowed_ciphers = $::os_service_default,
$tls_enabled = $facts['os_service_default'],
$tls_cafile = $facts['os_service_default'],
$tls_certfile = $facts['os_service_default'],
$tls_keyfile = $facts['os_service_default'],
$tls_allowed_ciphers = $facts['os_service_default'],
) {
include zaqar::deps

View File

@ -8,41 +8,41 @@
# (Optional) Indicate whether this resource may be shared with the domain
# received in the requests "origin" header.
# (string value)
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
#
# [*allow_credentials*]
# (Optional) Indicate that the actual request can include user credentials.
# (boolean value)
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
#
# [*expose_headers*]
# (Optional) Indicate which headers are safe to expose to the API.
# (list value)
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
#
# [*max_age*]
# (Optional) Maximum cache age of CORS preflight requests.
# (integer value)
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
#
# [*allow_methods*]
# (Optional) Indicate which methods can be used during the actual request.
# (list value)
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
#
# [*allow_headers*]
# (Optional) Indicate which header field names may be used during the actual
# request.
# (list value)
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
#
class zaqar::cors (
$allowed_origin = $::os_service_default,
$allow_credentials = $::os_service_default,
$expose_headers = $::os_service_default,
$max_age = $::os_service_default,
$allow_methods = $::os_service_default,
$allow_headers = $::os_service_default,
$allowed_origin = $facts['os_service_default'],
$allow_credentials = $facts['os_service_default'],
$expose_headers = $facts['os_service_default'],
$max_age = $facts['os_service_default'],
$allow_methods = $facts['os_service_default'],
$allow_headers = $facts['os_service_default'],
) {
include zaqar::deps

View File

@ -22,42 +22,42 @@
# Pipeline to use for processing queue operations.
# This pipeline will be consumed before calling the storage driver's
# controller methods.
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
#
# [*message_pipeline*]
# Pipeline to use for processing message operations.
# This pipeline will be consumed before calling the storage driver's
# controller methods.
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
#
# [*claim_pipeline*]
# Pipeline to use for processing claim operations. This
# pipeline will be consumed before calling the storage driver's controller
# methods.
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
#
# [*subscription_pipeline*]
# Pipeline to use for processing subscription
# operations. This pipeline will be consumed before calling the storage
# driver's controller methods.
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
#
# [*topic_pipeline*]
# Pipeline to use for processing topic operations. This pipeline will be
# consumed before calling the strage driver's controller methods.
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
#
# [*max_messages_post_size*]
# Defines the maximum size of message posts. (integer value)
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
#
# [*message_store*]
# Backend driver for message storage.
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
#
# [*management_store*]
# Backend driver for management storage.
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
#
# [*unreliable*]
# Disable all reliability constraints. (boolean value)
@ -78,15 +78,15 @@
#
class zaqar(
$auth_strategy = 'keystone',
$admin_mode = $::os_service_default,
$unreliable = $::os_service_default,
$pooling = $::os_service_default,
$queue_pipeline = $::os_service_default,
$message_pipeline = $::os_service_default,
$claim_pipeline = $::os_service_default,
$subscription_pipeline = $::os_service_default,
$topic_pipeline = $::os_service_default,
$max_messages_post_size = $::os_service_default,
$admin_mode = $facts['os_service_default'],
$unreliable = $facts['os_service_default'],
$pooling = $facts['os_service_default'],
$queue_pipeline = $facts['os_service_default'],
$message_pipeline = $facts['os_service_default'],
$claim_pipeline = $facts['os_service_default'],
$subscription_pipeline = $facts['os_service_default'],
$topic_pipeline = $facts['os_service_default'],
$max_messages_post_size = $facts['os_service_default'],
$message_store = 'mongodb',
$management_store = 'mongodb',
$package_name = $::zaqar::params::package_name,

View File

@ -10,7 +10,7 @@
#
# [*password*]
# (Optional) Password to create for the service user
# Defaults to $::os_service_default
# Defaults to $facts['os_service_default']
#
# [*auth_url*]
# (Optional) The URL to use for authentication.
@ -30,17 +30,17 @@
#
# [*system_scope*]
# (Optional) Scope for system operations.
# Defaults to $::os_service_default
# Defaults to $facts['os_service_default']
#
# [*insecure*]
# (Optional) If true, explicitly allow TLS without checking server cert
# against any certificate authorities. WARNING: not recommended. Use with
# caution.
# Defaults to $::os_service_default
# Defaults to $facts['os_service_default']
#
# [*auth_section*]
# (Optional) Config Section from which to load plugin specific options
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
#
# [*auth_type*]
# (Optional) Authentication type to load
@ -52,26 +52,26 @@
#
# [*auth_version*]
# (Optional) API version of the admin Identity API endpoint.
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
#
# [*cache*]
# (Optional) Env key for the swift cache.
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
#
# [*cafile*]
# (Optional) A PEM encoded Certificate Authority to use when verifying HTTPs
# connections.
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
#
# [*certfile*]
# (Optional) Required if identity server requires client certificate
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
#
# [*delay_auth_decision*]
# (Optional) Do not handle authorization requests within the middleware, but
# delegate the authorization decision to downstream WSGI components. Boolean
# value
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
#
# [*enforce_token_bind*]
# (Optional) Used to control the use and type of token binding. Can be set
@ -81,57 +81,57 @@
# type is unknown the token will be rejected. "required" any form of token
# binding is needed to be allowed. Finally the name of a binding method that
# must be present in tokens. String value.
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
#
# [*http_connect_timeout*]
# (Optional) Request timeout value for communicating with Identity API
# server.
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
#
# [*http_request_max_retries*]
# (Optional) How many times are we trying to reconnect when communicating
# with Identity API Server. Integer value
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
#
# [*include_service_catalog*]
# (Optional) Indicate whether to set the X-Service-Catalog header. If False,
# middleware will not ask for service catalog on token validation and will
# not set the X-Service-Catalog header. Boolean value.
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
#
# [*keyfile*]
# (Optional) Required if identity server requires client certificate
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
#
# [*memcache_pool_conn_get_timeout*]
# (Optional) Number of seconds that an operation will wait to get a memcached
# client connection from the pool. Integer value
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
#
# [*memcache_pool_dead_retry*]
# (Optional) Number of seconds memcached server is considered dead before it
# is tried again. Integer value
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
#
# [*memcache_pool_maxsize*]
# (Optional) Maximum total number of open connections to every memcached
# server. Integer value
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
#
# [*memcache_pool_socket_timeout*]
# (Optional) Number of seconds a connection to memcached is held unused in
# the pool before it is closed. Integer value
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
#
# [*memcache_pool_unused_timeout*]
# (Optional) Number of seconds a connection to memcached is held unused in
# the pool before it is closed. Integer value
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
#
# [*memcache_secret_key*]
# (Optional, mandatory if memcache_security_strategy is defined) This string
# is used for key derivation.
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
#
# [*memcache_security_strategy*]
# (Optional) If defined, indicate whether token data should be authenticated
@ -139,17 +139,17 @@
# HMAC) in the cache. If ENCRYPT, token data is encrypted and authenticated in the
# cache. If the value is not one of these options or empty, auth_token will
# raise an exception on initialization.
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
#
# [*memcache_use_advanced_pool*]
# (Optional) Use the advanced (eventlet safe) memcached client pool. The
# advanced pool will only work under python 2.x Boolean value
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
#
# [*memcached_servers*]
# (Optional) Optionally specify a list of memcached server(s) to use for
# caching. If left undefined, tokens will instead be cached in-process.
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
#
# [*manage_memcache_package*]
# (Optional) Whether to install the python-memcache package.
@ -157,13 +157,13 @@
#
# [*region_name*]
# (Optional) The region in which the identity server can be found.
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
#
# [*token_cache_time*]
# (Optional) In order to prevent excessive effort spent validating tokens,
# the middleware caches previously-seen tokens for a configurable duration
# (in seconds). Set to -1 to disable caching completely. Integer value
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
#
# [*service_token_roles*]
# (Optional) A choice of roles that must be present in a service token.
@ -173,23 +173,23 @@
# here are applied as an ANY check so any role in this list
# must be present. For backwards compatibility reasons this
# currently only affects the allow_expired check. (list value)
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
#
# [*service_token_roles_required*]
# (optional) backwards compatibility to ensure that the service tokens are
# compared against a list of possible roles for validity
# true/false
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
#
# [*service_type*]
# (Optional) The name or type of the service as it appears in the service
# catalog. This is used to validate tokens that have restricted access rules.
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
#
# [*interface*]
# (Optional) Interface to use for the Identity API endpoint. Valid values are
# "public", "internal" or "admin".
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
#
# [*params*]
# (Optional) Hash of additional parameters to pass through to the keystone
@ -197,42 +197,42 @@
#
class zaqar::keystone::authtoken(
$username = 'zaqar',
$password = $::os_service_default,
$password = $facts['os_service_default'],
$auth_url = 'http://localhost:5000',
$project_name = 'services',
$user_domain_name = 'Default',
$project_domain_name = 'Default',
$system_scope = $::os_service_default,
$insecure = $::os_service_default,
$auth_section = $::os_service_default,
$system_scope = $facts['os_service_default'],
$insecure = $facts['os_service_default'],
$auth_section = $facts['os_service_default'],
$auth_type = 'password',
$www_authenticate_uri = 'http://localhost:5000',
$auth_version = $::os_service_default,
$cache = $::os_service_default,
$cafile = $::os_service_default,
$certfile = $::os_service_default,
$delay_auth_decision = $::os_service_default,
$enforce_token_bind = $::os_service_default,
$http_connect_timeout = $::os_service_default,
$http_request_max_retries = $::os_service_default,
$include_service_catalog = $::os_service_default,
$keyfile = $::os_service_default,
$memcache_pool_conn_get_timeout = $::os_service_default,
$memcache_pool_dead_retry = $::os_service_default,
$memcache_pool_maxsize = $::os_service_default,
$memcache_pool_socket_timeout = $::os_service_default,
$memcache_pool_unused_timeout = $::os_service_default,
$memcache_secret_key = $::os_service_default,
$memcache_security_strategy = $::os_service_default,
$memcache_use_advanced_pool = $::os_service_default,
$memcached_servers = $::os_service_default,
$auth_version = $facts['os_service_default'],
$cache = $facts['os_service_default'],
$cafile = $facts['os_service_default'],
$certfile = $facts['os_service_default'],
$delay_auth_decision = $facts['os_service_default'],
$enforce_token_bind = $facts['os_service_default'],
$http_connect_timeout = $facts['os_service_default'],
$http_request_max_retries = $facts['os_service_default'],
$include_service_catalog = $facts['os_service_default'],
$keyfile = $facts['os_service_default'],
$memcache_pool_conn_get_timeout = $facts['os_service_default'],
$memcache_pool_dead_retry = $facts['os_service_default'],
$memcache_pool_maxsize = $facts['os_service_default'],
$memcache_pool_socket_timeout = $facts['os_service_default'],
$memcache_pool_unused_timeout = $facts['os_service_default'],
$memcache_secret_key = $facts['os_service_default'],
$memcache_security_strategy = $facts['os_service_default'],
$memcache_use_advanced_pool = $facts['os_service_default'],
$memcached_servers = $facts['os_service_default'],
$manage_memcache_package = false,
$region_name = $::os_service_default,
$token_cache_time = $::os_service_default,
$service_token_roles = $::os_service_default,
$service_token_roles_required = $::os_service_default,
$service_type = $::os_service_default,
$interface = $::os_service_default,
$region_name = $facts['os_service_default'],
$token_cache_time = $facts['os_service_default'],
$service_token_roles = $facts['os_service_default'],
$service_token_roles_required = $facts['os_service_default'],
$service_type = $facts['os_service_default'],
$interface = $facts['os_service_default'],
$params = {}
) {

View File

@ -10,7 +10,7 @@
#
# [*password*]
# (Optional) Password to create for the trust user
# Defaults to $::os_service_default
# Defaults to $facts['os_service_default']
#
# [*auth_url*]
# (Optional) The URL to use for authentication.
@ -22,7 +22,7 @@
#
# [*auth_section*]
# (Optional) Config Section from which to load plugin specific options
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
#
# [*auth_type*]
# (Optional) Authentication type to load
@ -30,10 +30,10 @@
#
class zaqar::keystone::trust(
$username = 'zaqar',
$password = $::os_service_default,
$password = $facts['os_service_default'],
$auth_url = 'http://localhost:5000',
$user_domain_name = 'Default',
$auth_section = $::os_service_default,
$auth_section = $facts['os_service_default'],
$auth_type = 'password',
) {

View File

@ -6,71 +6,71 @@
#
# [*debug*]
# (Optional) Should the daemons log debug messages.
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
#
# [*use_syslog*]
# (Optional) Use syslog for logging.
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
#
# [*use_json*]
# (Optional) Use json for logging.
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
#
# [*use_journal*]
# (Optional) Use journal for logging.
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
#
# [*use_stderr*]
# (Optional) Use stderr for logging.
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
#
# [*log_facility*]
# (Optional) Syslog facility to receive log lines.
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
#
# [*log_dir*]
# (Optional) Directory where logs should be stored.
# If set to $::os_service_default, it will not log to any directory.
# If set to $facts['os_service_default'], it will not log to any directory.
# Defaults to '/var/log/zaqar'
#
# [*log_file*]
# (Optional) File where logs should be stored.
# Defaults to $::os_service_default
# Defaults to $facts['os_service_default']
#
# [*watch_log_file*]
# (Optional) Uses logging handler designed to watch file system (boolean value).
# Defaults to $::os_service_default
# Defaults to $facts['os_service_default']
#
# [*logging_context_format_string*]
# (Optional) Format string to use for log messages with context.
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
# Example: '%(asctime)s.%(msecs)03d %(process)d %(levelname)s %(name)s\
# [%(request_id)s %(user_identity)s] %(instance)s%(message)s'
#
# [*logging_default_format_string*]
# (Optional) Format string to use for log messages without context.
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
# Example: '%(asctime)s.%(msecs)03d %(process)d %(levelname)s %(name)s\
# [-] %(instance)s%(message)s'
#
# [*logging_debug_format_suffix*]
# (Optional) Formatted data to append to log format when level is DEBUG.
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
# Example: '%(funcName)s %(pathname)s:%(lineno)d'
#
# [*logging_exception_prefix*]
# (Optional) Prefix each line of exception output with this format.
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
# Example: '%(asctime)s.%(msecs)03d %(process)d TRACE %(name)s %(instance)s'
#
# [*log_config_append*]
# (Optional) The name of an additional logging configuration file.
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
# See https://docs.python.org/2/howto/logging.html
#
# [*default_log_levels*]
# (Optional) Hash of logger (keys) and level (values) pairs.
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
# Example:
# { 'amqp' => 'WARN', 'amqplib' => 'WARN', 'boto' => 'WARN',
# 'sqlalchemy' => 'WARN', 'suds' => 'INFO',
@ -82,50 +82,50 @@
#
# [*publish_errors*]
# (Optional) Publish error events (boolean value).
# Defaults to $::os_service_default (false if unconfigured).
# Defaults to $facts['os_service_default'] (false if unconfigured).
#
# [*fatal_deprecations*]
# (Optional) Make deprecations fatal (boolean value)
# Defaults to $::os_service_default (false if unconfigured).
# Defaults to $facts['os_service_default'] (false if unconfigured).
#
# [*instance_format*]
# (Optional) If an instance is passed with the log message, format it
# like this (string value).
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
# Example: '[instance: %(uuid)s] '
#
# [*instance_uuid_format*]
# (Optional) If an instance UUID is passed with the log message, format
# it like this (string value).
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
# Example: instance_uuid_format='[instance: %(uuid)s] '
# [*log_date_format*]
# (Optional) Format string for %%(asctime)s in log records.
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
# Example: 'Y-%m-%d %H:%M:%S'
#
class zaqar::logging(
$use_syslog = $::os_service_default,
$use_json = $::os_service_default,
$use_journal = $::os_service_default,
$use_stderr = $::os_service_default,
$log_facility = $::os_service_default,
$use_syslog = $facts['os_service_default'],
$use_json = $facts['os_service_default'],
$use_journal = $facts['os_service_default'],
$use_stderr = $facts['os_service_default'],
$log_facility = $facts['os_service_default'],
$log_dir = '/var/log/zaqar',
$log_file = $::os_service_default,
$watch_log_file = $::os_service_default,
$debug = $::os_service_default,
$logging_context_format_string = $::os_service_default,
$logging_default_format_string = $::os_service_default,
$logging_debug_format_suffix = $::os_service_default,
$logging_exception_prefix = $::os_service_default,
$log_config_append = $::os_service_default,
$default_log_levels = $::os_service_default,
$publish_errors = $::os_service_default,
$fatal_deprecations = $::os_service_default,
$instance_format = $::os_service_default,
$instance_uuid_format = $::os_service_default,
$log_date_format = $::os_service_default,
$log_file = $facts['os_service_default'],
$watch_log_file = $facts['os_service_default'],
$debug = $facts['os_service_default'],
$logging_context_format_string = $facts['os_service_default'],
$logging_default_format_string = $facts['os_service_default'],
$logging_debug_format_suffix = $facts['os_service_default'],
$logging_exception_prefix = $facts['os_service_default'],
$log_config_append = $facts['os_service_default'],
$default_log_levels = $facts['os_service_default'],
$publish_errors = $facts['os_service_default'],
$fatal_deprecations = $facts['os_service_default'],
$instance_format = $facts['os_service_default'],
$instance_uuid_format = $facts['os_service_default'],
$log_date_format = $facts['os_service_default'],
) {
include zaqar::deps

View File

@ -5,13 +5,13 @@
#
# [*ssl_keyfile*]
# The private keyfile used to identify the local connection against
# mongod. Default $::os_service_default
# Defaults to $::os_service_default.
# mongod. Default $facts['os_service_default']
# Defaults to $facts['os_service_default'].
#
# [*ssl_certfile*]
# The certificate file used to identify the local connection against
# mongod. (string value)
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
#
# [*ssl_cert_reqs*]
# Specifies whether a certificate is required from the other side of
@ -19,56 +19,56 @@
# must be one of the three values ``CERT_NONE``(certificates ignored),
# ``CERT_OPTIONAL``(not required, but validated if provided), or
# ``CERT_REQUIRED``(required and validated).
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
#
# [*ssl_ca_certs*]
# The ca_certs file contains a set of concatenated "certification
# authority" certificates, which are used to validate certificates
# passed from the other end of the connection.
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
#
# [*database*]
# Database name. (string value). Defaults to $::os_service_default.
# Database name. (string value). Defaults to $facts['os_service_default'].
#
# [*max_attempts*]
# Maximum number of times to retry a failed operation. Currently only
# used for retrying a message post.
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
#
# [*max_retry_sleep*]
# Maximum sleep interval between retries (actual sleep time increases
# linearly according to number of attempts performed).
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
#
# [*max_retry_jitter*]
# Maximum jitter interval, to be added to the sleep interval, in order
# to decrease probability that parallel requests will retry at the
# same instant. (floating point value)
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
#
# [*max_reconnect_attempts*]
# Maximum number of times to retry an operation that failed due to a
# primary node failover. (integer value)
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
#
# [*reconnect_sleep*]
# Base sleep interval between attempts to reconnect after a primary
# node failover. The actual sleep time increases exponentially (power
# of 2) each time the operation is retried. (floating point value)
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
#
class zaqar::management::mongodb(
$uri,
$ssl_keyfile = $::os_service_default,
$ssl_certfile = $::os_service_default,
$ssl_cert_reqs = $::os_service_default,
$ssl_ca_certs = $::os_service_default,
$database = $::os_service_default,
$max_attempts = $::os_service_default,
$max_retry_sleep = $::os_service_default,
$max_retry_jitter = $::os_service_default,
$max_reconnect_attempts = $::os_service_default,
$reconnect_sleep = $::os_service_default,
$ssl_keyfile = $facts['os_service_default'],
$ssl_certfile = $facts['os_service_default'],
$ssl_cert_reqs = $facts['os_service_default'],
$ssl_ca_certs = $facts['os_service_default'],
$database = $facts['os_service_default'],
$max_attempts = $facts['os_service_default'],
$max_retry_sleep = $facts['os_service_default'],
$max_retry_jitter = $facts['os_service_default'],
$max_reconnect_attempts = $facts['os_service_default'],
$reconnect_sleep = $facts['os_service_default'],
) {
include zaqar::deps

View File

@ -6,17 +6,17 @@
# [*max_reconnect_attempts*]
# Maximum number of times to retry an operation that failed due to a redis
# node failover.
# Defaults to $::os_service_default
# Defaults to $facts['os_service_default']
#
# [*reconnect_sleep*]
# Base sleep interval between attempts to reconnect after a redis node
# failover.
# Defaults to $::os_service_default
# Defaults to $facts['os_service_default']
#
class zaqar::management::redis(
$uri,
$max_reconnect_attempts = $::os_service_default,
$reconnect_sleep = $::os_service_default,
$max_reconnect_attempts = $facts['os_service_default'],
$reconnect_sleep = $facts['os_service_default'],
) {
include zaqar::deps

View File

@ -5,13 +5,13 @@
#
# [*ssl_keyfile*]
# The private keyfile used to identify the local connection against
# mongod. Default $::os_service_default
# Defaults to $::os_service_default.
# mongod. Default $facts['os_service_default']
# Defaults to $facts['os_service_default'].
#
# [*ssl_certfile*]
# The certificate file used to identify the local connection against
# mongod. (string value)
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
#
# [*ssl_cert_reqs*]
# Specifies whether a certificate is required from the other side of
@ -19,63 +19,63 @@
# must be one of the three values ``CERT_NONE``(certificates ignored),
# ``CERT_OPTIONAL``(not required, but validated if provided), or
# ``CERT_REQUIRED``(required and validated).
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
#
# [*ssl_ca_certs*]
# The ca_certs file contains a set of concatenated "certification
# authority" certificates, which are used to validate certificates
# passed from the other end of the connection.
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
#
# [*database*]
# Database name. (string value). Defaults to $::os_service_default.
# Database name. (string value). Defaults to $facts['os_service_default'].
#
# [*max_attempts*]
# Maximum number of times to retry a failed operation. Currently only
# used for retrying a message post.
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
#
# [*max_retry_sleep*]
# Maximum sleep interval between retries (actual sleep time increases
# linearly according to number of attempts performed).
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
#
# [*max_retry_jitter*]
# Maximum jitter interval, to be added to the sleep interval, in order
# to decrease probability that parallel requests will retry at the
# same instant. (floating point value)
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
#
# [*max_reconnect_attempts*]
# Maximum number of times to retry an operation that failed due to a
# primary node failover. (integer value)
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
#
# [*reconnect_sleep*]
# Base sleep interval between attempts to reconnect after a primary
# node failover. The actual sleep time increases exponentially (power
# of 2) each time the operation is retried. (floating point value)
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
#
# [*partitions*]
# Number of databases across which to partition message data, in order
# to reduce writer lock %. DO NOT change this setting after initial
# deployment. It MUST remain static.
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
#
class zaqar::messaging::mongodb(
$uri,
$ssl_keyfile = $::os_service_default,
$ssl_certfile = $::os_service_default,
$ssl_cert_reqs = $::os_service_default,
$ssl_ca_certs = $::os_service_default,
$database = $::os_service_default,
$max_attempts = $::os_service_default,
$max_retry_sleep = $::os_service_default,
$max_retry_jitter = $::os_service_default,
$max_reconnect_attempts = $::os_service_default,
$reconnect_sleep = $::os_service_default,
$partitions = $::os_service_default,
$ssl_keyfile = $facts['os_service_default'],
$ssl_certfile = $facts['os_service_default'],
$ssl_cert_reqs = $facts['os_service_default'],
$ssl_ca_certs = $facts['os_service_default'],
$database = $facts['os_service_default'],
$max_attempts = $facts['os_service_default'],
$max_retry_sleep = $facts['os_service_default'],
$max_retry_jitter = $facts['os_service_default'],
$max_reconnect_attempts = $facts['os_service_default'],
$reconnect_sleep = $facts['os_service_default'],
$partitions = $facts['os_service_default'],
) {
include zaqar::deps

View File

@ -6,18 +6,18 @@
# [*max_reconnect_attempts*]
# Maximum number of times to retry an operation that failed due to a
# primary node failover. (integer value)
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
#
# [*reconnect_sleep*]
# Base sleep interval between attempts to reconnect after a primary
# node failover. The actual sleep time increases exponentially (power
# of 2) each time the operation is retried. (floating point value)
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
#
class zaqar::messaging::redis(
$uri,
$max_reconnect_attempts = $::os_service_default,
$reconnect_sleep = $::os_service_default,
$max_reconnect_attempts = $facts['os_service_default'],
$reconnect_sleep = $facts['os_service_default'],
) {
include zaqar::deps

View File

@ -4,11 +4,11 @@
# Swift Connection URI. Required.
#
# [*auth_url*]
# URL to the KeyStone service. Default $::os_service_default
# URL to the KeyStone service. Default $facts['os_service_default']
#
class zaqar::messaging::swift(
$uri,
$auth_url = $::os_service_default,
$auth_url = $facts['os_service_default'],
) {
include zaqar::deps

View File

@ -11,7 +11,7 @@ class zaqar::params {
$user = 'zaqar'
$group = 'zaqar'
case $::osfamily {
case $facts['os']['family'] {
'RedHat': {
$package_name = 'openstack-zaqar'
$service_name = 'openstack-zaqar'
@ -25,9 +25,7 @@ class zaqar::params {
$zaqar_wsgi_script_path = '/usr/lib/cgi-bin/zaqar'
}
default: {
fail("Unsupported osfamily: ${::osfamily} operatingsystem: \
${::operatingsystem}, module ${module_name} only support osfamily \
RedHat and Debian")
fail("Unsupported osfamily: ${facts['os']['family']}")
}
}
}

View File

@ -6,12 +6,12 @@
#
# [*enforce_scope*]
# (Optional) Whether or not to enforce scope when evaluating policies.
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
#
# [*enforce_new_defaults*]
# (Optional) Whether or not to use old deprecated defaults when evaluating
# policies.
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
#
# [*policies*]
# (Optional) Set of policies to configure for zaqar
@ -34,11 +34,11 @@
#
# [*policy_default_rule*]
# (Optional) Default rule. Enforced when a requested rule is not found.
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
#
# [*policy_dirs*]
# (Optional) Path to the zaqar policy folder
# Defaults to $::os_service_default
# Defaults to $facts['os_service_default']
#
# [*purge_config*]
# (optional) Whether to set only the specified policy rules in the policy
@ -46,12 +46,12 @@
# Defaults to false.
#
class zaqar::policy (
$enforce_scope = $::os_service_default,
$enforce_new_defaults = $::os_service_default,
$enforce_scope = $facts['os_service_default'],
$enforce_new_defaults = $facts['os_service_default'],
$policies = {},
$policy_path = '/etc/zaqar/policy.yaml',
$policy_default_rule = $::os_service_default,
$policy_dirs = $::os_service_default,
$policy_default_rule = $facts['os_service_default'],
$policy_dirs = $facts['os_service_default'],
$purge_config = false,
) {

View File

@ -2,30 +2,30 @@
#
# [*bind*]
# Address on which the self-hosting server will listen.
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
#
# [*port*]
# Port on which the self-hosting server will listen.
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
#
# [*external_port*]
# Port on which the service is provided to the user.
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
#
# [*notification_bind*]
# Address on which the notification server will listen.
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
#
# [*notification_port*]
# Port on which the notification server will listen.
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
#
class zaqar::transport::websocket(
$bind = $::os_service_default,
$port = $::os_service_default,
$external_port = $::os_service_default,
$notification_bind = $::os_service_default,
$notification_port = $::os_service_default,
$bind = $facts['os_service_default'],
$port = $facts['os_service_default'],
$external_port = $facts['os_service_default'],
$notification_bind = $facts['os_service_default'],
$notification_port = $facts['os_service_default'],
) {
include zaqar::deps

View File

@ -2,15 +2,15 @@
#
# [*bind*]
# Address on which the self-hosting server will listen.
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
#
# [*port*]
# Port on which the self-hosting server will listen.
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
#
class zaqar::transport::wsgi(
$bind = $::os_service_default,
$port = $::os_service_default,
$bind = $facts['os_service_default'],
$port = $facts['os_service_default'],
) {
include zaqar::deps

View File

@ -22,7 +22,7 @@
#
# [*servername*]
# (Optional) The servername for the virtualhost.
# Defaults to $::fqdn
# Defaults to $facts['networking']['fqdn']
#
# [*port*]
# (Optional) The port.
@ -42,7 +42,7 @@
#
# [*workers*]
# (Optional) Number of WSGI workers to spawn.
# Defaults to $::os_workers
# Defaults to $facts['os_workers']
#
# [*priority*]
# (Optional) The priority for the vhost.
@ -123,12 +123,12 @@
# class { 'zaqar::wsgi::apache': }
#
class zaqar::wsgi::apache (
$servername = $::fqdn,
$servername = $facts['networking']['fqdn'],
$port = 8888,
$bind_host = undef,
$path = '/',
$ssl = false,
$workers = $::os_workers,
$workers = $facts['os_workers'],
$ssl_cert = undef,
$ssl_key = undef,
$ssl_chain = undef,

View File

@ -27,7 +27,7 @@ describe 'zaqar::client' do
end
let(:platform_params) do
case facts[:osfamily]
case facts[:os]['family']
when 'Debian'
{ :client_package_name => 'python3-zaqarclient' }
when 'RedHat'

View File

@ -31,10 +31,7 @@ describe 'zaqar::db::sync' do
}).each do |os,facts|
context "on #{os}" do
let (:facts) do
facts.merge(OSDefaults.get_facts({
:os_workers => 8,
:concat_basedir => '/var/lib/puppet/concat'
}))
facts.merge(OSDefaults.get_facts())
end
it_configures 'zaqar-dbsync'

View File

@ -85,7 +85,7 @@ describe 'zaqar' do
end
let(:platform_params) do
case facts[:osfamily]
case facts[:os]['family']
when 'Debian'
{ :zaqar_common_package => 'zaqar-server' }
when 'RedHat'

View File

@ -28,7 +28,7 @@ describe 'zaqar::server' do
end
let(:platform_params) do
case facts[:osfamily]
case facts[:os]['family']
when 'Debian'
{ :zaqar_service_name => 'zaqar-server' }
when 'RedHat'

View File

@ -10,7 +10,7 @@ describe 'zaqar::wsgi::apache' do
:group => 'zaqar',
:path => '/',
:priority => 10,
:servername => facts[:fqdn],
:servername => 'foo.example.com',
:ssl => false,
:threads => 1,
:user => 'zaqar',
@ -143,14 +143,12 @@ describe 'zaqar::wsgi::apache' do
context "on #{os}" do
let (:facts) do
facts.merge!(OSDefaults.get_facts({
:os_workers => 42,
:concat_basedir => '/var/lib/puppet/concat',
:fqdn => 'some.host.tld',
:os_workers => 42,
}))
end
let(:platform_params) do
case facts[:osfamily]
case facts[:os]['family']
when 'Debian'
{
:wsgi_script_path => '/usr/lib/cgi-bin/zaqar',

View File

@ -47,7 +47,7 @@ describe 'zaqar::server_instance' do
end
let(:platform_params) do
case facts[:osfamily]
case facts[:os]['family']
when 'Debian'
{ :zaqar_service_name => 'zaqar-server' }
when 'RedHat'