Use the value of "ml2_plugin_config" when retrieving the ML2 conf file

The method ``get_ml2_conf_file`` now uses the configuration option
"ml2_plugin_config" instead of the hardcoded default value
"/etc/neutron/plugins/ml2/ml2_conf.ini"

Change-Id: Ib749d3b35ebaf030375160ebdc63b2ec4f73b959
This commit is contained in:
Rodolfo Alonso Hernandez 2024-09-09 15:42:03 +00:00 committed by Rodolfo Alonso
parent 284370494c
commit 5e29b1e826

View File

@ -304,9 +304,13 @@ def get_neutron_api_service_name():
def get_ml2_conf_file():
"""Neutron ML2 config file name depending on the installation type"""
"""Neutron ML2 config file name depending on the installation type
The default value of WB_CONF.ml2_plugin_config is
'/etc/neutron/plugins/ml2/ml2_conf.ini'.
"""
if WB_CONF.openstack_type in ('podified', 'devstack'):
return '/etc/neutron/plugins/ml2/ml2_conf.ini'
return WB_CONF.ml2_plugin_config
else:
return ('/var/lib/config-data/puppet-generated/neutron'
'/etc/neutron/plugins/ml2/ml2_conf.ini')
return ('/var/lib/config-data/puppet-generated/neutron' +
WB_CONF.ml2_plugin_config)