diff --git a/networking_odl/ml2/mech_driver.py b/networking_odl/ml2/mech_driver.py index 82a9ba464..27248565a 100644 --- a/networking_odl/ml2/mech_driver.py +++ b/networking_odl/ml2/mech_driver.py @@ -39,6 +39,7 @@ from networking_odl.common import callback as odl_call from networking_odl.common import client as odl_client from networking_odl.common import constants as odl_const from networking_odl.common import filters +from networking_odl.common import odl_features from networking_odl.common import utils as odl_utils from networking_odl.ml2 import port_binding from networking_odl.trunk import trunk_driver_v1 as trunk_driver @@ -459,6 +460,7 @@ class OpenDaylightMechanismDriver(api.MechanismDriver): self.password = cfg.CONF.ml2_odl.password self.odl_drv = OpenDaylightDriver() self.trunk_driver = trunk_driver.OpenDaylightTrunkDriverV1.create() + odl_features.init() # Postcommit hooks are used to trigger synchronization. diff --git a/networking_odl/tests/unit/ml2/test_mechanism_odl.py b/networking_odl/tests/unit/ml2/test_mechanism_odl.py index 21b25559d..ce834b9cc 100644 --- a/networking_odl/tests/unit/ml2/test_mechanism_odl.py +++ b/networking_odl/tests/unit/ml2/test_mechanism_odl.py @@ -122,6 +122,7 @@ class OpenDaylightTestCase(test_plugin.Ml2PluginV2TestCase): def setUp(self): self.useFixture(odl_base.OpenDaylightRestClientFixture()) + self.useFixture(odl_base.OpendaylightFeaturesFixture()) super(OpenDaylightTestCase, self).setUp() self.port_create_status = 'DOWN' self.mech = mech_driver.OpenDaylightMechanismDriver() @@ -137,6 +138,7 @@ class OpenDaylightTestCase(test_plugin.Ml2PluginV2TestCase): class OpenDayLightMechanismConfigTests(testlib_api.SqlTestCase): def setUp(self): super(OpenDayLightMechanismConfigTests, self).setUp() + self.useFixture(odl_base.OpendaylightFeaturesFixture()) config.cfg.CONF.set_override('mechanism_drivers', ['logger', 'opendaylight'], 'ml2') @@ -302,6 +304,7 @@ class OpenDaylightMechanismDriverTestCase(base.BaseTestCase): def setUp(self): super(OpenDaylightMechanismDriverTestCase, self).setUp() self.useFixture(odl_base.OpenDaylightRestClientFixture()) + self.useFixture(odl_base.OpendaylightFeaturesFixture()) config.cfg.CONF.set_override('mechanism_drivers', ['logger', 'opendaylight'], 'ml2') self.mech = mech_driver.OpenDaylightMechanismDriver() @@ -547,6 +550,7 @@ class OpenDaylightMechanismDriverTestCase(base.BaseTestCase): class TestOpenDaylightMechanismDriver(base.DietTestCase): def setUp(self): self.useFixture(odl_base.OpenDaylightRestClientFixture()) + self.useFixture(odl_base.OpendaylightFeaturesFixture()) super(TestOpenDaylightMechanismDriver, self).setUp() config.cfg.CONF.set_override('mechanism_drivers', ['logger', 'opendaylight'], 'ml2')