Merge "Add support for vlan_limit option"
This commit is contained in:
commit
9fd0804f79
@ -31,6 +31,11 @@
|
||||
#
|
||||
# [*disable_emc*]
|
||||
# (optional) Configure OVS to disable EMC.
|
||||
# Defaults to false
|
||||
#
|
||||
# [*vlan_limit*]
|
||||
# (optional) Number of vlan layers allowed.
|
||||
# Default to $::os_service_default
|
||||
#
|
||||
# [*revalidator_cores*]
|
||||
# (Optional) Number of cores to be used for OVS Revalidator threads.
|
||||
@ -52,6 +57,7 @@ class vswitch::dpdk (
|
||||
$pmd_core_list = undef,
|
||||
$socket_mem = undef,
|
||||
$disable_emc = false,
|
||||
$vlan_limit = $::os_service_default,
|
||||
$revalidator_cores = undef,
|
||||
$handler_cores = undef,
|
||||
# DEPRECATED PARAMETERS
|
||||
@ -103,6 +109,13 @@ class vswitch::dpdk (
|
||||
}
|
||||
}
|
||||
|
||||
if ! is_service_default($vlan_limit) {
|
||||
vs_config { 'other_config:vlan-limit':
|
||||
value => "${vlan_limit}",
|
||||
wait => true,
|
||||
}
|
||||
}
|
||||
|
||||
# lint:ignore:quoted_booleans
|
||||
vs_config { 'other_config:dpdk-init':
|
||||
value => 'true',
|
||||
|
@ -23,16 +23,22 @@
|
||||
# (optional) Configure OVS to use
|
||||
# Hardware Offload. This feature is
|
||||
# supported from ovs 2.8.0.
|
||||
# Defaults to False.
|
||||
# Defaults to false.
|
||||
#
|
||||
# [*disable_emc*]
|
||||
# (optional) Configure OVS to disable EMC.
|
||||
|
||||
# Defaults to false.
|
||||
#
|
||||
# [*vlan_limit*]
|
||||
# (optional) Number of vlan layers allowed.
|
||||
# Default to $::os_service_default
|
||||
#
|
||||
class vswitch::ovs(
|
||||
$package_ensure = 'present',
|
||||
$dkms_ensure = false,
|
||||
$enable_hw_offload = false,
|
||||
$disable_emc = false,
|
||||
$vlan_limit = $::os_service_default,
|
||||
) {
|
||||
|
||||
include vswitch::params
|
||||
@ -96,6 +102,13 @@ class vswitch::ovs(
|
||||
}
|
||||
}
|
||||
|
||||
if ! is_service_default($vlan_limit) {
|
||||
vs_config { 'other_config:vlan-limit':
|
||||
value => "${vlan_limit}",
|
||||
wait => true,
|
||||
}
|
||||
}
|
||||
|
||||
service { 'openvswitch':
|
||||
ensure => true,
|
||||
enable => true,
|
||||
|
7
releasenotes/notes/vlan-limit-b40bd9ca223b76ca.yaml
Normal file
7
releasenotes/notes/vlan-limit-b40bd9ca223b76ca.yaml
Normal file
@ -0,0 +1,7 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
The following two parameters have been added.
|
||||
|
||||
- ``vswitch::ovs::vlan_limit``
|
||||
- ``vswitch::dpdk::vlan_limit``
|
@ -46,6 +46,7 @@ describe 'vswitch::dpdk' do
|
||||
:value => nil, :wait => false,
|
||||
)
|
||||
is_expected.to_not contain_vs_config('other_config:emc-insert-inv-prob')
|
||||
is_expected.to_not contain_vs_config('other_config:vlan-limit')
|
||||
|
||||
end
|
||||
end
|
||||
@ -57,6 +58,7 @@ describe 'vswitch::dpdk' do
|
||||
params.merge!(:memory_channels => 2)
|
||||
params.merge!(:pmd_core_list => '22,23,24,25,66,67,68,69')
|
||||
params.merge!(:disable_emc => true)
|
||||
params.merge!(:vlan_limit => 2)
|
||||
end
|
||||
it 'configures dpdk options' do
|
||||
is_expected.to contain_vs_config('other_config:dpdk-init').with(
|
||||
@ -77,6 +79,9 @@ describe 'vswitch::dpdk' do
|
||||
is_expected.to contain_vs_config('other_config:emc-insert-inv-prob').with(
|
||||
:value => '0', :notify => 'Service[openvswitch]', :wait => false,
|
||||
)
|
||||
is_expected.to contain_vs_config('other_config:vlan-limit').with(
|
||||
:value => '2', :wait => true,
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -54,6 +54,10 @@ describe 'vswitch::ovs' do
|
||||
is_expected.to_not contain_vs_config('other_config:emc-insert-inv-prob')
|
||||
end
|
||||
|
||||
it 'does not set vlan-limit option' do
|
||||
is_expected.to_not contain_vs_config('other_config:vlan-limit')
|
||||
end
|
||||
|
||||
it 'configures service' do
|
||||
is_expected.to contain_service('openvswitch').with(
|
||||
:ensure => true,
|
||||
@ -80,6 +84,7 @@ describe 'vswitch::ovs' do
|
||||
:dkms_ensure => false,
|
||||
:enable_hw_offload => true,
|
||||
:disable_emc => true,
|
||||
:vlan_limit => 2,
|
||||
}
|
||||
end
|
||||
it 'installs correct package' do
|
||||
@ -99,6 +104,12 @@ describe 'vswitch::ovs' do
|
||||
:value => '0', :notify => 'Service[openvswitch]', :wait => false,
|
||||
)
|
||||
end
|
||||
it 'configures vlan-limit option' do
|
||||
is_expected.to contain_vs_config('other_config:vlan-limit').with(
|
||||
:value => '2', :wait => true,
|
||||
)
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user