From 19558abd2b174f16d74809cd159451effc6d2ac2 Mon Sep 17 00:00:00 2001 From: Mark McLoughlin Date: Wed, 12 Dec 2012 08:12:11 +0000 Subject: Move network_driver into new nova.network.driver Add a new load_network_driver() function which constrains the use of the network_driver option and move the option into nova.network.driver. blueprint: scope-config-opts Change-Id: I0a839765890093dc871b48435cfd113e0f8e46c4 --- nova/tests/network/test_linux_net.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'nova/tests') diff --git a/nova/tests/network/test_linux_net.py b/nova/tests/network/test_linux_net.py index 68aaa6251..243b0ee56 100644 --- a/nova/tests/network/test_linux_net.py +++ b/nova/tests/network/test_linux_net.py @@ -21,16 +21,14 @@ import mox from nova import context from nova import db +from nova.network import driver from nova.network import linux_net -from nova.openstack.common import cfg from nova.openstack.common import fileutils from nova.openstack.common import importutils from nova.openstack.common import log as logging from nova import test from nova import utils -CONF = cfg.CONF -CONF.import_opt('network_driver', 'nova.config') LOG = logging.getLogger(__name__) HOST = "testhost" @@ -214,8 +212,7 @@ class LinuxNetworkTestCase(test.TestCase): def setUp(self): super(LinuxNetworkTestCase, self).setUp() - network_driver = CONF.network_driver - self.driver = importutils.import_module(network_driver) + self.driver = driver.load_network_driver() self.driver.db = db self.context = context.RequestContext('testuser', 'testproject', is_admin=True) -- cgit