Replace vnic_type_blacklist by vnic_type_prohibit_list
... to follow renaming in neutron[1]. [1] 055036ba2bc1fd1cfc54ef63dc6cb82037111950 Change-Id: I8891efc94ceafe7ee7c789b68c410629fc240c91
This commit is contained in:
parent
0d34714dad
commit
2c5ed70823
@ -14,23 +14,43 @@
|
|||||||
#
|
#
|
||||||
# === Parameters:
|
# === Parameters:
|
||||||
#
|
#
|
||||||
# [*vnic_type_blacklist*]
|
# [*vnic_type_prohibit_list*]
|
||||||
# (optional) list of VNIC types for which support in Neutron is
|
# (optional) list of VNIC types for which support in Neutron is
|
||||||
# administratively prohibited by the OVS mechanism driver
|
# administratively prohibited by the OVS mechanism driver
|
||||||
# Defaults to []
|
# 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 (
|
class neutron::plugins::ml2::ovs_driver (
|
||||||
$vnic_type_blacklist = [],
|
$vnic_type_prohibit_list = [],
|
||||||
|
# DEPRECATED PARAMETERS
|
||||||
|
$vnic_type_blacklist = undef,
|
||||||
){
|
){
|
||||||
|
|
||||||
validate_legacy(Array, 'validate_array', $vnic_type_blacklist)
|
if $vnic_type_blacklist != undef {
|
||||||
if !empty($vnic_type_blacklist) {
|
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) {
|
||||||
neutron_plugin_ml2 {
|
neutron_plugin_ml2 {
|
||||||
'ovs_driver/vnic_type_blacklist': value => join(any2array($vnic_type_blacklist), ',');
|
'ovs_driver/vnic_type_prohibit_list': value => join(any2array($vnic_type_prohibit_list_real), ',');
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
neutron_plugin_ml2 {
|
neutron_plugin_ml2 {
|
||||||
'ovs_driver/vnic_type_blacklist': value => $::os_service_default;
|
'ovs_driver/vnic_type_prohibit_list': value => $::os_service_default;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
neutron_plugin_ml2 {
|
||||||
|
'ovs_driver/vnic_type_blacklist': ensure => absent;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -14,23 +14,43 @@
|
|||||||
#
|
#
|
||||||
# === Parameters:
|
# === Parameters:
|
||||||
#
|
#
|
||||||
# [*vnic_type_blacklist*]
|
# [*vnic_type_prohibit_list*]
|
||||||
# (optional) list of VNIC types for which support in Neutron is
|
# (optional) list of VNIC types for which support in Neutron is
|
||||||
# administratively prohibited by the SRIOV mechanism driver
|
# administratively prohibited by the SRIOV mechanism driver
|
||||||
# Defaults to []
|
# 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 (
|
class neutron::plugins::ml2::sriov_driver (
|
||||||
$vnic_type_blacklist= [],
|
$vnic_type_prohibit_list = [],
|
||||||
|
# DEPRECATED PARAMETERS
|
||||||
|
$vnic_type_blacklist = undef,
|
||||||
){
|
){
|
||||||
|
|
||||||
validate_legacy(Array, 'validate_array', $vnic_type_blacklist)
|
if $vnic_type_blacklist != undef {
|
||||||
if !empty($vnic_type_blacklist) {
|
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) {
|
||||||
neutron_plugin_ml2 {
|
neutron_plugin_ml2 {
|
||||||
'sriov_driver/vnic_type_blacklist': value => join(any2array($vnic_type_blacklist), ',');
|
'sriov_driver/vnic_type_prohibit_list': value => join(any2array($vnic_type_prohibit_list_real), ',');
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
neutron_plugin_ml2 {
|
neutron_plugin_ml2 {
|
||||||
'sriov_driver/vnic_type_blacklist': value => $::os_service_default;
|
'sriov_driver/vnic_type_prohibit_list': value => $::os_service_default;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
neutron_plugin_ml2 {
|
||||||
|
'sriov_driver/vnic_type_blacklist': ensure => absent;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
deprecations:
|
||||||
|
- |
|
||||||
|
The ``vnic_type_blacklist`` parameter has been deprecated. Use the
|
||||||
|
``vnic_type_prohibit_list`` parameter instead.
|
@ -23,17 +23,17 @@ describe 'neutron::plugins::ml2::ovs_driver' do
|
|||||||
end
|
end
|
||||||
|
|
||||||
it 'should set the default values' do
|
it 'should set the default values' do
|
||||||
should contain_neutron_plugin_ml2('ovs_driver/vnic_type_blacklist').with_value("<SERVICE DEFAULT>")
|
should contain_neutron_plugin_ml2('ovs_driver/vnic_type_prohibit_list').with_value("<SERVICE DEFAULT>")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'when vnic_type_blacklist is not empty list' do
|
context 'when vnic_type_prohibit_list is not empty list' do
|
||||||
let :params do
|
let :params do
|
||||||
{ :vnic_type_blacklist => ['direct'] }
|
{ :vnic_type_prohibit_list => ['direct'] }
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'should configure direct in vnic_type_blacklist' do
|
it 'should configure direct in vnic_type_prohibit_list' do
|
||||||
should contain_neutron_plugin_ml2('ovs_driver/vnic_type_blacklist').with_value("direct")
|
should contain_neutron_plugin_ml2('ovs_driver/vnic_type_prohibit_list').with_value("direct")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -23,17 +23,17 @@ describe 'neutron::plugins::ml2::sriov_driver' do
|
|||||||
end
|
end
|
||||||
|
|
||||||
it 'should set the default values' do
|
it 'should set the default values' do
|
||||||
should contain_neutron_plugin_ml2('sriov_driver/vnic_type_blacklist').with_value("<SERVICE DEFAULT>")
|
should contain_neutron_plugin_ml2('sriov_driver/vnic_type_prohibit_list').with_value("<SERVICE DEFAULT>")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'when vnic_type_blacklist is not empty list' do
|
context 'when vnic_type_prohibit_list is not empty list' do
|
||||||
let :params do
|
let :params do
|
||||||
{ :vnic_type_blacklist => ['direct'] }
|
{ :vnic_type_prohibit_list => ['direct'] }
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'should configure direct in vnic_type_blacklist' do
|
it 'should configure direct in vnic_type_prohibit_list' do
|
||||||
should contain_neutron_plugin_ml2('sriov_driver/vnic_type_blacklist').with_value("direct")
|
should contain_neutron_plugin_ml2('sriov_driver/vnic_type_prohibit_list').with_value("direct")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user