Centralize arbitrary configurations for libvirt daemons

This is a prep work to add support for separate libvirt daemons and
merge libvirt::config class and libvirtd::virtlogd::config class, so
that we can put arbitary configurations to the single config class
later.

Change-Id: I21357822ae6113e484e94c6e6ab03976f40604eb
This commit is contained in:
Takashi Kajinami 2021-04-25 22:17:49 +09:00
parent a3b9a7538b
commit d2aaab3683
3 changed files with 25 additions and 2 deletions

View File

@ -17,14 +17,23 @@
# bar:
# value: barValue
#
# [*virtlogd_config*]
# (optional) Allow configuration of arbitrary virtlogd configurations.
# The value is an hash of virtlogd_config resources.
#
# NOTE: The configuration MUST NOT be already handled by this module
# or Puppet catalog compilation will fail with duplicate resources.
#
class nova::compute::libvirt::config (
$libvirtd_config = {},
$libvirtd_config = {},
$virtlogd_config = {},
) {
include nova::deps
validate_legacy(Hash, 'validate_hash', $libvirtd_config)
validate_legacy(Hash, 'validate_hash', $virtlogd_config)
create_resources('libvirtd_config', $libvirtd_config)
create_resources('virtlogd_config', $virtlogd_config)
}

View File

@ -1,11 +1,12 @@
# == Class: nova::compute::libvirt::virtlogd::config
#
# DEPRECATED !
# This class is used to manage arbitrary virtlogd configurations.
#
# === Parameters
#
# [*virtlogd_config*]
# (optional) Allow configuration of arbitrary libvirtd configurations.
# (optional) Allow configuration of arbitrary virtlogd configurations.
# The value is an hash of virtlogd_config resources. Example:
# { 'foo' => { value => 'fooValue'},
# 'bar' => { value => 'barValue'}
@ -24,6 +25,9 @@ class nova::compute::libvirt::virtlogd::config (
$virtlogd_config = {},
) {
warning('The nova::compute::libvirt::virtlogd::config class has been deprecated. \
Use the nova::compute::libvirt::config::virtlogd_config parameter.')
validate_legacy(Hash, 'validate_hash', $virtlogd_config)
create_resources('virtlogd_config', $virtlogd_config)

View File

@ -0,0 +1,10 @@
---
features:
- |
The new ``nova::compute::libvirt::virtlogd_config`` parameter has been
added.
deprecations:
- |
The ``nova::compute::libvirt::virtlogd::config`` class has been deprecated
in favor of ``nova::compute::libvirt::virtlogd_config``.