Deprecate support for monkey_patch options
... because these were deprecated in Queens release, and were already removed from nova[1]. [1] 9f48aee9b0ea68f7c8eba6a1f3d076e4194d804d Change-Id: I843b6d79fdf4fb0218a06327c9f6346aa9abd554
This commit is contained in:
@@ -1,24 +1,28 @@
|
|||||||
# == Class: nova:patch::config
|
# == Class: nova:patch::config
|
||||||
#
|
#
|
||||||
|
# DEPRECATED !!!
|
||||||
# This class is aim to configure nova.patch parameters
|
# This class is aim to configure nova.patch parameters
|
||||||
#
|
#
|
||||||
# === Parameters:
|
# === Parameters:
|
||||||
#
|
#
|
||||||
# [*monkey_patch*]
|
# [*monkey_patch*]
|
||||||
# (optional) Apply monkey patching or not
|
# (optional) Apply monkey patching or not
|
||||||
# Defaults to false
|
# Defaults to $facts['os_service_default']
|
||||||
#
|
#
|
||||||
# [*monkey_patch_modules*]
|
# [*monkey_patch_modules*]
|
||||||
# (optional) List of modules/decorators to monkey patch
|
# (optional) List of modules/decorators to monkey patch
|
||||||
# Defaults to $facts['os_service_default']
|
# Defaults to $facts['os_service_default']
|
||||||
#
|
#
|
||||||
class nova::patch::config (
|
class nova::patch::config (
|
||||||
$monkey_patch = false,
|
$monkey_patch = $facts['os_service_default'],
|
||||||
$monkey_patch_modules = $facts['os_service_default'],
|
$monkey_patch_modules = $facts['os_service_default'],
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include nova::deps
|
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'])
|
$monkey_patch_modules_real = pick(join(any2array($monkey_patch_modules), ','), $facts['os_service_default'])
|
||||||
|
|
||||||
nova_config {
|
nova_config {
|
||||||
|
|||||||
@@ -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.
|
||||||
@@ -11,8 +11,8 @@ describe 'nova::patch::config' do
|
|||||||
it { is_expected.to contain_class('nova::deps') }
|
it { is_expected.to contain_class('nova::deps') }
|
||||||
|
|
||||||
context 'with default parameters' do
|
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').with_value('<SERVICE DEFAULT>') }
|
||||||
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_modules').with_value('<SERVICE DEFAULT>') }
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'when overriding parameters' do
|
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').with_value('true') }
|
||||||
it { is_expected.to contain_nova_config('DEFAULT/monkey_patch_modules').with_value('nova.compute.api:nova.notifications.notify_decorator') }
|
it { is_expected.to contain_nova_config('DEFAULT/monkey_patch_modules').with_value('nova.compute.api:nova.notifications.notify_decorator') }
|
||||||
end
|
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
|
end
|
||||||
|
|
||||||
on_supported_os({
|
on_supported_os({
|
||||||
|
|||||||
Reference in New Issue
Block a user