Browse Source

Deprecate ovsdb_interface

This was removed from Neutron in 2018 and
it now always defaults to native [1].

[1] cf37563c83

Change-Id: Iec0b1a897709a549026f75dd18ca1a627c9995aa
tags/16.1.0
Tobias Urdin Takashi Kajinami 2 weeks ago
parent
commit
3568ccf3d7
3 changed files with 18 additions and 31 deletions
  1. +14
    -11
      manifests/agents/ml2/ovs.pp
  2. +4
    -0
      releasenotes/notes/deprecate-ovsdb_interface-d5720f786ce14b8a.yaml
  3. +0
    -20
      spec/classes/neutron_agents_ml2_ovs_spec.rb

+ 14
- 11
manifests/agents/ml2/ovs.pp View File

@@ -139,11 +139,6 @@
# (optional) The vhost-user socket directory for OVS
# Defaults to $::os_service_default
#
# [*ovsdb_interface*]
# (optional) The interface for interacting with the OVSDB
# Allowed values: vsctl, native
# Defaults to $::os_service_default
#
# [*purge_config*]
# (optional) Whether to set only the specified config options
# in the ovs config.
@@ -178,6 +173,11 @@
# [*of_interface*]
# (optional) This option is deprecated an has no effect
#
# [*ovsdb_interface*]
# (optional) The interface for interacting with the OVSDB
# Allowed values: vsctl, native
# Defaults to undef
#
class neutron::agents::ml2::ovs (
$package_ensure = 'present',
$enabled = true,
@@ -205,7 +205,6 @@ class neutron::agents::ml2::ovs (
$tun_peer_patch_port = $::os_service_default,
$datapath_type = $::os_service_default,
$vhostuser_socket_dir = $::os_service_default,
$ovsdb_interface = $::os_service_default,
$purge_config = false,
$enable_dpdk = false,
$enable_security_group = $::os_service_default,
@@ -214,6 +213,7 @@ class neutron::agents::ml2::ovs (
$tunnel_csum = $::os_service_default,
# DEPRECATED
$of_interface = undef,
$ovsdb_interface = undef,
) {

include neutron::deps
@@ -267,10 +267,6 @@ class neutron::agents::ml2::ovs (
warning('of_interface is deprecated and will be removed in the future')
}

if ! (is_service_default($ovsdb_interface)) and ! ($ovsdb_interface =~ /^(vsctl|native)$/) {
fail('A value of $ovsdb_interface is incorrect. The allowed values are vsctl and native')
}

resources { 'neutron_agent_ovs':
purge => $purge_config,
}
@@ -304,6 +300,14 @@ class neutron::agents::ml2::ovs (
}
}

# TODO(tobias.urdin): Remove in V release.
if $ovsdb_interface != undef {
warning('ovsdb_interface is deprecated and has no effect')
}
neutron_agent_ovs {
'ovs/ovsdb_interface': ensure => absent;
}

neutron_agent_ovs {
'agent/polling_interval': value => $polling_interval;
'agent/l2_population': value => $l2_population;
@@ -320,7 +324,6 @@ class neutron::agents::ml2::ovs (
'ovs/integration_bridge': value => $integration_bridge;
'ovs/datapath_type': value => $datapath_type;
'ovs/vhostuser_socket_dir': value => $vhostuser_socket_dir;
'ovs/ovsdb_interface': value => $ovsdb_interface;
'ovs/of_interface': value => $of_interface;
'securitygroup/enable_security_group': value => $enable_security_group;
}


+ 4
- 0
releasenotes/notes/deprecate-ovsdb_interface-d5720f786ce14b8a.yaml View File

@@ -0,0 +1,4 @@
---
deprecations:
- |
The neutron::agents::ml2::ovs::ovsdb_interface is deprecated and has no effect.

+ 0
- 20
spec/classes/neutron_agents_ml2_ovs_spec.rb View File

@@ -49,7 +49,6 @@ describe 'neutron::agents::ml2::ovs' do
should contain_neutron_agent_ovs('agent/tunnel_csum').with_value(['<SERVICE DEFAULT>'])
should contain_neutron_agent_ovs('ovs/datapath_type').with_value(['<SERVICE DEFAULT>'])
should contain_neutron_agent_ovs('ovs/vhostuser_socket_dir').with_value(['<SERVICE DEFAULT>'])
should contain_neutron_agent_ovs('ovs/ovsdb_interface').with_value(['<SERVICE DEFAULT>'])
should contain_neutron_agent_ovs('ovs/ovsdb_timeout').with_value('<SERVICE DEFAULT>')
should contain_neutron_agent_ovs('ovs/of_connect_timeout').with_value('<SERVICE DEFAULT>')
should contain_neutron_agent_ovs('ovs/of_request_timeout').with_value('<SERVICE DEFAULT>')
@@ -311,25 +310,6 @@ describe 'neutron::agents::ml2::ovs' do
end
end

context 'when supplying ovsdb_interface' do
context 'with incorrect value' do
before :each do
params.merge!(:ovsdb_interface => 'random')
end

it { should raise_error(Puppet::Error, /A value of \$ovsdb_interface is incorrect. The allowed values are vsctl and native/) }
end

context 'with supported value' do
before :each do
params.merge!(:ovsdb_interface => 'native')
end
it 'should configure ovsdb_interface for ovs' do
should contain_neutron_agent_ovs('ovs/ovsdb_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)


Loading…
Cancel
Save