puppet-nova/manifests/compute/mdev.pp
Takashi Kajinami f0cb20a86a replace validate_legacy with proper data types
the validate_legacy function is marked for deprecation in
v9.0.0 from puppetlabs-stdlib.

Change-Id: I7a66cba32f00851e0c93b8ef6e5a620fb474f111
2023-06-21 17:37:34 +09:00

27 lines
561 B
Puppet

# Class nova::compute::mdev
#
# Configures nova compute mdev options
#
# === Parameters:
#
# [*mdev_types*]
# (Optional) A hash to define the nova::compute::mdev_type resources.
# Defaults to {}
#
class nova::compute::mdev(
Hash $mdev_types = {},
) {
include nova::deps
if !empty($mdev_types) {
nova_config {
'devices/enabled_mdev_types': value => join(keys($mdev_types), ',')
}
create_resources('nova::compute::mdev_type', $mdev_types)
} else {
nova_config {
'devices/enabled_mdev_types': ensure => absent;
}
}
}