From 9ee8a47a9e4789309261f787bb426e359838aac3 Mon Sep 17 00:00:00 2001 From: Mark McClain Date: Tue, 28 Mar 2017 15:05:43 -0400 Subject: [PATCH] Add cfg.CONF.import_group() to document option dependencies This change documents option dependencies within the code and ensures isolated test runs will work properly and not depend on other import side effects. Change-Id: I42aa0a496f64ecbae3f70af214b03e3dc9bae243 --- networking_arista/l3Plugin/arista_l3_driver.py | 1 + networking_arista/ml2/drivers/type_arista_vlan.py | 2 +- networking_arista/ml2/mechanism_arista.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/networking_arista/l3Plugin/arista_l3_driver.py b/networking_arista/l3Plugin/arista_l3_driver.py index bc9fb81d..b7d83d79 100644 --- a/networking_arista/l3Plugin/arista_l3_driver.py +++ b/networking_arista/l3Plugin/arista_l3_driver.py @@ -24,6 +24,7 @@ from networking_arista.common import api from networking_arista.common import exceptions as arista_exc LOG = logging.getLogger(__name__) +cfg.CONF.import_group('l3_arista', 'networking_arista.common.config') EOS_UNREACHABLE_MSG = _('Unable to reach EOS') DEFAULT_VLAN = 1 diff --git a/networking_arista/ml2/drivers/type_arista_vlan.py b/networking_arista/ml2/drivers/type_arista_vlan.py index b922df5f..b25eedb6 100644 --- a/networking_arista/ml2/drivers/type_arista_vlan.py +++ b/networking_arista/ml2/drivers/type_arista_vlan.py @@ -21,13 +21,13 @@ from oslo_log import log from neutron.plugins.ml2.drivers import type_vlan from networking_arista._i18n import _LI -from networking_arista.common import config # noqa from networking_arista.common import db_lib from networking_arista.common import exceptions as exc from networking_arista.ml2 import arista_ml2 from networking_arista.ml2.drivers import driver_helpers LOG = log.getLogger(__name__) +cfg.CONF.import_group('arista_type_driver', 'networking_arista.common.config') class AristaVlanTypeDriver(type_vlan.VlanTypeDriver): diff --git a/networking_arista/ml2/mechanism_arista.py b/networking_arista/ml2/mechanism_arista.py index 2ba8eac9..c97a617a 100644 --- a/networking_arista/ml2/mechanism_arista.py +++ b/networking_arista/ml2/mechanism_arista.py @@ -26,7 +26,6 @@ from neutron.plugins.ml2.common import exceptions as ml2_exc from neutron.plugins.ml2 import driver_api from networking_arista._i18n import _, _LI, _LE -from networking_arista.common import config # noqa from networking_arista.common import db from networking_arista.common import db_lib from networking_arista.common import exceptions as arista_exc @@ -34,6 +33,7 @@ from networking_arista.ml2 import arista_ml2 from networking_arista.ml2 import sec_group_callback LOG = logging.getLogger(__name__) +cfg.CONF.import_group('ml2_arista', 'networking_arista.common.config') # Messages EOS_UNREACHABLE_MSG = _('Unable to reach EOS')