Use undef instead of $::os_service_default

In puppet-vswitch and puppet-ovn, undef has been used more commonly
than $::os_service_default. This change is the prep work to replace
$::os_service_default by undef, to make undef consistently used.

Change-Id: Ica9d4df335a1a5dfb9356fb21d24352bf8da58e3
This commit is contained in:
Takashi Kajinami 2022-01-22 22:24:32 +09:00
parent 7a7629748e
commit 5c809de016
2 changed files with 11 additions and 5 deletions

View File

@ -39,7 +39,7 @@
#
# [*datapath_type*]
# (optional) Datapath type for ovs bridges
# Defaults to $::os_service_default
# Defaults to undef
#
# [*enable_dpdk*]
# (optional) Enable or not DPDK with OVS
@ -96,7 +96,7 @@ class ovn::controller(
$hostname = $::fqdn,
$ovn_bridge = 'br-int',
$mac_table_size = undef,
$datapath_type = $::os_service_default,
$datapath_type = undef,
$enable_dpdk = false,
$ovn_remote_probe_interval = 60000,
$ovn_openflow_probe_interval = 60,
@ -192,13 +192,14 @@ class ovn::controller(
}
}
if ! is_service_default($datapath_type) {
if is_service_default($datapath_type) {
warning('Usage of $::os_service_default has been deprecated. Use undef instead')
$datapath_config = {
'external_ids:ovn-bridge-datapath-type' => { 'value' => $datapath_type }
'external_ids:ovn-bridge-datapath-type' => { 'ensure' => 'absent' }
}
} else {
$datapath_config = {
'external_ids:ovn-bridge-datapath-type' => { 'ensure' => 'absent' }
'external_ids:ovn-bridge-datapath-type' => { 'value' => $datapath_type }
}
}

View File

@ -0,0 +1,5 @@
---
deprecations:
- |
Usage of ``$::os_service_default`` for ``ovn::controller::datapath_type``
has been deprecated. Use ``undef`` instead.