OVN: Deprecate the vif_type option

... because it was already deprecated in networking-ovn and has no
effect now[1].

[1] 5be7dfeb637984f75937a21b994c1375dfa77d87

Change-Id: I3139cc238036ec681d4eda18bb0aebc9f1404c4e
This commit is contained in:
Takashi Kajinami 2021-01-03 17:14:38 +09:00
parent 4f09774c6b
commit 1ba7a40514
3 changed files with 9 additions and 13 deletions

View File

@ -116,7 +116,6 @@ class neutron::plugins::ml2::ovn(
$package_ensure = 'present',
$ovsdb_connection_timeout = $::os_service_default,
$neutron_sync_mode = $::os_service_default,
$vif_type = $::os_service_default,
$ovn_metadata_enabled = $::os_service_default,
$dvr_enabled = $::os_service_default,
$dns_servers = $::os_service_default,
@ -124,6 +123,7 @@ class neutron::plugins::ml2::ovn(
$ovn_emit_need_to_frag = $::os_service_default,
# DEPRECATED PARAMETERS
$ovn_l3_mode = undef,
$vif_type = undef,
) {
include neutron::deps
@ -133,8 +133,8 @@ class neutron::plugins::ml2::ovn(
warning('The ovn_l3_mode parameter has been deprecated and has no effect')
}
if ! ( $vif_type in ['ovs', 'vhostuser', $::os_service_default] ) {
fail( 'Invalid value for vif_type parameter' )
if $vif_type != undef {
warning('The vif_type parameter has been deprecated and has no effect')
}
if ! ( $neutron_sync_mode in ['off', 'log', 'repair', $::os_service_default] ) {
@ -159,7 +159,6 @@ class neutron::plugins::ml2::ovn(
'ovn/ovn_sb_ca_cert' : value => $ovn_sb_ca_cert;
'ovn/ovsdb_connection_timeout' : value => $ovsdb_connection_timeout;
'ovn/neutron_sync_mode' : value => $neutron_sync_mode;
'ovn/vif_type' : value => $vif_type;
'ovn/ovn_metadata_enabled' : value => $ovn_metadata_enabled;
'ovn/enable_distributed_floating_ip' : value => $dvr_enabled;
'ovn/dns_servers' : value => join(any2array($dns_servers), ',');
@ -170,5 +169,6 @@ class neutron::plugins::ml2::ovn(
# TODO(tkajinam): Remove this when removing the deprecated parameters
neutron_plugin_ml2 {
'ovn/ovn_l3_mode' : ensure => absent;
'ovn/vif_type' : ensure => absent;
}
}

View File

@ -0,0 +1,5 @@
---
deprecations:
- |
The ``neutron::plugins::ml2::ovn::vif_type`` parameter has been deprecated
and has no effect.

View File

@ -21,7 +21,6 @@ describe 'neutron::plugins::ml2::ovn' do
:ovn_sb_ca_cert => 'sb_ca_cert',
:ovsdb_connection_timeout => '60',
:neutron_sync_mode => 'log',
:vif_type => 'ovs',
:dvr_enabled => false,
:dns_servers => ['8.8.8.8', '10.10.10.10'],
:ovn_emit_need_to_frag => false,
@ -49,7 +48,6 @@ describe 'neutron::plugins::ml2::ovn' do
should contain_neutron_plugin_ml2('ovn/ovn_sb_ca_cert').with_value(params[:ovn_sb_ca_cert])
should contain_neutron_plugin_ml2('ovn/ovsdb_connection_timeout').with_value(params[:ovsdb_connection_timeout])
should contain_neutron_plugin_ml2('ovn/neutron_sync_mode').with_value(params[:neutron_sync_mode])
should contain_neutron_plugin_ml2('ovn/vif_type').with_value(params[:vif_type])
should contain_neutron_plugin_ml2('ovn/enable_distributed_floating_ip').with_value(params[:dvr_enabled])
should contain_neutron_plugin_ml2('ovn/dns_servers').with_value(params[:dns_servers].join(','))
should contain_neutron_plugin_ml2('ovn/vhost_sock_dir').with_value('<SERVICE DEFAULT>')
@ -74,13 +72,6 @@ describe 'neutron::plugins::ml2::ovn' do
should raise_error(Puppet::Error, /Invalid value for neutron_sync_mode parameter/)
end
it 'should fail with invalid vif_type' do
params[:vif_type] = 'invalid'
should raise_error(Puppet::Error, /Invalid value for vif_type parameter/)
params.delete(:vif_type)
should contain_neutron_plugin_ml2('ovn/vif_type').with_value('<SERVICE DEFAULT>')
end
it 'should contain valid vhostuser socket dir' do
should contain_neutron_plugin_ml2('ovn/vhost_sock_dir').with_value('test')
end