diff --git a/manifests/plugins/ml2/ovn.pp b/manifests/plugins/ml2/ovn.pp index 03090a8cb..526896f35 100644 --- a/manifests/plugins/ml2/ovn.pp +++ b/manifests/plugins/ml2/ovn.pp @@ -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; } } diff --git a/releasenotes/notes/deprecate-ovn-vif_type-76f7c2a0ee9fdb6b.yaml b/releasenotes/notes/deprecate-ovn-vif_type-76f7c2a0ee9fdb6b.yaml new file mode 100644 index 000000000..350d1498d --- /dev/null +++ b/releasenotes/notes/deprecate-ovn-vif_type-76f7c2a0ee9fdb6b.yaml @@ -0,0 +1,5 @@ +--- +deprecations: + - | + The ``neutron::plugins::ml2::ovn::vif_type`` parameter has been deprecated + and has no effect. diff --git a/spec/classes/neutron_plugins_ml2_ovn_spec.rb b/spec/classes/neutron_plugins_ml2_ovn_spec.rb index d0487e1ab..106fffcc6 100644 --- a/spec/classes/neutron_plugins_ml2_ovn_spec.rb +++ b/spec/classes/neutron_plugins_ml2_ovn_spec.rb @@ -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('') @@ -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('') - end - it 'should contain valid vhostuser socket dir' do should contain_neutron_plugin_ml2('ovn/vhost_sock_dir').with_value('test') end