puppet-heat/manifests/config.pp
Tobias Urdin e46b67d242 Use validate_legacy
This changes all the puppet 3 validate_* functions
to use the validate_legacy function.

The validate_legacy function has been available since
about three years but require Puppet >= 4.4.0 and since
there is Puppet 4.10.12 as latest we should assume people
are running a fairly new Puppet 4 version.

This is the first step to then remove all validate function
calls and use proper types for parameter as described in spec [1].

[1] https://review.openstack.org/#/c/568929/

Change-Id: I422be4bfb6fd6f73f0b24ae9464c5c85689594e1
2019-02-23 14:52:57 +01:00

39 lines
1.0 KiB
Puppet

# == Class: heat::config
#
# This class is used to manage arbitrary Heat configurations.
#
# === Parameters
#
# [*heat_config*]
# (optional) Allow configuration of arbitrary Heat configurations.
# The value is a hash of heat_config resources. Example:
# { 'DEFAULT/foo' => { value => 'fooValue'},
# 'DEFAULT/bar' => { value => 'barValue'}
# }
# In yaml format, Example:
# heat_config:
# DEFAULT/foo:
# value: fooValue
# DEFAULT/bar:
# value: barValue
#
# [*heat_api_paste_ini*]
# (optional) Allow configuration of /etc/heat/api-paste.ini options.
#
# NOTE: The configuration MUST NOT be already handled by this module
# or Puppet catalog compilation will fail with duplicate resources.
#
class heat::config (
$heat_config = {},
$heat_api_paste_ini = {},
) {
include ::heat::deps
validate_legacy(Hash, 'validate_hash', $heat_config)
validate_legacy(Hash, 'validate_hash', $heat_api_paste_ini)
create_resources('heat_config', $heat_config)
create_resources('heat_api_paste_ini', $heat_api_paste_ini)
}