Merge "Deprecate support for monkey_patch options"

This commit is contained in:
Zuul 2024-07-20 18:11:38 +00:00 committed by Gerrit Code Review
commit 9e7480a644
3 changed files with 15 additions and 16 deletions

View File

@ -1,24 +1,28 @@
# == Class: nova:patch::config
#
# DEPRECATED !!!
# This class is aim to configure nova.patch parameters
#
# === Parameters:
#
# [*monkey_patch*]
# (optional) Apply monkey patching or not
# Defaults to false
# Defaults to $facts['os_service_default']
#
# [*monkey_patch_modules*]
# (optional) List of modules/decorators to monkey patch
# Defaults to $facts['os_service_default']
#
class nova::patch::config (
$monkey_patch = false,
$monkey_patch_modules = $facts['os_service_default'],
$monkey_patch = $facts['os_service_default'],
$monkey_patch_modules = $facts['os_service_default'],
) {
include nova::deps
warning("The nova::patch::config class has been deprecated \"
and will be removed in the future release.")
$monkey_patch_modules_real = pick(join(any2array($monkey_patch_modules), ','), $facts['os_service_default'])
nova_config {

View File

@ -0,0 +1,6 @@
---
deprecations:
- |
The ``nova::patch::config`` class has been deprecated, because the options
supported by the class have already been removed from nova. The class
will be removed in a future release.

View File

@ -11,8 +11,8 @@ describe 'nova::patch::config' do
it { is_expected.to contain_class('nova::deps') }
context 'with default parameters' do
it { is_expected.to contain_nova_config('DEFAULT/monkey_patch').with_value('false') }
it { is_expected.to contain_nova_config('DEFAULT/monkey_patch_modules').with(:value => '<SERVICE DEFAULT>') }
it { is_expected.to contain_nova_config('DEFAULT/monkey_patch').with_value('<SERVICE DEFAULT>') }
it { is_expected.to contain_nova_config('DEFAULT/monkey_patch_modules').with_value('<SERVICE DEFAULT>') }
end
context 'when overriding parameters' do
@ -25,17 +25,6 @@ describe 'nova::patch::config' do
it { is_expected.to contain_nova_config('DEFAULT/monkey_patch').with_value('true') }
it { is_expected.to contain_nova_config('DEFAULT/monkey_patch_modules').with_value('nova.compute.api:nova.notifications.notify_decorator') }
end
context 'when overriding parameters with reset values' do
let :params do
{ :monkey_patch => false,
:monkey_patch_modules => '<SERVICE DEFAULT>'
}
end
it { is_expected.to contain_nova_config('DEFAULT/monkey_patch').with_value('false') }
it { is_expected.to contain_nova_config('DEFAULT/monkey_patch_modules').with(:value => '<SERVICE DEFAULT>') }
end
end
on_supported_os({