From 51829b985f6791883e5591890b998a0c344b9b9a Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Thu, 2 Mar 2023 11:41:04 +0900 Subject: [PATCH] Replace legacy facts and use fact hash ... because the latest lint no longer allows usage of legacy facts and top scope fact. Change-Id: Ibe75e48eeb387c213c42511797c59b9df39a7762 --- manifests/api.pp | 84 +++---- manifests/availability_zone.pp | 12 +- manifests/cache.pp | 112 ++++----- manifests/cinder.pp | 50 ++-- manifests/compute.pp | 134 +++++----- manifests/compute/image_cache.pp | 24 +- manifests/compute/libvirt.pp | 118 ++++----- manifests/compute/libvirt/libvirtd.pp | 36 +-- manifests/compute/libvirt/services.pp | 4 +- manifests/compute/libvirt/version.pp | 2 +- manifests/compute/libvirt/virtlockd.pp | 42 ++-- manifests/compute/libvirt/virtlogd.pp | 28 +-- manifests/compute/libvirt/virtnodedevd.pp | 32 +-- manifests/compute/libvirt/virtproxyd.pp | 36 +-- manifests/compute/libvirt/virtqemud.pp | 32 +-- manifests/compute/libvirt/virtsecretd.pp | 32 +-- manifests/compute/libvirt/virtstoraged.pp | 16 +- manifests/compute/libvirt_guests.pp | 4 +- manifests/compute/mdev_type.pp | 10 +- manifests/compute/pci.pp | 6 +- manifests/compute/rbd.pp | 14 +- manifests/compute/spice.pp | 6 +- manifests/compute/vmware.pp | 28 +-- manifests/conductor.pp | 8 +- manifests/cors.pp | 24 +- manifests/db.pp | 72 +++--- manifests/glance.pp | 36 +-- manifests/init.pp | 234 +++++++++--------- manifests/ironic/common.pp | 30 +-- manifests/key_manager/barbican.pp | 32 +-- .../key_manager/barbican/service_user.pp | 28 +-- manifests/keystone.pp | 30 +-- manifests/keystone/authtoken.pp | 118 ++++----- manifests/keystone/service_user.pp | 32 +-- manifests/limit.pp | 20 +- manifests/logging.pp | 78 +++--- manifests/metadata.pp | 12 +- manifests/migration/libvirt.pp | 76 +++--- manifests/network/neutron.pp | 44 ++-- manifests/params.pp | 7 +- manifests/patch/config.pp | 6 +- manifests/pci.pp | 6 +- manifests/placement.pp | 12 +- manifests/policy.pp | 16 +- manifests/quota.pp | 52 ++-- manifests/scheduler.pp | 38 +-- manifests/scheduler/filter.pp | 86 +++---- manifests/spicehtml5proxy.pp | 2 +- manifests/vendordata.pp | 60 ++--- manifests/vncproxy.pp | 2 +- manifests/workarounds.pp | 24 +- manifests/wsgi/apache_api.pp | 8 +- manifests/wsgi/apache_metadata.pp | 8 +- manifests/wsgi/uwsgi_api.pp | 6 +- manifests/wsgi/uwsgi_api_metadata.pp | 6 +- spec/classes/nova_api_spec.rb | 4 +- spec/classes/nova_client_spec.rb | 2 +- spec/classes/nova_compute_ironic_spec.rb | 7 +- spec/classes/nova_compute_libvirt_spec.rb | 2 +- spec/classes/nova_compute_rbd_spec.rb | 6 +- spec/classes/nova_compute_spec.rb | 2 +- spec/classes/nova_conductor_spec.rb | 2 +- .../nova_db_online_data_migrations_spec.rb | 5 +- spec/classes/nova_db_sync_api_spec.rb | 4 +- spec/classes/nova_db_sync_spec.rb | 5 +- spec/classes/nova_init_spec.rb | 2 +- spec/classes/nova_metadata_spec.rb | 2 +- spec/classes/nova_migration_libvirt_spec.rb | 4 +- spec/classes/nova_scheduler_spec.rb | 2 +- spec/classes/nova_serial_proxy_spec.rb | 4 +- spec/classes/nova_spicehtml5proxy_spec.rb | 6 +- spec/classes/nova_vendordata_spec.rb | 4 +- spec/classes/nova_vnc_proxy_spec.rb | 6 +- spec/classes/nova_wsgi_apache_api_spec.rb | 8 +- .../classes/nova_wsgi_apache_metadata_spec.rb | 8 +- 75 files changed, 1072 insertions(+), 1088 deletions(-) diff --git a/manifests/api.pp b/manifests/api.pp index 3b19817de..d42daf6b3 100644 --- a/manifests/api.pp +++ b/manifests/api.pp @@ -22,15 +22,15 @@ # # [*api_bind_address*] # (optional) IP address for nova-api server to listen -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*metadata_listen*] # (optional) IP address for metadata server to listen -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*metadata_listen_port*] # (optional) The port on which the metadata API will listen. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*enabled_apis*] # (optional) A list of apis to enable @@ -38,15 +38,15 @@ # # [*osapi_compute_workers*] # (optional) Number of workers for OpenStack API service -# Defaults to $::os_workers +# Defaults to $facts['os_workers'] # # [*osapi_compute_listen_port*] # (optional) The port on which the OpenStack API will listen. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*metadata_workers*] # (optional) Number of workers for metadata service -# Defaults to $::os_workers +# Defaults to $facts['os_workers'] # # [*sync_db*] # (optional) Run nova-manage db sync on api nodes after installing the package. @@ -64,11 +64,11 @@ # [*enable_proxy_headers_parsing*] # (optional) This determines if the HTTPProxyToWSGI # middleware should parse the proxy headers or not.(boolean value) -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*max_request_body_size*] # (Optional) Set max request body size -# Defaults to $::os_service_default. +# Defaults to $facts['os_service_default']. # # [*service_name*] # (optional) Name of the service that will be providing the @@ -89,39 +89,39 @@ # # [*max_limit*] # (optional) This option is limit the maximum number of items in a single response. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*compute_link_prefix*] # (optional) This string is prepended to the normal URL that is returned in links # to the OpenStack Compute API. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*glance_link_prefix*] # (optional) This string is prepended to the normal URL that is returned in links # to Glance resources. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*hide_server_address_states*] # (optional) This option is a list of all instance states for which network address # information should not be returned from the API. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*allow_instance_snapshots*] # (optional) Operators can turn off the ability for a user to take snapshots of their # instances by setting this option to False -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*enable_network_quota*] # (optional) This option is used to enable or disable quota checking for tenant networks -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*enable_instance_password*] # (optional) Enables returning of the instance password by the relevant server API calls -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*password_length*] # (optional) Length of generated instance admin passwords (integer value) -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*allow_resize_to_same_host*] # (optional) Allow destination machine to match source for resize. @@ -130,22 +130,22 @@ # [*instance_list_per_project_cells*] # (optional) Only query cell databases in which the tenant has mapped # instances -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*instance_list_cells_batch_strategy*] # (optional) The method by which the API queries cell databases in smaller # batches during large instance list operations. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*instance_list_cells_batch_fixed_size*] # (optional) This controls batch size of instances requested from each cell # database if ``instance_list_cells_batch_strategy``` is set to ``fixed`` -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*list_records_by_skipping_down_cells*] # (optional) Whether to skip the down cells and return the results from # the up cells. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # DEPRECATED # @@ -169,33 +169,33 @@ class nova::api( $manage_service = true, $api_paste_config = 'api-paste.ini', $ensure_package = 'present', - $api_bind_address = $::os_service_default, - $osapi_compute_listen_port = $::os_service_default, - $metadata_listen = $::os_service_default, - $metadata_listen_port = $::os_service_default, + $api_bind_address = $facts['os_service_default'], + $osapi_compute_listen_port = $facts['os_service_default'], + $metadata_listen = $facts['os_service_default'], + $metadata_listen_port = $facts['os_service_default'], $enabled_apis = ['osapi_compute', 'metadata'], - $osapi_compute_workers = $::os_workers, - $metadata_workers = $::os_workers, + $osapi_compute_workers = $facts['os_workers'], + $metadata_workers = $facts['os_workers'], $sync_db = true, $sync_db_api = true, $db_online_data_migrations = false, $service_name = $::nova::params::api_service_name, $metadata_service_name = $::nova::params::api_metadata_service_name, - $enable_proxy_headers_parsing = $::os_service_default, - $max_request_body_size = $::os_service_default, - $max_limit = $::os_service_default, - $compute_link_prefix = $::os_service_default, - $glance_link_prefix = $::os_service_default, - $hide_server_address_states = $::os_service_default, - $allow_instance_snapshots = $::os_service_default, - $enable_network_quota = $::os_service_default, - $enable_instance_password = $::os_service_default, - $password_length = $::os_service_default, + $enable_proxy_headers_parsing = $facts['os_service_default'], + $max_request_body_size = $facts['os_service_default'], + $max_limit = $facts['os_service_default'], + $compute_link_prefix = $facts['os_service_default'], + $glance_link_prefix = $facts['os_service_default'], + $hide_server_address_states = $facts['os_service_default'], + $allow_instance_snapshots = $facts['os_service_default'], + $enable_network_quota = $facts['os_service_default'], + $enable_instance_password = $facts['os_service_default'], + $password_length = $facts['os_service_default'], $allow_resize_to_same_host = false, - $instance_list_per_project_cells = $::os_service_default, - $instance_list_cells_batch_strategy = $::os_service_default, - $instance_list_cells_batch_fixed_size = $::os_service_default, - $list_records_by_skipping_down_cells = $::os_service_default, + $instance_list_per_project_cells = $facts['os_service_default'], + $instance_list_cells_batch_strategy = $facts['os_service_default'], + $instance_list_cells_batch_fixed_size = $facts['os_service_default'], + $list_records_by_skipping_down_cells = $facts['os_service_default'], # DEPRECATED PARAMETER $nova_metadata_wsgi_enabled = false, $use_forwarded_for = undef, @@ -227,7 +227,7 @@ Use the nova::instance_name_template parameter instead.") # Try best to clean up the parameter if defined(Class['nova']) and $::nova::instance_name_template == undef { nova_config { - 'DEFAULT/instance_name_template': value => $::os_service_default; + 'DEFAULT/instance_name_template': value => $facts['os_service_default']; } } } @@ -319,7 +319,7 @@ as a standalone service, or httpd for being run by a httpd server") 'DEFAULT/osapi_compute_workers': value => $osapi_compute_workers; 'DEFAULT/enable_network_quota': value => $enable_network_quota; 'DEFAULT/password_length': value => $password_length; - 'api/use_forwarded_for': value => pick($use_forwarded_for, $::os_service_default); + 'api/use_forwarded_for': value => pick($use_forwarded_for, $facts['os_service_default']); 'api/max_limit': value => $max_limit; 'api/compute_link_prefix': value => $compute_link_prefix; 'api/glance_link_prefix': value => $glance_link_prefix; diff --git a/manifests/availability_zone.pp b/manifests/availability_zone.pp index 3495ae7a5..705645c90 100644 --- a/manifests/availability_zone.pp +++ b/manifests/availability_zone.pp @@ -6,20 +6,20 @@ # # [*default_availability_zone*] # (optional) Default compute node availability zone. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*default_schedule_zone*] # (optional) Availability zone to use when user doesn't specify one. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*internal_service_availability_zone*] # (optional) The availability zone to show internal services under. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # class nova::availability_zone ( - $default_availability_zone = $::os_service_default, - $default_schedule_zone = $::os_service_default, - $internal_service_availability_zone = $::os_service_default, + $default_availability_zone = $facts['os_service_default'], + $default_schedule_zone = $facts['os_service_default'], + $internal_service_availability_zone = $facts['os_service_default'], ) { nova_config { diff --git a/manifests/cache.pp b/manifests/cache.pp index bd465b01b..015829a1c 100644 --- a/manifests/cache.pp +++ b/manifests/cache.pp @@ -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: ":". (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 nova::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 nova::deps diff --git a/manifests/cinder.pp b/manifests/cinder.pp index b356b39ac..229382a84 100644 --- a/manifests/cinder.pp +++ b/manifests/cinder.pp @@ -7,7 +7,7 @@ # [*password*] # (optional) Password for connecting to Cinder services in # admin context through the OpenStack Identity service. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*auth_type*] # (optional) Name of the auth type to load (string value) @@ -21,7 +21,7 @@ # # [*timeout*] # (optional) Timeout value for connecting to cinder in seconds. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*project_name*] # (optional) Project name for connecting to Cinder services in @@ -35,7 +35,7 @@ # # [*system_scope*] # (optional) Scope for system operations. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*username*] # (optional) Username for connecting to Cinder services in admin context @@ -53,43 +53,43 @@ # things such as cinder volume attach work. If you don't set this # and you have multiple endpoints, you will get AmbiguousEndpoint # exceptions in the nova API service. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*catalog_info*] # (optional) Info to match when looking for cinder in the service # catalog. Format is: separated values of the form: # :: -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*http_retries*] # (optional) Number of times cinderclient should retry on any failed http # call. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*cross_az_attach*] # (optional) Allow attach between instance and volume in different availability zones. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*debug*] # (optional) Enable DEBUG logging with cinderclient and os_brick # independently of the rest of Nova. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # class nova::cinder ( - $password = $::os_service_default, + $password = $facts['os_service_default'], $auth_type = 'password', $auth_url = 'http://127.0.0.1:5000/', - $timeout = $::os_service_default, + $timeout = $facts['os_service_default'], $project_name = 'services', $project_domain_name = 'Default', - $system_scope = $::os_service_default, + $system_scope = $facts['os_service_default'], $username = 'cinder', $user_domain_name = 'Default', - $os_region_name = $::os_service_default, - $catalog_info = $::os_service_default, - $http_retries = $::os_service_default, - $cross_az_attach = $::os_service_default, - $debug = $::os_service_default, + $os_region_name = $facts['os_service_default'], + $catalog_info = $facts['os_service_default'], + $http_retries = $facts['os_service_default'], + $cross_az_attach = $facts['os_service_default'], + $debug = $facts['os_service_default'], ) { include nova::deps @@ -98,13 +98,13 @@ class nova::cinder ( # Controller nodes do not require the admin credential while controller # nodes require it. We keep the credential optional here to avoid # requiring unnecessary credential. - $auth_type_real = $::os_service_default - $auth_url_real = $::os_service_default - $project_name_real = $::os_service_default - $project_domain_name_real = $::os_service_default - $system_scope_real = $::os_service_default - $username_real = $::os_service_default - $user_domain_name_real = $::os_service_default + $auth_type_real = $facts['os_service_default'] + $auth_url_real = $facts['os_service_default'] + $project_name_real = $facts['os_service_default'] + $project_domain_name_real = $facts['os_service_default'] + $system_scope_real = $facts['os_service_default'] + $username_real = $facts['os_service_default'] + $user_domain_name_real = $facts['os_service_default'] } else { $auth_type_real = $auth_type $auth_url_real = $auth_url @@ -116,8 +116,8 @@ class nova::cinder ( $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'] } } diff --git a/manifests/compute.pp b/manifests/compute.pp index f221fdad0..38a15967e 100644 --- a/manifests/compute.pp +++ b/manifests/compute.pp @@ -10,7 +10,7 @@ # # [*heal_instance_info_cache_interval*] # (optional) Controls how often the instance info should be updated. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # To disable you can set the value to zero. # # [*manage_service*] @@ -56,7 +56,7 @@ # # [*mkisofs_cmd*] # (optional) Name or path of the tool used for ISO image creation. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*instance_usage_audit*] # (optional) Generate periodic compute.instance.exists notifications. @@ -69,26 +69,26 @@ # # [*use_cow_images*] # (optional) Enable use of copy-on-write (cow) images. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*force_raw_images*] # (optional) Force backing images to raw format. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*virt_mkfs*] # (optional) Name of the mkfs commands for ephemeral device. # The format is = -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*reserved_host_memory*] # Reserved host memory # The amount of memory in MB reserved for the host. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*reserved_host_disk*] # Reserved host disk # The amount of disk in MB reserved for the host. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*config_drive_format*] # (optional) Config drive format. One of iso9660 (default) or vfat @@ -101,25 +101,25 @@ # Leaving this at the default of 0 will cause this to run at the default # periodic interval. Setting it to any positive value will cause it to run # at approximately that number of seconds. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*reboot_timeout*] # (optional) Time interval after which an instance is hard rebooted # automatically. Setting this option to a time period in seconds will # automatically hard reboot an instance if it has been stuck in a rebooting # state longer than N seconds. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*instance_build_timeout*] # (optional) Maximum time in seconds that an instance can take to build. # If this timer expires, instance status will be changed to ERROR. # Enabling this option will make sure an instance will not be stuck # in BUILD state for a longer period. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*rescue_timeout*] # (optional) Interval to wait before un-rescuing an instance stuck in RESCUE. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*resize_confirm_window*] # (optional) Automatically confirm resizes after N seconds. @@ -130,7 +130,7 @@ # server status from resized to active. Setting this option to a time # period (in seconds) will automatically confirm the resize if the # server is in resized state longer than that time. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*shutdown_timeout*] # (optional) Total time to wait in seconds for an instance to perform a clean @@ -138,49 +138,49 @@ # perform a clean shutdown. While performing stop, rescue and shelve, rebuild # operations, configuring this option gives the VM a chance to perform a # controlled shutdown before the instance is powered off. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*cpu_shared_set*] # (optional) Mask of host CPUs that can be used for ``VCPU`` resources and # offloaded emulator threads. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*cpu_dedicated_set*] # (optional) A list or range of host CPU cores to which processes for pinned # instance CPUs (PCPUs) can be scheduled. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*resume_guests_state_on_host_boot*] # (optional) This option specifies whether to start guests that were running before the # host rebooted. It ensures that all of the instances on a Nova compute node # resume their state each time the compute node boots or restarts. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*max_concurrent_builds*] # (optional) Maximum number of instance builds to run concurrently -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*max_concurrent_live_migrations*] # (optional) Maximum number of live migrations to run in parallel. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*sync_power_state_pool_size*] # (optional) Maximum number of greenthreads to use when syncing power states. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*sync_power_state_interval*] # (optional) Interval to sync power states between the database and the hypervisor. Set # to -1 to disable. Setting this to 0 will run at the default rate. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*consecutive_build_service_disable_threshold*] # (optional) Max number of consecutive build failures before the nova-compute # will disable itself. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*reserved_huge_pages*] # (optional) Number of huge memory pages to reserved per NUMA host cell. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # Accepts a string e.g "node:0,size:1GB,count:4" or a list of strings e.g: # ["node:0,size:1GB,count:4", "node:1,size:1GB,count:4"] # @@ -195,7 +195,7 @@ # # [*live_migration_wait_for_vif_plug*] # (optional) whether to wait for ``network-vif-plugged`` events before starting guest transfer -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*max_disk_devices_to_attach*] # (optional) specifies max number of devices that can be attached @@ -205,40 +205,40 @@ # to 4 attached devices. The configured maximum is enforced # during server create, rebuild, evacuate, unshelve, live migrate, # and attach volume. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*default_access_ip_network_name*] # (optional) Name of the network to be used to set access IPs for # instances. If there are multiple IPs to choose from, an arbitrary # one will be chosen. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*running_deleted_instance_action*] # (optional) The compute service periodically checks for instances that # have been deleted in the database but remain running on the compute node. # This option enables action to be taken when such instances are identified -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*running_deleted_instance_poll_interval*] # (optional) Time interval in seconds to wait between runs for the clean up # action. If set to 0, deleted instances check will be disabled. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*running_deleted_instance_timeout*] # (optional) Time interval in seconds to wait for the instances that have # been marked as deleted in database to be eligible for cleanup. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*compute_monitors*] # (optional) A comma-separated list of monitors that can be used for getting # compute metrics. Only one monitor per namespace (For example: cpu) can be # loaded at a time. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*default_ephemeral_format*] # (optional) The default format an ephemeral_volume will be formatted with # on creation. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*image_type_exclude_list*] # (optional) List of image formats that should not be advertised as supported @@ -246,12 +246,12 @@ # # [*block_device_allocate_retries*] # (optional) Number of times to retry block device allocation on failures -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*block_device_allocate_retries_interval*] # (optional) Waiting time interval (seconds) between block device allocation # retries on failures -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # class nova::compute ( $enabled = true, @@ -267,48 +267,48 @@ class nova::compute ( $force_config_drive = false, $instance_usage_audit = false, $instance_usage_audit_period = 'month', - $mkisofs_cmd = $::os_service_default, - $use_cow_images = $::os_service_default, - $force_raw_images = $::os_service_default, - $virt_mkfs = $::os_service_default, - $reserved_host_memory = $::os_service_default, - $reserved_host_disk = $::os_service_default, - $heal_instance_info_cache_interval = $::os_service_default, - $config_drive_format = $::os_service_default, - $update_resources_interval = $::os_service_default, - $reboot_timeout = $::os_service_default, - $instance_build_timeout = $::os_service_default, - $rescue_timeout = $::os_service_default, - $resize_confirm_window = $::os_service_default, - $shutdown_timeout = $::os_service_default, - $cpu_shared_set = $::os_service_default, - $cpu_dedicated_set = $::os_service_default, - $resume_guests_state_on_host_boot = $::os_service_default, - $max_concurrent_builds = $::os_service_default, - $max_concurrent_live_migrations = $::os_service_default, - $sync_power_state_pool_size = $::os_service_default, - $sync_power_state_interval = $::os_service_default, - $consecutive_build_service_disable_threshold = $::os_service_default, - $reserved_huge_pages = $::os_service_default, + $mkisofs_cmd = $facts['os_service_default'], + $use_cow_images = $facts['os_service_default'], + $force_raw_images = $facts['os_service_default'], + $virt_mkfs = $facts['os_service_default'], + $reserved_host_memory = $facts['os_service_default'], + $reserved_host_disk = $facts['os_service_default'], + $heal_instance_info_cache_interval = $facts['os_service_default'], + $config_drive_format = $facts['os_service_default'], + $update_resources_interval = $facts['os_service_default'], + $reboot_timeout = $facts['os_service_default'], + $instance_build_timeout = $facts['os_service_default'], + $rescue_timeout = $facts['os_service_default'], + $resize_confirm_window = $facts['os_service_default'], + $shutdown_timeout = $facts['os_service_default'], + $cpu_shared_set = $facts['os_service_default'], + $cpu_dedicated_set = $facts['os_service_default'], + $resume_guests_state_on_host_boot = $facts['os_service_default'], + $max_concurrent_builds = $facts['os_service_default'], + $max_concurrent_live_migrations = $facts['os_service_default'], + $sync_power_state_pool_size = $facts['os_service_default'], + $sync_power_state_interval = $facts['os_service_default'], + $consecutive_build_service_disable_threshold = $facts['os_service_default'], + $reserved_huge_pages = $facts['os_service_default'], $neutron_physnets_numa_nodes_mapping = {}, $neutron_tunnel_numa_nodes = [], - $live_migration_wait_for_vif_plug = $::os_service_default, - $max_disk_devices_to_attach = $::os_service_default, - $default_access_ip_network_name = $::os_service_default, - $running_deleted_instance_action = $::os_service_default, - $running_deleted_instance_poll_interval = $::os_service_default, - $running_deleted_instance_timeout = $::os_service_default, - $compute_monitors = $::os_service_default, - $default_ephemeral_format = $::os_service_default, - $image_type_exclude_list = $::os_service_default, - $block_device_allocate_retries = $::os_service_default, - $block_device_allocate_retries_interval = $::os_service_default, + $live_migration_wait_for_vif_plug = $facts['os_service_default'], + $max_disk_devices_to_attach = $facts['os_service_default'], + $default_access_ip_network_name = $facts['os_service_default'], + $running_deleted_instance_action = $facts['os_service_default'], + $running_deleted_instance_poll_interval = $facts['os_service_default'], + $running_deleted_instance_timeout = $facts['os_service_default'], + $compute_monitors = $facts['os_service_default'], + $default_ephemeral_format = $facts['os_service_default'], + $image_type_exclude_list = $facts['os_service_default'], + $block_device_allocate_retries = $facts['os_service_default'], + $block_device_allocate_retries_interval = $facts['os_service_default'], ) { include nova::deps include nova::params - $image_type_exclude_list_real = pick(join(any2array($image_type_exclude_list), ','), $::os_service_default) + $image_type_exclude_list_real = pick(join(any2array($image_type_exclude_list), ','), $facts['os_service_default']) include nova::policy diff --git a/manifests/compute/image_cache.pp b/manifests/compute/image_cache.pp index f69456983..8065684e1 100644 --- a/manifests/compute/image_cache.pp +++ b/manifests/compute/image_cache.pp @@ -6,36 +6,36 @@ # # [*manager_interval*] # (optional) Number of seconds to wait between runs of the image cache manager. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*subdirectory_name*] # (optional) Location of cached images. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*remove_unused_base_images*] # (optional) Should unused base images be removed? -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*remove_unused_original_minimum_age_seconds*] # (optional) Unused unresized base images younger than this will not be removed. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*remove_unused_resized_minimum_age_seconds*] # (optional) Unused resized base images younger than this will not be removed. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*precache_concurrency*] # (optional) Maximum number of compute hosts to trigger image precaching # in parallel. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # class nova::compute::image_cache ( - $manager_interval = $::os_service_default, - $subdirectory_name = $::os_service_default, - $remove_unused_base_images = $::os_service_default, - $remove_unused_original_minimum_age_seconds = $::os_service_default, - $remove_unused_resized_minimum_age_seconds = $::os_service_default, - $precache_concurrency = $::os_service_default + $manager_interval = $facts['os_service_default'], + $subdirectory_name = $facts['os_service_default'], + $remove_unused_base_images = $facts['os_service_default'], + $remove_unused_original_minimum_age_seconds = $facts['os_service_default'], + $remove_unused_resized_minimum_age_seconds = $facts['os_service_default'], + $precache_concurrency = $facts['os_service_default'] ) { include nova::deps diff --git a/manifests/compute/libvirt.pp b/manifests/compute/libvirt.pp index 138bc1828..094b478e4 100644 --- a/manifests/compute/libvirt.pp +++ b/manifests/compute/libvirt.pp @@ -42,12 +42,12 @@ # [*snapshot_image_format*] # (optional) Format to save snapshots to. Some filesystems # have a preference and only operate on raw or qcow2 -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*snapshots_directory*] # (optional) Location where libvirt driver will store snapshots before # uploading them to image service -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*disk_cachemodes*] # (optional) A list of cachemodes for different disk types, e.g. @@ -59,29 +59,29 @@ # [*hw_disk_discard*] # (optional) Discard option for nova managed disks. Need Libvirt(1.0.6) # Qemu1.5 (raw format) Qemu1.6(qcow2 format). -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*hw_machine_type*] # (optional) Option to specify a default machine type per host architecture. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*sysinfo_serial*] # (optional) Option to specify a serial number entry generation method. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*inject_password*] # (optional) Inject the admin password at boot time, without an agent. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*inject_key*] # (optional) Inject the ssh public key at boot time. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*inject_partition*] # (optional) The partition to inject to : -2 => disable, -1 => inspect # (libguestfs only), 0 => not partitioned, >0 => partition # number (integer value) -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*enabled_perf_events*] # (optional) This is a performance event list which could be used as monitor. @@ -89,18 +89,18 @@ # The supported events list can be found in # https://libvirt.org/html/libvirt-libvirt-domain.html , # which you may need to search key words ``VIR_PERF_PARAM_*`` -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*device_detach_attempts*] # (optional) Maximum number of attempts the driver tries to detach a device # in libvirt. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*device_detach_timeout*] # (optional) Maximum number of seconds the driver waits for the success or # the failure event from libvirt for a given device detach attempt before # it re-trigger the detach. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*libvirt_service_name*] # (optional) libvirt service name. @@ -126,7 +126,7 @@ # [*preallocate_images*] # (optional) The image preallocation mode to use. # Valid values are 'none' or 'space'. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*manage_libvirt_services*] # (optional) Whether or not deploy Libvirt services. @@ -138,44 +138,44 @@ # [*rx_queue_size*] # (optional) virtio-net rx queue size # Valid values are 256, 512, 1024 -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*tx_queue_size*] # (optional) virtio-net tx queue size # Valid values are 256, 512, 1024 -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*file_backed_memory*] # (optional) Available capacity in MiB for file-backed memory. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*images_type*] # (optional) VM Images format. # Valid Values are raw, flat, qcow2, lvm, rbd, ploop, default -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*volume_use_multipath*] # (optional) Use multipath connection of the # iSCSI or FC volume. Volumes can be connected in the # LibVirt as multipath devices. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*nfs_mount_options*] # (optional) Mount options passed to the NFS client. See section of the # nfs man page for details. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*num_pcie_ports*] # (optional) The number of PCIe ports an instance will get. # Libvirt allows a custom number of PCIe ports (pcie-root-port controllers) a # target instance will get. Some will be used by default, rest will be available # for hotplug use. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*mem_stats_period_seconds*] # (optional) A number of seconds to memory usage statistics period, # zero or negative value mean to disable memory usage statistics. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*pmem_namespaces*] # (optional) Configure persistent memory(pmem) namespaces. These namespaces @@ -184,21 +184,21 @@ # $NSNAME is the name of the pmem namespace. $LABEL represents one resource # class, this is used to generate the resource class name as # CUSTOM_PMEM_NAMESPACE_$LABEL. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*swtpm_enabled*] # (optional) Enable emulated Trusted Platform Module (TPM) for guests. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*swtpm_user*] # (optional) Configure the user that the swtpm binary, used for emulated # Trusted Platform Module (TPM) functionality, runs as. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*swtpm_group*] # (optional) Configure the group that the swtpm binary, used for emulated # Trusted Platform Module (TPM) functionality, runs as. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*max_queues*] # (optional) The maximum number of virtio queue pairs that can be enabled @@ -206,17 +206,17 @@ # will be the lesser of the CPUs requested by the guest and the max value # defined. By default, this value is set to none meaning the legacy limits # based on the reported kernel major version will be used. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*num_memory_encrypted_guests*] # (optional) The maximum number of guests with encrypted memory which can # run concurrently on this compute host. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*wait_soft_reboot_seconds*] # (optional) Number of seconds to wait for instance to shut down after soft # reboot request is made. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # DEPRECATED PARAMETRS # @@ -250,40 +250,40 @@ class nova::compute::libvirt ( $cpu_mode = false, $cpu_models = [], $cpu_model_extra_flags = undef, - $snapshot_image_format = $::os_service_default, - $snapshots_directory = $::os_service_default, + $snapshot_image_format = $facts['os_service_default'], + $snapshots_directory = $facts['os_service_default'], $disk_cachemodes = [], - $hw_disk_discard = $::os_service_default, - $hw_machine_type = $::os_service_default, - $sysinfo_serial = $::os_service_default, - $inject_password = $::os_service_default, - $inject_key = $::os_service_default, - $inject_partition = $::os_service_default, - $enabled_perf_events = $::os_service_default, - $device_detach_attempts = $::os_service_default, - $device_detach_timeout = $::os_service_default, + $hw_disk_discard = $facts['os_service_default'], + $hw_machine_type = $facts['os_service_default'], + $sysinfo_serial = $facts['os_service_default'], + $inject_password = $facts['os_service_default'], + $inject_key = $facts['os_service_default'], + $inject_partition = $facts['os_service_default'], + $enabled_perf_events = $facts['os_service_default'], + $device_detach_attempts = $facts['os_service_default'], + $device_detach_timeout = $facts['os_service_default'], $libvirt_service_name = $::nova::params::libvirt_service_name, $virtlock_service_name = $::nova::params::virtlock_service_name, $virtlog_service_name = $::nova::params::virtlog_service_name, $modular_libvirt = $::nova::params::modular_libvirt, $compute_driver = 'libvirt.LibvirtDriver', - $preallocate_images = $::os_service_default, + $preallocate_images = $facts['os_service_default'], $manage_libvirt_services = true, - $rx_queue_size = $::os_service_default, - $tx_queue_size = $::os_service_default, - $file_backed_memory = $::os_service_default, - $images_type = $::os_service_default, - $volume_use_multipath = $::os_service_default, - $nfs_mount_options = $::os_service_default, - $num_pcie_ports = $::os_service_default, - $mem_stats_period_seconds = $::os_service_default, - $pmem_namespaces = $::os_service_default, - $swtpm_enabled = $::os_service_default, - $swtpm_user = $::os_service_default, - $swtpm_group = $::os_service_default, - $max_queues = $::os_service_default, - $num_memory_encrypted_guests = $::os_service_default, - $wait_soft_reboot_seconds = $::os_service_default, + $rx_queue_size = $facts['os_service_default'], + $tx_queue_size = $facts['os_service_default'], + $file_backed_memory = $facts['os_service_default'], + $images_type = $facts['os_service_default'], + $volume_use_multipath = $facts['os_service_default'], + $nfs_mount_options = $facts['os_service_default'], + $num_pcie_ports = $facts['os_service_default'], + $mem_stats_period_seconds = $facts['os_service_default'], + $pmem_namespaces = $facts['os_service_default'], + $swtpm_enabled = $facts['os_service_default'], + $swtpm_user = $facts['os_service_default'], + $swtpm_group = $facts['os_service_default'], + $max_queues = $facts['os_service_default'], + $num_memory_encrypted_guests = $facts['os_service_default'], + $wait_soft_reboot_seconds = $facts['os_service_default'], # DEPRECATED PARAMETERS $log_outputs = undef, $log_filters = undef, @@ -308,7 +308,7 @@ class nova::compute::libvirt ( $cpu_mode_default = $cpu_mode } - if($::osfamily == 'Debian') { + if($facts['os']['family'] == 'Debian') { package { "nova-compute-${virt_type}": ensure => $ensure_package, tag => ['openstack', 'nova-package'], @@ -328,11 +328,11 @@ class nova::compute::libvirt ( } } - unless $rx_queue_size == $::os_service_default or $rx_queue_size in [256, 512, 1024] { + unless $rx_queue_size == $facts['os_service_default'] or $rx_queue_size in [256, 512, 1024] { fail("Invalid rx_queue_size parameter: ${rx_queue_size}") } - unless $tx_queue_size == $::os_service_default or $tx_queue_size in [256, 512, 1024] { + unless $tx_queue_size == $facts['os_service_default'] or $tx_queue_size in [256, 512, 1024] { fail("Invalid_tx_queue_size parameter: ${tx_queue_size}") } @@ -407,7 +407,7 @@ class nova::compute::libvirt ( if !empty($cpu_models) { warning('$cpu_models requires that $cpu_mode => "custom" and will be ignored') } - $cpu_models_real = $::os_service_default + $cpu_models_real = $facts['os_service_default'] } nova_config { 'libvirt/cpu_models': value => $cpu_models_real; @@ -421,7 +421,7 @@ class nova::compute::libvirt ( if $cpu_model_extra_flags { warning('$cpu_model_extra_flags requires that $cpu_mode is not set to "none" and will be ignored') } - $cpu_model_extra_flags_real = $::os_service_default + $cpu_model_extra_flags_real = $facts['os_service_default'] } nova_config { 'libvirt/cpu_model_extra_flags': value => $cpu_model_extra_flags_real; diff --git a/manifests/compute/libvirt/libvirtd.pp b/manifests/compute/libvirt/libvirtd.pp index 70e22917e..a472f79db 100644 --- a/manifests/compute/libvirt/libvirtd.pp +++ b/manifests/compute/libvirt/libvirtd.pp @@ -6,58 +6,58 @@ # # [*log_level*] # Defines a log level to filter log outputs. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*log_filters*] # Defines a log filter to select a different logging level for # for a given category log outputs. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*log_outputs*] # (optional) Defines log outputs, as specified in # https://libvirt.org/logging.html -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*max_clients*] # The maximum number of concurrent client connections to allow # on primary socket. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*admin_max_clients*] # The maximum number of concurrent client connections to allow # on administrative socket. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*max_client_requests*] # Limit on concurrent requests from a single client connection. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*admin_max_client_requests*] # Limit on concurrent requests from a single client connection # for the admin interface. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*tls_priority*] # (optional) Override the compile time default TLS priority string. The # default is usually "NORMAL" unless overridden at build time. # Only set this if it is desired for libvirt to deviate from # the global default settings. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*ovs_timeout*] # (optional) A timeout for openvswitch calls made by libvirt -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # class nova::compute::libvirt::libvirtd ( - $log_level = $::os_service_default, - $log_filters = $::os_service_default, - $log_outputs = $::os_service_default, - $max_clients = $::os_service_default, - $admin_max_clients = $::os_service_default, - $max_client_requests = $::os_service_default, - $admin_max_client_requests = $::os_service_default, - $tls_priority = $::os_service_default, - $ovs_timeout = $::os_service_default, + $log_level = $facts['os_service_default'], + $log_filters = $facts['os_service_default'], + $log_outputs = $facts['os_service_default'], + $max_clients = $facts['os_service_default'], + $admin_max_clients = $facts['os_service_default'], + $max_client_requests = $facts['os_service_default'], + $admin_max_client_requests = $facts['os_service_default'], + $tls_priority = $facts['os_service_default'], + $ovs_timeout = $facts['os_service_default'], ) { include nova::deps diff --git a/manifests/compute/libvirt/services.pp b/manifests/compute/libvirt/services.pp index 9710fb96a..5f62c36c3 100644 --- a/manifests/compute/libvirt/services.pp +++ b/manifests/compute/libvirt/services.pp @@ -68,7 +68,7 @@ class nova::compute::libvirt::services ( if $libvirt_service_name { # libvirt-nwfilter - if $::osfamily == 'RedHat' { + if $facts['os']['family'] == 'RedHat' { package { 'libvirt-nwfilter': ensure => $ensure_package, name => $::nova::params::libvirt_nwfilter_package_name, @@ -115,7 +115,7 @@ class nova::compute::libvirt::services ( Libvirtd_config<||> ~> Service['libvirt'] # messagebus - if($::osfamily == 'RedHat') { + if( $facts['os']['family'] == 'RedHat') { service { 'messagebus': ensure => running, enable => true, diff --git a/manifests/compute/libvirt/version.pp b/manifests/compute/libvirt/version.pp index 258d7ba16..f3d5f6f30 100644 --- a/manifests/compute/libvirt/version.pp +++ b/manifests/compute/libvirt/version.pp @@ -18,7 +18,7 @@ class nova::compute::libvirt::version { $default = '6.0' } default: { - fail("Class['nova::compute::libvirt::version']: Unsupported osfamily: ${::osfamily}") + fail("Unsupported osfamily: ${::facts['os']['family']}") } } } diff --git a/manifests/compute/libvirt/virtlockd.pp b/manifests/compute/libvirt/virtlockd.pp index f7868e32c..a3689527b 100644 --- a/manifests/compute/libvirt/virtlockd.pp +++ b/manifests/compute/libvirt/virtlockd.pp @@ -6,55 +6,55 @@ # # [*log_level*] # Defines a log level to filter log outputs. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*log_filters*] # Defines a log filter to select a different logging level for # for a given category log outputs. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*log_outputs*] # (optional) Defines log outputs, as specified in # https://libvirt.org/logging.html -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*max_clients*] # The maximum number of concurrent client connections to allow # on primary socket. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*admin_max_clients*] # The maximum number of concurrent client connections to allow # on administrative socket. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*max_size*] # Maximum file size before rolling over. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*max_backups*] # Maximum number of backup files to keep. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # class nova::compute::libvirt::virtlockd ( - $log_level = $::os_service_default, - $log_filters = $::os_service_default, - $log_outputs = $::os_service_default, - $max_clients = $::os_service_default, - $admin_max_clients = $::os_service_default, - $max_size = $::os_service_default, - $max_backups = $::os_service_default, + $log_level = $facts['os_service_default'], + $log_filters = $facts['os_service_default'], + $log_outputs = $facts['os_service_default'], + $max_clients = $facts['os_service_default'], + $admin_max_clients = $facts['os_service_default'], + $max_size = $facts['os_service_default'], + $max_backups = $facts['os_service_default'], ) { include nova::deps virtlockd_config { - 'log_level': value => pick($log_level, $::os_service_default); - 'log_filters': value => pick($log_filters, $::os_service_default), quote => true; - 'log_outputs': value => pick($log_outputs, $::os_service_default), quote => true; - 'max_clients': value => pick($max_clients, $::os_service_default); - 'admin_max_clients': value => pick($admin_max_clients, $::os_service_default); - 'max_size': value => pick($max_size, $::os_service_default); - 'max_backups': value => pick($max_backups, $::os_service_default); + 'log_level': value => pick($log_level, $facts['os_service_default']); + 'log_filters': value => pick($log_filters, $facts['os_service_default']), quote => true; + 'log_outputs': value => pick($log_outputs, $facts['os_service_default']), quote => true; + 'max_clients': value => pick($max_clients, $facts['os_service_default']); + 'admin_max_clients': value => pick($admin_max_clients, $facts['os_service_default']); + 'max_size': value => pick($max_size, $facts['os_service_default']); + 'max_backups': value => pick($max_backups, $facts['os_service_default']); } } diff --git a/manifests/compute/libvirt/virtlogd.pp b/manifests/compute/libvirt/virtlogd.pp index b74d38855..0708ab27f 100644 --- a/manifests/compute/libvirt/virtlogd.pp +++ b/manifests/compute/libvirt/virtlogd.pp @@ -6,44 +6,44 @@ # # [*log_level*] # Defines a log level to filter log outputs. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*log_filters*] # Defines a log filter to select a different logging level for # for a given category log outputs. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*log_outputs*] # (optional) Defines log outputs, as specified in # https://libvirt.org/logging.html -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*max_clients*] # The maximum number of concurrent client connections to allow # on primary socket. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*admin_max_clients*] # The maximum number of concurrent client connections to allow # on administrative socket. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*max_size*] # Maximum file size before rolling over. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*max_backups*] # Maximum number of backup files to keep. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # class nova::compute::libvirt::virtlogd ( - $log_level = $::os_service_default, - $log_filters = $::os_service_default, - $log_outputs = $::os_service_default, - $max_clients = $::os_service_default, - $admin_max_clients = $::os_service_default, - $max_size = $::os_service_default, - $max_backups = $::os_service_default, + $log_level = $facts['os_service_default'], + $log_filters = $facts['os_service_default'], + $log_outputs = $facts['os_service_default'], + $max_clients = $facts['os_service_default'], + $admin_max_clients = $facts['os_service_default'], + $max_size = $facts['os_service_default'], + $max_backups = $facts['os_service_default'], ) { include nova::deps diff --git a/manifests/compute/libvirt/virtnodedevd.pp b/manifests/compute/libvirt/virtnodedevd.pp index 1386e41b5..262cc2ace 100644 --- a/manifests/compute/libvirt/virtnodedevd.pp +++ b/manifests/compute/libvirt/virtnodedevd.pp @@ -6,50 +6,50 @@ # # [*log_level*] # Defines a log level to filter log outputs. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*log_filters*] # Defines a log filter to select a different logging level for # for a given category log outputs. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*log_outputs*] # (optional) Defines log outputs, as specified in # https://libvirt.org/logging.html -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*max_clients*] # The maximum number of concurrent client connections to allow # on primary socket. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*admin_max_clients*] # The maximum number of concurrent client connections to allow # on administrative socket. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*max_client_requests*] # Limit on concurrent requests from a single client connection. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*admin_max_client_requests*] # Limit on concurrent requests from a single client connection # for the admin interface. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*ovs_timeout*] # (optional) A timeout for openvswitch calls made by libvirt -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # class nova::compute::libvirt::virtnodedevd ( - $log_level = $::os_service_default, - $log_filters = $::os_service_default, - $log_outputs = $::os_service_default, - $max_clients = $::os_service_default, - $admin_max_clients = $::os_service_default, - $max_client_requests = $::os_service_default, - $admin_max_client_requests = $::os_service_default, - $ovs_timeout = $::os_service_default, + $log_level = $facts['os_service_default'], + $log_filters = $facts['os_service_default'], + $log_outputs = $facts['os_service_default'], + $max_clients = $facts['os_service_default'], + $admin_max_clients = $facts['os_service_default'], + $max_client_requests = $facts['os_service_default'], + $admin_max_client_requests = $facts['os_service_default'], + $ovs_timeout = $facts['os_service_default'], ) { include nova::deps diff --git a/manifests/compute/libvirt/virtproxyd.pp b/manifests/compute/libvirt/virtproxyd.pp index 1dabe0556..3c7607805 100644 --- a/manifests/compute/libvirt/virtproxyd.pp +++ b/manifests/compute/libvirt/virtproxyd.pp @@ -6,58 +6,58 @@ # # [*log_level*] # Defines a log level to filter log outputs. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*log_filters*] # Defines a log filter to select a different logging level for # for a given category log outputs. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*log_outputs*] # (optional) Defines log outputs, as specified in # https://libvirt.org/logging.html -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*max_clients*] # The maximum number of concurrent client connections to allow # on primary socket. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*admin_max_clients*] # The maximum number of concurrent client connections to allow # on administrative socket. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*max_client_requests*] # Limit on concurrent requests from a single client connection. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*admin_max_client_requests*] # Limit on concurrent requests from a single client connection # for the admin interface. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*ovs_timeout*] # (optional) A timeout for openvswitch calls made by libvirt -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*tls_priority*] # (optional) Override the compile time default TLS priority string. The # default is usually "NORMAL" unless overridden at build time. # Only set this if it is desired for libvirt to deviate from # the global default settings. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # class nova::compute::libvirt::virtproxyd ( - $log_level = $::os_service_default, - $log_filters = $::os_service_default, - $log_outputs = $::os_service_default, - $max_clients = $::os_service_default, - $admin_max_clients = $::os_service_default, - $max_client_requests = $::os_service_default, - $admin_max_client_requests = $::os_service_default, - $ovs_timeout = $::os_service_default, - $tls_priority = $::os_service_default, + $log_level = $facts['os_service_default'], + $log_filters = $facts['os_service_default'], + $log_outputs = $facts['os_service_default'], + $max_clients = $facts['os_service_default'], + $admin_max_clients = $facts['os_service_default'], + $max_client_requests = $facts['os_service_default'], + $admin_max_client_requests = $facts['os_service_default'], + $ovs_timeout = $facts['os_service_default'], + $tls_priority = $facts['os_service_default'], ) { include nova::deps diff --git a/manifests/compute/libvirt/virtqemud.pp b/manifests/compute/libvirt/virtqemud.pp index 9414b445d..ddde22ccb 100644 --- a/manifests/compute/libvirt/virtqemud.pp +++ b/manifests/compute/libvirt/virtqemud.pp @@ -6,51 +6,51 @@ # # [*log_level*] # Defines a log level to filter log outputs. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*log_filters*] # Defines a log filter to select a different logging level for # for a given category log outputs. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*log_outputs*] # (optional) Defines log outputs, as specified in # https://libvirt.org/logging.html -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*max_clients*] # The maximum number of concurrent client connections to allow # on primary socket. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*admin_max_clients*] # The maximum number of concurrent client connections to allow # on administrative socket. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*max_client_requests*] # Limit on concurrent requests from a single client connection. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*admin_max_client_requests*] # Limit on concurrent requests from a single client connection # for the admin interface. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*ovs_timeout*] # (optional) A timeout for openvswitch calls made by libvirt -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # class nova::compute::libvirt::virtqemud ( - $log_level = $::os_service_default, - $log_filters = $::os_service_default, - $log_outputs = $::os_service_default, - $max_clients = $::os_service_default, - $admin_max_clients = $::os_service_default, - $max_client_requests = $::os_service_default, - $admin_max_client_requests = $::os_service_default, - $ovs_timeout = $::os_service_default, + $log_level = $facts['os_service_default'], + $log_filters = $facts['os_service_default'], + $log_outputs = $facts['os_service_default'], + $max_clients = $facts['os_service_default'], + $admin_max_clients = $facts['os_service_default'], + $max_client_requests = $facts['os_service_default'], + $admin_max_client_requests = $facts['os_service_default'], + $ovs_timeout = $facts['os_service_default'], ) { include nova::deps diff --git a/manifests/compute/libvirt/virtsecretd.pp b/manifests/compute/libvirt/virtsecretd.pp index 0023c1b7f..afda5af2a 100644 --- a/manifests/compute/libvirt/virtsecretd.pp +++ b/manifests/compute/libvirt/virtsecretd.pp @@ -6,50 +6,50 @@ # # [*log_level*] # Defines a log level to filter log outputs. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*log_filters*] # Defines a log filter to select a different logging level for # for a given category log outputs. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*log_outputs*] # (optional) Defines log outputs, as specified in # https://libvirt.org/logging.html -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*max_clients*] # The maximum number of concurrent client connections to allow # on primary socket. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*admin_max_clients*] # The maximum number of concurrent client connections to allow # on administrative socket. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*max_client_requests*] # Limit on concurrent requests from a single client connection. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*admin_max_client_requests*] # Limit on concurrent requests from a single client connection # for the admin interface. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*ovs_timeout*] # (optional) A timeout for openvswitch calls made by libvirt -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # class nova::compute::libvirt::virtsecretd ( - $log_level = $::os_service_default, - $log_filters = $::os_service_default, - $log_outputs = $::os_service_default, - $max_clients = $::os_service_default, - $admin_max_clients = $::os_service_default, - $max_client_requests = $::os_service_default, - $admin_max_client_requests = $::os_service_default, - $ovs_timeout = $::os_service_default, + $log_level = $facts['os_service_default'], + $log_filters = $facts['os_service_default'], + $log_outputs = $facts['os_service_default'], + $max_clients = $facts['os_service_default'], + $admin_max_clients = $facts['os_service_default'], + $max_client_requests = $facts['os_service_default'], + $admin_max_client_requests = $facts['os_service_default'], + $ovs_timeout = $facts['os_service_default'], ) { include nova::deps diff --git a/manifests/compute/libvirt/virtstoraged.pp b/manifests/compute/libvirt/virtstoraged.pp index b6e55c4fd..f69f763d6 100644 --- a/manifests/compute/libvirt/virtstoraged.pp +++ b/manifests/compute/libvirt/virtstoraged.pp @@ -6,27 +6,27 @@ # # [*log_level*] # Defines a log level to filter log outputs. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*log_filters*] # Defines a log filter to select a different logging level for # for a given category log outputs. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*log_outputs*] # (optional) Defines log outputs, as specified in # https://libvirt.org/logging.html -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*ovs_timeout*] # (optional) A timeout for openvswitch calls made by libvirt -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # class nova::compute::libvirt::virtstoraged ( - $log_level = $::os_service_default, - $log_filters = $::os_service_default, - $log_outputs = $::os_service_default, - $ovs_timeout = $::os_service_default, + $log_level = $facts['os_service_default'], + $log_filters = $facts['os_service_default'], + $log_outputs = $facts['os_service_default'], + $ovs_timeout = $facts['os_service_default'], ) { include nova::deps diff --git a/manifests/compute/libvirt_guests.pp b/manifests/compute/libvirt_guests.pp index 19deca7e3..fc0d6c6a6 100644 --- a/manifests/compute/libvirt_guests.pp +++ b/manifests/compute/libvirt_guests.pp @@ -62,7 +62,7 @@ class nova::compute::libvirt_guests ( -> File_line<| tag == 'libvirt-guests-file_line'|> -> Anchor['nova::config::end'] - case $::osfamily { + case $facts['os']['family'] { 'RedHat': { # NOTE(tkajinam): Since libvirt 8.1.0, the sysconfig files are # no longer provided by packages. @@ -102,7 +102,7 @@ class nova::compute::libvirt_guests ( } } default: { - warning("Unsupported osfamily: ${::osfamily}, make sure you are configuring this yourself") + warning("Unsupported osfamily: ${facts['os']['family']}, make sure you are configuring this yourself") } } } diff --git a/manifests/compute/mdev_type.pp b/manifests/compute/mdev_type.pp index bbe504493..22b048216 100644 --- a/manifests/compute/mdev_type.pp +++ b/manifests/compute/mdev_type.pp @@ -11,22 +11,22 @@ # [*device_addresses*] # (Optional) A list of PCI addresses corresponding to the physical GPU(s) or # mdev-capable hardware. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*mdev_class*] # (Optional) Class of mediated device to manage used to differentiate between # device type. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # define nova::compute::mdev_type ( $mdev_type = $name, - $device_addresses = $::os_service_default, - $mdev_class = $::os_service_default, + $device_addresses = $facts['os_service_default'], + $mdev_class = $facts['os_service_default'], ) { if empty($device_addresses) { nova_config { - "mdev_${mdev_type}/device_addresses": value => $::os_service_default + "mdev_${mdev_type}/device_addresses": value => $facts['os_service_default'] } } else { nova_config { diff --git a/manifests/compute/pci.pp b/manifests/compute/pci.pp index ed55d8433..236933d83 100644 --- a/manifests/compute/pci.pp +++ b/manifests/compute/pci.pp @@ -6,13 +6,13 @@ # # [*passthrough*] # (optional) Pci passthrough list of hash. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # Example of format: # [ { "vendor_id" => "1234","product_id" => "5678" }, # { "vendor_id" => "4321","product_id" => "8765", "physical_network" => "default" } ] class nova::compute::pci( - $passthrough = $::os_service_default + $passthrough = $facts['os_service_default'] ) { include nova::deps @@ -21,7 +21,7 @@ class nova::compute::pci( !empty($passthrough) { $passthrough_real = to_array_of_json_strings($passthrough) } else { - $passthrough_real = $::os_service_default + $passthrough_real = $facts['os_service_default'] } nova_config { 'pci/device_spec': value => $passthrough_real; diff --git a/manifests/compute/rbd.pp b/manifests/compute/rbd.pp index 534cc524b..14a78cbbd 100644 --- a/manifests/compute/rbd.pp +++ b/manifests/compute/rbd.pp @@ -35,17 +35,17 @@ # If set, this will allow Nova to request that Glance copy an image from # an existing non-local store into the one named by this option before # booting so that proper Copy-on-Write behavior is maintained. -# Defaults to $::os_service_default. +# Defaults to $facts['os_service_default']. # # [*libvirt_images_rbd_glance_copy_poll_interval*] # (optional) The interval in seconds with which to poll Glance after asking # for it to copy an image to the local rbd store. -# Defaults to $::os_service_default. +# Defaults to $facts['os_service_default']. # # [*libvirt_images_rbd_glance_copy_timeout*] # (optional) The overall maximum time we will wait for Glance to complete # an image copy to our local rbd store. -# Defaults to $::os_service_default. +# Defaults to $facts['os_service_default']. # # [*libvirt_rbd_user*] # (Required) The RADOS client name for accessing rbd volumes. @@ -90,9 +90,9 @@ class nova::compute::rbd ( $libvirt_rbd_secret_key = undef, $libvirt_images_rbd_pool = 'rbd', $libvirt_images_rbd_ceph_conf = '/etc/ceph/ceph.conf', - $libvirt_images_rbd_glance_store_name = $::os_service_default, - $libvirt_images_rbd_glance_copy_poll_interval = $::os_service_default, - $libvirt_images_rbd_glance_copy_timeout = $::os_service_default, + $libvirt_images_rbd_glance_store_name = $facts['os_service_default'], + $libvirt_images_rbd_glance_copy_poll_interval = $facts['os_service_default'], + $libvirt_images_rbd_glance_copy_timeout = $facts['os_service_default'], $rbd_keyring = 'client.nova', $ephemeral_storage = true, $manage_ceph_client = true, @@ -112,7 +112,7 @@ class nova::compute::rbd ( } } - if $::osfamily == 'Debian' { + if $facts['os']['family'] == 'Debian' { package { 'qemu-block-extra': ensure => $package_ensure, tag => ['openstack', 'nova-support-package'], diff --git a/manifests/compute/spice.pp b/manifests/compute/spice.pp index 6df55a6cd..e00e20e1f 100644 --- a/manifests/compute/spice.pp +++ b/manifests/compute/spice.pp @@ -10,7 +10,7 @@ # # [*server_listen*] # (optional) IP address on which instance spice servers should listen -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*server_proxyclient_address*] # (optional) Management IP Address on which instance spiceservers will @@ -35,7 +35,7 @@ # class nova::compute::spice( $agent_enabled = true, - $server_listen = $::os_service_default, + $server_listen = $facts['os_service_default'], $server_proxyclient_address = '127.0.0.1', $proxy_host = false, $proxy_protocol = 'http', @@ -52,7 +52,7 @@ class nova::compute::spice( } } else { nova_config { - 'spice/html5proxy_base_url': value => $::os_service_default; + 'spice/html5proxy_base_url': value => $facts['os_service_default']; } } diff --git a/manifests/compute/vmware.pp b/manifests/compute/vmware.pp index 792eb78fa..719687a55 100644 --- a/manifests/compute/vmware.pp +++ b/manifests/compute/vmware.pp @@ -19,7 +19,7 @@ # [*api_retry_count*] # (optional) The number of times we retry on failures, # e.g., socket error, etc. -# Defaults to $::os_service_default. +# Defaults to $facts['os_service_default']. # # [*maximum_objects*] # (optional) The maximum number of ObjectContent data objects that should @@ -28,15 +28,15 @@ # objects reaches the specified maximum. The server may still # limit the count to something less than the configured value. # Any remaining objects may be retrieved with additional requests. -# Defaults to $::os_service_default. +# Defaults to $facts['os_service_default']. # # [*task_poll_interval*] # (optional) The interval in seconds used for polling of remote tasks. -# Defaults to $::os_service_default. +# Defaults to $facts['os_service_default']. # # [*use_linked_clone*] # (optional) Whether to use linked clone strategy while creating VM's. -# Defaults to $::os_service_default. +# Defaults to $facts['os_service_default']. # # [*compute_driver*] # (optional) Compute driver. @@ -47,30 +47,30 @@ # If true, the vCenter server certificate is not verified. If # false, then the default CA truststore is used for verification. This # option is ignored if 'ca_file' is set. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*ca_file*] # (optional) Specify a CA bundle file to use in verifying the vCenter server # certificate. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*datastore_regex*] # (optional) Regex to match the name of a datastore. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # class nova::compute::vmware( $host_ip, $host_username, $host_password, $cluster_name, - $api_retry_count = $::os_service_default, - $maximum_objects = $::os_service_default, - $task_poll_interval = $::os_service_default, - $use_linked_clone = $::os_service_default, + $api_retry_count = $facts['os_service_default'], + $maximum_objects = $facts['os_service_default'], + $task_poll_interval = $facts['os_service_default'], + $use_linked_clone = $facts['os_service_default'], $compute_driver = 'vmwareapi.VMwareVCDriver', - $insecure = $::os_service_default, - $ca_file = $::os_service_default, - $datastore_regex = $::os_service_default, + $insecure = $facts['os_service_default'], + $ca_file = $facts['os_service_default'], + $datastore_regex = $facts['os_service_default'], ) { include nova::deps diff --git a/manifests/conductor.pp b/manifests/conductor.pp index ae713b74e..a14a26b34 100644 --- a/manifests/conductor.pp +++ b/manifests/conductor.pp @@ -18,21 +18,21 @@ # # [*workers*] # (optional) Number of workers for OpenStack Conductor service -# Defaults to $::os_workers +# Defaults to $facts['os_workers'] # # [*enable_new_services*] # (optional) When a new service (for example "nova-compute") start up, it gets # registered in the database as an enabled service. Setting this to false will # cause new services to be disabled when added. This config option is only used # by the conductor service which is responsible for creating the service entries. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # class nova::conductor( $enabled = true, $manage_service = true, $ensure_package = 'present', - $workers = $::os_workers, - $enable_new_services = $::os_service_default, + $workers = $facts['os_workers'], + $enable_new_services = $facts['os_service_default'], ) { include nova::deps diff --git a/manifests/cors.pp b/manifests/cors.pp index 5c044c381..cdca217e3 100644 --- a/manifests/cors.pp +++ b/manifests/cors.pp @@ -8,41 +8,41 @@ # (Optional) Indicate whether this resource may be shared with the domain # received in the requests "origin" header. # (string value) -# Defaults to $::os_service_default. +# Defaults to $facts['os_service_default']. # # [*allow_credentials*] # (Optional) Indicate that the actual request can include user credentials. # (boolean value) -# Defaults to $::os_service_default. +# Defaults to $facts['os_service_default']. # # [*expose_headers*] # (Optional) Indicate which headers are safe to expose to the API. # (list value) -# Defaults to $::os_service_default. +# Defaults to $facts['os_service_default']. # # [*max_age*] # (Optional) Maximum cache age of CORS preflight requests. # (integer value) -# Defaults to $::os_service_default. +# Defaults to $facts['os_service_default']. # # [*allow_methods*] # (Optional) Indicate which methods can be used during the actual request. # (list value) -# Defaults to $::os_service_default. +# Defaults to $facts['os_service_default']. # # [*allow_headers*] # (Optional) Indicate which header field names may be used during the actual # request. # (list value) -# Defaults to $::os_service_default. +# Defaults to $facts['os_service_default']. # class nova::cors ( - $allowed_origin = $::os_service_default, - $allow_credentials = $::os_service_default, - $expose_headers = $::os_service_default, - $max_age = $::os_service_default, - $allow_methods = $::os_service_default, - $allow_headers = $::os_service_default, + $allowed_origin = $facts['os_service_default'], + $allow_credentials = $facts['os_service_default'], + $expose_headers = $facts['os_service_default'], + $max_age = $facts['os_service_default'], + $allow_methods = $facts['os_service_default'], + $allow_headers = $facts['os_service_default'], ) { include nova::deps diff --git a/manifests/db.pp b/manifests/db.pp index 945c7d21b..7ead5e818 100644 --- a/manifests/db.pp +++ b/manifests/db.pp @@ -23,99 +23,99 @@ # # [*database_connection*] # (optional) Connection url to connect to nova database. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*slave_connection*] # (optional) Connection url to connect to nova slave database (read-only). -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*database_connection_recycle_time*] # Timeout when db connections should be reaped. -# (Optional) Defaults to $::os_service_default +# (Optional) Defaults to $facts['os_service_default'] # # [*database_max_pool_size*] # 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*] # Maximum db connection retries during startup. # Setting -1 implies an infinite retry count. -# (Optional) Defaults to $::os_service_default +# (Optional) Defaults to $facts['os_service_default'] # # [*database_retry_interval*] # Interval between retries of opening a sql connection. -# (Optional) Defaults to $::os_service_default +# (Optional) Defaults to $facts['os_service_default'] # # [*database_max_overflow*] # 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*] # (Optional) If set, use this value for pool_timeout with SQLAlchemy. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*database_db_max_retries*] # (optional) Maximum retries in case of connection error or deadlock error # before error is raised. Set to -1 to specify an infinite retry count. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*mysql_enable_ndb*] # (Optional) If True, transparently enables support for handling MySQL # Cluster (NDB). -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*api_database_connection*] # (optional) Connection url to connect to nova api database. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*api_slave_connection*] # (optional) Connection url to connect to nova api slave database (read-only). -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*api_database_connection_recycle_time*] # Timeout when nova api db connections should be reaped. -# (Optional) Defaults to $::os_service_default +# (Optional) Defaults to $facts['os_service_default'] # # [*api_database_max_pool_size*] # Maximum number of SQL connections to keep open in a pool. -# (Optional) Defaults to $::os_service_default +# (Optional) Defaults to $facts['os_service_default'] # # [*api_database_max_retries*] # Maximum db connection retries during startup. # Setting -1 implies an infinite retry count. -# (Optional) Defaults to $::os_service_default +# (Optional) Defaults to $facts['os_service_default'] # # [*api_database_retry_interval*] # Interval between retries of opening a sql connection. -# (Optional) Defaults to $::os_service_default +# (Optional) Defaults to $facts['os_service_default'] # # [*api_database_max_overflow*] # If set, use this value for max_overflow with sqlalchemy. -# (Optional) Defaults to $::os_service_default +# (Optional) Defaults to $facts['os_service_default'] # # [*api_database_pool_timeout*] # (Optional) If set, use this value for pool_timeout with SQLAlchemy. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # class nova::db ( - $database_connection = $::os_service_default, - $slave_connection = $::os_service_default, - $database_connection_recycle_time = $::os_service_default, - $database_max_pool_size = $::os_service_default, - $database_max_retries = $::os_service_default, - $database_retry_interval = $::os_service_default, - $database_max_overflow = $::os_service_default, - $database_pool_timeout = $::os_service_default, - $database_db_max_retries = $::os_service_default, - $mysql_enable_ndb = $::os_service_default, - $api_database_connection = $::os_service_default, - $api_slave_connection = $::os_service_default, - $api_database_connection_recycle_time = $::os_service_default, - $api_database_max_pool_size = $::os_service_default, - $api_database_max_retries = $::os_service_default, - $api_database_retry_interval = $::os_service_default, - $api_database_max_overflow = $::os_service_default, - $api_database_pool_timeout = $::os_service_default, + $database_connection = $facts['os_service_default'], + $slave_connection = $facts['os_service_default'], + $database_connection_recycle_time = $facts['os_service_default'], + $database_max_pool_size = $facts['os_service_default'], + $database_max_retries = $facts['os_service_default'], + $database_retry_interval = $facts['os_service_default'], + $database_max_overflow = $facts['os_service_default'], + $database_pool_timeout = $facts['os_service_default'], + $database_db_max_retries = $facts['os_service_default'], + $mysql_enable_ndb = $facts['os_service_default'], + $api_database_connection = $facts['os_service_default'], + $api_slave_connection = $facts['os_service_default'], + $api_database_connection_recycle_time = $facts['os_service_default'], + $api_database_max_pool_size = $facts['os_service_default'], + $api_database_max_retries = $facts['os_service_default'], + $api_database_retry_interval = $facts['os_service_default'], + $api_database_max_overflow = $facts['os_service_default'], + $api_database_pool_timeout = $facts['os_service_default'], ) { include nova::deps diff --git a/manifests/glance.pp b/manifests/glance.pp index 3bc953404..51da934b4 100644 --- a/manifests/glance.pp +++ b/manifests/glance.pp @@ -6,53 +6,53 @@ # # [*endpoint_override*] # (optional) Override the endpoint to use to talk to Glance. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*valid_interfaces*] # (optional) List of interfaces, in order of preference. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*num_retries*] # (optional) Number of retries in glance operation -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*verify_glance_signatures*] # (optional) Whether to verify image signatures. (boolean value) -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*enable_rbd_download*] # (optional) Enable download of Glance images directly via RBD -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*rbd_user*] # (optional) The RADOS client name for accessing Glance images stored as # rbd volumes. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*rbd_connect_timeout*] # (optional) THe RADOS client timeout in seconds when initially connecting # to the cluster. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*rbd_pool*] # (optional) The RADOS pool in which the Glance images are stored as rbd # volumes. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*rbd_ceph_conf*] # (optional) Path to the ceph configuration file to use. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # class nova::glance ( - $endpoint_override = $::os_service_default, - $valid_interfaces = $::os_service_default, - $num_retries = $::os_service_default, - $verify_glance_signatures = $::os_service_default, - $enable_rbd_download = $::os_service_default, - $rbd_user = $::os_service_default, - $rbd_connect_timeout = $::os_service_default, - $rbd_pool = $::os_service_default, - $rbd_ceph_conf = $::os_service_default, + $endpoint_override = $facts['os_service_default'], + $valid_interfaces = $facts['os_service_default'], + $num_retries = $facts['os_service_default'], + $verify_glance_signatures = $facts['os_service_default'], + $enable_rbd_download = $facts['os_service_default'], + $rbd_user = $facts['os_service_default'], + $rbd_connect_timeout = $facts['os_service_default'], + $rbd_pool = $facts['os_service_default'], + $rbd_ceph_conf = $facts['os_service_default'], ) { include nova::deps diff --git a/manifests/init.pp b/manifests/init.pp index 11b751db9..f7c2bc2c9 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -13,30 +13,30 @@ # (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. (integer value) -# Defaults to $::os_service_default. +# Defaults to $facts['os_service_default']. # # [*long_rpc_timeout*] # (Optional) An alternative timeout value for RPC calls that have # the potential to take a long time. -# 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'] # # [*rabbit_use_ssl*] # (optional) Boolean. Connect over SSL for RabbitMQ. (boolean value) -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*rabbit_ha_queues*] # (optional) Use HA queues in RabbitMQ. (boolean value) -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*rabbit_heartbeat_timeout_threshold*] # (optional) Number of seconds after which the RabbitMQ broker is considered @@ -44,14 +44,14 @@ # Heartbeating helps to ensure the TCP connection to RabbitMQ isn't silently # closed, resulting in missed or lost messages from the queue. # Requires kombu >= 3.0.7 and amqp >= 1.4.0. (integer value) -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*rabbit_heartbeat_rate*] # (optional) How often during the rabbit_heartbeat_timeout_threshold period # to check the heartbeat on RabbitMQ connection. # i.e. rabbit_heartbeat_rate=2 when rabbit_heartbeat_timeout_threshold=60, # the heartbeat will be checked every 30 seconds. (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 @@ -61,117 +61,117 @@ # 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_retry_interval*] # (Optional) How frequently to retry connecting with RabbitMQ. # (integer value) -# 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, SSLv23 and SSLv3. SSLv2 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 not be available in future versions. EXPERIMENTAL. # (string value) -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*amqp_durable_queues*] # (optional) Define queues as "durable" to rabbitmq. (boolean 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_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']. # # [*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']. # # [*service_down_time*] # (optional) Maximum time since last check-in for up service. @@ -237,43 +237,43 @@ # # [*cert*] # (optional) Path to SSL certificate file. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*key*] # (optional) SSL key file (if separate from cert). -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*console_ssl_ciphers*] # (optional) OpenSSL cipher preference string that specifies what ciphers to # allow for TLS connections from clients. See the man page for the OpenSSL # 'ciphers' command for details of the cipher preference string format and # allowed values. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*console_ssl_minimum_version*] # (optional) Minimum allowed SSL/TLS protocol version. Valid values are # 'default', 'tlsv1_1', 'tlsv1_2', and 'tlsv1_3'. A value of 'default' will # use the underlying system OpenSSL defaults. -# 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'] # # [*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']. # # [*notification_topics*] # (optional) AMQP topic used for OpenStack notifications -# Defaults to ::os_service_default +# Defaults to facts['os_service_default'] # # [*notification_format*] # (optional) Format used for OpenStack notifications -# Defaults to ::os_service_default +# Defaults to facts['os_service_default'] # # [*notify_on_state_change*] # (optional) If set, send compute.instance.update notifications @@ -285,27 +285,27 @@ # [*ovsdb_connection*] # (optional) Sets the ovsdb connection string. This is used by os-vif # to interact with openvswitch on the host. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*upgrade_level_cells*] # (optional) Sets a version cap for messages sent to local cells services -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*upgrade_level_compute*] # (optional) Sets a version cap for messages sent to compute services -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*upgrade_level_conductor*] # (optional) Sets a version cap for messages sent to conductor services -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*upgrade_level_intercell*] # (optional) Sets a version cap for messages sent between cells services -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*upgrade_level_scheduler*] # (optional) Sets a version cap for messages sent to scheduler services -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*purge_config*] # (optional) Whether to set only the specified config options @@ -316,41 +316,41 @@ # (optional) Virtual CPU to physical CPU allocation ratio which affects all # CPU filters. This can be set on the scheduler, or can be overridden # per compute node. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*ram_allocation_ratio*] # (optional) Virtual ram to physical ram allocation ratio which affects all # ram filters. This can be set on the scheduler, or can be overridden # per compute node. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*disk_allocation_ratio*] # (optional) Virtual disk to physical disk allocation ratio which is used # by the disk filter. This can be set on the scheduler, or can be overridden # per compute node. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*initial_cpu_allocation_ratio*] # (optional) Initial virtual CPU to physical CPU allocation ratio. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*initial_ram_allocation_ratio*] # (optional) Initial virtual RAM to physical RAM allocation ratio. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*initial_disk_allocation_ratio*] # (optional) Initial virtual disk to physical disk allocation ratio. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*my_ip*] # (optional) IP address of this host on the management network. # If unset, will determine the IP programmatically based on the default route. # If unable to do so, will use "127.0.0.1". -# Defaults to $::os_service_default. +# Defaults to $facts['os_service_default']. # # [*dhcp_domain*] # (optional) domain to use for building the hostnames -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*instance_name_template*] # (optional) Template string to be used to generate instance names @@ -368,44 +368,44 @@ # # [*upgrade_level_network*] # (optional) Sets a version cap for messages sent to network services -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # class nova( $ensure_package = 'present', - $default_transport_url = $::os_service_default, - $rpc_response_timeout = $::os_service_default, - $long_rpc_timeout = $::os_service_default, - $control_exchange = $::os_service_default, - $rabbit_use_ssl = $::os_service_default, - $rabbit_heartbeat_timeout_threshold = $::os_service_default, - $rabbit_heartbeat_rate = $::os_service_default, - $rabbit_heartbeat_in_pthread = $::os_service_default, - $rabbit_ha_queues = $::os_service_default, - $rabbit_retry_interval = $::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_durable_queues = $::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_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, - $host = $::os_service_default, + $default_transport_url = $facts['os_service_default'], + $rpc_response_timeout = $facts['os_service_default'], + $long_rpc_timeout = $facts['os_service_default'], + $control_exchange = $facts['os_service_default'], + $rabbit_use_ssl = $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_ha_queues = $facts['os_service_default'], + $rabbit_retry_interval = $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_durable_queues = $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_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'], + $host = $facts['os_service_default'], $service_down_time = 60, $state_path = '/var/lib/nova', $lock_path = $::nova::params::lock_path, @@ -420,30 +420,30 @@ class nova( $nova_public_key = undef, $nova_private_key = undef, $ssl_only = false, - $cert = $::os_service_default, - $key = $::os_service_default, - $console_ssl_ciphers = $::os_service_default, - $console_ssl_minimum_version = $::os_service_default, - $notification_transport_url = $::os_service_default, - $notification_driver = $::os_service_default, - $notification_topics = $::os_service_default, - $notification_format = $::os_service_default, + $cert = $facts['os_service_default'], + $key = $facts['os_service_default'], + $console_ssl_ciphers = $facts['os_service_default'], + $console_ssl_minimum_version = $facts['os_service_default'], + $notification_transport_url = $facts['os_service_default'], + $notification_driver = $facts['os_service_default'], + $notification_topics = $facts['os_service_default'], + $notification_format = $facts['os_service_default'], $notify_on_state_change = undef, - $ovsdb_connection = $::os_service_default, - $upgrade_level_cells = $::os_service_default, - $upgrade_level_compute = $::os_service_default, - $upgrade_level_conductor = $::os_service_default, - $upgrade_level_intercell = $::os_service_default, - $upgrade_level_scheduler = $::os_service_default, - $cpu_allocation_ratio = $::os_service_default, - $ram_allocation_ratio = $::os_service_default, - $disk_allocation_ratio = $::os_service_default, - $initial_cpu_allocation_ratio = $::os_service_default, - $initial_ram_allocation_ratio = $::os_service_default, - $initial_disk_allocation_ratio = $::os_service_default, + $ovsdb_connection = $facts['os_service_default'], + $upgrade_level_cells = $facts['os_service_default'], + $upgrade_level_compute = $facts['os_service_default'], + $upgrade_level_conductor = $facts['os_service_default'], + $upgrade_level_intercell = $facts['os_service_default'], + $upgrade_level_scheduler = $facts['os_service_default'], + $cpu_allocation_ratio = $facts['os_service_default'], + $ram_allocation_ratio = $facts['os_service_default'], + $disk_allocation_ratio = $facts['os_service_default'], + $initial_cpu_allocation_ratio = $facts['os_service_default'], + $initial_ram_allocation_ratio = $facts['os_service_default'], + $initial_disk_allocation_ratio = $facts['os_service_default'], $purge_config = false, - $my_ip = $::os_service_default, - $dhcp_domain = $::os_service_default, + $my_ip = $facts['os_service_default'], + $dhcp_domain = $facts['os_service_default'], $instance_name_template = undef, # DEPRECATED PARAMETERS $auth_strategy = undef, @@ -550,7 +550,7 @@ but should be one of: ssh-rsa, ssh-dsa, ssh-ecdsa.") warning('The auth_strategy parameter is deprecated, and will be removed in a future release.') } nova_config { - 'api/auth_strategy': value => pick($auth_strategy, $::os_service_default) + 'api/auth_strategy': value => pick($auth_strategy, $facts['os_service_default']) } nova_config { @@ -570,7 +570,7 @@ but should be one of: ssh-rsa, ssh-dsa, ssh-ecdsa.") 'DEFAULT/dhcp_domain': value => $dhcp_domain; } - # TODO(tkajinam): Change the default value to $::os_service_default when we + # TODO(tkajinam): Change the default value to $facts['os_service_default'] when we # remove nova::api::instance_name_template after Antelope. if $instance_name_template != undef { nova_config { @@ -685,11 +685,11 @@ but should be one of: ssh-rsa, ssh-dsa, ssh-ecdsa.") nova_config { 'upgrade_levels/cells': value => $upgrade_level_cells; - 'upgrade_levels/cert': value => pick($upgrade_level_cert, $::os_service_default); + 'upgrade_levels/cert': value => pick($upgrade_level_cert, $facts['os_service_default']); 'upgrade_levels/compute': value => $upgrade_level_compute; 'upgrade_levels/conductor': value => $upgrade_level_conductor; 'upgrade_levels/intercell': value => $upgrade_level_intercell; - 'upgrade_levels/network': value => pick($upgrade_level_network, $::os_service_default); + 'upgrade_levels/network': value => pick($upgrade_level_network, $facts['os_service_default']); 'upgrade_levels/scheduler': value => $upgrade_level_scheduler; } } diff --git a/manifests/ironic/common.pp b/manifests/ironic/common.pp index 248a63847..dd139ff6d 100644 --- a/manifests/ironic/common.pp +++ b/manifests/ironic/common.pp @@ -14,7 +14,7 @@ # # [*system_scope*] # (optional) Scope for system operations. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*password*] # The admin password for Ironic to connect to Nova. @@ -26,7 +26,7 @@ # # [*endpoint_override*] # (optional) Override the endpoint to use to talk to Ironic. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*region_name*] # (optional) Region name for connecting to ironic in admin context @@ -48,32 +48,32 @@ # # [*service_type*] # (optional) The default service_type for endpoint URL discovery. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*valid_interfaces*] # (Optional) The endpoint type to lookup when talking to Ironic. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*timeout*] # (Optional) Timeout value for connecting to ironic in seconds. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # class nova::ironic::common ( $auth_plugin = 'password', $auth_url = 'http://127.0.0.1:5000/', $password = 'ironic', $project_name = 'services', - $system_scope = $::os_service_default, + $system_scope = $facts['os_service_default'], $username = 'admin', - $endpoint_override = $::os_service_default, - $region_name = $::os_service_default, - $api_max_retries = $::os_service_default, - $api_retry_interval = $::os_service_default, + $endpoint_override = $facts['os_service_default'], + $region_name = $facts['os_service_default'], + $api_max_retries = $facts['os_service_default'], + $api_retry_interval = $facts['os_service_default'], $user_domain_name = 'Default', $project_domain_name = 'Default', - $service_type = $::os_service_default, - $valid_interfaces = $::os_service_default, - $timeout = $::os_service_default, + $service_type = $facts['os_service_default'], + $valid_interfaces = $facts['os_service_default'], + $timeout = $facts['os_service_default'], ) { include nova::deps @@ -82,8 +82,8 @@ class nova::ironic::common ( $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'] } nova_config { diff --git a/manifests/key_manager/barbican.pp b/manifests/key_manager/barbican.pp index f89a6acf3..4b5e6a99e 100644 --- a/manifests/key_manager/barbican.pp +++ b/manifests/key_manager/barbican.pp @@ -6,46 +6,46 @@ # # [*barbican_endpoint*] # (Optional) Use this endpoint to connect to Barbican. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*barbican_api_version*] # (Optional) Version of the Barbican API. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*auth_endpoint*] # (Optional) Use this endpoint to connect to Keystone. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*retry_delay*] # (Optional) Number of seconds to wait before retrying poll for key creation # completion. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*number_of_retries*] # (Optional) Number of times to retry poll fo key creation completion. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*barbican_endpoint_type*] # (Optional) Specifies the type of endpoint. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*barbican_region_name*] # (Optional) Specifies the region of the chosen endpoint. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*send_service_user_token*] # (Optional) The service uses service token feature when this is set as true. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # class nova::key_manager::barbican ( - $barbican_endpoint = $::os_service_default, - $barbican_api_version = $::os_service_default, - $auth_endpoint = $::os_service_default, - $retry_delay = $::os_service_default, - $number_of_retries = $::os_service_default, - $barbican_endpoint_type = $::os_service_default, - $barbican_region_name = $::os_service_default, - $send_service_user_token = $::os_service_default, + $barbican_endpoint = $facts['os_service_default'], + $barbican_api_version = $facts['os_service_default'], + $auth_endpoint = $facts['os_service_default'], + $retry_delay = $facts['os_service_default'], + $number_of_retries = $facts['os_service_default'], + $barbican_endpoint_type = $facts['os_service_default'], + $barbican_region_name = $facts['os_service_default'], + $send_service_user_token = $facts['os_service_default'], ) { include nova::deps diff --git a/manifests/key_manager/barbican/service_user.pp b/manifests/key_manager/barbican/service_user.pp index 2c18e4079..9dcc792b6 100644 --- a/manifests/key_manager/barbican/service_user.pp +++ b/manifests/key_manager/barbican/service_user.pp @@ -29,13 +29,13 @@ # # [*system_scope*] # (Optional) Scope for system operations. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*insecure*] # (Optional) If true, explicitly allow TLS without checking server cert # against any certificate authorities. WARNING: not recommended. Use with # caution. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*auth_type*] # (Optional) Authentication type to load @@ -43,24 +43,24 @@ # # [*auth_version*] # (Optional) API version of the admin Identity API endpoint. -# Defaults to $::os_service_default. +# Defaults to $facts['os_service_default']. # # [*cafile*] # (Optional) A PEM encoded Certificate Authority to use when verifying HTTPs # connections. -# Defaults to $::os_service_default. +# Defaults to $facts['os_service_default']. # # [*certfile*] # (Optional) Required if identity server requires client certificate -# Defaults to $::os_service_default. +# Defaults to $facts['os_service_default']. # # [*keyfile*] # (Optional) Required if identity server requires client certificate -# Defaults to $::os_service_default. +# Defaults to $facts['os_service_default']. # # [*region_name*] # (Optional) The region in which the identity server can be found. -# Defaults to $::os_service_default. +# Defaults to $facts['os_service_default']. # class nova::key_manager::barbican::service_user( $password, @@ -69,14 +69,14 @@ class nova::key_manager::barbican::service_user( $project_name = 'services', $user_domain_name = 'Default', $project_domain_name = 'Default', - $system_scope = $::os_service_default, - $insecure = $::os_service_default, + $system_scope = $facts['os_service_default'], + $insecure = $facts['os_service_default'], $auth_type = 'password', - $auth_version = $::os_service_default, - $cafile = $::os_service_default, - $certfile = $::os_service_default, - $keyfile = $::os_service_default, - $region_name = $::os_service_default, + $auth_version = $facts['os_service_default'], + $cafile = $facts['os_service_default'], + $certfile = $facts['os_service_default'], + $keyfile = $facts['os_service_default'], + $region_name = $facts['os_service_default'], ) { include nova::deps diff --git a/manifests/keystone.pp b/manifests/keystone.pp index 18065e5d3..43e12baf4 100644 --- a/manifests/keystone.pp +++ b/manifests/keystone.pp @@ -16,28 +16,28 @@ # (optional) Points to the OpenStack Identity server IP and port. # This is the Identity (keystone) admin API server IP and port value, # and not the Identity service API IP and port. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*timeout*] # (optional) Timeout value for connecting to keystone in seconds. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*service_type*] # (optional) The default service_type for endpoint URL discovery. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*valid_interfaces*] # (optional) List of interfaces, in order of preference for endpoint URL. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*region_name*] # (optional) Region name for connecting to keystone in admin context # through the OpenStack Identity service. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*endpoint_override*] # (optional) Always use this endpoint URL for requests for this client. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*project_name*] # (optional) Project name for connecting to Keystone services in @@ -51,7 +51,7 @@ # # [*system_scope*] # (Optional) Scope for system operations -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*username*] # (optional) Username for connecting to Keystone services in admin context @@ -69,14 +69,14 @@ class nova::keystone ( $password, $auth_type = 'password', $auth_url = 'http://127.0.0.1:5000', - $timeout = $::os_service_default, - $service_type = $::os_service_default, - $valid_interfaces = $::os_service_default, - $endpoint_override = $::os_service_default, - $region_name = $::os_service_default, + $timeout = $facts['os_service_default'], + $service_type = $facts['os_service_default'], + $valid_interfaces = $facts['os_service_default'], + $endpoint_override = $facts['os_service_default'], + $region_name = $facts['os_service_default'], $project_name = 'services', $project_domain_name = 'Default', - $system_scope = $::os_service_default, + $system_scope = $facts['os_service_default'], $username = 'nova', $user_domain_name = 'Default', ) { @@ -87,8 +87,8 @@ class nova::keystone ( $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'] } nova_config { diff --git a/manifests/keystone/authtoken.pp b/manifests/keystone/authtoken.pp index 24585b2ca..85b384690 100644 --- a/manifests/keystone/authtoken.pp +++ b/manifests/keystone/authtoken.pp @@ -10,7 +10,7 @@ # # [*password*] # (Optional) Password to create for the service user -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*auth_url*] # (Optional) The URL to use for authentication. @@ -30,21 +30,21 @@ # # [*system_scope*] # (Optional) Scope for system operations -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*insecure*] # (Optional) If true, explicitly allow TLS without checking server cert # against any certificate authorities. WARNING: not recommended. Use with # caution. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*auth_section*] # (Optional) Config Section from which to load plugin specific options -# Defaults to $::os_service_default. +# Defaults to $facts['os_service_default']. # # [*auth_type*] # (Optional) Authentication type to load -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*www_authenticate_uri*] # (Optional) Complete public Identity API endpoint. @@ -52,26 +52,26 @@ # # [*auth_version*] # (Optional) API version of the admin Identity API endpoint. -# Defaults to $::os_service_default. +# Defaults to $facts['os_service_default']. # # [*cache*] # (Optional) Env key for the swift cache. -# Defaults to $::os_service_default. +# Defaults to $facts['os_service_default']. # # [*cafile*] # (Optional) A PEM encoded Certificate Authority to use when verifying HTTPs # connections. -# Defaults to $::os_service_default. +# Defaults to $facts['os_service_default']. # # [*certfile*] # (Optional) Required if identity server requires client certificate -# Defaults to $::os_service_default. +# Defaults to $facts['os_service_default']. # # [*delay_auth_decision*] # (Optional) Do not handle authorization requests within the middleware, but # delegate the authorization decision to downstream WSGI components. Boolean # value -# Defaults to $::os_service_default. +# Defaults to $facts['os_service_default']. # # [*enforce_token_bind*] # (Optional) Used to control the use and type of token binding. Can be set @@ -81,57 +81,57 @@ # type is unknown the token will be rejected. "required" any form of token # binding is needed to be allowed. Finally the name of a binding method that # must be present in tokens. String value. -# Defaults to $::os_service_default. +# Defaults to $facts['os_service_default']. # # [*http_connect_timeout*] # (Optional) Request timeout value for communicating with Identity API # server. -# Defaults to $::os_service_default. +# Defaults to $facts['os_service_default']. # # [*http_request_max_retries*] # (Optional) How many times are we trying to reconnect when communicating # with Identity API Server. Integer value -# Defaults to $::os_service_default. +# Defaults to $facts['os_service_default']. # # [*include_service_catalog*] # (Optional) Indicate whether to set the X-Service-Catalog header. If False, # middleware will not ask for service catalog on token validation and will # not set the X-Service-Catalog header. Boolean value. -# Defaults to $::os_service_default. +# Defaults to $facts['os_service_default']. # # [*keyfile*] # (Optional) Required if identity server requires client certificate -# Defaults to $::os_service_default. +# Defaults to $facts['os_service_default']. # # [*memcache_pool_conn_get_timeout*] # (Optional) Number of seconds that an operation will wait to get a memcached # client connection from the pool. Integer value -# Defaults to $::os_service_default. +# Defaults to $facts['os_service_default']. # # [*memcache_pool_dead_retry*] # (Optional) Number of seconds memcached server is considered dead before it # is tried again. Integer value -# Defaults to $::os_service_default. +# Defaults to $facts['os_service_default']. # # [*memcache_pool_maxsize*] # (Optional) Maximum total number of open connections to every memcached # server. Integer value -# Defaults to $::os_service_default. +# Defaults to $facts['os_service_default']. # # [*memcache_pool_socket_timeout*] # (Optional) Number of seconds a connection to memcached is held unused in # the pool before it is closed. Integer value -# Defaults to $::os_service_default. +# Defaults to $facts['os_service_default']. # # [*memcache_pool_unused_timeout*] # (Optional) Number of seconds a connection to memcached is held unused in # the pool before it is closed. Integer value -# Defaults to $::os_service_default. +# Defaults to $facts['os_service_default']. # # [*memcache_secret_key*] # (Optional, mandatory if memcache_security_strategy is defined) This string # is used for key derivation. -# Defaults to $::os_service_default. +# Defaults to $facts['os_service_default']. # # [*memcache_security_strategy*] # (Optional) If defined, indicate whether token data should be authenticated @@ -139,17 +139,17 @@ # HMAC) in the cache. If ENCRYPT, token data is encrypted and authenticated in the # cache. If the value is not one of these options or empty, auth_token will # raise an exception on initialization. -# Defaults to $::os_service_default. +# Defaults to $facts['os_service_default']. # # [*memcache_use_advanced_pool*] # (Optional) Use the advanced (eventlet safe) memcached client pool. The # advanced pool will only work under python 2.x Boolean value -# Defaults to $::os_service_default. +# Defaults to $facts['os_service_default']. # # [*memcached_servers*] # (Optional) Optionally specify a list of memcached server(s) to use for # caching. If left undefined, tokens will instead be cached in-process. -# Defaults to $::os_service_default. +# Defaults to $facts['os_service_default']. # # [*manage_memcache_package*] # (Optional) Whether to install the python-memcache package. @@ -157,13 +157,13 @@ # # [*region_name*] # (Optional) The region in which the identity server can be found. -# Defaults to $::os_service_default. +# Defaults to $facts['os_service_default']. # # [*token_cache_time*] # (Optional) In order to prevent excessive effort spent validating tokens, # the middleware caches previously-seen tokens for a configurable duration # (in seconds). Set to -1 to disable caching completely. Integer value -# Defaults to $::os_service_default. +# Defaults to $facts['os_service_default']. # # [*service_token_roles*] # (Optional) A choice of roles that must be present in a service token. @@ -173,23 +173,23 @@ # here are applied as an ANY check so any role in this list # must be present. For backwards compatibility reasons this # currently only affects the allow_expired check. (list value) -# Defaults to $::os_service_default. +# Defaults to $facts['os_service_default']. # # [*service_token_roles_required*] # (optional) backwards compatibility to ensure that the service tokens are # compared against a list of possible roles for validity # true/false -# Defaults to $::os_service_default. +# Defaults to $facts['os_service_default']. # # [*service_type*] # (Optional) The name or type of the service as it appears in the service # catalog. This is used to validate tokens that have restricted access rules. -# Defaults to $::os_service_default. +# Defaults to $facts['os_service_default']. # # [*interface*] # (Optional) Interface to use for the Identity API endpoint. Valid values are # "public", "internal" or "admin". -# Defaults to $::os_service_default. +# Defaults to $facts['os_service_default']. # # [*params*] # (Optional) Hash of additional parameters to pass through to the keystone @@ -197,42 +197,42 @@ # class nova::keystone::authtoken( $username = 'nova', - $password = $::os_service_default, + $password = $facts['os_service_default'], $auth_url = 'http://127.0.0.1:5000/', $project_name = 'services', $user_domain_name = 'Default', $project_domain_name = 'Default', - $system_scope = $::os_service_default, - $insecure = $::os_service_default, - $auth_section = $::os_service_default, + $system_scope = $facts['os_service_default'], + $insecure = $facts['os_service_default'], + $auth_section = $facts['os_service_default'], $auth_type = 'password', $www_authenticate_uri = 'http://127.0.0.1:5000/', - $auth_version = $::os_service_default, - $cache = $::os_service_default, - $cafile = $::os_service_default, - $certfile = $::os_service_default, - $delay_auth_decision = $::os_service_default, - $enforce_token_bind = $::os_service_default, - $http_connect_timeout = $::os_service_default, - $http_request_max_retries = $::os_service_default, - $include_service_catalog = $::os_service_default, - $keyfile = $::os_service_default, - $memcache_pool_conn_get_timeout = $::os_service_default, - $memcache_pool_dead_retry = $::os_service_default, - $memcache_pool_maxsize = $::os_service_default, - $memcache_pool_socket_timeout = $::os_service_default, - $memcache_pool_unused_timeout = $::os_service_default, - $memcache_secret_key = $::os_service_default, - $memcache_security_strategy = $::os_service_default, - $memcache_use_advanced_pool = $::os_service_default, - $memcached_servers = $::os_service_default, + $auth_version = $facts['os_service_default'], + $cache = $facts['os_service_default'], + $cafile = $facts['os_service_default'], + $certfile = $facts['os_service_default'], + $delay_auth_decision = $facts['os_service_default'], + $enforce_token_bind = $facts['os_service_default'], + $http_connect_timeout = $facts['os_service_default'], + $http_request_max_retries = $facts['os_service_default'], + $include_service_catalog = $facts['os_service_default'], + $keyfile = $facts['os_service_default'], + $memcache_pool_conn_get_timeout = $facts['os_service_default'], + $memcache_pool_dead_retry = $facts['os_service_default'], + $memcache_pool_maxsize = $facts['os_service_default'], + $memcache_pool_socket_timeout = $facts['os_service_default'], + $memcache_pool_unused_timeout = $facts['os_service_default'], + $memcache_secret_key = $facts['os_service_default'], + $memcache_security_strategy = $facts['os_service_default'], + $memcache_use_advanced_pool = $facts['os_service_default'], + $memcached_servers = $facts['os_service_default'], $manage_memcache_package = false, - $region_name = $::os_service_default, - $token_cache_time = $::os_service_default, - $service_token_roles = $::os_service_default, - $service_token_roles_required = $::os_service_default, - $service_type = $::os_service_default, - $interface = $::os_service_default, + $region_name = $facts['os_service_default'], + $token_cache_time = $facts['os_service_default'], + $service_token_roles = $facts['os_service_default'], + $service_token_roles_required = $facts['os_service_default'], + $service_type = $facts['os_service_default'], + $interface = $facts['os_service_default'], $params = {}, ) { diff --git a/manifests/keystone/service_user.pp b/manifests/keystone/service_user.pp index f95ab473a..99416e865 100644 --- a/manifests/keystone/service_user.pp +++ b/manifests/keystone/service_user.pp @@ -10,7 +10,7 @@ # # [*password*] # (Optional) Password to create for the service user -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*auth_url*] # (Optional) The URL to use for authentication. @@ -30,7 +30,7 @@ # # [*system_scope*] # (Optional) Scope for system operations -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*send_service_user_token*] # (Optional) The service uses service token feature when this is set as true @@ -40,7 +40,7 @@ # (Optional) If true, explicitly allow TLS without checking server cert # against any certificate authorities. WARNING: not recommended. Use with # caution. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*auth_type*] # (Optional) Authentication type to load @@ -48,41 +48,41 @@ # # [*auth_version*] # (Optional) API version of the admin Identity API endpoint. -# Defaults to $::os_service_default. +# Defaults to $facts['os_service_default']. # # [*cafile*] # (Optional) A PEM encoded Certificate Authority to use when verifying HTTPs # connections. -# Defaults to $::os_service_default. +# Defaults to $facts['os_service_default']. # # [*certfile*] # (Optional) Required if identity server requires client certificate -# Defaults to $::os_service_default. +# Defaults to $facts['os_service_default']. # # [*keyfile*] # (Optional) Required if identity server requires client certificate -# Defaults to $::os_service_default. +# Defaults to $facts['os_service_default']. # # [*region_name*] # (Optional) The region in which the identity server can be found. -# Defaults to $::os_service_default. +# Defaults to $facts['os_service_default']. # class nova::keystone::service_user( $username = 'nova', - $password = $::os_service_default, + $password = $facts['os_service_default'], $auth_url = 'http://127.0.0.1:5000/', $project_name = 'services', $user_domain_name = 'Default', $project_domain_name = 'Default', - $system_scope = $::os_service_default, + $system_scope = $facts['os_service_default'], $send_service_user_token = false, - $insecure = $::os_service_default, + $insecure = $facts['os_service_default'], $auth_type = 'password', - $auth_version = $::os_service_default, - $cafile = $::os_service_default, - $certfile = $::os_service_default, - $keyfile = $::os_service_default, - $region_name = $::os_service_default, + $auth_version = $facts['os_service_default'], + $cafile = $facts['os_service_default'], + $certfile = $facts['os_service_default'], + $keyfile = $facts['os_service_default'], + $region_name = $facts['os_service_default'], ) { include nova::deps diff --git a/manifests/limit.pp b/manifests/limit.pp index f222acc6c..9e8be834c 100644 --- a/manifests/limit.pp +++ b/manifests/limit.pp @@ -32,7 +32,7 @@ # # [*system_scope*] # (Optional) Scope for system operations. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*auth_type*] # (Optional) Authentication type to load @@ -41,19 +41,19 @@ # [*service_type*] # (Optional) The name or type of the service as it appears in the service # catalog. This is used to validate tokens that have restricted access rules. -# Defaults to $::os_service_default. +# Defaults to $facts['os_service_default']. # # [*valid_interfaces*] # (Optional) List of interfaces, in order of preference, for endpoint URL. -# Defaults to $::os_service_default. +# Defaults to $facts['os_service_default']. # # [*region_name*] # (Optional) The region in which the identity server can be found. -# Defaults to $::os_service_default. +# Defaults to $facts['os_service_default']. # # [*endpoint_override*] # (Optional) Always use this endpoint URL for requests for this client. -# Defaults to $::os_service_default. +# Defaults to $facts['os_service_default']. # class nova::limit( $endpoint_id, @@ -63,12 +63,12 @@ class nova::limit( $project_name = 'services', $user_domain_name = 'Default', $project_domain_name = 'Default', - $system_scope = $::os_service_default, + $system_scope = $facts['os_service_default'], $auth_type = 'password', - $service_type = $::os_service_default, - $valid_interfaces = $::os_service_default, - $region_name = $::os_service_default, - $endpoint_override = $::os_service_default, + $service_type = $facts['os_service_default'], + $valid_interfaces = $facts['os_service_default'], + $region_name = $facts['os_service_default'], + $endpoint_override = $facts['os_service_default'], ) { include nova::deps diff --git a/manifests/logging.pp b/manifests/logging.pp index 545d08be3..a92e15fc9 100644 --- a/manifests/logging.pp +++ b/manifests/logging.pp @@ -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/nova' # # [*log_file*] # (Optional) File where logs should be stored. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*watch_log_file*] # (Optional) Uses logging handler designed to watch file system (boolean value). -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*logging_context_format_string*] # (Optional) Format string to use for log messages with context. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # Example: '%(asctime)s.%(msecs)03d %(process)d %(levelname)s %(name)s\ # [%(request_id)s %(user_identity)s] %(instance)s%(message)s' # # [*logging_default_format_string*] # (Optional) Format string to use for log messages without context. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # Example: '%(asctime)s.%(msecs)03d %(process)d %(levelname)s %(name)s\ # [-] %(instance)s%(message)s' # # [*logging_debug_format_suffix*] # (Optional) Formatted data to append to log format when level is DEBUG. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # Example: '%(funcName)s %(pathname)s:%(lineno)d' # # [*logging_exception_prefix*] # (Optional) Prefix each line of exception output with this format. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # Example: '%(asctime)s.%(msecs)03d %(process)d TRACE %(name)s %(instance)s' # # [*log_config_append*] # (Optional) The name of an additional logging configuration file. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # See https://docs.python.org/2/howto/logging.html # # [*default_log_levels*] # (Optional) Hash of logger (keys) and level (values) pairs. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # Example: # { 'amqp' => 'WARN', 'amqplib' => 'WARN', 'boto' => 'WARN', # 'sqlalchemy' => 'WARN', 'suds' => 'INFO', '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 nova::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/nova', - $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 nova::deps diff --git a/manifests/metadata.pp b/manifests/metadata.pp index 373693a24..30a6dce8c 100644 --- a/manifests/metadata.pp +++ b/manifests/metadata.pp @@ -10,7 +10,7 @@ # # [*metadata_cache_expiration*] # (optional) This option is the time (in seconds) to cache metadata. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*local_metadata_per_cell*] # (optional) Indicates that the nova-metadata API service has been deployed @@ -22,17 +22,17 @@ # When running nova-metadata API service per cell, you should also configure # each Neutron metadata-agent to point to the corresponding nova-metadata API # service. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*dhcp_domain*] # (optional) domain to use for building the hostnames -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # class nova::metadata( $neutron_metadata_proxy_shared_secret = undef, - $metadata_cache_expiration = $::os_service_default, - $local_metadata_per_cell = $::os_service_default, - $dhcp_domain = $::os_service_default, + $metadata_cache_expiration = $facts['os_service_default'], + $local_metadata_per_cell = $facts['os_service_default'], + $dhcp_domain = $facts['os_service_default'], ) inherits nova::params { include nova::deps diff --git a/manifests/migration/libvirt.pp b/manifests/migration/libvirt.pp index 420a2a428..458406a27 100644 --- a/manifests/migration/libvirt.pp +++ b/manifests/migration/libvirt.pp @@ -16,12 +16,12 @@ # # [*listen_address*] # (optional) Bind libvirtd tcp/tls socket to the given address. -# Defaults to $::os_service_default (bind to all addresses) +# Defaults to $facts['os_service_default'] (bind to all addresses) # # [*live_migration_inbound_addr*] # (optional) The IP address or hostname to be used as the target for live # migration traffic. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*live_migration_tunnelled*] # (optional) Whether to use tunnelled migration, where migration data is @@ -32,7 +32,7 @@ # If False, use the native transport. # If not set, Nova will choose a sensible default based on, for example # the availability of native encryption support in the hypervisor. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*live_migration_with_native_tls*] # (optional) This option will allow both migration stream (guest RAM plus @@ -42,30 +42,30 @@ # Compute nodes. This means, Certificate Authority (CA), server, client # certificates, their corresponding keys, and their file permissions are # in place, and are validated. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*live_migration_downtime*] # (optional) Target maximum period of time Nova will try to keep the instance paused # during the last part of the memory copy, in miliseconds. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*live_migration_downtime_steps*] # (optional) Number of incremental steps to reach max downtime value. # Minimum number of steps is 3. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*live_migration_downtime_delay*] # (optional) Time to wait, in seconds, between each step increase of the migration # downtime. Value is per GiB of guest RAM + disk to be transferred, with lower bound # of a minimum of 2 GiB per device. Minimum delay is 3 seconds. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*live_migration_completion_timeout*] # (optional) Time to wait, in seconds, for migration to successfully complete # transferring data before aborting the operation. Value is per GiB of guest # RAM + disk to be transferred, with lower bound of a minimum of 2 GiB. Set # to 0 to disable timeouts. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*live_migration_timeout_action*] # (optional) This option will be used to determine what action will be taken @@ -73,7 +73,7 @@ # the live migrate operation will be aborted after completion timeout. # If it is set to force_complete, the compute service will either pause the # VM or trigger post-copy depending on if post copy is enabled and available -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*live_migration_permit_post_copy*] # (optional) This option allows nova to switch an on-going live migration @@ -81,7 +81,7 @@ # node before the migration is complete, therefore ensuring an upper bound # on the memory that needs to be transferred. # Post-copy requires libvirt>=1.3.3 and QEMU>=2.5.0. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*live_migration_permit_auto_converge*] # (optional) This option allows nova to start live migration with auto @@ -89,7 +89,7 @@ # live migration is slow. Auto converge will only be used if this flag is # set to True and post copy is not permitted or post copy is unavailable # due to the version of libvirt and QEMU in use. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*override_uuid*] # (optional) Set uuid not equal to output from dmidecode (boolean) @@ -126,13 +126,13 @@ # (optional) Specifies the CA certificate that the TLS transport will use. # Note that this is only used if the TLS transport is enabled via the # "transport" option. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*crl_file*] # (optional) Specifies the CRL file that the TLS transport will use. # Note that this is only used if the TLS transport is enabled via the # "transport" option. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*libvirt_version*] # (optional) installed libvirt version. Default is automatic detected depending @@ -147,17 +147,17 @@ class nova::migration::libvirt( $transport = undef, $auth = 'none', - $listen_address = $::os_service_default, - $live_migration_inbound_addr = $::os_service_default, - $live_migration_tunnelled = $::os_service_default, - $live_migration_with_native_tls = $::os_service_default, - $live_migration_downtime = $::os_service_default, - $live_migration_downtime_steps = $::os_service_default, - $live_migration_downtime_delay = $::os_service_default, - $live_migration_completion_timeout = $::os_service_default, - $live_migration_timeout_action = $::os_service_default, - $live_migration_permit_post_copy = $::os_service_default, - $live_migration_permit_auto_converge = $::os_service_default, + $listen_address = $facts['os_service_default'], + $live_migration_inbound_addr = $facts['os_service_default'], + $live_migration_tunnelled = $facts['os_service_default'], + $live_migration_with_native_tls = $facts['os_service_default'], + $live_migration_downtime = $facts['os_service_default'], + $live_migration_downtime_steps = $facts['os_service_default'], + $live_migration_downtime_delay = $facts['os_service_default'], + $live_migration_completion_timeout = $facts['os_service_default'], + $live_migration_timeout_action = $facts['os_service_default'], + $live_migration_permit_post_copy = $facts['os_service_default'], + $live_migration_permit_auto_converge = $facts['os_service_default'], $override_uuid = false, $host_uuid = undef, $configure_libvirt = true, @@ -165,8 +165,8 @@ class nova::migration::libvirt( $client_user = undef, $client_port = undef, $client_extraparams = {}, - $ca_file = $::os_service_default, - $crl_file = $::os_service_default, + $ca_file = $facts['os_service_default'], + $crl_file = $facts['os_service_default'], $libvirt_version = $::nova::compute::libvirt::version::default, $modular_libvirt = undef, ) inherits nova::compute::libvirt::version { @@ -251,7 +251,7 @@ class nova::migration::libvirt( File_line<| tag == 'libvirt-file_line' |> ~> Service['libvirt'] if $override_uuid { - if ! $::libvirt_uuid { + if ! $facts['libvirt_uuid'] { $host_uuid_real = pick( $host_uuid, generate('/bin/cat', '/proc/sys/kernel/random/uuid')) @@ -260,7 +260,7 @@ class nova::migration::libvirt( require => Package['libvirt'], } } else { - $host_uuid_real = $::libvirt_uuid + $host_uuid_real = $facts['libvirt_uuid'] } if $modular_libvirt_real { @@ -284,19 +284,19 @@ class nova::migration::libvirt( if $transport_real == 'tls' { $auth_tls_real = $auth - $auth_tcp_real = $::os_service_default + $auth_tcp_real = $facts['os_service_default'] $ca_file_real = $ca_file $crl_file_real = $crl_file } elsif $transport_real == 'tcp' { - $auth_tls_real = $::os_service_default + $auth_tls_real = $facts['os_service_default'] $auth_tcp_real = $auth - $ca_file_real = $::os_service_default - $crl_file_real = $::os_service_default + $ca_file_real = $facts['os_service_default'] + $crl_file_real = $facts['os_service_default'] } else { - $auth_tls_real = $::os_service_default - $auth_tcp_real = $::os_service_default - $ca_file_real = $::os_service_default - $crl_file_real = $::os_service_default + $auth_tls_real = $facts['os_service_default'] + $auth_tcp_real = $facts['os_service_default'] + $ca_file_real = $facts['os_service_default'] + $crl_file_real = $facts['os_service_default'] } $libvirt_listen_config = $modular_libvirt_real ? { @@ -343,7 +343,7 @@ class nova::migration::libvirt( } } - case $::osfamily { + case $facts['os']['family'] { 'RedHat': { # NOTE(tkajinam): Since libvirt 8.1.0, the sysconfig files are # no longer provided by packages. @@ -365,7 +365,7 @@ class nova::migration::libvirt( } } default: { - warning("Unsupported osfamily: ${::osfamily}, make sure you are configuring this yourself") + warning("Unsupported osfamily: ${facts['os']['family']}, make sure you are configuring this yourself") } } } diff --git a/manifests/network/neutron.pp b/manifests/network/neutron.pp index 729588d43..d7d7ee8bc 100644 --- a/manifests/network/neutron.pp +++ b/manifests/network/neutron.pp @@ -24,7 +24,7 @@ # # [*system_scope*] # (Optional) Scope for system operations -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*username*] # (optional) Username for connecting to Neutron network services in admin context @@ -44,11 +44,11 @@ # # [*valid_interfaces*] # (optional) The endpoint type to lookup when talking to Neutron. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*endpoint_override*] # (optional) Override the endpoint to use to talk to Neutron. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*timeout*] # (optional) Timeout value for connecting to neutron in seconds. @@ -62,56 +62,56 @@ # [*http_retries*] # (optional) Number of times neutronclient should retry on any failed http # call. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*service_type*] # (optional) The default service_type for endpoint URL discovery. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*ovs_bridge*] # (optional) Name of Integration Bridge used by Open vSwitch -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*extension_sync_interval*] # (optional) Number of seconds before querying neutron for extensions -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*vif_plugging_is_fatal*] # (optional) Fail to boot instance if vif plugging fails. # This prevents nova from booting an instance if vif plugging notification # is not received from neutron. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*vif_plugging_timeout*] # (optional) Number of seconds to wait for neutron vif plugging events. # Set to '0' and vif_plugging_is_fatal to 'False' if vif plugging # notification is not being used. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*default_floating_pool*] # (optional) Default pool for floating IPs -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # class nova::network::neutron ( $password, $auth_type = 'v3password', $project_name = 'services', $project_domain_name = 'Default', - $system_scope = $::os_service_default, + $system_scope = $facts['os_service_default'], $username = 'neutron', $user_domain_name = 'Default', $auth_url = 'http://127.0.0.1:5000/v3', - $valid_interfaces = $::os_service_default, - $endpoint_override = $::os_service_default, + $valid_interfaces = $facts['os_service_default'], + $endpoint_override = $facts['os_service_default'], $timeout = '30', $region_name = 'RegionOne', - $http_retries = $::os_service_default, - $service_type = $::os_service_default, - $ovs_bridge = $::os_service_default, - $extension_sync_interval = $::os_service_default, - $vif_plugging_is_fatal = $::os_service_default, - $vif_plugging_timeout = $::os_service_default, - $default_floating_pool = $::os_service_default, + $http_retries = $facts['os_service_default'], + $service_type = $facts['os_service_default'], + $ovs_bridge = $facts['os_service_default'], + $extension_sync_interval = $facts['os_service_default'], + $vif_plugging_is_fatal = $facts['os_service_default'], + $vif_plugging_timeout = $facts['os_service_default'], + $default_floating_pool = $facts['os_service_default'], ) { include nova::deps @@ -120,8 +120,8 @@ class nova::network::neutron ( $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'] } nova_config { diff --git a/manifests/params.pp b/manifests/params.pp index 57fd6758a..12607330c 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -13,7 +13,7 @@ class nova::params { $nova_user = $user $nova_group = $group - case $::osfamily { + case $facts['os']['family'] { 'RedHat': { # package names $api_package_name = 'openstack-nova-api' @@ -90,7 +90,7 @@ class nova::params { # debian specific nova config $root_helper = 'sudo nova-rootwrap' $lock_path = '/var/lock/nova' - case $::operatingsystem { + case $facts['os']['name'] { 'Debian': { $api_metadata_service_name = 'nova-api-metadata' $spicehtml5proxy_package_name = 'nova-consoleproxy' @@ -127,8 +127,7 @@ class nova::params { $libvirt_service_name = 'libvirtd' } default: { - fail("Unsupported osfamily: ${::osfamily} operatingsystem: ${::operatingsystem}, \ -module ${module_name} only support osfamily RedHat and Debian") + fail("Unsupported osfamily: ${facts['os']['family']}") } } diff --git a/manifests/patch/config.pp b/manifests/patch/config.pp index 50c2d0665..d4074afb7 100644 --- a/manifests/patch/config.pp +++ b/manifests/patch/config.pp @@ -10,16 +10,16 @@ # # [*monkey_patch_modules*] # (optional) List of modules/decorators to monkey patch -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # class nova::patch::config ( $monkey_patch = false, - $monkey_patch_modules = $::os_service_default, + $monkey_patch_modules = $facts['os_service_default'], ) { include nova::deps - $monkey_patch_modules_real = pick(join(any2array($monkey_patch_modules), ','), $::os_service_default) + $monkey_patch_modules_real = pick(join(any2array($monkey_patch_modules), ','), $facts['os_service_default']) nova_config { 'DEFAULT/monkey_patch': value => $monkey_patch; diff --git a/manifests/pci.pp b/manifests/pci.pp index e8368d235..89db16162 100644 --- a/manifests/pci.pp +++ b/manifests/pci.pp @@ -6,13 +6,13 @@ # # [*aliases*] # (optional) A list of pci alias hashes -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # Example: # [{"vendor_id" => "1234", "product_id" => "5678", "name" => "default"}, # {"vendor_id" => "1234", "product_id" => "6789", "name" => "other"}] class nova::pci( - $aliases = $::os_service_default + $aliases = $facts['os_service_default'] ) { include nova::deps @@ -21,7 +21,7 @@ class nova::pci( !empty($aliases) { $aliases_real = to_array_of_json_strings($aliases) } else { - $aliases_real = $::os_service_default + $aliases_real = $facts['os_service_default'] } nova_config { 'pci/alias': value => $aliases_real; diff --git a/manifests/placement.pp b/manifests/placement.pp index 863482eaf..81044283a 100644 --- a/manifests/placement.pp +++ b/manifests/placement.pp @@ -24,7 +24,7 @@ # # [*system_scope*] # (Optional) Scope for system operations -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*user_domain_name*] # (optional) User Domain name for connecting to Placement API service in @@ -44,7 +44,7 @@ # [*valid_interfaces*] # (optional) Interface names used for getting the keystone endpoint for # the placement API. Comma separated if multiple. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*auth_url*] # (optional) Points to the OpenStack Identity server IP and port. @@ -57,10 +57,10 @@ class nova::placement( $auth_type = 'password', $auth_url = 'http://127.0.0.1:5000/v3', $region_name = 'RegionOne', - $valid_interfaces = $::os_service_default, + $valid_interfaces = $facts['os_service_default'], $project_domain_name = 'Default', $project_name = 'services', - $system_scope = $::os_service_default, + $system_scope = $facts['os_service_default'], $user_domain_name = 'Default', $username = 'placement', ) inherits nova::params { @@ -71,8 +71,8 @@ class nova::placement( $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'] } nova_config { diff --git a/manifests/policy.pp b/manifests/policy.pp index 6acd2d713..ff719f75f 100644 --- a/manifests/policy.pp +++ b/manifests/policy.pp @@ -6,12 +6,12 @@ # # [*enforce_scope*] # (Optional) Whether or not to enforce scope when evaluating policies. -# Defaults to $::os_service_default. +# Defaults to $facts['os_service_default']. # # [*enforce_new_defaults*] # (Optional) Whether or not to use old deprecated defaults when evaluating # policies. -# Defaults to $::os_service_default. +# Defaults to $facts['os_service_default']. # # [*policies*] # (Optional) Set of policies to configure for nova @@ -34,11 +34,11 @@ # # [*policy_default_rule*] # (Optional) Default rule. Enforced when a requested rule is not found. -# Defaults to $::os_service_default. +# Defaults to $facts['os_service_default']. # # [*policy_dirs*] # (Optional) Path to the nova policy folder -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*purge_config*] # (optional) Whether to set only the specified policy rules in the policy @@ -46,12 +46,12 @@ # Defaults to false. # class nova::policy ( - $enforce_scope = $::os_service_default, - $enforce_new_defaults = $::os_service_default, + $enforce_scope = $facts['os_service_default'], + $enforce_new_defaults = $facts['os_service_default'], $policies = {}, $policy_path = '/etc/nova/policy.yaml', - $policy_default_rule = $::os_service_default, - $policy_dirs = $::os_service_default, + $policy_default_rule = $facts['os_service_default'], + $policy_dirs = $facts['os_service_default'], $purge_config = false, ) { diff --git a/manifests/quota.pp b/manifests/quota.pp index aee915a83..4f56efd18 100644 --- a/manifests/quota.pp +++ b/manifests/quota.pp @@ -6,71 +6,71 @@ # # [*driver*] # (optional) Driver to use for quota checks. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*instances*] # (optional) Number of instances -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*cores*] # (optional) Number of cores -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*ram*] # (optional) Ram in MB -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*metadata_items*] # (optional) Number of metadata items per instance -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*injected_files*] # (optional) Number of files that can be injected per instance -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*injected_file_content_bytes*] # (optional) Maximum size in bytes of injected files -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*injected_file_path_length*] # (optional) Maximum size in bytes of injected file path -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*key_pairs*] # (optional) Number of key pairs -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*server_groups*] # (optional) Number of server groups per project -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*server_group_members*] # (optional) Number of servers per server group -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*recheck_quota*] # (optional) Recheck quota after resource creation to prevent allowing # quota to be exceeded. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*count_usage_from_placement*] # (optional Enable the counting of quota usage from the placement service. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # class nova::quota( - $driver = $::os_service_default, - $instances = $::os_service_default, - $cores = $::os_service_default, - $ram = $::os_service_default, - $metadata_items = $::os_service_default, - $injected_files = $::os_service_default, - $injected_file_content_bytes = $::os_service_default, - $injected_file_path_length = $::os_service_default, - $key_pairs = $::os_service_default, - $server_groups = $::os_service_default, - $server_group_members = $::os_service_default, - $recheck_quota = $::os_service_default, - $count_usage_from_placement = $::os_service_default, + $driver = $facts['os_service_default'], + $instances = $facts['os_service_default'], + $cores = $facts['os_service_default'], + $ram = $facts['os_service_default'], + $metadata_items = $facts['os_service_default'], + $injected_files = $facts['os_service_default'], + $injected_file_content_bytes = $facts['os_service_default'], + $injected_file_path_length = $facts['os_service_default'], + $key_pairs = $facts['os_service_default'], + $server_groups = $facts['os_service_default'], + $server_group_members = $facts['os_service_default'], + $recheck_quota = $facts['os_service_default'], + $count_usage_from_placement = $facts['os_service_default'], ) { include nova::deps diff --git a/manifests/scheduler.pp b/manifests/scheduler.pp index 877d1642b..21366c806 100644 --- a/manifests/scheduler.pp +++ b/manifests/scheduler.pp @@ -18,28 +18,28 @@ # # [*workers*] # (Optional) The amount of scheduler workers. -# Defaults to $::os_workers +# Defaults to $facts['os_workers'] # # [*max_attempts*] # (optional) Maximum number of attempts to schedule an instance -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*discover_hosts_in_cells_interval*] # (Optional) This value controls how often (in seconds) the scheduler should # attempt to discover new hosts that have been added to cells. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*query_placement_for_image_type_support*] # (Optional) This setting causes the scheduler to ask placement only for # compute hosts that support the ``disk_format`` of the image used in the # request. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*limit_tenants_to_placement_aggregate*] # (Optional) This setting allows to have tenant isolation with placement. # It ensures hosts in tenant-isolated host aggregate and availability # zones will only be available to specific set of tenants. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*placement_aggregate_required_for_tenants*] # (Optional) This setting controls if a tenant with no aggregate affinity @@ -48,23 +48,23 @@ # If aggregates are used to limit some tenants but not all, then this should # be False. # If all tenants should be confined via aggregate, then this should be True. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*max_placement_results*] # (Optional) This setting determines the maximum limit on results received # from the placement service during a scheduling operation. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*enable_isolated_aggregate_filtering*] # (Optional) This setting allows the scheduler to restrict hosts in aggregates # based on matching required traits in the aggregate metadata and the instance # flavor/image. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*query_placement_for_routed_network_aggregates*] # (Optional) This setting allows to enable the scheduler to filter # compute hosts affined to routed network segment aggregates. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # DEPRECATED PARAMETERS # @@ -79,15 +79,15 @@ class nova::scheduler( $enabled = true, $manage_service = true, $ensure_package = 'present', - $workers = $::os_workers, - $max_attempts = $::os_service_default, - $discover_hosts_in_cells_interval = $::os_service_default, - $query_placement_for_image_type_support = $::os_service_default, - $limit_tenants_to_placement_aggregate = $::os_service_default, - $placement_aggregate_required_for_tenants = $::os_service_default, - $max_placement_results = $::os_service_default, - $enable_isolated_aggregate_filtering = $::os_service_default, - $query_placement_for_routed_network_aggregates = $::os_service_default, + $workers = $facts['os_workers'], + $max_attempts = $facts['os_service_default'], + $discover_hosts_in_cells_interval = $facts['os_service_default'], + $query_placement_for_image_type_support = $facts['os_service_default'], + $limit_tenants_to_placement_aggregate = $facts['os_service_default'], + $placement_aggregate_required_for_tenants = $facts['os_service_default'], + $max_placement_results = $facts['os_service_default'], + $enable_isolated_aggregate_filtering = $facts['os_service_default'], + $query_placement_for_routed_network_aggregates = $facts['os_service_default'], # DEPRECATED PARAMETERS $query_placement_for_availability_zone = undef, ) { @@ -100,7 +100,7 @@ class nova::scheduler( if $query_placement_for_availability_zone != undef { warning('The query_placement_for_availability_zone parameter is deprecated.') } - $query_placement_for_availability_zone_real = pick($query_placement_for_availability_zone, $::os_service_default) + $query_placement_for_availability_zone_real = pick($query_placement_for_availability_zone, $facts['os_service_default']) nova::generic_service { 'scheduler': enabled => $enabled, diff --git a/manifests/scheduler/filter.pp b/manifests/scheduler/filter.pp index 815687665..77aa7851c 100644 --- a/manifests/scheduler/filter.pp +++ b/manifests/scheduler/filter.pp @@ -6,23 +6,23 @@ # # [*scheduler_host_subset_size*] # (optional) defines the subset size that a host is chosen from -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*max_io_ops_per_host*] # (optional) Ignore hosts that have too many builds/resizes/snaps/migrations -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*max_instances_per_host*] # (optional) Ignore hosts that have too many instances -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*isolated_images*] # (optional) An array of images to run on isolated host -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*isolated_hosts*] # (optional) An array of hosts reserved for specific images -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*scheduler_available_filters*] # (optional) An array with filter classes available to the scheduler. @@ -31,7 +31,7 @@ # # [*scheduler_enabled_filters*] # (optional) An array of filters to be used by default -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*scheduler_weight_classes*] # (optional) Which weight class names to use for weighing hosts @@ -39,91 +39,91 @@ # # [*track_instance_changes*] # (optional) Enable querying of individual hosts for instance information. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*ram_weight_multiplier*] # (optional) Ram weight multiplier ratio. This option determines how hosts # with more or less available RAM are weighed. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*cpu_weight_multiplier*] # (optional) CPU weight multiplier ratio. This options determines how hosts # with more or less available CPU cores are weighed. Negative numbers mean # to stack vs spread. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*disk_weight_multiplier*] # (optional) Disk weight multiplier ratio. Multiplier used for weighing free # disk space. Negative numbers mean to stack vs spread. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*io_ops_weight_multiplier*] # (optional) IO operations weight multiplier ratio. This option determines # how hosts with differing workloads are weighed -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*soft_affinity_weight_multiplier*] # (optional) Multiplier used for weighing hosts for group soft-affinity -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*soft_anti_affinity_weight_multiplier*] # (optional) Multiplier used for weighing hosts for group soft-anti-affinity -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*build_failure_weight_multiplier*] # (optional) Multiplier used for weighing hosts that have had recent build # failures -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*cross_cell_move_weight_multiplier*] # (optional) Multiplier used for weighing hosts during a cross-cell move -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*shuffle_best_same_weighed_hosts*] # (Optional) Enabled spreading the instances between hosts with the same # best weight -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*restrict_isolated_hosts_to_isolated_images*] # (optional) Prevent non-isolated images from being built on isolated hosts. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*aggregate_image_properties_isolation_namespace*] # (optional) Image property namespace for use in the host aggregate -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*aggregate_image_properties_isolation_separator*] # (optional) Separator character(s) for image property namespace and name -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # class nova::scheduler::filter ( - $scheduler_host_subset_size = $::os_service_default, - $max_io_ops_per_host = $::os_service_default, - $max_instances_per_host = $::os_service_default, - $isolated_images = $::os_service_default, - $isolated_hosts = $::os_service_default, + $scheduler_host_subset_size = $facts['os_service_default'], + $max_io_ops_per_host = $facts['os_service_default'], + $max_instances_per_host = $facts['os_service_default'], + $isolated_images = $facts['os_service_default'], + $isolated_hosts = $facts['os_service_default'], $scheduler_available_filters = ['nova.scheduler.filters.all_filters'], - $scheduler_enabled_filters = $::os_service_default, + $scheduler_enabled_filters = $facts['os_service_default'], $scheduler_weight_classes = 'nova.scheduler.weights.all_weighers', - $track_instance_changes = $::os_service_default, - $ram_weight_multiplier = $::os_service_default, - $cpu_weight_multiplier = $::os_service_default, - $disk_weight_multiplier = $::os_service_default, - $io_ops_weight_multiplier = $::os_service_default, - $soft_affinity_weight_multiplier = $::os_service_default, - $soft_anti_affinity_weight_multiplier = $::os_service_default, - $build_failure_weight_multiplier = $::os_service_default, - $cross_cell_move_weight_multiplier = $::os_service_default, - $shuffle_best_same_weighed_hosts = $::os_service_default, - $restrict_isolated_hosts_to_isolated_images = $::os_service_default, - $aggregate_image_properties_isolation_namespace = $::os_service_default, - $aggregate_image_properties_isolation_separator = $::os_service_default, + $track_instance_changes = $facts['os_service_default'], + $ram_weight_multiplier = $facts['os_service_default'], + $cpu_weight_multiplier = $facts['os_service_default'], + $disk_weight_multiplier = $facts['os_service_default'], + $io_ops_weight_multiplier = $facts['os_service_default'], + $soft_affinity_weight_multiplier = $facts['os_service_default'], + $soft_anti_affinity_weight_multiplier = $facts['os_service_default'], + $build_failure_weight_multiplier = $facts['os_service_default'], + $cross_cell_move_weight_multiplier = $facts['os_service_default'], + $shuffle_best_same_weighed_hosts = $facts['os_service_default'], + $restrict_isolated_hosts_to_isolated_images = $facts['os_service_default'], + $aggregate_image_properties_isolation_namespace = $facts['os_service_default'], + $aggregate_image_properties_isolation_separator = $facts['os_service_default'], ) { include nova::deps # The following values are following this rule: - # - default is $::os_service_default so Puppet won't try to configure it. + # - default is $facts['os_service_default'] so Puppet won't try to configure it. # - if set, we'll validate it's an array that is not empty and configure the parameter. # - Otherwise, fallback to default. @@ -131,12 +131,12 @@ class nova::scheduler::filter ( validate_legacy(Array, 'validate_array', $scheduler_enabled_filters) $scheduler_enabled_filters_real = join($scheduler_enabled_filters, ',') } else { - $scheduler_enabled_filters_real = $::os_service_default + $scheduler_enabled_filters_real = $facts['os_service_default'] } if $scheduler_available_filters =~ Array { if empty($scheduler_available_filters) { - $scheduler_available_filters_real = $::os_service_default + $scheduler_available_filters_real = $facts['os_service_default'] } else { $scheduler_available_filters_real = $scheduler_available_filters } @@ -149,13 +149,13 @@ class nova::scheduler::filter ( validate_legacy(Array, 'validate_array', $isolated_images) $isolated_images_real = join($isolated_images, ',') } else { - $isolated_images_real = $::os_service_default + $isolated_images_real = $facts['os_service_default'] } if !is_service_default($isolated_hosts) and !empty($isolated_hosts){ validate_legacy(Array, 'validate_array', $isolated_hosts) $isolated_hosts_real = join($isolated_hosts, ',') } else { - $isolated_hosts_real = $::os_service_default + $isolated_hosts_real = $facts['os_service_default'] } nova_config { diff --git a/manifests/spicehtml5proxy.pp b/manifests/spicehtml5proxy.pp index ded3b5f53..a5d54df4d 100644 --- a/manifests/spicehtml5proxy.pp +++ b/manifests/spicehtml5proxy.pp @@ -56,7 +56,7 @@ class nova::spicehtml5proxy( # 3/ Start the service # Other OS don't need this scheduling and can use # the standard nova::generic_service - if $::operatingsystem == 'Debian' { + if $facts['os']['name'] == 'Debian' { if $enabled { file_line { '/etc/default/nova-consoleproxy:NOVA_CONSOLE_PROXY_TYPE': path => '/etc/default/nova-consoleproxy', diff --git a/manifests/vendordata.pp b/manifests/vendordata.pp index 37791e60e..168242363 100644 --- a/manifests/vendordata.pp +++ b/manifests/vendordata.pp @@ -10,48 +10,48 @@ # available to the instances via the metadata service, and to the rendering of # config-drive. The default class for this, JsonFileVendorData, loads this # information from a JSON file, whose path is configured by this option -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*vendordata_providers*] # (optional) vendordata providers are how deployers can provide metadata via # configdrive and metadata that is specific to their deployment. There are # currently two supported providers: StaticJSON and DynamicJSON. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*vendordata_dynamic_targets*] # (optional) A list of targets for the dynamic vendordata provider. These # targets are of the form @. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*vendordata_dynamic_connect_timeout*] # (optional) Maximum wait time for an external REST service to connect. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*vendordata_dynamic_read_timeout*] # (optional) Maximum wait time for an external REST service to return data # once connected. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*vendordata_dynamic_failure_fatal*] # (optional) Should failures to fetch dynamic vendordata be fatal to # instance boot? -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*vendordata_dynamic_auth_auth_type*] # (optional) Authentication type to load for vendordata dynamic plugins. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*vendordata_dynamic_auth_auth_url*] # (optional) URL to use for authenticating. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*vendordata_dynamic_auth_os_region_name*] # (optional) Region name for the vendordata dynamic plugin credentials. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*vendordata_dynamic_auth_password*] # (optional) Password for the vendordata dynamic plugin credentials. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*vendordata_dynamic_auth_project_domain_name*] # (optional) Project domain name for the vendordata dynamic plugin @@ -60,11 +60,11 @@ # # [*vendordata_dynamic_auth_project_name*] # (optional) Project name for the vendordata dynamic plugin credentials. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*vendordata_dynamic_auth_system_scope*] # (optional) Scope for system operations. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*vendordata_dynamic_auth_user_domain_name*] # (optional) User domain name for the vendordata dynamic plugin credentials. @@ -72,24 +72,24 @@ # # [*vendordata_dynamic_auth_username*] # (optional) User name for the vendordata dynamic plugin credentials. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # class nova::vendordata( - $vendordata_jsonfile_path = $::os_service_default, - $vendordata_providers = $::os_service_default, - $vendordata_dynamic_targets = $::os_service_default, - $vendordata_dynamic_connect_timeout = $::os_service_default, - $vendordata_dynamic_read_timeout = $::os_service_default, - $vendordata_dynamic_failure_fatal = $::os_service_default, - $vendordata_dynamic_auth_auth_type = $::os_service_default, - $vendordata_dynamic_auth_auth_url = $::os_service_default, - $vendordata_dynamic_auth_os_region_name = $::os_service_default, - $vendordata_dynamic_auth_password = $::os_service_default, + $vendordata_jsonfile_path = $facts['os_service_default'], + $vendordata_providers = $facts['os_service_default'], + $vendordata_dynamic_targets = $facts['os_service_default'], + $vendordata_dynamic_connect_timeout = $facts['os_service_default'], + $vendordata_dynamic_read_timeout = $facts['os_service_default'], + $vendordata_dynamic_failure_fatal = $facts['os_service_default'], + $vendordata_dynamic_auth_auth_type = $facts['os_service_default'], + $vendordata_dynamic_auth_auth_url = $facts['os_service_default'], + $vendordata_dynamic_auth_os_region_name = $facts['os_service_default'], + $vendordata_dynamic_auth_password = $facts['os_service_default'], $vendordata_dynamic_auth_project_domain_name = 'Default', - $vendordata_dynamic_auth_project_name = $::os_service_default, - $vendordata_dynamic_auth_system_scope = $::os_service_default, + $vendordata_dynamic_auth_project_name = $facts['os_service_default'], + $vendordata_dynamic_auth_system_scope = $facts['os_service_default'], $vendordata_dynamic_auth_user_domain_name = 'Default', - $vendordata_dynamic_auth_username = $::os_service_default, + $vendordata_dynamic_auth_username = $facts['os_service_default'], ) inherits nova::params { include nova::deps @@ -97,22 +97,22 @@ class nova::vendordata( validate_legacy(Array, 'validate_array', $vendordata_providers) $vendordata_providers_real = join($vendordata_providers, ',') } else { - $vendordata_providers_real = $::os_service_default + $vendordata_providers_real = $facts['os_service_default'] } if !is_service_default($vendordata_dynamic_targets) and !empty($vendordata_dynamic_targets){ validate_legacy(Array, 'validate_array', $vendordata_dynamic_targets) $vendordata_dynamic_targets_real = join($vendordata_dynamic_targets, ',') } else { - $vendordata_dynamic_targets_real = $::os_service_default + $vendordata_dynamic_targets_real = $facts['os_service_default'] } if is_service_default($vendordata_dynamic_auth_system_scope) { $vendordata_dynamic_auth_project_name_real = $vendordata_dynamic_auth_project_name $vendordata_dynamic_auth_project_domain_name_real = $vendordata_dynamic_auth_project_domain_name } else { - $vendordata_dynamic_auth_project_name_real = $::os_service_default - $vendordata_dynamic_auth_project_domain_name_real = $::os_service_default + $vendordata_dynamic_auth_project_name_real = $facts['os_service_default'] + $vendordata_dynamic_auth_project_domain_name_real = $facts['os_service_default'] } nova_config { diff --git a/manifests/vncproxy.pp b/manifests/vncproxy.pp index 8de0accb2..88389bb39 100644 --- a/manifests/vncproxy.pp +++ b/manifests/vncproxy.pp @@ -126,7 +126,7 @@ class nova::vncproxy( # 3/ Start the service # Other OS don't need this scheduling and can use # the standard nova::generic_service - if $::operatingsystem == 'Debian' { + if $facts['os']['name'] == 'Debian' { if $enabled { file_line { '/etc/default/nova-consoleproxy:NOVA_CONSOLE_PROXY_TYPE': path => '/etc/default/nova-consoleproxy', diff --git a/manifests/workarounds.pp b/manifests/workarounds.pp index 1615caedb..eaf171c45 100644 --- a/manifests/workarounds.pp +++ b/manifests/workarounds.pp @@ -7,36 +7,36 @@ # [*never_download_image_if_on_rbd*] # (Optional) refuse to boot an instance if it would require downloading from # glance and uploading to ceph instead of a COW clone -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*ensure_libvirt_rbd_instance_dir_cleanup*] # (Optional) Ensure the instance directory is removed during clean up when using # rbd. When enabled this workaround will ensure that the instance directory is # always removed during cleanup on hosts using ``[libvirt]/images_type=rbd`` -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*enable_qemu_monitor_announce_self*] # (Optional) If it is set to True the libvirt driver will try as a best effort to # send the announce-self command to the QEMU monitor so that it generates RARP frames # to update network switches in the post live migration phase on the destination. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*wait_for_vif_plugged_event_during_hard_reboot*] # (Optional) If set Nova will wait for the Neutron ML2 backend to sent vif # plugged events when performing hard reboot. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*disable_compute_service_check_for_ffu*] # (Optional) If this is set, the normal safety check for old compute services will # be treated as a warning instead of an error. This is only to be enabled to # facilitate a Fast-Forward upgrade where new control services are being started # before compute nodes have been able to update their service record. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # [*skip_hypervisor_version_check_on_lm*] # (Optional) When this is enabled, it will skip version-checking of # hypervisors during live migration. -# Defaults to $::os_service_default +# Defaults to $facts['os_service_default'] # # DEPRECATED # @@ -45,12 +45,12 @@ # Defaults to undef # class nova::workarounds ( - $never_download_image_if_on_rbd = $::os_service_default, - $ensure_libvirt_rbd_instance_dir_cleanup = $::os_service_default, - $enable_qemu_monitor_announce_self = $::os_service_default, - $wait_for_vif_plugged_event_during_hard_reboot = $::os_service_default, - $disable_compute_service_check_for_ffu = $::os_service_default, - $skip_hypervisor_version_check_on_lm = $::os_service_default, + $never_download_image_if_on_rbd = $facts['os_service_default'], + $ensure_libvirt_rbd_instance_dir_cleanup = $facts['os_service_default'], + $enable_qemu_monitor_announce_self = $facts['os_service_default'], + $wait_for_vif_plugged_event_during_hard_reboot = $facts['os_service_default'], + $disable_compute_service_check_for_ffu = $facts['os_service_default'], + $skip_hypervisor_version_check_on_lm = $facts['os_service_default'], # DEPRECATED PARAMETER $enable_numa_live_migration = undef, ) { diff --git a/manifests/wsgi/apache_api.pp b/manifests/wsgi/apache_api.pp index e8731c423..53fafe22e 100644 --- a/manifests/wsgi/apache_api.pp +++ b/manifests/wsgi/apache_api.pp @@ -26,7 +26,7 @@ # # [*servername*] # (Optional) The servername for the virtualhost. -# Defaults to $::fqdn +# Defaults to $facts['networking']['fqdn'] # # [*port*] # (Optional) The port for Nova API service. @@ -46,7 +46,7 @@ # # [*workers*] # (Optional) Number of WSGI workers to spawn. -# Defaults to $::os_workers +# Defaults to $facts['os_workers'] # # [*priority*] # (Optional) The priority for the vhost. @@ -138,12 +138,12 @@ # class { 'nova::wsgi::apache': } # class nova::wsgi::apache_api ( - $servername = $::fqdn, + $servername = $facts['networking']['fqdn'], $port = 8774, $bind_host = undef, $path = '/', $ssl = false, - $workers = $::os_workers, + $workers = $facts['os_workers'], $ssl_cert = undef, $ssl_key = undef, $ssl_chain = undef, diff --git a/manifests/wsgi/apache_metadata.pp b/manifests/wsgi/apache_metadata.pp index d05625c6d..dbc0f0465 100644 --- a/manifests/wsgi/apache_metadata.pp +++ b/manifests/wsgi/apache_metadata.pp @@ -25,7 +25,7 @@ # # [*servername*] # (Optional) The servername for the virtualhost. -# Defaults to $::fqdn +# Defaults to $facts['networking']['fqdn'] # # [*ensure_package*] # (Optional) Control the ensure parameter for the Nova Metadata API package @@ -50,7 +50,7 @@ # # [*workers*] # (Optional) Number of WSGI workers to spawn. -# Defaults to $::os_workers +# Defaults to $facts['os_workers'] # # [*priority*] # (Optional) The priority for the vhost. @@ -142,12 +142,12 @@ # class { 'nova::wsgi::apache_metadata': } # class nova::wsgi::apache_metadata ( - $servername = $::fqdn, + $servername = $facts['networking']['fqdn'], $port = 8775, $bind_host = undef, $path = '/', $ssl = false, - $workers = $::os_workers, + $workers = $facts['os_workers'], $ssl_cert = undef, $ssl_key = undef, $ssl_chain = undef, diff --git a/manifests/wsgi/uwsgi_api.pp b/manifests/wsgi/uwsgi_api.pp index 7ebc68ca9..b2967d10e 100644 --- a/manifests/wsgi/uwsgi_api.pp +++ b/manifests/wsgi/uwsgi_api.pp @@ -11,7 +11,7 @@ # # [*processes*] # (Optional) Number of processes. -# Defaults to $::os_workers. +# Defaults to $facts['os_workers']. # # [*threads*] # (Optional) Number of threads. @@ -22,14 +22,14 @@ # Defaults to 100 # class nova::wsgi::uwsgi_api ( - $processes = $::os_workers, + $processes = $facts['os_workers'], $threads = 1, $listen_queue_size = 100, ){ include nova::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.') } diff --git a/manifests/wsgi/uwsgi_api_metadata.pp b/manifests/wsgi/uwsgi_api_metadata.pp index c5e437d98..90e45bbee 100644 --- a/manifests/wsgi/uwsgi_api_metadata.pp +++ b/manifests/wsgi/uwsgi_api_metadata.pp @@ -11,7 +11,7 @@ # # [*processes*] # (Optional) Number of processes. -# Defaults to $::os_workers. +# Defaults to $facts['os_workers']. # # [*threads*] # (Optional) Number of threads. @@ -22,14 +22,14 @@ # Defaults to 100 # class nova::wsgi::uwsgi_api_metadata ( - $processes = $::os_workers, + $processes = $facts['os_workers'], $threads = 1, $listen_queue_size = 100, ){ include nova::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.') } diff --git a/spec/classes/nova_api_spec.rb b/spec/classes/nova_api_spec.rb index 43ef1e197..c9be9cee8 100644 --- a/spec/classes/nova_api_spec.rb +++ b/spec/classes/nova_api_spec.rb @@ -288,7 +288,7 @@ describe 'nova::api' do end let (:platform_params) do - case facts[:osfamily] + case facts[:os]['family'] when 'Debian' { :nova_api_package => 'nova-api', :nova_api_service => 'nova-api' } @@ -298,7 +298,7 @@ describe 'nova::api' do end end it_behaves_like 'nova-api' - if facts[:operatingsystem] == 'Debian' + if facts[:os]['name'] == 'Debian' it_behaves_like 'nova-api on Debian' end end diff --git a/spec/classes/nova_client_spec.rb b/spec/classes/nova_client_spec.rb index a714dce18..bcbcdf6ad 100644 --- a/spec/classes/nova_client_spec.rb +++ b/spec/classes/nova_client_spec.rb @@ -25,7 +25,7 @@ describe 'nova::client' do end let(:platform_params) do - case facts[:osfamily] + case facts[:os]['family'] when 'Debian' { :client_package_name => 'python3-novaclient' } when 'RedHat' diff --git a/spec/classes/nova_compute_ironic_spec.rb b/spec/classes/nova_compute_ironic_spec.rb index 9dd57fbb6..f4786994a 100644 --- a/spec/classes/nova_compute_ironic_spec.rb +++ b/spec/classes/nova_compute_ironic_spec.rb @@ -35,14 +35,11 @@ describe 'nova::compute::ironic' do }).each do |os,facts| context "on #{os}" do let (:facts) do - facts.merge!(OSDefaults.get_facts({ - :fqdn => 'some.host.tld', - :concat_basedir => '/var/lib/puppet/concat' - })) + facts.merge!(OSDefaults.get_facts()) end let(:platform_params) do - case facts[:osfamily] + case facts[:os]['family'] when 'Debian' {} when 'RedHat' diff --git a/spec/classes/nova_compute_libvirt_spec.rb b/spec/classes/nova_compute_libvirt_spec.rb index 3101e2103..107ab68e5 100644 --- a/spec/classes/nova_compute_libvirt_spec.rb +++ b/spec/classes/nova_compute_libvirt_spec.rb @@ -364,7 +364,7 @@ describe 'nova::compute::libvirt' do facts.merge!(OSDefaults.get_facts()) end - case facts[:osfamily] + case facts[:os]['family'] when 'Debian' it_behaves_like 'debian-nova-compute-libvirt' when 'RedHat' diff --git a/spec/classes/nova_compute_rbd_spec.rb b/spec/classes/nova_compute_rbd_spec.rb index 2c8003bf2..4044a6c48 100644 --- a/spec/classes/nova_compute_rbd_spec.rb +++ b/spec/classes/nova_compute_rbd_spec.rb @@ -192,7 +192,7 @@ describe 'nova::compute::rbd' do end let (:platform_params) do - case facts[:osfamily] + case facts[:os]['family'] when 'Debian' { :ceph_client_package => 'ceph-common' } when 'RedHat' @@ -200,8 +200,8 @@ describe 'nova::compute::rbd' do end end it_configures 'nova::compute::rbd' - if facts[:osfamily] == 'Debian' - it_configures "nova::compute::rbd in #{facts[:osfamily]}" + if facts[:os]['family'] == 'Debian' + it_configures "nova::compute::rbd in #{facts[:os]['family']}" end end end diff --git a/spec/classes/nova_compute_spec.rb b/spec/classes/nova_compute_spec.rb index c740e07d6..8e08ea269 100644 --- a/spec/classes/nova_compute_spec.rb +++ b/spec/classes/nova_compute_spec.rb @@ -355,7 +355,7 @@ describe 'nova::compute' do let (:facts) do facts.merge!(OSDefaults.get_facts()) end - case facts[:osfamily] + case facts[:os]['family'] when 'Debian' let (:platform_params) do { diff --git a/spec/classes/nova_conductor_spec.rb b/spec/classes/nova_conductor_spec.rb index 9a7f432a2..f1eb3569f 100644 --- a/spec/classes/nova_conductor_spec.rb +++ b/spec/classes/nova_conductor_spec.rb @@ -71,7 +71,7 @@ describe 'nova::conductor' do end let (:platform_params) do - case facts[:osfamily] + case facts[:os]['family'] when 'Debian' { :conductor_package_name => 'nova-conductor', :conductor_service_name => 'nova-conductor' } diff --git a/spec/classes/nova_db_online_data_migrations_spec.rb b/spec/classes/nova_db_online_data_migrations_spec.rb index b6fcbeaf1..bcc54b59c 100644 --- a/spec/classes/nova_db_online_data_migrations_spec.rb +++ b/spec/classes/nova_db_online_data_migrations_spec.rb @@ -79,10 +79,7 @@ describe 'nova::db::online_data_migrations' do }).each do |os,facts| context "on #{os}" do let (:facts) do - facts.merge(OSDefaults.get_facts({ - :processorcount => 8, - :concat_basedir => '/var/lib/puppet/concat' - })) + facts.merge(OSDefaults.get_facts()) end it_configures 'nova-db-online-data-migrations' diff --git a/spec/classes/nova_db_sync_api_spec.rb b/spec/classes/nova_db_sync_api_spec.rb index 6745e2a02..4dd7bc228 100644 --- a/spec/classes/nova_db_sync_api_spec.rb +++ b/spec/classes/nova_db_sync_api_spec.rb @@ -79,9 +79,7 @@ describe 'nova::db::sync_api' do }).each do |os,facts| context "on #{os}" do let (:facts) do - facts.merge(OSDefaults.get_facts({ - :os_workers => 8, - })) + facts.merge(OSDefaults.get_facts()) end it_configures 'nova-dbsync-api' diff --git a/spec/classes/nova_db_sync_spec.rb b/spec/classes/nova_db_sync_spec.rb index 58761a424..730aa8adc 100644 --- a/spec/classes/nova_db_sync_spec.rb +++ b/spec/classes/nova_db_sync_spec.rb @@ -84,10 +84,7 @@ describe 'nova::db::sync' do }).each do |os,facts| context "on #{os}" do let (:facts) do - facts.merge(OSDefaults.get_facts({ - :os_workers => 8, - :concat_basedir => '/var/lib/puppet/concat' - })) + facts.merge(OSDefaults.get_facts()) end it_configures 'nova-dbsync' diff --git a/spec/classes/nova_init_spec.rb b/spec/classes/nova_init_spec.rb index f9f3de95f..835460fa5 100644 --- a/spec/classes/nova_init_spec.rb +++ b/spec/classes/nova_init_spec.rb @@ -484,7 +484,7 @@ describe 'nova' do facts.merge!(OSDefaults.get_facts()) end - case facts[:osfamily] + case facts[:os]['family'] when 'Debian' let (:platform_params) do { :nova_common_package => 'nova-common', diff --git a/spec/classes/nova_metadata_spec.rb b/spec/classes/nova_metadata_spec.rb index ca2cbbd54..63befcde8 100644 --- a/spec/classes/nova_metadata_spec.rb +++ b/spec/classes/nova_metadata_spec.rb @@ -61,7 +61,7 @@ describe 'nova::metadata' do end let (:platform_params) do - case facts[:osfamily] + case facts[:os]['family'] when 'Debian' { :nova_api_package => 'nova-api', :nova_api_service => 'nova-api' } diff --git a/spec/classes/nova_migration_libvirt_spec.rb b/spec/classes/nova_migration_libvirt_spec.rb index a3271c6a5..9607b7f47 100644 --- a/spec/classes/nova_migration_libvirt_spec.rb +++ b/spec/classes/nova_migration_libvirt_spec.rb @@ -505,11 +505,11 @@ describe 'nova::migration::libvirt' do }).each do |os,facts| context "on #{os}" do let (:facts) do - facts.merge!(OSDefaults.get_facts({ :os_workers => 5 })) + facts.merge!(OSDefaults.get_facts()) end it_behaves_like 'nova migration with libvirt' - case facts[:osfamily] + case facts[:os]['family'] when 'Debian' it_behaves_like 'nova migration with libvirt in Debian' when 'RedHat' diff --git a/spec/classes/nova_scheduler_spec.rb b/spec/classes/nova_scheduler_spec.rb index 7b0e89b3e..0c35d9b1a 100644 --- a/spec/classes/nova_scheduler_spec.rb +++ b/spec/classes/nova_scheduler_spec.rb @@ -140,7 +140,7 @@ describe 'nova::scheduler' do end let (:platform_params) do - case facts[:osfamily] + case facts[:os]['family'] when 'Debian' { :scheduler_package_name => 'nova-scheduler', :scheduler_service_name => 'nova-scheduler' } diff --git a/spec/classes/nova_serial_proxy_spec.rb b/spec/classes/nova_serial_proxy_spec.rb index 1f2546cb8..28af9ac14 100644 --- a/spec/classes/nova_serial_proxy_spec.rb +++ b/spec/classes/nova_serial_proxy_spec.rb @@ -57,9 +57,9 @@ describe 'nova::serialproxy' do end let (:platform_params) do - case facts[:osfamily] + case facts[:os]['family'] when 'Debian' - if facts[:operatingsystem] == 'Debian' + if facts[:os]['name'] == 'Debian' { :serialproxy_package_name => 'nova-consoleproxy', :serialproxy_service_name => 'nova-serialproxy' } else diff --git a/spec/classes/nova_spicehtml5proxy_spec.rb b/spec/classes/nova_spicehtml5proxy_spec.rb index d91591dfe..1aca859c4 100644 --- a/spec/classes/nova_spicehtml5proxy_spec.rb +++ b/spec/classes/nova_spicehtml5proxy_spec.rb @@ -71,9 +71,9 @@ describe 'nova::spicehtml5proxy' do end let (:platform_params) do - case facts[:osfamily] + case facts[:os]['family'] when 'Debian' - if facts[:operatingsystem] == 'Debian' then + if facts[:os]['name'] == 'Debian' then package_name = 'nova-consoleproxy' service_name = 'nova-spicehtml5proxy' else @@ -94,7 +94,7 @@ describe 'nova::spicehtml5proxy' do it_behaves_like 'nova::spicehtml5proxy' - if facts[:operatingsystem] == 'Debian' + if facts[:os]['name'] == 'Debian' it_behaves_like 'nova::spicehtml5proxy on Debian' end end diff --git a/spec/classes/nova_vendordata_spec.rb b/spec/classes/nova_vendordata_spec.rb index fe09e8ed4..df2b93c28 100644 --- a/spec/classes/nova_vendordata_spec.rb +++ b/spec/classes/nova_vendordata_spec.rb @@ -91,11 +91,11 @@ describe 'nova::vendordata' do }).each do |os,facts| context "on #{os}" do let (:facts) do - facts.merge!(OSDefaults.get_facts({ :os_workers => 5 })) + facts.merge!(OSDefaults.get_facts()) end let (:platform_params) do - case facts[:osfamily] + case facts[:os]['family'] when 'Debian' { :nova_api_package => 'nova-api', :nova_api_service => 'nova-api' } diff --git a/spec/classes/nova_vnc_proxy_spec.rb b/spec/classes/nova_vnc_proxy_spec.rb index b2906ba91..76601149b 100644 --- a/spec/classes/nova_vnc_proxy_spec.rb +++ b/spec/classes/nova_vnc_proxy_spec.rb @@ -156,9 +156,9 @@ describe 'nova::vncproxy' do end let (:platform_params) do - case facts[:osfamily] + case facts[:os]['family'] when 'Debian' - if facts[:operatingsystem] == 'Debian' + if facts[:os]['name'] == 'Debian' { :nova_vncproxy_package => 'nova-consoleproxy', :nova_vncproxy_service => 'nova-novncproxy' } else @@ -173,7 +173,7 @@ describe 'nova::vncproxy' do it_behaves_like 'nova_vnc_proxy' - if facts[:operatingsystem] == 'Debian' + if facts[:os]['name'] == 'Debian' it_behaves_like 'nova_vnc_proxy debian package' end diff --git a/spec/classes/nova_wsgi_apache_api_spec.rb b/spec/classes/nova_wsgi_apache_api_spec.rb index eca876591..143109774 100644 --- a/spec/classes/nova_wsgi_apache_api_spec.rb +++ b/spec/classes/nova_wsgi_apache_api_spec.rb @@ -19,7 +19,7 @@ describe 'nova::wsgi::apache_api' do :group => 'nova', :path => '/', :priority => 10, - :servername => facts[:fqdn], + :servername => 'foo.example.com', :ssl => false, :threads => 1, :user => 'nova', @@ -226,14 +226,12 @@ describe 'nova::wsgi::apache_api' do context "on #{os}" do let (:facts) do facts.merge!(OSDefaults.get_facts({ - :os_workers => 42, - :concat_basedir => '/var/lib/puppet/concat', - :fqdn => 'some.host.tld', + :os_workers => 42, })) end let(:platform_params) do - case facts[:osfamily] + case facts[:os]['family'] when 'Debian' { :wsgi_script_path => '/usr/lib/cgi-bin/nova', diff --git a/spec/classes/nova_wsgi_apache_metadata_spec.rb b/spec/classes/nova_wsgi_apache_metadata_spec.rb index dbef07cac..9ada6953a 100644 --- a/spec/classes/nova_wsgi_apache_metadata_spec.rb +++ b/spec/classes/nova_wsgi_apache_metadata_spec.rb @@ -17,7 +17,7 @@ describe 'nova::wsgi::apache_metadata' do :group => 'nova', :path => '/', :priority => 10, - :servername => facts[:fqdn], + :servername => 'foo.example.com', :ssl => false, :threads => 1, :user => 'nova', @@ -212,14 +212,12 @@ describe 'nova::wsgi::apache_metadata' do context "on #{os}" do let (:facts) do facts.merge!(OSDefaults.get_facts({ - :os_workers => 42, - :concat_basedir => '/var/lib/puppet/concat', - :fqdn => 'some.host.tld', + :os_workers => 42, })) end let(:platform_params) do - case facts[:osfamily] + case facts[:os]['family'] when 'Debian' { :wsgi_script_path => '/usr/lib/cgi-bin/nova',