From fb1d984b42901d106de617e60afd1bce85753b66 Mon Sep 17 00:00:00 2001 From: Thomas Goirand Date: Wed, 2 Nov 2022 14:49:21 +0100 Subject: [PATCH] Add list_opts() function and define entry point This patch makes it possible to use oslo-config-generator, which was not possible without the correct oslo.config entry point. Change-Id: I5174fb7a8e10b2f8a833bca5c54b4d05b0e91ad0 --- ovn_bgp_agent/config.py | 7 +++++++ setup.cfg | 3 +++ 2 files changed, 10 insertions(+) diff --git a/ovn_bgp_agent/config.py b/ovn_bgp_agent/config.py index 7af1fedd..28c2d359 100644 --- a/ovn_bgp_agent/config.py +++ b/ovn_bgp_agent/config.py @@ -140,3 +140,10 @@ def get_root_helper(conf): def setup_privsep(): priv_context.init(root_helper=shlex.split(get_root_helper(cfg.CONF))) + + +def list_opts(): + return [ + ("DEFAULT", agent_opts), + ("AGENT", root_helper_opts) + ] diff --git a/setup.cfg b/setup.cfg index 0870ce37..b5593f4c 100644 --- a/setup.cfg +++ b/setup.cfg @@ -37,3 +37,6 @@ console_scripts = ovn_bgp_agent.drivers = ovn_bgp_driver = ovn_bgp_agent.drivers.openstack.ovn_bgp_driver:OVNBGPDriver ovn_evpn_driver = ovn_bgp_agent.drivers.openstack.ovn_evpn_driver:OVNEVPNDriver + +oslo.config.opts = + ovnbgpagent = ovn_bgp_agent.config:list_opts