Glance: 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(<NAME>, [<VALUE TYPE>], [<MERGE BEHAVIOR>], [<DEFAULT VALUE>])

Change-Id: I1e2dcec22f74e47a48d6f29b177c14cd2b41a666
This commit is contained in:
katarimanoj 2022-04-19 16:30:02 +05:30 committed by Takashi Kajinami
parent a06b94c4a3
commit 3d9363f4dc
7 changed files with 135 additions and 134 deletions

View File

@ -20,7 +20,7 @@
#
# [*bootstrap_node*]
# (Optional) The hostname of the node responsible for bootstrapping tasks
# Defaults to hiera('glance_api_short_bootstrap_node_name')
# Defaults to lookup('glance_api_short_bootstrap_node_name', undef, undef, undef)
#
# [*certificates_specs*]
# (Optional) The specifications to give to certmonger for the certificate(s)
@ -32,15 +32,15 @@
# service_certificate: <service certificate path>
# service_key: <service key path>
# principal: "haproxy/<overcloud controller fqdn>"
# 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)
#
# [*glance_backend*]
# (Optional) Default glance backend type.
# Defaults to downcase(hiera('glance_backend', 'swift'))
# Defaults to downcase(lookup('glance_backend', undef, undef, 'swift'))
#
# [*glance_backend_id*]
# (Optional) Default glance backend identifier.
@ -49,7 +49,7 @@
# [*glance_network*]
# (Optional) The network name where the glance endpoint is listening on.
# This is set by t-h-t.
# Defaults to hiera('glance_api_network', undef)
# Defaults to lookup('glance_api_network', undef, undef, undef)
#
# [*multistore_config*]
# (Optional) Hash of settings for configuring additional glance-api backends.
@ -58,55 +58,55 @@
# [*step*]
# (Optional) The current step in deployment. See tripleo-heat-templates
# for more details.
# Defaults to hiera('step')
# Defaults to Integer(lookup('step'))
#
# [*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')
#
# [*tls_proxy_bind_ip*]
# IP on which the TLS proxy will listen on. Required only if
@ -138,26 +138,26 @@
# Defaults to undef
#
class tripleo::profile::base::glance::api (
$bootstrap_node = hiera('glance_api_short_bootstrap_node_name', undef),
$certificates_specs = hiera('apache_certificates_specs', {}),
$enable_internal_tls = hiera('enable_internal_tls', false),
$glance_backend = downcase(hiera('glance_backend', 'swift')),
$bootstrap_node = lookup('glance_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),
$glance_backend = downcase(lookup('glance_backend', undef, undef, 'swift')),
$glance_backend_id = 'default_backend',
$glance_network = hiera('glance_api_network', undef),
$glance_network = lookup('glance_api_network', undef, undef, undef),
$multistore_config = {},
$step = Integer(hiera('step')),
$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(lookup('step')),
$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'),
$tls_proxy_bind_ip = undef,
$tls_proxy_fqdn = undef,
$tls_proxy_port = 9292,

View File

@ -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::glance::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
) {

View File

@ -27,89 +27,89 @@
#
# [*cinder_ca_certificates_file*]
# (Optional) Location of ca certicate file to use for cinder client requests.
# Defaults to hiera('glance::backend::cinder::cinder_ca_certificates_file', undef).
# Defaults to lookup('glance::backend::cinder::cinder_ca_certificates_file', undef, undef, undef).
#
# [*cinder_api_insecure*]
# (Optional) Allow to perform insecure SSL requests to cinder.
# Defaults to hiera('glance::backend::cinder::cinder_api_insecure', undef).
# Defaults to lookup('glance::backend::cinder::cinder_api_insecure', undef, undef, undef).
#
# [*cinder_catalog_info*]
# (Optional) Info to match when looking for cinder in the service catalog.
# Defaults to hiera('glance::backend::cinder::cinder_catalog_info', undef).
# Defaults to lookup('glance::backend::cinder::cinder_catalog_info', undef, undef, undef).
#
# [*cinder_endpoint_template*]
# (Optional) Override service catalog lookup with template for cinder endpoint.
# Defaults to hiera('glance::backend::cinder::cinder_endpoint_template', undef).
# Defaults to lookup('glance::backend::cinder::cinder_endpoint_template', undef, undef, undef).
#
# [*cinder_http_retries*]
# (Optional) Number of cinderclient retries on failed http calls.
# Defaults to hiera('glance::backend::cinder::cinder_http_retries', undef).
# Defaults to lookup('glance::backend::cinder::cinder_http_retries', undef, undef, undef).
#
# [*cinder_store_auth_address*]
# (Optional) A valid authentication service address.
# Defaults to hiera('glance::backend::cinder::cinder_store_auth_address', undef).
# Defaults to lookup('glance::backend::cinder::cinder_store_auth_address', undef, undef, undef).
#
# [*cinder_store_project_name*]
# (Optional) Project name where the image volume is stored in cinder.
# Defaults to hiera('glance::backend::cinder::cinder_store_project_name', undef).
# Defaults to lookup('glance::backend::cinder::cinder_store_project_name', undef, undef, undef).
#
# [*cinder_store_user_name*]
# (Optional) User name to authenticate against cinder.
# Defaults to hiera('glance::backend::cinder::cinder_store_user_name', undef)
# Defaults to lookup('glance::backend::cinder::cinder_store_user_name', undef, undef, undef)
#
# [*cinder_store_password*]
# (Optional) A valid password for the user specified by `cinder_store_user_name'
# Defaults to hiera('glance::backend::cinder::cinder_store_password', undef)
# Defaults to lookup('glance::backend::cinder::cinder_store_password', undef, undef, undef)
#
# [*cinder_os_region_name*]
# (optional) Sets the keystone region to use.
# Defaults to hiera('glance::backend::cinder::cinder_os_region_name', undef)
# Defaults to lookup('glance::backend::cinder::cinder_os_region_name', undef, undef, undef)
#
# [*cinder_enforce_multipath*]
# (Optional) Set to True when multipathd is enabled
# Defaults to hiera('glance::backend::cinder::cinder_enforce_multipath', undef)
# Defaults to lookup('glance::backend::cinder::cinder_enforce_multipath', undef, undef, undef)
#
# [*cinder_use_multipath*]
# (Optional) Set to True when multipathd is enabled
# Defaults to hiera('glance::backend::cinder::cinder_use_multipath', undef)
# Defaults to lookup('glance::backend::cinder::cinder_use_multipath', undef, undef, undef)
#
# [*cinder_mount_point_base*]
# (Optional) Directory where the NFS volume is mounted on the glance node.
# Defaults to hiera('glance::backend::cinder::cinder_mount_point_base', undef)
# Defaults to lookup('glance::backend::cinder::cinder_mount_point_base', undef, undef, undef)
#
# [*cinder_volume_type*]
# (Optional) The volume type to be used to create image volumes in cinder.
# Defaults to hiera('glance::backend::cinder::cinder_volume_type', undef)
# Defaults to lookup('glance::backend::cinder::cinder_volume_type', undef, undef, undef)
#
# [*store_description*]
# (Optional) Provides constructive information about the store backend to
# end users.
# Defaults to hiera('tripleo::profile::base::glance::api::glance_store_description', 'Cinder store').
# Defaults to lookup('tripleo::profile::base::glance::api::glance_store_description', undef, undef, 'Cinder store').
#
# [*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::glance::backend::cinder (
$backend_names,
$multistore_config = {},
$cinder_ca_certificates_file = hiera('glance::backend::cinder::cinder_ca_certificates_file', undef),
$cinder_api_insecure = hiera('glance::backend::cinder::cinder_api_insecure', undef),
$cinder_catalog_info = hiera('glance::backend::cinder::cinder_catalog_info', undef),
$cinder_endpoint_template = hiera('glance::backend::cinder::cinder_endpoint_template', undef),
$cinder_http_retries = hiera('glance::backend::cinder::cinder_http_retries', undef),
$cinder_store_auth_address = hiera('glance::backend::cinder::cinder_store_auth_address', undef),
$cinder_store_project_name = hiera('glance::backend::cinder::cinder_store_project_name', undef),
$cinder_store_user_name = hiera('glance::backend::cinder::cinder_store_user_name', undef),
$cinder_store_password = hiera('glance::backend::cinder::cinder_store_password', undef),
$cinder_os_region_name = hiera('glance::backend::cinder::cinder_os_region_name', undef),
$cinder_enforce_multipath = hiera('glance::backend::cinder::cinder_enforce_multipath', undef),
$cinder_use_multipath = hiera('glance::backend::cinder::cinder_use_multipath', undef),
$cinder_mount_point_base = hiera('glance::backend::cinder::cinder_mount_point_base', undef),
$cinder_volume_type = hiera('glance::backend::cinder::cinder_volume_type', undef),
$store_description = hiera('tripleo::profile::base::glance::api::glance_store_description', 'Cinder store'),
$step = Integer(hiera('step')),
$cinder_ca_certificates_file = lookup('glance::backend::cinder::cinder_ca_certificates_file', undef, undef, undef),
$cinder_api_insecure = lookup('glance::backend::cinder::cinder_api_insecure', undef, undef, undef),
$cinder_catalog_info = lookup('glance::backend::cinder::cinder_catalog_info', undef, undef, undef),
$cinder_endpoint_template = lookup('glance::backend::cinder::cinder_endpoint_template', undef, undef, undef),
$cinder_http_retries = lookup('glance::backend::cinder::cinder_http_retries', undef, undef, undef),
$cinder_store_auth_address = lookup('glance::backend::cinder::cinder_store_auth_address', undef, undef, undef),
$cinder_store_project_name = lookup('glance::backend::cinder::cinder_store_project_name', undef, undef, undef),
$cinder_store_user_name = lookup('glance::backend::cinder::cinder_store_user_name', undef, undef, undef),
$cinder_store_password = lookup('glance::backend::cinder::cinder_store_password', undef, undef, undef),
$cinder_os_region_name = lookup('glance::backend::cinder::cinder_os_region_name', undef, undef, undef),
$cinder_enforce_multipath = lookup('glance::backend::cinder::cinder_enforce_multipath', undef, undef, undef),
$cinder_use_multipath = lookup('glance::backend::cinder::cinder_use_multipath', undef, undef, undef),
$cinder_mount_point_base = lookup('glance::backend::cinder::cinder_mount_point_base', undef, undef, undef),
$cinder_volume_type = lookup('glance::backend::cinder::cinder_volume_type', undef, undef, undef),
$store_description = lookup('tripleo::profile::base::glance::api::glance_store_description', undef, undef, 'Cinder store'),
$step = Integer(lookup('step')),
) {

View File

@ -27,29 +27,29 @@
#
# [*filesystem_store_datadir*]
# (Optional) Location where dist images are stored when the backend type is file.
# Defaults to hiera('glance::backend::file::filesystem_store_datadir', undef).
# Defaults to lookup('glance::backend::file::filesystem_store_datadir', undef, undef, undef).
#
# [*filesystem_thin_provisioning*]
# (Optional) Boolean describing if thin provisioning is enabled or not
# Defaults to hiera('glance::backend::file::filesystem_thin_provisioning', undef).
# Defaults to lookup('glance::backend::file::filesystem_thin_provisioning', undef, undef, undef).
#
# [*store_description*]
# (Optional) Provides constructive information about the store backend to
# end users.
# Defaults to hiera('tripleo::profile::base::glance::api::glance_store_description', 'File store').
# Defaults to lookup('tripleo::profile::base::glance::api::glance_store_description', undef, undef, 'File store').
#
# [*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::glance::backend::file (
$backend_names,
$multistore_config = {},
$filesystem_store_datadir = hiera('glance::backend::file::filesystem_store_datadir', undef),
$filesystem_thin_provisioning = hiera('glance::backend::file::filesystem_thin_provisioning', undef),
$store_description = hiera('tripleo::profile::base::glance::api::glance_store_description', 'File store'),
$step = Integer(hiera('step')),
$filesystem_store_datadir = lookup('glance::backend::file::filesystem_store_datadir', undef, undef, undef),
$filesystem_thin_provisioning = lookup('glance::backend::file::filesystem_thin_provisioning', undef, undef, undef),
$store_description = lookup('tripleo::profile::base::glance::api::glance_store_description', undef, undef, 'File store'),
$step = Integer(lookup('step')),
) {
if $backend_names.length() > 1 {

View File

@ -31,50 +31,50 @@
#
# [*rbd_store_ceph_conf*]
# (Optional) Ceph cluster config file.
# Defaults to hiera('glance::backend::rbd::rbd_store_ceph_conf', '/etc/ceph/ceph.conf').
# Defaults to lookup('glance::backend::rbd::rbd_store_ceph_conf', undef, undef, '/etc/ceph/ceph.conf').
#
# [*rbd_store_user*]
# (Optional) Ceph client username.
# Defaults to hiera('glance::backend::rbd::rbd_store_user', 'openstack').
# Defaults to lookup('glance::backend::rbd::rbd_store_user', undef, undef, 'openstack').
#
# [*rbd_store_pool*]
# (Optional) Ceph pool for storing images.
# Defaults to hiera('glance::backend::rbd::rbd_store_pool', 'images').
# Defaults to lookup('glance::backend::rbd::rbd_store_pool', undef, undef, 'images').
#
# [*rbd_store_chunk_size*]
# (Optional) RBD chunk size.
# Defaults to hiera('glance::backend::rbd::rbd_store_chunk_size', undef).
# Defaults to lookup('glance::backend::rbd::rbd_store_chunk_size', undef, undef, undef).
#
# [*rbd_thin_provisioning*]
# (Optional) Boolean describing if thin provisioning is enabled or not
# Defaults to hiera('glance::backend::rbd::rbd_thin_provisioning', undef).
# Defaults to lookup('glance::backend::rbd::rbd_thin_provisioning', undef, undef, undef).
#
# [*rados_connect_timeout*]
# (Optional) RADOS connection timeout.
# Defaults to hiera('glance::backend::rbd::rados_connect_timeout', undef).
# Defaults to lookup('glance::backend::rbd::rados_connect_timeout', undef, undef, undef).
#
# [*store_description*]
# (Optional) Provides constructive information about the store backend to
# end users.
# Defaults to hiera('tripleo::profile::base::glance::api::glance_store_description', 'RBD store').
# Defaults to lookup('tripleo::profile::base::glance::api::glance_store_description', undef, undef, 'RBD store').
#
# [*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::glance::backend::rbd (
$backend_names,
$multistore_config = {},
$glance_rbd_ceph_conf_path = '/etc/ceph',
$rbd_store_ceph_conf = hiera('glance::backend::rbd::rbd_store_ceph_conf', '/etc/ceph/ceph.conf'),
$rbd_store_user = hiera('glance::backend::rbd::rbd_store_user', 'openstack'),
$rbd_store_pool = hiera('glance::backend::rbd::rbd_store_pool', 'images'),
$rbd_store_chunk_size = hiera('glance::backend::rbd::rbd_store_chunk_size', undef),
$rbd_thin_provisioning = hiera('glance::backend::rbd::rbd_thin_provisioning', undef),
$rados_connect_timeout = hiera('glance::backend::rbd::rados_connect_timeout', undef),
$store_description = hiera('tripleo::profile::base::glance::api::glance_store_description', 'RBD store'),
$step = Integer(hiera('step')),
$rbd_store_ceph_conf = lookup('glance::backend::rbd::rbd_store_ceph_conf', undef, undef, '/etc/ceph/ceph.conf'),
$rbd_store_user = lookup('glance::backend::rbd::rbd_store_user', undef, undef, 'openstack'),
$rbd_store_pool = lookup('glance::backend::rbd::rbd_store_pool', undef, undef, 'images'),
$rbd_store_chunk_size = lookup('glance::backend::rbd::rbd_store_chunk_size', undef, undef, undef),
$rbd_thin_provisioning = lookup('glance::backend::rbd::rbd_thin_provisioning', undef, undef, undef),
$rados_connect_timeout = lookup('glance::backend::rbd::rados_connect_timeout', undef, undef, undef),
$store_description = lookup('tripleo::profile::base::glance::api::glance_store_description', undef, undef, 'RBD store'),
$step = Integer(lookup('step')),
) {
if $step >= 4 {

View File

@ -27,54 +27,54 @@
#
# [*swift_store_user*]
# (Optional) Swift store user.
# Defaults to hiera('glance::backend::swift::swift_store_user').
# Defaults to lookup('glance::backend::swift::swift_store_user').
#
# [*swift_store_key*]
# (Optional) Swift store key.
# Defaults to hiera('glance::backend::swift::swift_store_key').
# Defaults to lookup('glance::backend::swift::swift_store_key').
#
# [*swift_store_container*]
# (Optional) Swift store container.
# Defaults to hiera('glance::backend::swift::swift_store_container', undef).
# Defaults to lookup('glance::backend::swift::swift_store_container', undef, undef, undef).
#
# [*swift_store_auth_address*]
# (Optional) Swift store auth address.
# Defaults to hiera('glance::backend::swift::swift_store_auth_address', undef).
# Defaults to lookup('glance::backend::swift::swift_store_auth_address', undef, undef, undef).
#
# [*swift_store_auth_version*]
# (Optional) Swift store auth version.
# Defaults to hiera('glance::backend::swift::swift_store_auth_version', undef).
# Defaults to lookup('glance::backend::swift::swift_store_auth_version', undef, undef, undef).
#
# [*swift_store_auth_project_domain_id*]
# (Optional) Useful when keystone auth is version 3.
# Defaults to hiera('glance::backend::swift::swift_store_auth_project_domain_id', undef).
# Defaults to lookup('glance::backend::swift::swift_store_auth_project_domain_id', undef, undef, undef).
#
# [*swift_store_auth_user_domain_id*]
# (Optional) Useful when keystone auth is version 3.
# Defaults to hiera('glance::backend::swift::swift_store_auth_user_domain_id', undef).
# Defaults to lookup('glance::backend::swift::swift_store_auth_user_domain_id', undef, undef, undef).
#
# [*swift_store_large_object_size*]
# (Optional) What size, in MB, should Glance start chunking image files
# and do a large object manifest in Swift?
# Defaults to hiera('glance::backend::swift::swift_store_large_object_size', undef).
# Defaults to lookup('glance::backend::swift::swift_store_large_object_size', undef, undef, undef).
#
# [*swift_store_large_object_chunk_size*]
# (Optional) When doing a large object manifest, what size, in MB, should
# Glance write chunks to Swift? This amount of data is written
# to a temporary disk buffer during the process of chunking.
# Defaults to hiera('glance::backend::swift::swift_store_large_object_chunk_size', undef).
# Defaults to lookup('glance::backend::swift::swift_store_large_object_chunk_size', undef, undef, undef).
#
# [*swift_store_create_container_on_put*]
# (Optional) Whether to create the swift container if it's missing.
# Defaults to hiera('glance::backend::swift::swift_store_create_container_on_put', undef).
# Defaults to lookup('glance::backend::swift::swift_store_create_container_on_put', undef, undef, undef).
#
# [*swift_store_endpoint_type*]
# (Optional) Swift store endpoint type.
# Defaults to hiera('glance::backend::swift::swift_store_endpoint_type', undef).
# Defaults to lookup('glance::backend::swift::swift_store_endpoint_type', undef, undef, undef).
#
# [*swift_store_region*]
# (Optional) Swift store region.
# Defaults to hiera('glance::backend::swift::swift_store_region', undef).
# Defaults to lookup('glance::backend::swift::swift_store_region', undef, undef, undef).
#
# [*default_swift_reference*]
# (Optional) The reference to the default swift
@ -85,12 +85,12 @@
# [*store_description*]
# (Optional) Provides constructive information about the store backend to
# end users.
# Defaults to hiera('tripleo::profile::base::glance::api::glance_store_description', 'Swift store').
# Defaults to lookup('tripleo::profile::base::glance::api::glance_store_description', undef, undef, 'Swift store').
#
# [*step*]
# (Optional) The current step in deployment. See tripleo-heat-templates
# for more details.
# Defaults to hiera('step')
# Defaults to Integer(lookup('step'))
#
# DEPRECATED PARAMETERS
#
@ -101,21 +101,22 @@
class tripleo::profile::base::glance::backend::swift (
$backend_names,
$multistore_config = {},
$swift_store_user = hiera('glance::backend::swift::swift_store_user'),
$swift_store_key = hiera('glance::backend::swift::swift_store_key'),
$swift_store_container = hiera('glance::backend::swift::swift_store_container', undef),
$swift_store_auth_address = hiera('glance::backend::swift::swift_store_auth_address', undef),
$swift_store_auth_version = hiera('glance::backend::swift::swift_store_auth_version', undef),
$swift_store_auth_project_domain_id = hiera('glance::backend::swift::swift_store_auth_project_domain_id', undef),
$swift_store_auth_user_domain_id = hiera('glance::backend::swift::swift_store_auth_user_domain_id', undef),
$swift_store_large_object_size = hiera('glance::backend::swift::swift_store_large_object_size', undef),
$swift_store_large_object_chunk_size = hiera('glance::backend::swift::swift_store_large_object_chunk_size', undef),
$swift_store_create_container_on_put = hiera('glance::backend::swift::swift_store_create_container_on_put', undef),
$swift_store_endpoint_type = hiera('glance::backend::swift::swift_store_endpoint_type', undef),
$swift_store_region = hiera('glance::backend::swift::swift_store_region', undef),
$swift_store_user = lookup('glance::backend::swift::swift_store_user'),
$swift_store_key = lookup('glance::backend::swift::swift_store_key'),
$swift_store_container = lookup('glance::backend::swift::swift_store_container', undef, undef, undef),
$swift_store_auth_address = lookup('glance::backend::swift::swift_store_auth_address', undef, undef, undef),
$swift_store_auth_version = lookup('glance::backend::swift::swift_store_auth_version', undef, undef, undef),
$swift_store_auth_project_domain_id = lookup('glance::backend::swift::swift_store_auth_project_domain_id', undef, undef, undef),
$swift_store_auth_user_domain_id = lookup('glance::backend::swift::swift_store_auth_user_domain_id', undef, undef, undef),
$swift_store_large_object_size = lookup('glance::backend::swift::swift_store_large_object_size', undef, undef, undef),
$swift_store_large_object_chunk_size = lookup('glance::backend::swift::swift_store_large_object_chunk_size', undef, undef, undef),
$swift_store_create_container_on_put = lookup('glance::backend::swift::swift_store_create_container_on_put', undef, undef, undef),
$swift_store_endpoint_type = lookup('glance::backend::swift::swift_store_endpoint_type', undef, undef, undef),
$swift_store_region = lookup('glance::backend::swift::swift_store_region', undef, undef, undef),
$default_swift_reference = 'ref1',
$store_description = hiera('tripleo::profile::base::glance::api::glance_store_description', 'Swift store'),
$step = Integer(hiera('step')),
$store_description = lookup('tripleo::profile::base::glance::api::glance_store_description',
undef, undef, 'Swift store'),
$step = Integer(lookup('step')),
# DEPRECATED PARAMETERS
$swift_store_config_file = undef,
) {

View File

@ -34,13 +34,13 @@
# [*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::glance::netapp (
$netapp_share,
$netapp_nfs_mount = '/var/lib/glance/images',
$filesystem_store_metadata_file = '/etc/glance/glance-metadata-file.json',
$step = Integer(hiera('step')),
$step = Integer(lookup('step')),
) {