Add support for external_ids:ovn-cms-options
This change introduces the new parameter to manage the ovn-cms-options parameter, which is comsumed by the CMS plugin. Change-Id: Ic404a56f341f354d20387c20dbf71a4de28bf122
This commit is contained in:
parent
ef57dec400
commit
e577f548f9
@ -45,6 +45,11 @@
|
||||
# (optional) Enable or not DPDK with OVS
|
||||
# Defaults to false.
|
||||
#
|
||||
# [*ovn_cms_options*]
|
||||
# (optional) A list of options that will be consumed by the CMS Plugin and
|
||||
# which specific to this particular chassis.
|
||||
# Defaults to undef
|
||||
#
|
||||
# [*ovn_remote_probe_interval*]
|
||||
# (optional) Set probe interval, based on user configuration, value is in ms
|
||||
# Defaults to 60000
|
||||
@ -102,6 +107,7 @@ class ovn::controller(
|
||||
$mac_table_size = undef,
|
||||
$datapath_type = undef,
|
||||
$enable_dpdk = false,
|
||||
$ovn_cms_options = undef,
|
||||
$ovn_remote_probe_interval = 60000,
|
||||
$ovn_openflow_probe_interval = 60,
|
||||
$ovn_transport_zones = [],
|
||||
@ -143,12 +149,18 @@ class ovn::controller(
|
||||
before => Service['controller']
|
||||
}
|
||||
|
||||
$ovn_cms_options_real = $ovn_cms_options == undef ? {
|
||||
true => $ovn_cms_options,
|
||||
default => join(any2array($ovn_cms_options), ',')
|
||||
}
|
||||
|
||||
$config_items = {
|
||||
'external_ids:ovn-remote' => { 'value' => $ovn_remote },
|
||||
'external_ids:ovn-encap-type' => { 'value' => $ovn_encap_type },
|
||||
'external_ids:ovn-encap-ip' => { 'value' => $ovn_encap_ip },
|
||||
'external_ids:hostname' => { 'value' => $hostname },
|
||||
'external_ids:ovn-bridge' => { 'value' => $ovn_bridge },
|
||||
'external_ids:ovn-cms-options' => { 'value' => $ovn_cms_options_real },
|
||||
'external_ids:ovn-remote-probe-interval' => { 'value' => "${ovn_remote_probe_interval}" },
|
||||
'external_ids:ovn-openflow-probe-interval' => { 'value' => "${ovn_openflow_probe_interval}" },
|
||||
'external_ids:ovn-monitor-all' => { 'value' => "${ovn_monitor_all}" },
|
||||
|
4
releasenotes/notes/ovn-cms-options-2d98e441e752f002.yaml
Normal file
4
releasenotes/notes/ovn-cms-options-2d98e441e752f002.yaml
Normal file
@ -0,0 +1,4 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
The new ``ovn::controller::ovn_cms_options`` parameter has been added.
|
@ -10,6 +10,7 @@ describe 'ovn::controller' do
|
||||
:ovn_bridge => 'br-int',
|
||||
:bridge_interface_mappings => ['br-1:eth1'],
|
||||
:hostname => 'server1.example.com',
|
||||
:ovn_cms_options => ['cms_option1', 'cms_option2:foo'],
|
||||
:ovn_remote_probe_interval => 30000,
|
||||
:ovn_openflow_probe_interval => 8,
|
||||
:ovn_monitor_all => true,
|
||||
@ -68,6 +69,10 @@ describe 'ovn::controller' do
|
||||
:value => params[:ovn_bridge],
|
||||
)
|
||||
|
||||
is_expected.to contain_vs_config('external_ids:ovn-cms-options').with(
|
||||
:value => 'cms_option1,cms_option2:foo',
|
||||
)
|
||||
|
||||
is_expected.to contain_vs_config('external_ids:ovn-remote-probe-interval').with(
|
||||
:value => params[:ovn_remote_probe_interval],
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user