diff --git a/manifests/agents/ml2/ovs.pp b/manifests/agents/ml2/ovs.pp index ea7b5f661..b5ef1b755 100644 --- a/manifests/agents/ml2/ovs.pp +++ b/manifests/agents/ml2/ovs.pp @@ -121,11 +121,6 @@ # (optional) The vhost-user socket directory for OVS # Defaults to $::os_service_default # -# [*of_interface*] -# (optional) OpenFlow interface to use -# Allowed values: ovs-ofctl, native -# Defaults to $::os_service_default -# # [*ovsdb_interface*] # (optional) The interface for interacting with the OVSDB # Allowed values: vsctl, native @@ -150,6 +145,11 @@ # changes. (boolean value) # Defaults to $::os_service_default # +# DEPRECATED +# +# [*of_interface*] +# (optional) This option is deprecated an has no effect +# class neutron::agents::ml2::ovs ( $package_ensure = 'present', $enabled = true, @@ -173,12 +173,13 @@ class neutron::agents::ml2::ovs ( $tun_peer_patch_port = $::os_service_default, $datapath_type = $::os_service_default, $vhostuser_socket_dir = $::os_service_default, - $of_interface = $::os_service_default, $ovsdb_interface = $::os_service_default, $purge_config = false, $enable_dpdk = false, $enable_security_group = $::os_service_default, $minimize_polling = $::os_service_default, + # DEPRECATED + $of_interface = undef, ) { include ::neutron::deps @@ -221,8 +222,8 @@ class neutron::agents::ml2::ovs ( } } - if ! (is_service_default($of_interface)) and ! ($of_interface =~ /^(ovs-ofctl|native)$/) { - fail('A value of $of_interface is incorrect. The allowed values are ovs-ofctl and native') + if $of_interface { + warning('of_interface is deprecated and will be removed in the future') } if ! (is_service_default($ovsdb_interface)) and ! ($ovsdb_interface =~ /^(vsctl|native)$/) { diff --git a/releasenotes/notes/bug-1734241-a20421a6e3edcc17.yaml b/releasenotes/notes/bug-1734241-a20421a6e3edcc17.yaml new file mode 100644 index 000000000..22e617c5a --- /dev/null +++ b/releasenotes/notes/bug-1734241-a20421a6e3edcc17.yaml @@ -0,0 +1,3 @@ +--- +deprecations: + - Deprecate of_interface in class neutron::agents::ml2::ovs. Option not needed anymore \ No newline at end of file diff --git a/spec/classes/neutron_agents_ml2_ovs_spec.rb b/spec/classes/neutron_agents_ml2_ovs_spec.rb index d6bb7a667..436840ff7 100644 --- a/spec/classes/neutron_agents_ml2_ovs_spec.rb +++ b/spec/classes/neutron_agents_ml2_ovs_spec.rb @@ -49,7 +49,6 @@ describe 'neutron::agents::ml2::ovs' do is_expected.to contain_neutron_agent_ovs('ovs/datapath_type').with_value(['']) is_expected.to contain_neutron_agent_ovs('ovs/vhostuser_socket_dir').with_value(['']) is_expected.to contain_neutron_agent_ovs('ovs/ovsdb_interface').with_value(['']) - is_expected.to contain_neutron_agent_ovs('ovs/of_interface').with_value(['']) is_expected.to contain_neutron_agent_ovs('ovs/integration_bridge').with_value(p[:integration_bridge]) is_expected.to contain_neutron_agent_ovs('securitygroup/firewall_driver').\ with_value(p[:firewall_driver]) @@ -279,24 +278,6 @@ describe 'neutron::agents::ml2::ovs' do end end - context 'when supplying of_interface' do - context 'with incorrect value' do - before :each do - params.merge!(:of_interface => 'random') - end - it_raises 'a Puppet::Error', /A value of \$of_interface is incorrect. The allowed values are ovs-ofctl and native/ - end - - context 'with supported value' do - before :each do - params.merge!(:of_interface => 'native') - end - it 'should configure of_interface for ovs' do - is_expected.to contain_neutron_agent_ovs('ovs/of_interface').with_value('native') - end - end - end - context 'when enabling dpdk with manage vswitch disabled' do before :each do params.merge!(:enable_dpdk => true, :manage_vswitch => false)