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
changes/58/450958/4
Mark McClain 6 years ago
parent 01a44b171e
commit 9ee8a47a9e

@ -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

@ -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):

@ -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')

Loading…
Cancel
Save