Merge "Initialize odl_features in mech_driver_v1"

This commit is contained in:
Jenkins
2017-07-06 05:45:20 +00:00
committed by Gerrit Code Review
2 changed files with 6 additions and 0 deletions

View File

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

View File

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