Replace legacy facts and use fact hash

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

Change-Id: Iffdf359f0db141d80168e7bbaa0b10af31ae0ac6
This commit is contained in:
Takashi Kajinami 2023-03-01 14:58:01 +09:00
parent 31cead15d3
commit 331b15d107
14 changed files with 233 additions and 237 deletions

View File

@ -34,30 +34,30 @@
#
# [*ack_on_event_error*]
# (Optional) Acknowledge message when event persistence fails.
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
#
# [*disable_non_metric_meters*]
# (Optional) Disable or enable the collection of non-metric meters.
# Default to $::os_service_default.
# Default to $facts['os_service_default'].
#
# [*workers*]
# (Optional) Number of workers for notification service (integer value).
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
#
# [*messaging_urls*]
# (Optional) Messaging urls to listen for notifications. (Array of urls)
# The format should be transport://user:pass@host1:port[,hostN:portN]/virtual_host
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
#
# [*batch_size*]
# (Optional) Number of notification messages to wait before publishing
# them.
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
#
# [*batch_timeout*]
# (Optional) Number of seconds to wait before dispatching samples when
# batch_size is not reached.
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
#
# [*package_ensure*]
# (Optional) ensure state for package.
@ -96,12 +96,12 @@
class ceilometer::agent::notification (
$manage_service = true,
$enabled = true,
$ack_on_event_error = $::os_service_default,
$disable_non_metric_meters = $::os_service_default,
$workers = $::os_service_default,
$messaging_urls = $::os_service_default,
$batch_size = $::os_service_default,
$batch_timeout = $::os_service_default,
$ack_on_event_error = $facts['os_service_default'],
$disable_non_metric_meters = $facts['os_service_default'],
$workers = $facts['os_service_default'],
$messaging_urls = $facts['os_service_default'],
$batch_size = $facts['os_service_default'],
$batch_timeout = $facts['os_service_default'],
$package_ensure = 'present',
$manage_event_pipeline = false,
$event_pipeline_publishers = ['gnocchi://'],

View File

@ -40,7 +40,7 @@
#
# [*instance_discovery_method*]
# (Optional) method to discovery instances running on compute node
# Defaults to $::os_service_default
# Defaults to $facts['os_service_default']
# * naive: poll nova to get all instances
# * workload_partitioning: poll nova to get instances of the compute
# * libvirt_metadata: get instances from libvirt metadata
@ -49,11 +49,11 @@
# [*resource_update_interval*]
# (Optional) New instances will be discovered periodically based on this
# option (in seconds).
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
#
# [*resource_cache_expiry*]
# (Optional) The expiry to totally refresh the instances resource cache.
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
#
# [*manage_polling*]
# (Optional) Whether to manage polling.yaml
@ -75,11 +75,11 @@
#
# [*batch_size*]
# (Optional) Batch size of samples to send to notification agent.
# Defaults to $::os_service_default
# Defaults to $facts['os_service_default']
#
# [*tenant_name_discovery*]
# (optional) Identify user and project names from polled metrics.
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
#
class ceilometer::agent::polling (
$manage_service = true,
@ -90,15 +90,15 @@ class ceilometer::agent::polling (
$central_namespace = true,
$compute_namespace = true,
$ipmi_namespace = true,
$instance_discovery_method = $::os_service_default,
$resource_update_interval = $::os_service_default,
$resource_cache_expiry = $::os_service_default,
$instance_discovery_method = $facts['os_service_default'],
$resource_update_interval = $facts['os_service_default'],
$resource_cache_expiry = $facts['os_service_default'],
$manage_polling = false,
$polling_interval = 600,
$polling_meters = $::ceilometer::params::polling_meters,
$polling_config = undef,
$batch_size = $::os_service_default,
$tenant_name_discovery = $::os_service_default,
$batch_size = $facts['os_service_default'],
$tenant_name_discovery = $facts['os_service_default'],
) inherits ceilometer {
include ceilometer::deps

View File

@ -6,20 +6,20 @@
#
# [*access_key*]
# (Optional) Access key for Radosgw Admin.
# Defaults to $::os_service_default
# Defaults to $facts['os_service_default']
#
# [*secret_key*]
# (Optional) Secret key for Radosgw Admin.
# Defaults to $::os_service_default
# Defaults to $facts['os_service_default']
#
# [*implicit_tenants*]
# (Optional) Whether RGW uses implicit tenants or not.
# Defaults to $::os_service_default
# Defaults to $facts['os_service_default']
#
class ceilometer::agent::polling::rgw (
$access_key = $::os_service_default,
$secret_key = $::os_service_default,
$implicit_tenants = $::os_service_default,
$access_key = $facts['os_service_default'],
$secret_key = $facts['os_service_default'],
$implicit_tenants = $facts['os_service_default'],
) {
include ceilometer::deps

View File

@ -6,35 +6,35 @@
#
# [*glance*]
# (Optional) glance service type.
# Defaults to $::os_service_default
# Defaults to $facts['os_service_default']
#
# [*neutron*]
# (Optional) neutron service type.
# Defaults to $::os_service_default
# Defaults to $facts['os_service_default']
#
# [*nova*]
# (Optional) nova service type.
# Defaults to $::os_service_default
# Defaults to $facts['os_service_default']
#
# [*swift*]
# (Optional) swift service type.
# Defaults to $::os_service_default
# Defaults to $facts['os_service_default']
#
# [*cinder*]
# (Optional) cinder service type.
# Defaults to $::os_service_default
# Defaults to $facts['os_service_default']
#
# [*radosgw*]
# (Optional) Radosgw service type.
# Defaults to $::os_service_default
# Defaults to $facts['os_service_default']
#
class ceilometer::agent::polling::service_types (
$glance = $::os_service_default,
$neutron = $::os_service_default,
$nova = $::os_service_default,
$swift = $::os_service_default,
$cinder = $::os_service_default,
$radosgw = $::os_service_default,
$glance = $facts['os_service_default'],
$neutron = $facts['os_service_default'],
$nova = $facts['os_service_default'],
$swift = $facts['os_service_default'],
$cinder = $facts['os_service_default'],
$radosgw = $facts['os_service_default'],
) {
include ceilometer::deps

View File

@ -14,7 +14,7 @@
#
# [*region_name*]
# (Optional) the keystone region of this node
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
#
# [*username*]
# (Optional) the keystone user for ceilometer services
@ -26,16 +26,16 @@
#
# [*system_scope*]
# (Optional) Scope for system operations.
# Defaults to $::os_service_default
# Defaults to $facts['os_service_default']
#
# [*cafile*]
# (Optional) Certificate chain for SSL validation.
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
#
# [*interface*]
# (Optional) Type of endpoint in Identity service catalog to use for
# communication with OpenStack services.
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
#
# [*user_domain_name*]
# (Optional) domain name for auth user.
@ -52,12 +52,12 @@
class ceilometer::agent::service_credentials (
$password,
$auth_url = 'http://localhost:5000',
$region_name = $::os_service_default,
$region_name = $facts['os_service_default'],
$username = 'ceilometer',
$project_name = 'services',
$system_scope = $::os_service_default,
$cafile = $::os_service_default,
$interface = $::os_service_default,
$system_scope = $facts['os_service_default'],
$cafile = $facts['os_service_default'],
$interface = $facts['os_service_default'],
$user_domain_name = 'Default',
$project_domain_name = 'Default',
$auth_type = 'password',
@ -69,8 +69,8 @@ class ceilometer::agent::service_credentials (
$project_name_real = $project_name
$project_domain_name_real = $project_domain_name
} else {
$project_name_real = $::os_service_default
$project_domain_name_real = $::os_service_default
$project_name_real = $facts['os_service_default']
$project_domain_name_real = $facts['os_service_default']
}
ceilometer_config {

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 communicating 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,83 +124,83 @@
# 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. Otherwise 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']
#
# [*enable_retry_client*]
# (Optional) Enable retry client mechanisms to handle failure.
# Those mechanisms can be used to wrap all kind of pymemcache
# clients. The wrapper allows you to define how many attempts
# to make and how long to wait between attempts.
# Default to $::os_service_default
# Default to $facts['os_service_default']
#
# [*retry_attempts*]
# (Optional) Number of times to attempt an action before failing.
# Default to $::os_service_default
# Default to $facts['os_service_default']
#
# [*retry_delay*]
# (Optional) Number of seconds to sleep between each attempt.
# Default to $::os_service_default
# Default to $facts['os_service_default']
#
# [*hashclient_retry_attempts*]
# (Optional) Amount of times a client should be tried
# before it is marked dead and removed from the pool in
# the HashClient's internal mechanisms.
# Default to $::os_service_default
# Default to $facts['os_service_default']
#
# [*hashclient_retry_delay*]
# (Optional) Time in seconds that should pass between
# retry attempts in the HashClient's internal mechanisms.
# Default to $::os_service_default
# Default to $facts['os_service_default']
#
# [*dead_timeout*]
# (Optional) Time in seconds before attempting to add a node
# back in the pool in the HashClient's internal mechanisms.
# Default to $::os_service_default
# Default to $facts['os_service_default']
#
class ceilometer::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,
$enable_retry_client = $::os_service_default,
$retry_attempts = $::os_service_default,
$retry_delay = $::os_service_default,
$hashclient_retry_attempts = $::os_service_default,
$hashclient_retry_delay = $::os_service_default,
$dead_timeout = $::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'],
$enable_retry_client = $facts['os_service_default'],
$retry_attempts = $facts['os_service_default'],
$retry_delay = $facts['os_service_default'],
$hashclient_retry_attempts = $facts['os_service_default'],
$hashclient_retry_delay = $facts['os_service_default'],
$dead_timeout = $facts['os_service_default'],
) {
include ceilometer::deps

View File

@ -6,10 +6,10 @@
#
# [*backend_url*]
# (Optional) Coordination backend URL.
# Defaults to $::os_service_default
# Defaults to $facts['os_service_default']
#
class ceilometer::coordination (
$backend_url = $::os_service_default,
$backend_url = $facts['os_service_default'],
) {
include ceilometer::deps

View File

@ -7,12 +7,12 @@
#
# [*http_timeout*]
# (Optional) Timeout seconds for HTTP requests.
# Defaults to $::os_service_default
# Defaults to $facts['os_service_default']
#
# [*max_parallel_requests*]
# (Optional) Maximum number of parallel requests for services to handle at
# the same time.
# Defaults to $::os_service_default
# Defaults to $facts['os_service_default']
#
# [*telemetry_secret*]
# (Required) Secret key for signing messages.
@ -24,7 +24,7 @@
# [*notification_driver*]
# (optional) Driver or drivers to handle sending notifications.
# Value can be a string or a list.
# Defaults to $::os_service_default
# Defaults to $facts['os_service_default']
#
# [*package_ensure*]
# (Optional) ensure state for package.
@ -32,45 +32,45 @@
#
# [*executor_thread_pool_size*]
# (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*]
# (optional) A URL representing the messaging driver to use and its full
# configuration. Transport URLs take the form:
# transport://user:pass@host1:port[,hostN:portN]/virtual_host
# Defaults to $::os_service_default
# Defaults to $facts['os_service_default']
#
# [*rpc_response_timeout*]
# (Optional) Seconds to wait for a response from a call.
# Defaults to $::os_service_default
# Defaults to $facts['os_service_default']
#
# [*control_exchange*]
# (Optional) The default exchange under which topics are scoped. May be
# overridden by an exchange name specified in the transport_url
# option.
# Defaults to $::os_service_default
# Defaults to $facts['os_service_default']
#
# [*notification_transport_url*]
# (optional) A URL representing the messaging driver to use for notifications
# and its full configuration. Transport URLs take the form:
# transport://user:pass@host1:port[,hostN:portN]/virtual_host
# Defaults to $::os_service_default
# Defaults to $facts['os_service_default']
#
# [*rabbit_ha_queues*]
# (Optional) Use HA queues in RabbitMQ (x-ha-policy: all). If you change this
# option, you must wipe the RabbitMQ database. (boolean value)
# Defaults to $::os_service_default
# Defaults to $facts['os_service_default']
#
# [*rabbit_heartbeat_timeout_threshold*]
# (Optional) Number of seconds after which the Rabbit broker is
# considered down if heartbeat's keep-alive fails
# (0 disable the heartbeat). EXPERIMENTAL. (integer value)
# Defaults to $::os_service_default
# Defaults to $facts['os_service_default']
#
# [*rabbit_heartbeat_rate*]
# (Optional) How often times during the heartbeat_timeout_threshold
# we check the heartbeat. (integer value)
# Defaults to $::os_service_default
# Defaults to $facts['os_service_default']
#
# [*rabbit_heartbeat_in_pthread*]
# (Optional) EXPERIMENTAL: Run the health check heartbeat thread
@ -80,123 +80,123 @@
# example if the parent process have monkey patched the
# stdlib by using eventlet/greenlet then the heartbeat
# will be run through a green thread.
# Defaults to $::os_service_default
# Defaults to $facts['os_service_default']
#
# [*rabbit_qos_prefetch_count*]
# (Optional) Specifies the number of messages to prefetch.
# Defaults to $::os_service_default
# Defaults to $facts['os_service_default']
#
# [*rabbit_use_ssl*]
# (Optional) Connect over SSL for RabbitMQ. (boolean value)
# Defaults to $::os_service_default
# Defaults to $facts['os_service_default']
#
# [*amqp_durable_queues*]
# (optional) Define queues as "durable" to rabbitmq.
# Defaults to $::os_service_default
# Defaults to $facts['os_service_default']
#
# [*kombu_ssl_ca_certs*]
# (Optional) SSL certification authority file (valid only if SSL enabled).
# (string value)
# Defaults to $::os_service_default
# Defaults to $facts['os_service_default']
#
# [*kombu_ssl_certfile*]
# (Optional) SSL cert file (valid only if SSL enabled). (string value)
# Defaults to $::os_service_default
# Defaults to $facts['os_service_default']
#
# [*kombu_ssl_keyfile*]
# (Optional) SSL key file (valid only if SSL enabled). (string value)
# Defaults to $::os_service_default
# Defaults to $facts['os_service_default']
#
# [*kombu_ssl_version*]
# (Optional) SSL version to use (valid only if SSL enabled). '
# Valid values are TLSv1 and SSLv23. SSLv2, SSLv3, TLSv1_1,
# and TLSv1_2 may be available on some distributions. (string value)
# Defaults to $::os_service_default
# Defaults to $facts['os_service_default']
#
# [*kombu_reconnect_delay*]
# (Optional) How long to wait before reconnecting in response
# to an AMQP consumer cancel notification. (floating point value)
# Defaults to $::os_service_default
# Defaults to $facts['os_service_default']
#
# [*kombu_failover_strategy*]
# (Optional) Determines how the next RabbitMQ node is chosen in case the one
# we are currently connected to becomes unavailable. Takes effect only if
# more than one RabbitMQ node is provided in config. (string value)
# Defaults to $::os_service_default
# Defaults to $facts['os_service_default']
#
# [*kombu_compression*]
# (optional) Possible values are: gzip, bz2. If not set compression will not
# be used. This option may notbe available in future versions. EXPERIMENTAL.
# (string value)
# Defaults to $::os_service_default
# Defaults to $facts['os_service_default']
#
# [*amqp_server_request_prefix*]
# (Optional) Address prefix used when sending to a specific server
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
#
# [*amqp_broadcast_prefix*]
# (Optional) address prefix used when broadcasting to all servers
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
#
# [*amqp_group_request_prefix*]
# (Optional) address prefix when sending to any server in group
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
#
# [*amqp_container_name*]
# (Optional) Name for the AMQP container
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
#
# [*amqp_idle_timeout*]
# (Optional) Timeout for inactive connections
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
#
# [*amqp_trace*]
# (Optional) Debug: dump AMQP frames to stdout
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
#
# [*amqp_rpc_address_prefix*]
# (Optional) Address prefix for Ceilometer generated RPC addresses
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
#
# [*amqp_notify_address_prefix*]
# (Optional) Address prefix for Ceilometer generated Notification addresses
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
#
# [*amqp_ssl_ca_file*]
# (Optional) CA certificate PEM file to verify server certificate
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
#
# [*amqp_ssl_cert_file*]
# (Optional) Identifying certificate PEM file to present to clients
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
#
# [*amqp_ssl_key_file*]
# (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*]
# (Optional) Password for decrypting ssl_key_file (if encrypted)
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
#
# [*amqp_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*]
# (Optional) Path to directory that contains the SASL configuration
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
#
# [*amqp_sasl_config_name*]
# (Optional) Name of configuration file (without .conf suffix)
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
#
# [*amqp_username*]
# (Optional) User name for message broker authentication
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
#
# [*amqp_password*]
# (Optional) Password for message broker authentication
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
#
# [*purge_config*]
# (optional) Whether to set only the specified config options
@ -206,53 +206,53 @@
# [*host*]
# (Optional) Name of this node. This is typically a hostname, FQDN, or
# IP address.
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
#
class ceilometer(
$http_timeout = $::os_service_default,
$max_parallel_requests = $::os_service_default,
$http_timeout = $facts['os_service_default'],
$max_parallel_requests = $facts['os_service_default'],
$telemetry_secret = false,
$notification_topics = ['notifications'],
$notification_driver = $::os_service_default,
$notification_driver = $facts['os_service_default'],
$package_ensure = 'present',
$executor_thread_pool_size = $::os_service_default,
$default_transport_url = $::os_service_default,
$rpc_response_timeout = $::os_service_default,
$control_exchange = $::os_service_default,
$notification_transport_url = $::os_service_default,
$rabbit_ha_queues = $::os_service_default,
$rabbit_heartbeat_timeout_threshold = $::os_service_default,
$rabbit_heartbeat_rate = $::os_service_default,
$rabbit_heartbeat_in_pthread = $::os_service_default,
$rabbit_qos_prefetch_count = $::os_service_default,
$amqp_durable_queues = $::os_service_default,
$rabbit_use_ssl = $::os_service_default,
$kombu_ssl_ca_certs = $::os_service_default,
$kombu_ssl_certfile = $::os_service_default,
$kombu_ssl_keyfile = $::os_service_default,
$kombu_ssl_version = $::os_service_default,
$kombu_reconnect_delay = $::os_service_default,
$kombu_failover_strategy = $::os_service_default,
$kombu_compression = $::os_service_default,
$amqp_server_request_prefix = $::os_service_default,
$amqp_broadcast_prefix = $::os_service_default,
$amqp_group_request_prefix = $::os_service_default,
$amqp_container_name = $::os_service_default,
$amqp_idle_timeout = $::os_service_default,
$amqp_trace = $::os_service_default,
$amqp_rpc_address_prefix = $::os_service_default,
$amqp_notify_address_prefix = $::os_service_default,
$amqp_ssl_ca_file = $::os_service_default,
$amqp_ssl_cert_file = $::os_service_default,
$amqp_ssl_key_file = $::os_service_default,
$amqp_ssl_key_password = $::os_service_default,
$amqp_sasl_mechanisms = $::os_service_default,
$amqp_sasl_config_dir = $::os_service_default,
$amqp_sasl_config_name = $::os_service_default,
$amqp_username = $::os_service_default,
$amqp_password = $::os_service_default,
$executor_thread_pool_size = $facts['os_service_default'],
$default_transport_url = $facts['os_service_default'],
$rpc_response_timeout = $facts['os_service_default'],
$control_exchange = $facts['os_service_default'],
$notification_transport_url = $facts['os_service_default'],
$rabbit_ha_queues = $facts['os_service_default'],
$rabbit_heartbeat_timeout_threshold = $facts['os_service_default'],
$rabbit_heartbeat_rate = $facts['os_service_default'],
$rabbit_heartbeat_in_pthread = $facts['os_service_default'],
$rabbit_qos_prefetch_count = $facts['os_service_default'],
$amqp_durable_queues = $facts['os_service_default'],
$rabbit_use_ssl = $facts['os_service_default'],
$kombu_ssl_ca_certs = $facts['os_service_default'],
$kombu_ssl_certfile = $facts['os_service_default'],
$kombu_ssl_keyfile = $facts['os_service_default'],
$kombu_ssl_version = $facts['os_service_default'],
$kombu_reconnect_delay = $facts['os_service_default'],
$kombu_failover_strategy = $facts['os_service_default'],
$kombu_compression = $facts['os_service_default'],
$amqp_server_request_prefix = $facts['os_service_default'],
$amqp_broadcast_prefix = $facts['os_service_default'],
$amqp_group_request_prefix = $facts['os_service_default'],
$amqp_container_name = $facts['os_service_default'],
$amqp_idle_timeout = $facts['os_service_default'],
$amqp_trace = $facts['os_service_default'],
$amqp_rpc_address_prefix = $facts['os_service_default'],
$amqp_notify_address_prefix = $facts['os_service_default'],
$amqp_ssl_ca_file = $facts['os_service_default'],
$amqp_ssl_cert_file = $facts['os_service_default'],
$amqp_ssl_key_file = $facts['os_service_default'],
$amqp_ssl_key_password = $facts['os_service_default'],
$amqp_sasl_mechanisms = $facts['os_service_default'],
$amqp_sasl_config_dir = $facts['os_service_default'],
$amqp_sasl_config_name = $facts['os_service_default'],
$amqp_username = $facts['os_service_default'],
$amqp_password = $facts['os_service_default'],
$purge_config = false,
$host = $::os_service_default,
$host = $facts['os_service_default'],
) {
include ceilometer::deps

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/ceilometer'.
#
# [*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'].
# Example: 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', 'iso8601' => 'WARN',
@ -78,50 +78,50 @@
#
# [*publish_errors*]
# (Optional) Publish error events (boolean value).
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
#
# [*fatal_deprecations*]
# (Optional) Make deprecations fatal (boolean value)
# Defaults to $::os_service_default.
# Defaults to $facts['os_service_default'].
#
# [*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 ceilometer::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/ceilometer',
$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 ceilometer::deps

View File

@ -32,7 +32,7 @@ class ceilometer::params {
'volume.backup.size',
]
case $::osfamily {
case $facts['os']['family'] {
'RedHat': {
# package names
$agent_polling_package_name = 'openstack-ceilometer-polling'
@ -66,9 +66,7 @@ class ceilometer::params {
$libvirt_group = 'libvirt'
}
default: {
fail("Unsupported osfamily: ${::osfamily} operatingsystem: \
${::operatingsystem}, module ${module_name} only support osfamily \
RedHat and Debian")
fail("Unsupported osfamily: ${facts['os']['family']}")
}
}
}

View File

@ -272,7 +272,7 @@ sinks:
end
let :platform_params do
case facts[:osfamily]
case facts[:os]['family']
when 'Debian'
{ :agent_notification_package_name => 'ceilometer-agent-notification',
:agent_notification_service_name => 'ceilometer-agent-notification' }

View File

@ -353,7 +353,7 @@ sources:
end
let :platform_params do
case facts[:osfamily]
case facts[:os]['family']
when 'Debian'
{
:agent_polling_package_name => 'ceilometer-polling',

View File

@ -57,9 +57,7 @@ describe 'ceilometer::db::sync' do
}).each do |os,facts|
context "on #{os}" do
let (:facts) do
facts.merge(OSDefaults.get_facts({
:concat_basedir => '/var/lib/puppet/concat'
}))
facts.merge(OSDefaults.get_facts())
end
it_behaves_like 'ceilometer-upgrade'

View File

@ -294,7 +294,7 @@ describe 'ceilometer' do
end
let :platform_params do
case facts[:osfamily]
case facts[:os]['family']
when 'Debian'
{ :common_package_name => 'ceilometer-common' }
when 'RedHat'