From 97b558f3287f317be6d62c81e48fe2de87a762d1 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Sat, 16 Mar 2024 18:23:18 +0900 Subject: [PATCH] ovn-agent: Support [agent] extensions option The ovn-agent service in recent neutron versions support extensions mechanism to enable additional features. Change-Id: I725183b3b3b69a1f9636f4b44758932ab7bfde02 --- manifests/agents/ml2/ovn.pp | 8 +++++++- .../notes/ovn-agent-extensions-cee9f88173a4c123.yaml | 4 ++++ spec/classes/neutron_agents_ml2_ovn_spec.rb | 1 + 3 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 releasenotes/notes/ovn-agent-extensions-cee9f88173a4c123.yaml diff --git a/manifests/agents/ml2/ovn.pp b/manifests/agents/ml2/ovn.pp index 7460c054f..f9bf4d8d6 100644 --- a/manifests/agents/ml2/ovn.pp +++ b/manifests/agents/ml2/ovn.pp @@ -15,7 +15,11 @@ # Defaults to true # # [*debug*] -# Debug. Defaults to $facts['os_service_default']. +# (optional) Debug. Defaults to $facts['os_service_default']. +# +# [*extensions*] +# (optional) Extension list to use. +# Defaults to $facts['os_service_default'] # # [*ovsdb_connection*] # (optional) The URI used to connect to the local OVSDB server. @@ -105,6 +109,7 @@ class neutron::agents::ml2::ovn ( Boolean $enabled = true, Boolean $manage_service = true, $debug = $facts['os_service_default'], + $extensions = $facts['os_service_default'], $ovsdb_connection = 'tcp:127.0.0.1:6640', $ovs_manager = 'ptcp:6640:127.0.0.1', $ovn_nb_connection = $facts['os_service_default'], @@ -135,6 +140,7 @@ class neutron::agents::ml2::ovn ( neutron_agent_ovn { 'DEFAULT/debug': value => $debug; 'DEFAULT/state_path': value => $state_path; + 'agent/extensions': value => join(any2array($extensions), ','); 'agent/root_helper': value => $root_helper; 'agent/root_helper_daemon': value => $root_helper_daemon; 'ovs/ovsdb_connection': value => $ovsdb_connection; diff --git a/releasenotes/notes/ovn-agent-extensions-cee9f88173a4c123.yaml b/releasenotes/notes/ovn-agent-extensions-cee9f88173a4c123.yaml new file mode 100644 index 000000000..84fd50fae --- /dev/null +++ b/releasenotes/notes/ovn-agent-extensions-cee9f88173a4c123.yaml @@ -0,0 +1,4 @@ +--- +features: + - | + The new ``neutron::agents::ml2::ovn::extensions`` parameter has been added. diff --git a/spec/classes/neutron_agents_ml2_ovn_spec.rb b/spec/classes/neutron_agents_ml2_ovn_spec.rb index fa4c22b3b..756a0b6f9 100644 --- a/spec/classes/neutron_agents_ml2_ovn_spec.rb +++ b/spec/classes/neutron_agents_ml2_ovn_spec.rb @@ -38,6 +38,7 @@ describe 'neutron::agents::ml2::ovn' do it 'configures ovn_agent.ini' do should contain_neutron_agent_ovn('DEFAULT/debug').with(:value => '') should contain_neutron_agent_ovn('DEFAULT/state_path').with(:value => '/var/lib/neutron') + should contain_neutron_agent_ovn('agent/extensions').with(:value => '') should contain_neutron_agent_ovn('agent/root_helper').with(:value => 'sudo neutron-rootwrap /etc/neutron/rootwrap.conf') should contain_neutron_agent_ovn('agent/root_helper_daemon').with(:value => '') should contain_neutron_agent_ovn('ovs/ovsdb_connection').with(:value => 'tcp:127.0.0.1:6640')