From 7e36cf4913bf621449e97cbb3f71551ec06327f7 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Thu, 26 May 2022 14:27:35 +0900 Subject: [PATCH] Nova: Replace hiera by lookup The hiera function is deprecated and does not work with the latest hieradata version 5. It should be replaced by the new lookup function[1]. [1] https://puppet.com/docs/puppet/7/hiera_automatic.html With the lookup function, we can define value type and merge behavior, but these are kept default at this moment to limit scope of this change to just simple replacement. Adding value type might be useful to make sure the value is in expected type (especially when a boolean value is expected), but we will revisit that later. example: lookup(, [], [], []) Change-Id: Ib25279ec008373245eacb3478d6edb74a5cf9063 --- manifests/profile/base/nova.pp | 76 +++++++++---------- manifests/profile/base/nova/api.pp | 28 +++---- manifests/profile/base/nova/authtoken.pp | 24 +++--- manifests/profile/base/nova/compute.pp | 12 +-- manifests/profile/base/nova/compute/ironic.pp | 4 +- .../profile/base/nova/compute/libvirt.pp | 4 +- .../base/nova/compute/libvirt_guests.pp | 4 +- .../base/nova/compute_libvirt_shared.pp | 16 ++-- manifests/profile/base/nova/conductor.pp | 8 +- manifests/profile/base/nova/libvirt.pp | 4 +- manifests/profile/base/nova/metadata.pp | 20 ++--- manifests/profile/base/nova/migration.pp | 4 +- .../profile/base/nova/migration/client.pp | 4 +- .../profile/base/nova/migration/target.pp | 4 +- manifests/profile/base/nova/scheduler.pp | 4 +- manifests/profile/base/nova/vncproxy.pp | 4 +- 16 files changed, 110 insertions(+), 110 deletions(-) diff --git a/manifests/profile/base/nova.pp b/manifests/profile/base/nova.pp index f45341a96..721e087d0 100644 --- a/manifests/profile/base/nova.pp +++ b/manifests/profile/base/nova.pp @@ -20,75 +20,75 @@ # # [*bootstrap_node*] # (Optional) The hostname of the node responsible for bootstrapping tasks -# Defaults to hiera('nova_api_short_bootstrap_node_name') +# Defaults to lookup('nova_api_short_bootstrap_node_name', undef, undef, undef) # # [*oslomsg_rpc_proto*] # Protocol driver for the oslo messaging rpc service -# Defaults to hiera('oslo_messaging_rpc_scheme', rabbit) +# Defaults to lookup('oslo_messaging_rpc_scheme', undef, undef, 'rabbit') # # [*oslomsg_rpc_hosts*] # list of the oslo messaging rpc host fqdns -# Defaults to hiera('oslo_messaging_rpc_node_names') +# Defaults to any2array(lookup('oslo_messaging_rpc_node_names', undef, undef, undef)) # # [*oslomsg_rpc_port*] # IP port for oslo messaging rpc service -# Defaults to hiera('oslo_messaging_rpc_port', 5672) +# Defaults to lookup('oslo_messaging_rpc_port', undef, undef, '5672') # # [*oslomsg_rpc_username*] # Username for oslo messaging rpc service -# Defaults to hiera('oslo_messaging_rpc_user_name', 'guest') +# Defaults to lookup('oslo_messaging_rpc_user_name', undef, undef, 'guest') # # [*oslomsg_rpc_password*] # Password for oslo messaging rpc service -# Defaults to hiera('oslo_messaging_rpc_password') +# Defaults to lookup('oslo_messaging_rpc_password') # # [*oslomsg_rpc_use_ssl*] # Enable ssl oslo messaging services -# Defaults to hiera('oslo_messaging_rpc_use_ssl', '0') +# Defaults to lookup('oslo_messaging_rpc_use_ssl', undef, undef, '0') # # [*oslomsg_notify_proto*] # Protocol driver for the oslo messaging notify service -# Defaults to hiera('oslo_messaging_notify_scheme', rabbit) +# Defaults to lookup('oslo_messaging_notify_scheme', undef, undef, 'rabbit') # # [*oslomsg_notify_hosts*] # list of the oslo messaging notify host fqdns -# Defaults to hiera('oslo_messaging_notify_node_names') +# Defaults to any2array(lookup('oslo_messaging_notify_node_names', undef, undef, undef)) # # [*oslomsg_notify_port*] # IP port for oslo messaging notify service -# Defaults to hiera('oslo_messaging_notify_port', 5672) +# Defaults to lookup('oslo_messaging_notify_port', undef, undef, '5672') # # [*oslomsg_notify_username*] # Username for oslo messaging notify service -# Defaults to hiera('oslo_messaging_notify_user_name', 'guest') +# Defaults to lookup('oslo_messaging_notify_user_name', undef, undef, 'guest') # # [*oslomsg_notify_password*] # Password for oslo messaging notify service -# Defaults to hiera('oslo_messaging_notify_password') +# Defaults to lookup('oslo_messaging_notify_password') # # [*oslomsg_notify_use_ssl*] # Enable ssl oslo messaging services -# Defaults to hiera('oslo_messaging_notify_use_ssl', '0') +# Defaults to lookup('oslo_messaging_notify_use_ssl', undef, undef, '0') # # [*step*] # (Optional) The current step of the deployment -# Defaults to hiera('step') +# Defaults to Integer(lookup('step')) # # [*memcached_hosts*] # (Optional) Array of hostnames, ipv4 or ipv6 addresses for memcache. -# Defaults to hiera('memcached_node_names', []) +# Defaults to lookup('memcached_node_names', undef, undef, []) # # [*memcached_port*] # (Optional) Memcached port to use. -# Defaults to hiera('memcached_port', 11211) +# Defaults to lookup('memcached_port', undef, undef, 11211) # # [*memcached_ipv6*] # (Optional) Whether Memcached uses IPv6 network instead of IPv4 network. -# Defauls to hiera('memcached_ipv6', false) +# Defauls to lookup('memcached_ipv6', undef, undef, false) # # [*cache_backend*] # (Optional) oslo.cache backend used for caching. -# Defaults to hiera('nova::cache::backend', false) +# Defaults to lookup('nova::cache::backend', undef, undef, false) # # DEPRECATED PARAMETERS # @@ -97,24 +97,24 @@ # Defaults to undef # class tripleo::profile::base::nova ( - $bootstrap_node = hiera('nova_api_short_bootstrap_node_name', undef), - $oslomsg_rpc_proto = hiera('oslo_messaging_rpc_scheme', 'rabbit'), - $oslomsg_rpc_hosts = any2array(hiera('oslo_messaging_rpc_node_names', undef)), - $oslomsg_rpc_password = hiera('oslo_messaging_rpc_password'), - $oslomsg_rpc_port = hiera('oslo_messaging_rpc_port', '5672'), - $oslomsg_rpc_username = hiera('oslo_messaging_rpc_user_name', 'guest'), - $oslomsg_rpc_use_ssl = hiera('oslo_messaging_rpc_use_ssl', '0'), - $oslomsg_notify_proto = hiera('oslo_messaging_notify_scheme', 'rabbit'), - $oslomsg_notify_hosts = any2array(hiera('oslo_messaging_notify_node_names', undef)), - $oslomsg_notify_password = hiera('oslo_messaging_notify_password'), - $oslomsg_notify_port = hiera('oslo_messaging_notify_port', '5672'), - $oslomsg_notify_username = hiera('oslo_messaging_notify_user_name', 'guest'), - $oslomsg_notify_use_ssl = hiera('oslo_messaging_notify_use_ssl', '0'), - $step = Integer(hiera('step')), - $memcached_hosts = hiera('memcached_node_names', []), - $memcached_port = hiera('memcached_port', 11211), - $memcached_ipv6 = hiera('memcached_ipv6', false), - $cache_backend = hiera('nova::cache::backend', false), + $bootstrap_node = lookup('nova_api_short_bootstrap_node_name', undef, undef, undef), + $oslomsg_rpc_proto = lookup('oslo_messaging_rpc_scheme', undef, undef, 'rabbit'), + $oslomsg_rpc_hosts = any2array(lookup('oslo_messaging_rpc_node_names', undef, undef, undef)), + $oslomsg_rpc_password = lookup('oslo_messaging_rpc_password'), + $oslomsg_rpc_port = lookup('oslo_messaging_rpc_port', undef, undef, '5672'), + $oslomsg_rpc_username = lookup('oslo_messaging_rpc_user_name', undef, undef, 'guest'), + $oslomsg_rpc_use_ssl = lookup('oslo_messaging_rpc_use_ssl', undef, undef, '0'), + $oslomsg_notify_proto = lookup('oslo_messaging_notify_scheme', undef, undef, 'rabbit'), + $oslomsg_notify_hosts = any2array(lookup('oslo_messaging_notify_node_names', undef, undef, undef)), + $oslomsg_notify_password = lookup('oslo_messaging_notify_password'), + $oslomsg_notify_port = lookup('oslo_messaging_notify_port', undef, undef, '5672'), + $oslomsg_notify_username = lookup('oslo_messaging_notify_user_name', undef, undef, 'guest'), + $oslomsg_notify_use_ssl = lookup('oslo_messaging_notify_use_ssl', undef, undef, '0'), + $step = Integer(lookup('step')), + $memcached_hosts = lookup('memcached_node_names', undef, undef, []), + $memcached_port = lookup('memcached_port', undef, undef, 11211), + $memcached_ipv6 = lookup('memcached_ipv6', undef, undef, false), + $cache_backend = lookup('nova::cache::backend', undef, undef, false), # DEPRECATED PARAMETERS $memcached_ips = undef ) { @@ -129,8 +129,8 @@ class tripleo::profile::base::nova ( if $step >= 4 or ($step >= 3 and $sync_db) { $oslomsg_rpc_use_ssl_real = sprintf('%s', bool2num(str2bool($oslomsg_rpc_use_ssl))) $oslomsg_notify_use_ssl_real = sprintf('%s', bool2num(str2bool($oslomsg_notify_use_ssl))) - if hiera('nova_is_additional_cell', undef) { - $oslomsg_rpc_hosts_real = any2array(hiera('oslo_messaging_rpc_cell_node_names', undef)) + if lookup('nova_is_additional_cell', undef, undef, undef) { + $oslomsg_rpc_hosts_real = any2array(lookup('oslo_messaging_rpc_cell_node_names', undef, undef, undef)) } else { $oslomsg_rpc_hosts_real = $oslomsg_rpc_hosts } diff --git a/manifests/profile/base/nova/api.pp b/manifests/profile/base/nova/api.pp index 873da2a4b..d81d4ee32 100644 --- a/manifests/profile/base/nova/api.pp +++ b/manifests/profile/base/nova/api.pp @@ -18,7 +18,7 @@ # # [*bootstrap_node*] # (Optional) The hostname of the node responsible for bootstrapping tasks -# Defaults to hiera('nova_api_short_bootstrap_node_name') +# Defaults to lookup('nova_api_short_bootstrap_node_name') # # [*certificates_specs*] # (Optional) The specifications to give to certmonger for the certificate(s) @@ -30,38 +30,38 @@ # service_certificate: # service_key: # principal: "haproxy/" -# Defaults to hiera('apache_certificate_specs', {}). +# Defaults to lookup('apache_certificates_specs', undef, undef, {}). # # [*enable_internal_tls*] # (Optional) Whether TLS in the internal network is enabled or not. -# Defaults to hiera('enable_internal_tls', false) +# Defaults to lookup('enable_internal_tls', undef, undef, false) # # [*nova_api_network*] # (Optional) The network name where the nova API endpoint is listening on. # This is set by t-h-t. -# Defaults to hiera('nova_api_network', undef) +# Defaults to lookup('nova_api_network', undef, undef, undef) # # [*step*] # (Optional) The current step in deployment. See tripleo-heat-templates # for more details. -# Defaults to hiera('step') +# Defaults to Integer(lookup('step')) # # [*nova_enable_db_archive*] # (Optional) Wheter to enable db archiving -# Defaults to hiera('nova_enable_db_archive', true) +# Defaults to lookup('nova_enable_db_archive', undef, undef, true) # # [*nova_enable_db_purge*] # (Optional) Wheter to enable db purging -# Defaults to hiera('nova_enable_db_purge', true) +# Defaults to lookup('nova_enable_db_purge', undef, undef, true) # class tripleo::profile::base::nova::api ( - $bootstrap_node = hiera('nova_api_short_bootstrap_node_name', undef), - $certificates_specs = hiera('apache_certificates_specs', {}), - $enable_internal_tls = hiera('enable_internal_tls', false), - $nova_api_network = hiera('nova_api_network', undef), - $step = Integer(hiera('step')), - $nova_enable_db_archive = hiera('nova_enable_db_archive', true), - $nova_enable_db_purge = hiera('nova_enable_db_purge', true), + $bootstrap_node = lookup('nova_api_short_bootstrap_node_name', undef, undef, undef), + $certificates_specs = lookup('apache_certificates_specs', undef, undef, {}), + $enable_internal_tls = lookup('enable_internal_tls', undef, undef, false), + $nova_api_network = lookup('nova_api_network', undef, undef, undef), + $step = Integer(lookup('step')), + $nova_enable_db_archive = lookup('nova_enable_db_archive', undef, undef, true), + $nova_enable_db_purge = lookup('nova_enable_db_purge', undef, undef, true), ) { if $bootstrap_node and $::hostname == downcase($bootstrap_node) { $sync_db = true diff --git a/manifests/profile/base/nova/authtoken.pp b/manifests/profile/base/nova/authtoken.pp index 8742bea4f..c0bb12f9f 100644 --- a/manifests/profile/base/nova/authtoken.pp +++ b/manifests/profile/base/nova/authtoken.pp @@ -21,28 +21,28 @@ # [*step*] # (Optional) The current step in deployment. See tripleo-heat-templates # for more details. -# Defaults to hiera('step') +# Defaults to Integer(lookup('step')) # # [*memcached_hosts*] # (Optional) Array of hostnames, ipv4 or ipv6 addresses for memcache. -# Defaults to hiera('memcached_node_names', []) +# Defaults to lookup('memcached_node_names', undef, undef, []) # # [*memcached_port*] # (Optional) Memcached port to use. -# Defaults to hiera('memcached_authtoken_port', 11211) +# Defaults to lookup('memcached_authtoken_port', undef, undef, 11211) # # [*memcached_ipv6*] # (Optional) Whether Memcached uses IPv6 network instead of IPv4 network. -# Defauls to hiera('memcached_ipv6', false) +# Defauls to lookup('memcached_ipv6', undef, undef, false) # # [*security_strategy*] # (Optional) Memcached (authtoken) security strategy. -# Defaults to hiera('memcached_authtoken_security_strategy', undef) +# Defaults to lookup('memcached_authtoken_security_strategy', undef, undef, undef) # # [*secret_key*] # (Optional) Memcached (authtoken) secret key, used with security_strategy. # The key is hashed with a salt, to isolate services. -# Defaults to hiera('memcached_authtoken_secret_key', undef) +# Defaults to lookup('memcached_authtoken_secret_key', undef, undef, undef) # # DEPRECATED PARAMETERS # @@ -51,12 +51,12 @@ # Defaults to undef # class tripleo::profile::base::nova::authtoken ( - $step = Integer(hiera('step')), - $memcached_hosts = hiera('memcached_node_names', []), - $memcached_port = hiera('memcached_authtoken_port', 11211), - $memcached_ipv6 = hiera('memcached_ipv6', false), - $security_strategy = hiera('memcached_authtoken_security_strategy', undef), - $secret_key = hiera('memcached_authtoken_secret_key', undef), + $step = Integer(lookup('step')), + $memcached_hosts = lookup('memcached_node_names', undef, undef, []), + $memcached_port = lookup('memcached_authtoken_port', undef, undef, 11211), + $memcached_ipv6 = lookup('memcached_ipv6', undef, undef, false), + $security_strategy = lookup('memcached_authtoken_security_strategy', undef, undef, undef), + $secret_key = lookup('memcached_authtoken_secret_key', undef, undef, undef), # DEPRECATED PARAMETERS $memcached_ips = undef ) { diff --git a/manifests/profile/base/nova/compute.pp b/manifests/profile/base/nova/compute.pp index 66806796e..a64da6b81 100644 --- a/manifests/profile/base/nova/compute.pp +++ b/manifests/profile/base/nova/compute.pp @@ -21,20 +21,20 @@ # [*step*] # (Optional) The current step in deployment. See tripleo-heat-templates # for more details. -# Defaults to hiera('step') +# Defaults to Integer(lookup('step')) # # [*cinder_nfs_backend*] # (Optional) Whether or not Cinder is backed by NFS. -# Defaults to hiera('cinder_enable_nfs_backend', false) +# Defaults to lookup('cinder_enable_nfs_backend', undef, undef, false) # # [*nova_nfs_enabled*] # (Optional) Whether or not Nova is backed by NFS. -# Defaults to false +# Defaults to lookup('nova_nfs_enabled', undef, undef, false) # class tripleo::profile::base::nova::compute ( - $step = Integer(hiera('step')), - $cinder_nfs_backend = hiera('cinder_enable_nfs_backend', false), - $nova_nfs_enabled = hiera('nova_nfs_enabled', false), + $step = Integer(lookup('step')), + $cinder_nfs_backend = lookup('cinder_enable_nfs_backend', undef, undef, false), + $nova_nfs_enabled = lookup('nova_nfs_enabled', undef, undef, false), ) { if $step >= 4 { diff --git a/manifests/profile/base/nova/compute/ironic.pp b/manifests/profile/base/nova/compute/ironic.pp index ee42f2a66..a24879f7d 100644 --- a/manifests/profile/base/nova/compute/ironic.pp +++ b/manifests/profile/base/nova/compute/ironic.pp @@ -21,10 +21,10 @@ # [*step*] # (Optional) The current step in deployment. See tripleo-heat-templates # for more details. -# Defaults to hiera('step') +# Defaults to Integer(lookup('step')) # class tripleo::profile::base::nova::compute::ironic ( - $step = Integer(hiera('step')), + $step = Integer(lookup('step')), ) { if $step >= 4 { include tripleo::profile::base::nova::compute diff --git a/manifests/profile/base/nova/compute/libvirt.pp b/manifests/profile/base/nova/compute/libvirt.pp index f2feb26b9..0d33b4ae7 100644 --- a/manifests/profile/base/nova/compute/libvirt.pp +++ b/manifests/profile/base/nova/compute/libvirt.pp @@ -21,10 +21,10 @@ # [*step*] # (Optional) The current step in deployment. See tripleo-heat-templates # for more details. -# Defaults to hiera('step') +# Defaults to Integer(lookup('step')) # class tripleo::profile::base::nova::compute::libvirt ( - $step = Integer(hiera('step')), + $step = Integer(lookup('step')), ) { if $step >= 4 { include tripleo::profile::base::nova::compute diff --git a/manifests/profile/base/nova/compute/libvirt_guests.pp b/manifests/profile/base/nova/compute/libvirt_guests.pp index 17266119b..a85d3dfe1 100644 --- a/manifests/profile/base/nova/compute/libvirt_guests.pp +++ b/manifests/profile/base/nova/compute/libvirt_guests.pp @@ -21,14 +21,14 @@ # [*step*] # (Optional) The current step in deployment. See tripleo-heat-templates # for more details. -# Defaults to hiera('step') +# Defaults to Integer(lookup('step')) # # [*enabled*] # (Optional) Whether libvirt-guests should be configured and enabled or not. # Defaults to undef # class tripleo::profile::base::nova::compute::libvirt_guests ( - $step = Integer(hiera('step')), + $step = Integer(lookup('step')), $enabled = undef, ) { # only configure libvirt-guests if enabled diff --git a/manifests/profile/base/nova/compute_libvirt_shared.pp b/manifests/profile/base/nova/compute_libvirt_shared.pp index ae1e25a19..40b5658ed 100644 --- a/manifests/profile/base/nova/compute_libvirt_shared.pp +++ b/manifests/profile/base/nova/compute_libvirt_shared.pp @@ -21,25 +21,25 @@ # [*step*] # (Optional) The current step in deployment. See tripleo-heat-templates # for more details. -# Defaults to hiera('step') +# Defaults to Integer(lookup('step')) # # [*rbd_ephemeral_storage*] # (Optional) Use Ceph as ephmeral disk backend. -# Defaults to hiera('nova::compute::rbd::ephemeral_storage', false) +# Defaults to lookup('nova::compute::rbd::ephemeral_storage', undef, undef, false) # # [*rbd_persistent_storage*] # (Optional) Use Ceph as volume backend. -# Defaults to hiera('rbd_persistent_storage', false) +# Defaults to lookup('rbd_persistent_storage', undef, undef, false) # # [*rbd_disk_cachemodes*] # (Optional) Cache mode of rbd volumes. -# Defaults to hiera('rbd_disk_cachemodes', ['network=writeback']) +# Defaults to lookup('rbd_disk_cachemodes', undef, undef, ['network=writeback']) # class tripleo::profile::base::nova::compute_libvirt_shared ( - $step = Integer(hiera('step')), - $rbd_ephemeral_storage = hiera('nova::compute::rbd::ephemeral_storage', false), - $rbd_persistent_storage = hiera('rbd_persistent_storage', false), - $rbd_disk_cachemodes = hiera('rbd_disk_cachemodes', ['network=writeback']), + $step = Integer(lookup('step')), + $rbd_ephemeral_storage = lookup('nova::compute::rbd::ephemeral_storage', undef, undef, false), + $rbd_persistent_storage = lookup('rbd_persistent_storage', undef, undef, false), + $rbd_disk_cachemodes = lookup('rbd_disk_cachemodes', undef, undef, ['network=writeback']), ) { if $step >= 4 { # Ceph + Libvirt diff --git a/manifests/profile/base/nova/conductor.pp b/manifests/profile/base/nova/conductor.pp index ecc66fc21..3f624ca8f 100644 --- a/manifests/profile/base/nova/conductor.pp +++ b/manifests/profile/base/nova/conductor.pp @@ -20,16 +20,16 @@ # # [*bootstrap_node*] # (Optional) The hostname of the node responsible for bootstrapping tasks -# Defaults to hiera('nova_conductor_short_bootstrap_node_name') +# Defaults to lookup('nova_conductor_short_bootstrap_node_name', undef, undef, undef) # # [*step*] # (Optional) The current step in deployment. See tripleo-heat-templates # for more details. -# Defaults to hiera('step') +# Defaults to Integer(lookup('step')) # class tripleo::profile::base::nova::conductor ( - $bootstrap_node = hiera('nova_conductor_short_bootstrap_node_name', undef), - $step = Integer(hiera('step')), + $bootstrap_node = lookup('nova_conductor_short_bootstrap_node_name', undef, undef, undef), + $step = Integer(lookup('step')), ) { include tripleo::profile::base::nova include nova::db diff --git a/manifests/profile/base/nova/libvirt.pp b/manifests/profile/base/nova/libvirt.pp index 4739997df..3d57a6829 100644 --- a/manifests/profile/base/nova/libvirt.pp +++ b/manifests/profile/base/nova/libvirt.pp @@ -21,7 +21,7 @@ # [*step*] # (Optional) The current step in deployment. See tripleo-heat-templates # for more details. -# Defaults to hiera('step') +# Defaults to Integer(lookup('step')) # # [*libvirtd_config*] # (Optional) Overrides for libvirtd config options @@ -62,7 +62,7 @@ # Defaults to false # class tripleo::profile::base::nova::libvirt ( - $step = Integer(hiera('step')), + $step = Integer(lookup('step')), $libvirtd_config = {}, $virtlogd_config = {}, $virtproxyd_config = {}, diff --git a/manifests/profile/base/nova/metadata.pp b/manifests/profile/base/nova/metadata.pp index ac8a4f459..e3460379e 100644 --- a/manifests/profile/base/nova/metadata.pp +++ b/manifests/profile/base/nova/metadata.pp @@ -18,7 +18,7 @@ # # [*bootstrap_node*] # (Optional) The hostname of the node responsible for bootstrapping tasks -# Defaults to hiera('nova_metadata_short_bootstrap_node_name') +# Defaults to lookup('nova_metadata_short_bootstrap_node_name', undef, undef, undef) # # [*certificates_specs*] # (Optional) The specifications to give to certmonger for the certificate(s) @@ -30,28 +30,28 @@ # service_certificate: # service_key: # principal: "haproxy/" -# Defaults to hiera('apache_certificate_specs', {}). +# Defaults to lookup('apache_certificates_specs', undef, undef, {}). # # [*enable_internal_tls*] # (Optional) Whether TLS in the internal network is enabled or not. -# Defaults to hiera('enable_internal_tls', false) +# Defaults to lookup('enable_internal_tls', undef, undef, false) # # [*nova_metadata_network*] # (Optional) The network name where the nova metadata endpoint is listening on. # This is set by t-h-t. -# Defaults to hiera('nova_metadata_network', undef) +# Defaults to lookup('nova_metadata_network', undef, undef, undef) # # [*step*] # (Optional) The current step in deployment. See tripleo-heat-templates # for more details. -# Defaults to hiera('step') +# Defaults to Integer(lookup('step')) # class tripleo::profile::base::nova::metadata ( - $bootstrap_node = hiera('nova_metadata_short_bootstrap_node_name', undef), - $certificates_specs = hiera('apache_certificates_specs', {}), - $enable_internal_tls = hiera('enable_internal_tls', false), - $nova_metadata_network = hiera('nova_metadata_network', undef), - $step = Integer(hiera('step')), + $bootstrap_node = lookup('nova_metadata_short_bootstrap_node_name', undef, undef, undef), + $certificates_specs = lookup('apache_certificates_specs', undef, undef, {}), + $enable_internal_tls = lookup('enable_internal_tls', undef, undef, false), + $nova_metadata_network = lookup('nova_metadata_network', undef, undef, undef), + $step = Integer(lookup('step')), ) { if $bootstrap_node and $::hostname == downcase($bootstrap_node) { $is_bootstrap = true diff --git a/manifests/profile/base/nova/migration.pp b/manifests/profile/base/nova/migration.pp index 0c4c844b9..67c62ac8b 100644 --- a/manifests/profile/base/nova/migration.pp +++ b/manifests/profile/base/nova/migration.pp @@ -20,11 +20,11 @@ # # [*step*] # (Optional) The current step of the deployment -# Defaults to hiera('step') +# Defaults to Integer(lookup('step')) # class tripleo::profile::base::nova::migration ( - $step = Integer(hiera('step')), + $step = Integer(lookup('step')), ) { if $step >= 3 { package { 'openstack-nova-migration': diff --git a/manifests/profile/base/nova/migration/client.pp b/manifests/profile/base/nova/migration/client.pp index 017cec24c..ee4d9f290 100644 --- a/manifests/profile/base/nova/migration/client.pp +++ b/manifests/profile/base/nova/migration/client.pp @@ -28,7 +28,7 @@ # # [*step*] # (Optional) The current step of the deployment -# Defaults to hiera('step') +# Defaults to Integer(lookup('step')) # # [*ssh_private_key*] # (Optional) SSH private_key for migration SSH tunnel. @@ -45,7 +45,7 @@ class tripleo::profile::base::nova::migration::client ( $libvirt_enabled = false, $nova_compute_enabled = false, - $step = Integer(hiera('step')), + $step = Integer(lookup('step')), $ssh_private_key = '', $ssh_port = 22, $libvirt_tls = false, diff --git a/manifests/profile/base/nova/migration/target.pp b/manifests/profile/base/nova/migration/target.pp index f3df9844a..869435cef 100644 --- a/manifests/profile/base/nova/migration/target.pp +++ b/manifests/profile/base/nova/migration/target.pp @@ -20,7 +20,7 @@ # # [*step*] # (Optional) The current step of the deployment -# Defaults to hiera('step') +# Defaults to Integer(lookup('step')) # # [*ssh_authorized_keys*] # (Optional) List of SSH public keys authorized for migration. @@ -37,7 +37,7 @@ # Defaults to /bin/nova-migration-wrapper # class tripleo::profile::base::nova::migration::target ( - $step = Integer(hiera('step')), + $step = Integer(lookup('step')), $ssh_authorized_keys = [], $ssh_localaddrs = [], $wrapper_command = '/bin/nova-migration-wrapper', diff --git a/manifests/profile/base/nova/scheduler.pp b/manifests/profile/base/nova/scheduler.pp index 0675f14e9..e642ce96f 100644 --- a/manifests/profile/base/nova/scheduler.pp +++ b/manifests/profile/base/nova/scheduler.pp @@ -21,10 +21,10 @@ # [*step*] # (Optional) The current step in deployment. See tripleo-heat-templates # for more details. -# Defaults to hiera('step') +# Defaults to Integer(lookup('step')) # class tripleo::profile::base::nova::scheduler ( - $step = Integer(hiera('step')), + $step = Integer(lookup('step')), ) { if $step >= 4 { include tripleo::profile::base::nova diff --git a/manifests/profile/base/nova/vncproxy.pp b/manifests/profile/base/nova/vncproxy.pp index 9beacdafd..556170f16 100644 --- a/manifests/profile/base/nova/vncproxy.pp +++ b/manifests/profile/base/nova/vncproxy.pp @@ -21,10 +21,10 @@ # [*step*] # (Optional) The current step in deployment. See tripleo-heat-templates # for more details. -# Defaults to hiera('step') +# Defaults to Integer(lookup('step')) # class tripleo::profile::base::nova::vncproxy ( - $step = Integer(hiera('step')), + $step = Integer(lookup('step')), ) { if $step >= 4 { include tripleo::profile::base::nova