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:
@@ -121,11 +121,6 @@
|
|||||||
# (optional) The vhost-user socket directory for OVS
|
# (optional) The vhost-user socket directory for OVS
|
||||||
# Defaults to $::os_service_default
|
# Defaults to $::os_service_default
|
||||||
#
|
#
|
||||||
# [*of_interface*]
|
|
||||||
# (optional) OpenFlow interface to use
|
|
||||||
# Allowed values: ovs-ofctl, native
|
|
||||||
# Defaults to $::os_service_default
|
|
||||||
#
|
|
||||||
# [*ovsdb_interface*]
|
# [*ovsdb_interface*]
|
||||||
# (optional) The interface for interacting with the OVSDB
|
# (optional) The interface for interacting with the OVSDB
|
||||||
# Allowed values: vsctl, native
|
# Allowed values: vsctl, native
|
||||||
@@ -150,6 +145,11 @@
|
|||||||
# changes. (boolean value)
|
# changes. (boolean value)
|
||||||
# Defaults to $::os_service_default
|
# Defaults to $::os_service_default
|
||||||
#
|
#
|
||||||
|
# DEPRECATED
|
||||||
|
#
|
||||||
|
# [*of_interface*]
|
||||||
|
# (optional) This option is deprecated an has no effect
|
||||||
|
#
|
||||||
class neutron::agents::ml2::ovs (
|
class neutron::agents::ml2::ovs (
|
||||||
$package_ensure = 'present',
|
$package_ensure = 'present',
|
||||||
$enabled = true,
|
$enabled = true,
|
||||||
@@ -173,12 +173,13 @@ class neutron::agents::ml2::ovs (
|
|||||||
$tun_peer_patch_port = $::os_service_default,
|
$tun_peer_patch_port = $::os_service_default,
|
||||||
$datapath_type = $::os_service_default,
|
$datapath_type = $::os_service_default,
|
||||||
$vhostuser_socket_dir = $::os_service_default,
|
$vhostuser_socket_dir = $::os_service_default,
|
||||||
$of_interface = $::os_service_default,
|
|
||||||
$ovsdb_interface = $::os_service_default,
|
$ovsdb_interface = $::os_service_default,
|
||||||
$purge_config = false,
|
$purge_config = false,
|
||||||
$enable_dpdk = false,
|
$enable_dpdk = false,
|
||||||
$enable_security_group = $::os_service_default,
|
$enable_security_group = $::os_service_default,
|
||||||
$minimize_polling = $::os_service_default,
|
$minimize_polling = $::os_service_default,
|
||||||
|
# DEPRECATED
|
||||||
|
$of_interface = undef,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include ::neutron::deps
|
include ::neutron::deps
|
||||||
@@ -221,8 +222,8 @@ class neutron::agents::ml2::ovs (
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ! (is_service_default($of_interface)) and ! ($of_interface =~ /^(ovs-ofctl|native)$/) {
|
if $of_interface {
|
||||||
fail('A value of $of_interface is incorrect. The allowed values are ovs-ofctl and native')
|
warning('of_interface is deprecated and will be removed in the future')
|
||||||
}
|
}
|
||||||
|
|
||||||
if ! (is_service_default($ovsdb_interface)) and ! ($ovsdb_interface =~ /^(vsctl|native)$/) {
|
if ! (is_service_default($ovsdb_interface)) and ! ($ovsdb_interface =~ /^(vsctl|native)$/) {
|
||||||
|
3
releasenotes/notes/bug-1734241-a20421a6e3edcc17.yaml
Normal file
3
releasenotes/notes/bug-1734241-a20421a6e3edcc17.yaml
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
---
|
||||||
|
deprecations:
|
||||||
|
- Deprecate of_interface in class neutron::agents::ml2::ovs. Option not needed anymore
|
@@ -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/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/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/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('ovs/integration_bridge').with_value(p[:integration_bridge])
|
||||||
is_expected.to contain_neutron_agent_ovs('securitygroup/firewall_driver').\
|
is_expected.to contain_neutron_agent_ovs('securitygroup/firewall_driver').\
|
||||||
with_value(p[:firewall_driver])
|
with_value(p[:firewall_driver])
|
||||||
@@ -279,24 +278,6 @@ describe 'neutron::agents::ml2::ovs' do
|
|||||||
end
|
end
|
||||||
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
|
context 'when enabling dpdk with manage vswitch disabled' do
|
||||||
before :each do
|
before :each do
|
||||||
params.merge!(:enable_dpdk => true, :manage_vswitch => false)
|
params.merge!(:enable_dpdk => true, :manage_vswitch => false)
|
||||||
|
Reference in New Issue
Block a user