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: Id8a8be3f4e8d7f6f69371bd2df29e1b5bec90fb4
This commit is contained in:
Tobias Urdin 2019-02-23 22:33:44 +01:00
parent 7cab6640b4
commit 365f2f8fbd
1 changed files with 3 additions and 2 deletions

View File

@ -54,12 +54,13 @@ class ovn::controller(
$enable_hw_offload = false,
$mac_table_size = 50000,
) {
include ::ovn::params
include ::vswitch::ovs
include ::stdlib
validate_string($ovn_remote)
validate_string($ovn_encap_ip)
validate_legacy(String, 'validate_string', $ovn_remote)
validate_legacy(String, 'validate_string', $ovn_encap_ip)
service { 'controller':
ensure => true,