Deprecate of_interface for ovs

The parameter of_interface was use for OpenFlow
interfaces. This parameter is deprecated in neutron
project so it can be deprecated also in puppet.

Change-Id: Ic866355e7d24bff5885e3b894c97fe6cf3c174f9
Closes-Bug: 1734241
This commit is contained in:
Kamil Sambor
2018-07-27 09:33:02 +02:00
parent 79b720e932
commit 2a42bb26cd
3 changed files with 12 additions and 27 deletions

View File

@@ -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)$/) {

View File

@@ -0,0 +1,3 @@
---
deprecations:
- Deprecate of_interface in class neutron::agents::ml2::ovs. Option not needed anymore

View File

@@ -49,7 +49,6 @@ describe 'neutron::agents::ml2::ovs' do
is_expected.to contain_neutron_agent_ovs('ovs/datapath_type').with_value(['<SERVICE DEFAULT>'])
is_expected.to contain_neutron_agent_ovs('ovs/vhostuser_socket_dir').with_value(['<SERVICE DEFAULT>'])
is_expected.to contain_neutron_agent_ovs('ovs/ovsdb_interface').with_value(['<SERVICE DEFAULT>'])
is_expected.to contain_neutron_agent_ovs('ovs/of_interface').with_value(['<SERVICE DEFAULT>'])
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)