puppet-octavia/manifests/config.pp
Tobias Urdin 9825c437e5 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: I12c38f4e42684b65d55d1d94ca6d6fb4042a6a8b
2019-02-23 22:25:00 +01:00

33 lines
846 B
Puppet

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