Replace legacy facts and use fact hash

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

Change-Id: I2a52329948becfcfb799f034847db9eae7bd903d
This commit is contained in:
Takashi Kajinami 2023-03-01 12:02:51 +09:00
parent df3fce9e6b
commit 3bf38f8403
27 changed files with 292 additions and 301 deletions

View File

@ -34,15 +34,15 @@
# [*enable_proxy_headers_parsing*] # [*enable_proxy_headers_parsing*]
# (Optional) Enable paste middleware to handle SSL requests through # (Optional) Enable paste middleware to handle SSL requests through
# HTTPProxyToWSGI middleware. # HTTPProxyToWSGI middleware.
# Defaults to $::os_service_default. # Defaults to $facts['os_service_default'].
# #
# [*max_request_body_size*] # [*max_request_body_size*]
# (Optional) Set max request body size # (Optional) Set max request body size
# Defaults to $::os_service_default. # Defaults to $facts['os_service_default'].
# #
# [*paste_config*] # [*paste_config*]
# (Optional) Configuration file for WSGI definition of API # (Optional) Configuration file for WSGI definition of API
# Defaults to $::os_service_default. # Defaults to $facts['os_service_default'].
# #
# [*gnocchi_external_project_owner*] # [*gnocchi_external_project_owner*]
# (optional) Gnocchi external project owner (usually Ceilometer project name) # (optional) Gnocchi external project owner (usually Ceilometer project name)
@ -59,9 +59,9 @@ class aodh::api (
$service_name = $::aodh::params::api_service_name, $service_name = $::aodh::params::api_service_name,
$sync_db = false, $sync_db = false,
$auth_strategy = 'keystone', $auth_strategy = 'keystone',
$enable_proxy_headers_parsing = $::os_service_default, $enable_proxy_headers_parsing = $facts['os_service_default'],
$max_request_body_size = $::os_service_default, $max_request_body_size = $facts['os_service_default'],
$paste_config = $::os_service_default, $paste_config = $facts['os_service_default'],
$gnocchi_external_project_owner = 'services', $gnocchi_external_project_owner = 'services',
$gnocchi_external_domain_name = 'Default', $gnocchi_external_domain_name = 'Default',
) inherits aodh::params { ) inherits aodh::params {

View File

@ -6,28 +6,28 @@
# #
# [*backend_url*] # [*backend_url*]
# (Optional) Coordination backend URL. # (Optional) Coordination backend URL.
# Defaults to $::os_service_default # Defaults to $facts['os_service_default']
# #
# [*heartbeat_interval*] # [*heartbeat_interval*]
# (Optional) Number of seconds between heartbeats for distributed # (Optional) Number of seconds between heartbeats for distributed
# coordination. # coordination.
# Defaults to $::os_service_default # Defaults to $facts['os_service_default']
# #
# [*retry_backoff*] # [*retry_backoff*]
# (Optional) Retry backoff factor when retrying to connect with coordination # (Optional) Retry backoff factor when retrying to connect with coordination
# backend. # backend.
# Defaults to $::os_service_default # Defaults to $facts['os_service_default']
# #
# [*max_retry_interval*] # [*max_retry_interval*]
# (Optional) Maximum number of seconds between retry to join partitioning # (Optional) Maximum number of seconds between retry to join partitioning
# group # group
# Defaults to $::os_service_default # Defaults to $facts['os_service_default']
# #
class aodh::coordination ( class aodh::coordination (
$backend_url = $::os_service_default, $backend_url = $facts['os_service_default'],
$heartbeat_interval = $::os_service_default, $heartbeat_interval = $facts['os_service_default'],
$retry_backoff = $::os_service_default, $retry_backoff = $facts['os_service_default'],
$max_retry_interval = $::os_service_default, $max_retry_interval = $facts['os_service_default'],
) { ) {
include aodh::deps include aodh::deps

View File

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

View File

@ -7,7 +7,7 @@
# [*database_db_max_retries*] # [*database_db_max_retries*]
# (optional) Maximum retries in case of connection error or deadlock error # (optional) Maximum retries in case of connection error or deadlock error
# before error is raised. Set to -1 to specify an infinite retry count. # before error is raised. Set to -1 to specify an infinite retry count.
# Defaults to $::os_service_default # Defaults to $facts['os_service_default']
# #
# [*database_connection*] # [*database_connection*]
# Url used to connect to database. # Url used to connect to database.
@ -15,49 +15,49 @@
# #
# [*slave_connection*] # [*slave_connection*]
# (optional) Connection url to connect to aodh slave database (read-only). # (optional) Connection url to connect to aodh slave database (read-only).
# Defaults to $::os_service_default. # Defaults to $facts['os_service_default'].
# #
# [*database_connection_recycle_time*] # [*database_connection_recycle_time*]
# Timeout when db connections should be reaped. # Timeout when db connections should be reaped.
# (Optional) Defaults to $::os_service_default. # (Optional) Defaults to $facts['os_service_default'].
# #
# [*database_max_pool_size*] # [*database_max_pool_size*]
# Maximum number of SQL connections to keep open in a pool. # Maximum number of SQL connections to keep open in a pool.
# (Optional) Defaults to $::os_service_default. # (Optional) Defaults to $facts['os_service_default'].
# #
# [*database_max_retries*] # [*database_max_retries*]
# Maximum number of database connection retries during startup. # Maximum number of database connection retries during startup.
# Setting -1 implies an infinite retry count. # Setting -1 implies an infinite retry count.
# (Optional) Defaults to $::os_service_default. # (Optional) Defaults to $facts['os_service_default'].
# #
# [*database_retry_interval*] # [*database_retry_interval*]
# Interval between retries of opening a database connection. # Interval between retries of opening a database connection.
# (Optional) Defaults to $::os_service_default. # (Optional) Defaults to $facts['os_service_default'].
# #
# [*database_max_overflow*] # [*database_max_overflow*]
# If set, use this value for max_overflow with sqlalchemy. # If set, use this value for max_overflow with sqlalchemy.
# (Optional) Defaults to $::os_service_default. # (Optional) Defaults to $facts['os_service_default'].
# #
# [*database_pool_timeout*] # [*database_pool_timeout*]
# (Optional) If set, use this value for pool_timeout with SQLAlchemy. # (Optional) If set, use this value for pool_timeout with SQLAlchemy.
# Defaults to $::os_service_default # Defaults to $facts['os_service_default']
# #
# [*mysql_enable_ndb*] # [*mysql_enable_ndb*]
# (Optional) If True, transparently enables support for handling MySQL # (Optional) If True, transparently enables support for handling MySQL
# Cluster (NDB). # Cluster (NDB).
# Defaults to $::os_service_default # Defaults to $facts['os_service_default']
# #
class aodh::db ( class aodh::db (
$database_db_max_retries = $::os_service_default, $database_db_max_retries = $facts['os_service_default'],
$database_connection = 'sqlite:////var/lib/aodh/aodh.sqlite', $database_connection = 'sqlite:////var/lib/aodh/aodh.sqlite',
$slave_connection = $::os_service_default, $slave_connection = $facts['os_service_default'],
$database_connection_recycle_time = $::os_service_default, $database_connection_recycle_time = $facts['os_service_default'],
$database_max_pool_size = $::os_service_default, $database_max_pool_size = $facts['os_service_default'],
$database_max_retries = $::os_service_default, $database_max_retries = $facts['os_service_default'],
$database_retry_interval = $::os_service_default, $database_retry_interval = $facts['os_service_default'],
$database_max_overflow = $::os_service_default, $database_max_overflow = $facts['os_service_default'],
$database_pool_timeout = $::os_service_default, $database_pool_timeout = $facts['os_service_default'],
$mysql_enable_ndb = $::os_service_default, $mysql_enable_ndb = $facts['os_service_default'],
) { ) {
include aodh::deps include aodh::deps

View File

@ -15,29 +15,29 @@
# #
# [*workers*] # [*workers*]
# (optional) Number of workers for evaluator service. # (optional) Number of workers for evaluator service.
# Defaults to $::os_workers. # Defaults to $facts['os_workers'].
# #
# [*evaluation_interval*] # [*evaluation_interval*]
# (optional) Period of evaluation cycle # (optional) Period of evaluation cycle
# Defaults to $::os_service_default. # Defaults to $facts['os_service_default'].
# #
# [*event_alarm_cache_ttl*] # [*event_alarm_cache_ttl*]
# (optional) TTL of event alarm caches, in seconds. # (optional) TTL of event alarm caches, in seconds.
# Defaults to $::os_service_default. # Defaults to $facts['os_service_default'].
# #
# [*additional_ingestion_lag*] # [*additional_ingestion_lag*]
# (optional) The number of seconds to extend the evaluation windows to # (optional) The number of seconds to extend the evaluation windows to
# compensate the reporting/ingestion lag. # compensate the reporting/ingestion lag.
# Defaults to $::os_service_default. # Defaults to $facts['os_service_default'].
# #
class aodh::evaluator ( class aodh::evaluator (
$manage_service = true, $manage_service = true,
$enabled = true, $enabled = true,
$package_ensure = 'present', $package_ensure = 'present',
$workers = $::os_workers, $workers = $facts['os_workers'],
$evaluation_interval = $::os_service_default, $evaluation_interval = $facts['os_service_default'],
$event_alarm_cache_ttl = $::os_service_default, $event_alarm_cache_ttl = $facts['os_service_default'],
$additional_ingestion_lag = $::os_service_default, $additional_ingestion_lag = $facts['os_service_default'],
) { ) {
include aodh::deps include aodh::deps

View File

@ -36,7 +36,7 @@
# #
# [*alarm_histories_delete_batch_size*] # [*alarm_histories_delete_batch_size*]
# (optional) Limit number of deleted alarm histories in single purge run # (optional) Limit number of deleted alarm histories in single purge run
# Defaults to $::os_service_default. # Defaults to $facts['os_service_default'].
# #
class aodh::expirer ( class aodh::expirer (
$ensure = 'present', $ensure = 'present',
@ -47,7 +47,7 @@ class aodh::expirer (
$month = '*', $month = '*',
$weekday = '*', $weekday = '*',
$maxdelay = 0, $maxdelay = 0,
$alarm_histories_delete_batch_size = $::os_service_default, $alarm_histories_delete_batch_size = $facts['os_service_default'],
) { ) {
include aodh::params include aodh::params

View File

@ -6,28 +6,28 @@
# #
# [*detailed*] # [*detailed*]
# (Optional) Show more detailed information as part of the response. # (Optional) Show more detailed information as part of the response.
# Defaults to $::os_service_default # Defaults to $facts['os_service_default']
# #
# [*backends*] # [*backends*]
# (Optional) Additional backends that can perform health checks and report # (Optional) Additional backends that can perform health checks and report
# that information back as part of a request. # that information back as part of a request.
# Defaults to $::os_service_default # Defaults to $facts['os_service_default']
# #
# [*disable_by_file_path*] # [*disable_by_file_path*]
# (Optional) Check the presence of a file to determine if an application # (Optional) Check the presence of a file to determine if an application
# is running on a port. # is running on a port.
# Defaults to $::os_service_default # Defaults to $facts['os_service_default']
# #
# [*disable_by_file_paths*] # [*disable_by_file_paths*]
# (Optional) Check the presence of a file to determine if an application # (Optional) Check the presence of a file to determine if an application
# is running on a port. Expects a "port:path" list of strings. # is running on a port. Expects a "port:path" list of strings.
# Defaults to $::os_service_default # Defaults to $facts['os_service_default']
# #
class aodh::healthcheck ( class aodh::healthcheck (
$detailed = $::os_service_default, $detailed = $facts['os_service_default'],
$backends = $::os_service_default, $backends = $facts['os_service_default'],
$disable_by_file_path = $::os_service_default, $disable_by_file_path = $facts['os_service_default'],
$disable_by_file_paths = $::os_service_default, $disable_by_file_paths = $facts['os_service_default'],
) { ) {
include aodh::deps include aodh::deps

View File

@ -11,35 +11,35 @@
# [*alarm_history_time_to_live*] # [*alarm_history_time_to_live*]
# (Optional) Number of seconds that alarm histories are kept in the database for # (Optional) Number of seconds that alarm histories are kept in the database for
# (<= 0 means forever) # (<= 0 means forever)
# Defaults to $::os_service_default # Defaults to $facts['os_service_default']
# #
# [*executor_thread_pool_size*] # [*executor_thread_pool_size*]
# (optional) Size of executor thread pool when executor is threading or eventlet. # (optional) Size of executor thread pool when executor is threading or eventlet.
# Defaults to $::os_service_default. # Defaults to $facts['os_service_default'].
# #
# [*default_transport_url*] # [*default_transport_url*]
# (optional) A URL representing the messaging driver to use and its full # (optional) A URL representing the messaging driver to use and its full
# configuration. Transport URLs take the form: # configuration. Transport URLs take the form:
# transport://user:pass@host1:port[,hostN:portN]/virtual_host # transport://user:pass@host1:port[,hostN:portN]/virtual_host
# Defaults to $::os_service_default # Defaults to $facts['os_service_default']
# #
# [*rpc_response_timeout*] # [*rpc_response_timeout*]
# (Optional) Seconds to wait for a response from a call. # (Optional) Seconds to wait for a response from a call.
# Defaults to $::os_service_default # Defaults to $facts['os_service_default']
# #
# [*control_exchange*] # [*control_exchange*]
# (Optional) The default exchange under which topics are scoped. May be # (Optional) The default exchange under which topics are scoped. May be
# overridden by an exchange name specified in the transport_url # overridden by an exchange name specified in the transport_url
# option. # option.
# Defaults to $::os_service_default # Defaults to $facts['os_service_default']
# #
# [*rabbit_use_ssl*] # [*rabbit_use_ssl*]
# (optional) Connect over SSL for RabbitMQ # (optional) Connect over SSL for RabbitMQ
# Defaults to $::os_service_default # Defaults to $facts['os_service_default']
# #
# [*rabbit_ha_queues*] # [*rabbit_ha_queues*]
# (optional) Use HA queues in RabbitMQ. # (optional) Use HA queues in RabbitMQ.
# Defaults to $::os_service_default # Defaults to $facts['os_service_default']
# #
# [*rabbit_heartbeat_timeout_threshold*] # [*rabbit_heartbeat_timeout_threshold*]
# (optional) Number of seconds after which the RabbitMQ broker is considered # (optional) Number of seconds after which the RabbitMQ broker is considered
@ -47,14 +47,14 @@
# Heartbeating helps to ensure the TCP connection to RabbitMQ isn't silently # Heartbeating helps to ensure the TCP connection to RabbitMQ isn't silently
# closed, resulting in missed or lost messages from the queue. # closed, resulting in missed or lost messages from the queue.
# (Requires kombu >= 3.0.7 and amqp >= 1.4.0) # (Requires kombu >= 3.0.7 and amqp >= 1.4.0)
# Defaults to $::os_service_default # Defaults to $facts['os_service_default']
# #
# [*rabbit_heartbeat_rate*] # [*rabbit_heartbeat_rate*]
# (optional) How often during the rabbit_heartbeat_timeout_threshold period to # (optional) How often during the rabbit_heartbeat_timeout_threshold period to
# check the heartbeat on RabbitMQ connection. (i.e. rabbit_heartbeat_rate=2 # check the heartbeat on RabbitMQ connection. (i.e. rabbit_heartbeat_rate=2
# when rabbit_heartbeat_timeout_threshold=60, the heartbeat will be checked # when rabbit_heartbeat_timeout_threshold=60, the heartbeat will be checked
# every 30 seconds. # every 30 seconds.
# Defaults to $::os_service_default # Defaults to $facts['os_service_default']
# #
# [*rabbit_heartbeat_in_pthread*] # [*rabbit_heartbeat_in_pthread*]
# (Optional) EXPERIMENTAL: Run the health check heartbeat thread # (Optional) EXPERIMENTAL: Run the health check heartbeat thread
@ -64,121 +64,121 @@
# example if the parent process have monkey patched the # example if the parent process have monkey patched the
# stdlib by using eventlet/greenlet then the heartbeat # stdlib by using eventlet/greenlet then the heartbeat
# will be run through a green thread. # will be run through a green thread.
# Defaults to $::os_service_default # Defaults to $facts['os_service_default']
# #
# [*kombu_ssl_ca_certs*] # [*kombu_ssl_ca_certs*]
# (optional) SSL certification authority file (valid only if SSL enabled). # (optional) SSL certification authority file (valid only if SSL enabled).
# Defaults to $::os_service_default # Defaults to $facts['os_service_default']
# #
# [*kombu_ssl_certfile*] # [*kombu_ssl_certfile*]
# (optional) SSL cert file (valid only if SSL enabled). # (optional) SSL cert file (valid only if SSL enabled).
# Defaults to $::os_service_default # Defaults to $facts['os_service_default']
# #
# [*kombu_ssl_keyfile*] # [*kombu_ssl_keyfile*]
# (optional) SSL key file (valid only if SSL enabled). # (optional) SSL key file (valid only if SSL enabled).
# Defaults to $::os_service_default # Defaults to $facts['os_service_default']
# #
# [*kombu_ssl_version*] # [*kombu_ssl_version*]
# (optional) SSL version to use (valid only if SSL enabled). # (optional) SSL version to use (valid only if SSL enabled).
# Valid values are TLSv1, SSLv23 and SSLv3. SSLv2 may be # Valid values are TLSv1, SSLv23 and SSLv3. SSLv2 may be
# available on some distributions. # available on some distributions.
# Defaults to $::os_service_default # Defaults to $facts['os_service_default']
# #
# [*kombu_reconnect_delay*] # [*kombu_reconnect_delay*]
# (optional) How long to wait before reconnecting in response to an AMQP # (optional) How long to wait before reconnecting in response to an AMQP
# consumer cancel notification. # consumer cancel notification.
# Defaults to '$::os_service_default # Defaults to $facts['os_service_default']
# #
# [*kombu_failover_strategy*] # [*kombu_failover_strategy*]
# (Optional) Determines how the next RabbitMQ node is chosen in case the one # (Optional) Determines how the next RabbitMQ node is chosen in case the one
# we are currently connected to becomes unavailable. Takes effect only if # we are currently connected to becomes unavailable. Takes effect only if
# more than one RabbitMQ node is provided in config. (string value) # more than one RabbitMQ node is provided in config. (string value)
# Defaults to $::os_service_default # Defaults to $facts['os_service_default']
# #
# [*kombu_compression*] # [*kombu_compression*]
# (optional) Possible values are: gzip, bz2. If not set compression will not # (optional) Possible values are: gzip, bz2. If not set compression will not
# be used. This option may not be available in future versions. EXPERIMENTAL. # be used. This option may not be available in future versions. EXPERIMENTAL.
# (string value) # (string value)
# Defaults to $::os_service_default # Defaults to $facts['os_service_default']
# #
# [*amqp_durable_queues*] # [*amqp_durable_queues*]
# (optional) Define queues as "durable" to rabbitmq. # (optional) Define queues as "durable" to rabbitmq.
# Defaults to $::os_service_default # Defaults to $facts['os_service_default']
# #
# [*amqp_server_request_prefix*] # [*amqp_server_request_prefix*]
# (Optional) Address prefix used when sending to a specific server # (Optional) Address prefix used when sending to a specific server
# Defaults to $::os_service_default. # Defaults to $facts['os_service_default'].
# #
# [*amqp_broadcast_prefix*] # [*amqp_broadcast_prefix*]
# (Optional) address prefix used when broadcasting to all servers # (Optional) address prefix used when broadcasting to all servers
# Defaults to $::os_service_default. # Defaults to $facts['os_service_default'].
# #
# [*amqp_group_request_prefix*] # [*amqp_group_request_prefix*]
# (Optional) address prefix when sending to any server in group # (Optional) address prefix when sending to any server in group
# Defaults to $::os_service_default. # Defaults to $facts['os_service_default'].
# #
# [*amqp_container_name*] # [*amqp_container_name*]
# (Optional) Name for the AMQP container # (Optional) Name for the AMQP container
# Defaults to $::os_service_default. # Defaults to $facts['os_service_default'].
# #
# [*amqp_idle_timeout*] # [*amqp_idle_timeout*]
# (Optional) Timeout for inactive connections # (Optional) Timeout for inactive connections
# Defaults to $::os_service_default. # Defaults to $facts['os_service_default'].
# #
# [*amqp_trace*] # [*amqp_trace*]
# (Optional) Debug: dump AMQP frames to stdout # (Optional) Debug: dump AMQP frames to stdout
# Defaults to $::os_service_default. # Defaults to $facts['os_service_default'].
# #
# [*amqp_ssl_ca_file*] # [*amqp_ssl_ca_file*]
# (Optional) CA certificate PEM file to verify server certificate # (Optional) CA certificate PEM file to verify server certificate
# Defaults to $::os_service_default. # Defaults to $facts['os_service_default'].
# #
# [*amqp_ssl_cert_file*] # [*amqp_ssl_cert_file*]
# (Optional) Identifying certificate PEM file to present to clients # (Optional) Identifying certificate PEM file to present to clients
# Defaults to $::os_service_default. # Defaults to $facts['os_service_default'].
# #
# [*amqp_ssl_key_file*] # [*amqp_ssl_key_file*]
# (Optional) Private key PEM file used to sign cert_file certificate # (Optional) Private key PEM file used to sign cert_file certificate
# Defaults to $::os_service_default. # Defaults to $facts['os_service_default'].
# #
# [*amqp_ssl_key_password*] # [*amqp_ssl_key_password*]
# (Optional) Password for decrypting ssl_key_file (if encrypted) # (Optional) Password for decrypting ssl_key_file (if encrypted)
# Defaults to $::os_service_default. # Defaults to $facts['os_service_default'].
# #
# [*amqp_sasl_mechanisms*] # [*amqp_sasl_mechanisms*]
# (Optional) Space separated list of acceptable SASL mechanisms # (Optional) Space separated list of acceptable SASL mechanisms
# Defaults to $::os_service_default. # Defaults to $facts['os_service_default'].
# #
# [*amqp_sasl_config_dir*] # [*amqp_sasl_config_dir*]
# (Optional) Path to directory that contains the SASL configuration # (Optional) Path to directory that contains the SASL configuration
# Defaults to $::os_service_default. # Defaults to $facts['os_service_default'].
# #
# [*amqp_sasl_config_name*] # [*amqp_sasl_config_name*]
# (Optional) Name of configuration file (without .conf suffix) # (Optional) Name of configuration file (without .conf suffix)
# Defaults to $::os_service_default. # Defaults to $facts['os_service_default'].
# #
# [*amqp_username*] # [*amqp_username*]
# (Optional) User name for message broker authentication # (Optional) User name for message broker authentication
# Defaults to $::os_service_default. # Defaults to $facts['os_service_default'].
# #
# [*amqp_password*] # [*amqp_password*]
# (Optional) Password for message broker authentication # (Optional) Password for message broker authentication
# Defaults to $::os_service_default. # Defaults to $facts['os_service_default'].
# #
# [*notification_transport_url*] # [*notification_transport_url*]
# (optional) A URL representing the messaging driver to use for notifications # (optional) A URL representing the messaging driver to use for notifications
# and its full configuration. Transport URLs take the form: # and its full configuration. Transport URLs take the form:
# transport://user:pass@host1:port[,hostN:portN]/virtual_host # transport://user:pass@host1:port[,hostN:portN]/virtual_host
# Defaults to $::os_service_default # Defaults to $facts['os_service_default']
# #
# [*notification_driver*] # [*notification_driver*]
# (optional) Driver or drivers to handle sending notifications. # (optional) Driver or drivers to handle sending notifications.
# Value can be a string or a list. # Value can be a string or a list.
# Defaults to $::os_service_default # Defaults to $facts['os_service_default']
# #
# [*notification_topics*] # [*notification_topics*]
# (optional) AMQP topic used for OpenStack notifications # (optional) AMQP topic used for OpenStack notifications
# Defaults to $::os_service_default # Defaults to $facts['os_service_default']
# #
# [*purge_config*] # [*purge_config*]
# (optional) Whether to set only the specified config options # (optional) Whether to set only the specified config options
@ -187,42 +187,42 @@
# #
class aodh ( class aodh (
$package_ensure = 'present', $package_ensure = 'present',
$alarm_history_time_to_live = $::os_service_default, $alarm_history_time_to_live = $facts['os_service_default'],
$executor_thread_pool_size = $::os_service_default, $executor_thread_pool_size = $facts['os_service_default'],
$default_transport_url = $::os_service_default, $default_transport_url = $facts['os_service_default'],
$rpc_response_timeout = $::os_service_default, $rpc_response_timeout = $facts['os_service_default'],
$control_exchange = $::os_service_default, $control_exchange = $facts['os_service_default'],
$rabbit_use_ssl = $::os_service_default, $rabbit_use_ssl = $facts['os_service_default'],
$rabbit_heartbeat_timeout_threshold = $::os_service_default, $rabbit_heartbeat_timeout_threshold = $facts['os_service_default'],
$rabbit_heartbeat_rate = $::os_service_default, $rabbit_heartbeat_rate = $facts['os_service_default'],
$rabbit_heartbeat_in_pthread = $::os_service_default, $rabbit_heartbeat_in_pthread = $facts['os_service_default'],
$rabbit_ha_queues = $::os_service_default, $rabbit_ha_queues = $facts['os_service_default'],
$kombu_ssl_ca_certs = $::os_service_default, $kombu_ssl_ca_certs = $facts['os_service_default'],
$kombu_ssl_certfile = $::os_service_default, $kombu_ssl_certfile = $facts['os_service_default'],
$kombu_ssl_keyfile = $::os_service_default, $kombu_ssl_keyfile = $facts['os_service_default'],
$kombu_ssl_version = $::os_service_default, $kombu_ssl_version = $facts['os_service_default'],
$kombu_reconnect_delay = $::os_service_default, $kombu_reconnect_delay = $facts['os_service_default'],
$kombu_failover_strategy = $::os_service_default, $kombu_failover_strategy = $facts['os_service_default'],
$kombu_compression = $::os_service_default, $kombu_compression = $facts['os_service_default'],
$amqp_durable_queues = $::os_service_default, $amqp_durable_queues = $facts['os_service_default'],
$amqp_server_request_prefix = $::os_service_default, $amqp_server_request_prefix = $facts['os_service_default'],
$amqp_broadcast_prefix = $::os_service_default, $amqp_broadcast_prefix = $facts['os_service_default'],
$amqp_group_request_prefix = $::os_service_default, $amqp_group_request_prefix = $facts['os_service_default'],
$amqp_container_name = $::os_service_default, $amqp_container_name = $facts['os_service_default'],
$amqp_idle_timeout = $::os_service_default, $amqp_idle_timeout = $facts['os_service_default'],
$amqp_trace = $::os_service_default, $amqp_trace = $facts['os_service_default'],
$amqp_ssl_ca_file = $::os_service_default, $amqp_ssl_ca_file = $facts['os_service_default'],
$amqp_ssl_cert_file = $::os_service_default, $amqp_ssl_cert_file = $facts['os_service_default'],
$amqp_ssl_key_file = $::os_service_default, $amqp_ssl_key_file = $facts['os_service_default'],
$amqp_ssl_key_password = $::os_service_default, $amqp_ssl_key_password = $facts['os_service_default'],
$amqp_sasl_mechanisms = $::os_service_default, $amqp_sasl_mechanisms = $facts['os_service_default'],
$amqp_sasl_config_dir = $::os_service_default, $amqp_sasl_config_dir = $facts['os_service_default'],
$amqp_sasl_config_name = $::os_service_default, $amqp_sasl_config_name = $facts['os_service_default'],
$amqp_username = $::os_service_default, $amqp_username = $facts['os_service_default'],
$amqp_password = $::os_service_default, $amqp_password = $facts['os_service_default'],
$notification_transport_url = $::os_service_default, $notification_transport_url = $facts['os_service_default'],
$notification_driver = $::os_service_default, $notification_driver = $facts['os_service_default'],
$notification_topics = $::os_service_default, $notification_topics = $facts['os_service_default'],
$purge_config = false, $purge_config = false,
) inherits aodh::params { ) inherits aodh::params {

View File

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

View File

@ -15,29 +15,29 @@
# #
# [*workers*] # [*workers*]
# (optional) Number of workers for evaluator service. # (optional) Number of workers for evaluator service.
# Defaults to $::os_workers. # Defaults to $facts['os_workers'].
# #
# [*event_alarm_topic*] # [*event_alarm_topic*]
# (optional) The topic that aodh uses for event alarm evaluation. # (optional) The topic that aodh uses for event alarm evaluation.
# Defaults to $::os_service_default. # Defaults to $facts['os_service_default'].
# #
# [*batch_size*] # [*batch_size*]
# (optional) Number of notification messages to wait before dispatching them. # (optional) Number of notification messages to wait before dispatching them.
# Defaults to $::os_service_default. # Defaults to $facts['os_service_default'].
# #
# [*batch_timeout*] # [*batch_timeout*]
# (optional) Number of seconds to wait before dispatching samples when # (optional) Number of seconds to wait before dispatching samples when
# batch_size is not reached. # batch_size is not reached.
# Defaults to $::os_service_default. # Defaults to $facts['os_service_default'].
# #
class aodh::listener ( class aodh::listener (
$manage_service = true, $manage_service = true,
$enabled = true, $enabled = true,
$package_ensure = 'present', $package_ensure = 'present',
$workers = $::os_workers, $workers = $facts['os_workers'],
$event_alarm_topic = $::os_service_default, $event_alarm_topic = $facts['os_service_default'],
$batch_size = $::os_service_default, $batch_size = $facts['os_service_default'],
$batch_timeout = $::os_service_default, $batch_timeout = $facts['os_service_default'],
) { ) {
include aodh::deps include aodh::deps

View File

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

View File

@ -15,25 +15,25 @@
# #
# [*workers*] # [*workers*]
# (optional) Number of workers for notifier service. # (optional) Number of workers for notifier service.
# Defaults to $::os_workers. # Defaults to $facts['os_workers'].
# #
# [*batch_size*] # [*batch_size*]
# (optional) Number of notification messages to wait before dispatching # (optional) Number of notification messages to wait before dispatching
# them. # them.
# Defaults to $::os_service_default. # Defaults to $facts['os_service_default'].
# #
# [*batch_timeout*] # [*batch_timeout*]
# (optional) Number of seconds to wait before dispatching samples when # (optional) Number of seconds to wait before dispatching samples when
# batch_size is not reached. # batch_size is not reached.
# Defaults to $::os_service_default # Defaults to $facts['os_service_default']
# #
class aodh::notifier ( class aodh::notifier (
$manage_service = true, $manage_service = true,
$enabled = true, $enabled = true,
$package_ensure = 'present', $package_ensure = 'present',
$workers = $::os_workers, $workers = $facts['os_workers'],
$batch_size = $::os_service_default, $batch_size = $facts['os_service_default'],
$batch_timeout = $::os_service_default, $batch_timeout = $facts['os_service_default'],
) { ) {
include aodh::deps include aodh::deps

View File

@ -8,7 +8,7 @@ class aodh::params {
$group = 'aodh' $group = 'aodh'
$expirer_command = 'aodh-expirer' $expirer_command = 'aodh-expirer'
case $::osfamily { case $facts['os']['family'] {
'RedHat': { 'RedHat': {
$common_package_name = 'openstack-aodh-common' $common_package_name = 'openstack-aodh-common'
$api_package_name = 'openstack-aodh-api' $api_package_name = 'openstack-aodh-api'
@ -27,7 +27,7 @@ class aodh::params {
'Debian': { 'Debian': {
$common_package_name = 'aodh-common' $common_package_name = 'aodh-common'
$api_package_name = 'aodh-api' $api_package_name = 'aodh-api'
case $::operatingsystem { case $facts['os']['name'] {
'Ubuntu': { 'Ubuntu': {
$api_service_name = 'httpd' $api_service_name = 'httpd'
} }
@ -47,9 +47,8 @@ class aodh::params {
$aodh_wsgi_script_source = '/usr/bin/aodh-api' $aodh_wsgi_script_source = '/usr/bin/aodh-api'
} }
default: { default: {
fail("Unsupported osfamily: ${::osfamily} operatingsystem: ${::operatingsystem}, \ fail("Unsupported osfamily: ${facts['os']['family']}")
module ${module_name} only support osfamily RedHat and Debian")
} }
} # Case $::osfamily }
} }

View File

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

View File

@ -4,20 +4,20 @@
# #
# [*user_alarm_quota*] # [*user_alarm_quota*]
# (optional) Maximum number of alarms defined for a user. # (optional) Maximum number of alarms defined for a user.
# Defaults to $:os_service_default. # Defaults to $facts['os_service_default'].
# #
# [*project_alarm_quota*] # [*project_alarm_quota*]
# (optional) Maximum number of alarms defined for a project. # (optional) Maximum number of alarms defined for a project.
# Defaults to $:os_service_default. # Defaults to $facts['os_service_default'].
# #
# [*alarm_max_actions*] # [*alarm_max_actions*]
# (optional) Maximum count of actions for each state of an alarm. # (optional) Maximum count of actions for each state of an alarm.
# Defaults to $:os_service_default. # Defaults to $facts['os_service_default'].
# #
class aodh::quota ( class aodh::quota (
$user_alarm_quota = $::os_service_default, $user_alarm_quota = $facts['os_service_default'],
$project_alarm_quota = $::os_service_default, $project_alarm_quota = $facts['os_service_default'],
$alarm_max_actions = $::os_service_default, $alarm_max_actions = $facts['os_service_default'],
) { ) {
include aodh::deps include aodh::deps

View File

@ -32,7 +32,7 @@
# #
# [*system_scope*] # [*system_scope*]
# (Optional) Scope for system operations. # (Optional) Scope for system operations.
# Defaults to $::os_service_default # Defaults to $facts['os_service_default']
# #
# [*auth_type*] # [*auth_type*]
# (Optional) An authentication type to use with an OpenStack Identity server. # (Optional) An authentication type to use with an OpenStack Identity server.
@ -41,12 +41,12 @@
# #
# [*cacert*] # [*cacert*]
# (Optional) Certificate chain for SSL validation. # (Optional) Certificate chain for SSL validation.
# Defaults to $::os_service_default # Defaults to $facts['os_service_default']
# #
# [*interface*] # [*interface*]
# (Optional) Type of endpoint in Identity service catalog to use for # (Optional) Type of endpoint in Identity service catalog to use for
# communication with OpenStack services. # communication with OpenStack services.
# Optional. Defaults to $::os_service_default. # Optional. Defaults to $facts['os_service_default'].
# #
class aodh::service_credentials ( class aodh::service_credentials (
$password, $password,
@ -56,10 +56,10 @@ class aodh::service_credentials (
$project_name = 'services', $project_name = 'services',
$project_domain_name = 'Default', $project_domain_name = 'Default',
$user_domain_name = 'Default', $user_domain_name = 'Default',
$system_scope = $::os_service_default, $system_scope = $facts['os_service_default'],
$auth_type = 'password', $auth_type = 'password',
$cacert = $::os_service_default, $cacert = $facts['os_service_default'],
$interface = $::os_service_default, $interface = $facts['os_service_default'],
) { ) {
include aodh::deps include aodh::deps
@ -68,8 +68,8 @@ class aodh::service_credentials (
$project_name_real = $project_name $project_name_real = $project_name
$project_domain_name_real = $project_domain_name $project_domain_name_real = $project_domain_name
} else { } else {
$project_name_real = $::os_service_default $project_name_real = $facts['os_service_default']
$project_domain_name_real = $::os_service_default $project_domain_name_real = $facts['os_service_default']
} }
aodh_config { aodh_config {

View File

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

View File

@ -11,7 +11,7 @@
# #
# [*processes*] # [*processes*]
# (Optional) Number of processes. # (Optional) Number of processes.
# Defaults to $::os_workers. # Defaults to $facts['os_workers'].
# #
# [*threads*] # [*threads*]
# (Optional) Number of threads. # (Optional) Number of threads.
@ -22,14 +22,14 @@
# Defaults to 100 # Defaults to 100
# #
class aodh::wsgi::uwsgi ( class aodh::wsgi::uwsgi (
$processes = $::os_workers, $processes = $facts['os_workers'],
$threads = 32, $threads = 32,
$listen_queue_size = 100, $listen_queue_size = 100,
){ ){
include aodh::deps include aodh::deps
if $::operatingsystem != 'Debian' { if $facts['os']['name'] != 'Debian' {
warning('This class is only valid for Debian, as other operating systems are not using uwsgi by default.') warning('This class is only valid for Debian, as other operating systems are not using uwsgi by default.')
} }

View File

@ -191,16 +191,13 @@ describe 'aodh::api' do
}).each do |os,facts| }).each do |os,facts|
context "on #{os}" do context "on #{os}" do
let (:facts) do let (:facts) do
facts.merge!(OSDefaults.get_facts({ facts.merge!(OSDefaults.get_facts())
:fqdn => 'some.host.tld',
:concat_basedir => '/var/lib/puppet/concat'
}))
end end
let(:platform_params) do let(:platform_params) do
case facts[:osfamily] case facts[:os]['family']
when 'Debian' when 'Debian'
if facts[:operatingsystem] == 'Ubuntu' if facts[:os]['name'] == 'Ubuntu'
{ :api_package_name => 'aodh-api', { :api_package_name => 'aodh-api',
:api_service_name => 'httpd' } :api_service_name => 'httpd' }
else else
@ -213,7 +210,7 @@ describe 'aodh::api' do
end end
end end
if facts[:osfamily] == 'Debian' and facts[:operatingsystem] != 'Ubuntu' if facts[:os]['family'] == 'Debian' and facts[:os]['name'] != 'Ubuntu'
it_behaves_like 'aodh-api with standalone service' it_behaves_like 'aodh-api with standalone service'
else else
it_behaves_like 'aodh-api without standalone service' it_behaves_like 'aodh-api without standalone service'

View File

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

View File

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

View File

@ -110,7 +110,7 @@ describe 'aodh::evaluator' do
end end
let(:platform_params) do let(:platform_params) do
case facts[:osfamily] case facts[:os]['family']
when 'Debian' when 'Debian'
{ :evaluator_package_name => 'aodh-evaluator', { :evaluator_package_name => 'aodh-evaluator',
:evaluator_service_name => 'aodh-evaluator' } :evaluator_service_name => 'aodh-evaluator' }

View File

@ -79,7 +79,7 @@ describe 'aodh::expirer' do
end end
let(:platform_params) do let(:platform_params) do
case facts[:osfamily] case facts[:os]['family']
when 'Debian' when 'Debian'
{ :expirer_package_name => 'aodh-expirer' } { :expirer_package_name => 'aodh-expirer' }
when 'RedHat' when 'RedHat'

View File

@ -164,7 +164,7 @@ describe 'aodh' do
end end
let(:platform_params) do let(:platform_params) do
case facts[:osfamily] case facts[:os]['family']
when 'Debian' when 'Debian'
{ :aodh_common_package => 'aodh-common' } { :aodh_common_package => 'aodh-common' }
when 'RedHat' when 'RedHat'

View File

@ -96,7 +96,7 @@ describe 'aodh::listener' do
end end
let(:platform_params) do let(:platform_params) do
case facts[:osfamily] case facts[:os]['family']
when 'Debian' when 'Debian'
{ :listener_package_name => 'aodh-listener', { :listener_package_name => 'aodh-listener',
:listener_service_name => 'aodh-listener' } :listener_service_name => 'aodh-listener' }

View File

@ -101,7 +101,7 @@ describe 'aodh::notifier' do
end end
let(:platform_params) do let(:platform_params) do
case facts[:osfamily] case facts[:os]['family']
when 'Debian' when 'Debian'
{ :notifier_package_name => 'aodh-notifier', { :notifier_package_name => 'aodh-notifier',
:notifier_service_name => 'aodh-notifier' } :notifier_service_name => 'aodh-notifier' }

View File

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