From 36188e06cec5f5942eab7861330a694756d100e0 Mon Sep 17 00:00:00 2001 From: Dmitriy Rabotyagov Date: Wed, 12 Feb 2025 11:13:28 +0100 Subject: [PATCH] Simplify condition on ovn_ssl configuration in ml2 There is no reason to evaluate groups condition multiple times, as we are not placing OVN TLS configuration without more basic config anyway. So condition evaluation can be simplified and made more readable. Change-Id: If33870c00cc139e0fc8de4ec69adf331f178ee9d --- templates/plugins/ml2/ml2_conf.ini.j2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/plugins/ml2/ml2_conf.ini.j2 b/templates/plugins/ml2/ml2_conf.ini.j2 index f0fbb841..a294f170 100644 --- a/templates/plugins/ml2/ml2_conf.ini.j2 +++ b/templates/plugins/ml2/ml2_conf.ini.j2 @@ -51,14 +51,14 @@ enable_distributed_floating_ip = {{ neutron_ovn_distributed_fip }} ovn_metadata_enabled = True dns_servers = {{ neutron_dnsmasq_dns_servers }} dhcp_default_lease_time = {{ neutron_dnsmasq_lease_max }} -{% endif %} -{% if neutron_ovn_ssl and (neutron_services['neutron-server']['group'] in group_names or neutron_services['neutron-ovn-controller']['group'] in group_names) %} +{% if neutron_ovn_ssl %} ovn_sb_ca_cert={{ [neutron_conf_version_dir, neutron_ovn_ssl_ca_cert] | join('/') }} ovn_sb_certificate={{ [neutron_conf_version_dir, neutron_ovn_ssl_cert] | join('/') }} ovn_sb_private_key={{ [neutron_conf_version_dir, neutron_ovn_ssl_key] | join('/') }} ovn_nb_ca_cert={{ [neutron_conf_version_dir, neutron_ovn_ssl_ca_cert] | join('/') }} ovn_nb_certificate={{ [neutron_conf_version_dir, neutron_ovn_ssl_cert] | join('/') }} ovn_nb_private_key={{ [neutron_conf_version_dir, neutron_ovn_ssl_key] | join('/') }} +{% endif %} {% endif %} {% endif %} # Security groups