Temporarily support two INTERFACE_DRIVER_OPTS
INTERFACE_DRIVER_OPTS is being moved out of neutron.agent.common.config into neutron.conf.agent.common [1]. This patch has neutron-lbaas looking for the values in the old location, and if they aren't found, gets them from the new location. This patchset is required for Jenkins+1 in [1]. [1] https://review.openstack.org/#/c/343045/ Change-Id: I00e87e9c6f71a8a59e024a9795c48f7699387d85 Related-Bug: #1563069
This commit is contained in:
parent
970dd373e3
commit
d0f96c1c4f
|
@ -26,13 +26,26 @@ import neutron_lbaas.drivers.radware.base_v2_driver
|
|||
import neutron_lbaas.extensions.loadbalancerv2
|
||||
|
||||
|
||||
# TODO(johndperkins): Remove when https://review.openstack.org/#/c/343045
|
||||
# merges
|
||||
try:
|
||||
import neutron.conf.agent.common
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
try:
|
||||
_INTERFACE_DRIVER_OPTS = neutron.agent.common.config.INTERFACE_DRIVER_OPTS
|
||||
except AttributeError:
|
||||
_INTERFACE_DRIVER_OPTS = neutron.conf.agent.common.INTERFACE_DRIVER_OPTS
|
||||
|
||||
|
||||
def list_agent_opts():
|
||||
return [
|
||||
('DEFAULT',
|
||||
itertools.chain(
|
||||
neutron_lbaas.agent.agent.OPTS,
|
||||
neutron.agent.linux.interface.OPTS,
|
||||
neutron.agent.common.config.INTERFACE_DRIVER_OPTS)
|
||||
_INTERFACE_DRIVER_OPTS)
|
||||
)
|
||||
]
|
||||
|
||||
|
@ -64,7 +77,7 @@ def list_service_opts():
|
|||
neutron_lbaas.drivers.radware.base_v2_driver.driver_debug_opts),
|
||||
('haproxy',
|
||||
itertools.chain(
|
||||
neutron.agent.common.config.INTERFACE_DRIVER_OPTS,
|
||||
_INTERFACE_DRIVER_OPTS,
|
||||
neutron_lbaas.agent.agent.OPTS,
|
||||
)),
|
||||
('octavia',
|
||||
|
|
Loading…
Reference in New Issue