Clean up deprecated vnic_type_blacklist parameters

Change-Id: Id8805bd724b6f97d20a3548dc16349eb906d5607
This commit is contained in:
Takashi Kajinami 2021-04-26 00:09:03 +09:00
parent 9c3bf1a7d0
commit 516a6f362b
4 changed files with 15 additions and 77 deletions

View File

@ -23,21 +23,8 @@
# (required) Supported PCI vendor devices, defined by vendor_id:product_id according
# to the PCI ID Repository. Default enables support for Intel and Mellanox SR-IOV capable NICs
#
# DEPRECATED PARAMETERS
#
# [*ovs_vnic_type_blacklist*]
# (optional) list of VNIC types for which support in Neutron is
# administratively prohibited by the OVS mechanism driver
#
# [*sriov_vnic_type_blacklist*]
# (optional) list of VNIC types for which support in Neutron is
# administratively prohibited by the SR-IOV mechanism driver
#
define neutron::plugins::ml2::mech_driver (
$supported_pci_vendor_devs,
# DEPRECATED PARAMETERS
$ovs_vnic_type_blacklist = undef,
$sriov_vnic_type_blacklist = undef,
){
include neutron::deps
@ -64,20 +51,4 @@ define neutron::plugins::ml2::mech_driver (
}
}
}
if ($ovs_vnic_type_blacklist != undef) {
warning('neutron::plugins::ml2::mech_driver::ovs_vnic_type_blacklist has been \
deperecated. Use neutron::plugins::ml2::ovs_driver class')
class { 'neutron::plugins::ml2::ovs_driver':
vnic_type_blacklist => $ovs_vnic_type_blacklist
}
}
if ($sriov_vnic_type_blacklist != undef) {
warning('neutron::plugins::ml2::mech_driver::sriov_vnic_type_blacklist has been \
deperecated. Use neutron::plugins::ml2::sriov_driver class')
class { 'neutron::plugins::ml2::sriov_vnic_type_blacklist':
vnic_type_blacklist => $sriov_vnic_type_blacklist
}
}
}

View File

@ -19,38 +19,17 @@
# administratively prohibited by the OVS mechanism driver
# Defaults to []
#
# DEPRECATED PARAMETERS
#
# [*vnic_type_blacklist*]
# (optional) list of VNIC types for which support in Neutron is
# administratively prohibited by the OVS mechanism driver
# Defaults to undef
#
class neutron::plugins::ml2::ovs_driver (
$vnic_type_prohibit_list = [],
# DEPRECATED PARAMETERS
$vnic_type_blacklist = undef,
){
if $vnic_type_blacklist != undef {
warning('The vnic_type_blacklist parameter is deprecated. Use vnic_type_prohibit_list instead')
$vnic_type_prohibit_list_real = $vnic_type_blacklist
} else {
$vnic_type_prohibit_list_real = $vnic_type_prohibit_list
}
validate_legacy(Array, 'validate_array', $vnic_type_prohibit_list_real)
if !empty($vnic_type_prohibit_list_real) {
validate_legacy(Array, 'validate_array', $vnic_type_prohibit_list)
if !empty($vnic_type_prohibit_list) {
neutron_plugin_ml2 {
'ovs_driver/vnic_type_prohibit_list': value => join(any2array($vnic_type_prohibit_list_real), ',');
'ovs_driver/vnic_type_prohibit_list': value => join(any2array($vnic_type_prohibit_list), ',');
}
} else {
neutron_plugin_ml2 {
'ovs_driver/vnic_type_prohibit_list': value => $::os_service_default;
}
}
neutron_plugin_ml2 {
'ovs_driver/vnic_type_blacklist': ensure => absent;
}
}

View File

@ -19,38 +19,17 @@
# administratively prohibited by the SRIOV mechanism driver
# Defaults to []
#
# DEPRECATED PARAMETERS
#
# [*vnic_type_blacklist*]
# (optional) list of VNIC types for which support in Neutron is
# administratively prohibited by the OVS mechanism driver
# Defaults to undef
#
class neutron::plugins::ml2::sriov_driver (
$vnic_type_prohibit_list = [],
# DEPRECATED PARAMETERS
$vnic_type_blacklist = undef,
){
if $vnic_type_blacklist != undef {
warning('The vnic_type_blacklist parameter is deprecated. Use vnic_type_prohibit_list instead')
$vnic_type_prohibit_list_real = $vnic_type_blacklist
} else {
$vnic_type_prohibit_list_real = $vnic_type_prohibit_list
}
validate_legacy(Array, 'validate_array', $vnic_type_prohibit_list_real)
if !empty($vnic_type_prohibit_list_real) {
validate_legacy(Array, 'validate_array', $vnic_type_prohibit_list)
if !empty($vnic_type_prohibit_list) {
neutron_plugin_ml2 {
'sriov_driver/vnic_type_prohibit_list': value => join(any2array($vnic_type_prohibit_list_real), ',');
'sriov_driver/vnic_type_prohibit_list': value => join(any2array($vnic_type_prohibit_list), ',');
}
} else {
neutron_plugin_ml2 {
'sriov_driver/vnic_type_prohibit_list': value => $::os_service_default;
}
}
neutron_plugin_ml2 {
'sriov_driver/vnic_type_blacklist': ensure => absent;
}
}

View File

@ -0,0 +1,9 @@
---
upgrade:
- |
The following four parmaeters have been removed.
- ``neutron::plugins::ml2::mech_driver::ovs_vnic_type_blacklist``
- ``neutron::plugins::ml2::mech_driver::sriov_vnic_type_blacklist``
- ``neutron::plugins::ml2::ovs_driver``
- ``neutron::plugins::ml2::sriov_driver``