Expose OVS bridge related options into metering agent config file

Agent state options (report_interval), or interface related options
(f.e. ovs_integration_bridge) should be exposed into all configuration
files for all agents that may report a state, or instantiate a bridge
object.

Since some of options that were previously considered 'base' don't apply
to metering agent (specifically, availability_zone), moved them into
separate lists and included them into relevant agents (l3 and dhcp).

The only glitch with the change is that log_agent_heartbeats option is
now exposed into metering agent configuration file, even though the
agent does not honour it. I think it's minor and we can live with it.

Change-Id: Ibceca20cec60e75a8c6ddd35f3f9cb8cca272a9e
This commit is contained in:
Ihar Hrachyshka 2016-10-02 12:19:27 +00:00
parent c2e40cb069
commit a8e1badbd2
5 changed files with 12 additions and 10 deletions

View File

@ -2,6 +2,7 @@
output_file = etc/dhcp_agent.ini.sample
wrap_width = 79
namespace = neutron.az.agent
namespace = neutron.base.agent
namespace = neutron.dhcp.agent
namespace = oslo.log

View File

@ -2,6 +2,7 @@
output_file = etc/l3_agent.ini.sample
wrap_width = 79
namespace = neutron.az.agent
namespace = neutron.base.agent
namespace = neutron.l3.agent
namespace = oslo.log

View File

@ -2,5 +2,6 @@
output_file = etc/metering_agent.ini.sample
wrap_width = 79
namespace = neutron.base.agent
namespace = neutron.metering.agent
namespace = oslo.log

View File

@ -156,11 +156,13 @@ def list_base_agent_opts():
neutron.agent.common.config.INTERFACE_DRIVER_OPTS,
neutron.conf.agent.ovs_conf.OPTS)
),
('AGENT',
itertools.chain(
neutron.agent.common.config.AGENT_STATE_OPTS,
neutron.agent.common.config.AVAILABILITY_ZONE_OPTS)
)
('AGENT', neutron.agent.common.config.AGENT_STATE_OPTS),
]
def list_az_agent_opts():
return [
('AGENT', neutron.agent.common.config.AVAILABILITY_ZONE_OPTS),
]
@ -230,11 +232,7 @@ def list_metadata_agent_opts():
def list_metering_agent_opts():
return [
('DEFAULT',
itertools.chain(
neutron.conf.services.metering_agent.metering_agent_opts,
neutron.agent.common.config.INTERFACE_DRIVER_OPTS)
)
('DEFAULT', neutron.conf.services.metering_agent.metering_agent_opts),
]

View File

@ -129,6 +129,7 @@ oslo.messaging.notify.drivers =
oslo.config.opts =
neutron = neutron.opts:list_opts
neutron.agent = neutron.opts:list_agent_opts
neutron.az.agent = neutron.opts:list_az_agent_opts
neutron.base.agent = neutron.opts:list_base_agent_opts
neutron.db = neutron.opts:list_db_opts
neutron.dhcp.agent = neutron.opts:list_dhcp_agent_opts