diff --git a/manifests/plugins/ml2/ovn.pp b/manifests/plugins/ml2/ovn.pp index 404dbf894..03090a8cb 100644 --- a/manifests/plugins/ml2/ovn.pp +++ b/manifests/plugins/ml2/ovn.pp @@ -60,12 +60,6 @@ # that are no longer in Neutron. # Defaults to $::os_service_default # -# [*ovn_l3_mode*] -# (optional) Whether to use OVN native L3 support. Do not change the -# value for existing deployments that contain routers. -# Type: boolean -# Defaults to $::os_service_default -# # [*vif_type*] # (optional) Type of VIF to be used for ports. # Valid values are 'ovs', 'vhostuser' @@ -101,7 +95,15 @@ # grep "Check pkt length action". # Type: boolean # Defaults to $::os_service_default - +# +# DEPRECATED PARAMETERS +# +# [*ovn_l3_mode*] +# (optional) Whether to use OVN native L3 support. Do not change the +# value for existing deployments that contain routers. +# Type: boolean +# Defaults to undef +# class neutron::plugins::ml2::ovn( $ovn_nb_connection = $::os_service_default, $ovn_sb_connection = $::os_service_default, @@ -114,20 +116,21 @@ class neutron::plugins::ml2::ovn( $package_ensure = 'present', $ovsdb_connection_timeout = $::os_service_default, $neutron_sync_mode = $::os_service_default, - $ovn_l3_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, $vhostuser_socket_dir = $::os_service_default, $ovn_emit_need_to_frag = $::os_service_default, - ) { + # DEPRECATED PARAMETERS + $ovn_l3_mode = undef, +) { include neutron::deps require neutron::plugins::ml2 - if ! is_service_default($ovn_l3_mode) { - validate_legacy(Boolean, 'validate_bool', $ovn_l3_mode) + if $ovn_l3_mode != undef { + warning('The ovn_l3_mode parameter has been deprecated and has no effect') } if ! ( $vif_type in ['ovs', 'vhostuser', $::os_service_default] ) { @@ -156,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/ovn_l3_mode' : value => $ovn_l3_mode; 'ovn/vif_type' : value => $vif_type; 'ovn/ovn_metadata_enabled' : value => $ovn_metadata_enabled; 'ovn/enable_distributed_floating_ip' : value => $dvr_enabled; @@ -164,4 +166,9 @@ class neutron::plugins::ml2::ovn( 'ovn/vhost_sock_dir' : value => $vhostuser_socket_dir; 'ovn/ovn_emit_need_to_frag' : value => $ovn_emit_need_to_frag; } + + # TODO(tkajinam): Remove this when removing the deprecated parameters + neutron_plugin_ml2 { + 'ovn/ovn_l3_mode' : ensure => absent; + } } diff --git a/releasenotes/notes/deprecate-ovn_l3_mode-91308d51a9596f22.yaml b/releasenotes/notes/deprecate-ovn_l3_mode-91308d51a9596f22.yaml new file mode 100644 index 000000000..361f0f15d --- /dev/null +++ b/releasenotes/notes/deprecate-ovn_l3_mode-91308d51a9596f22.yaml @@ -0,0 +1,5 @@ +--- +deprecations: + - | + The ``neutron::plugins::ml2::ovn::ovn_l3_mode`` parameter has been + deprecated and has no effect now. diff --git a/spec/classes/neutron_plugins_ml2_ovn_spec.rb b/spec/classes/neutron_plugins_ml2_ovn_spec.rb index e6d3668c5..d0487e1ab 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', - :ovn_l3_mode => true, :vif_type => 'ovs', :dvr_enabled => false, :dns_servers => ['8.8.8.8', '10.10.10.10'], @@ -50,7 +49,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/ovn_l3_mode').with_value(params[:ovn_l3_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(','))