diff --git a/nova/flags.py b/nova/flags.py index fd2fcc95..316e35e0 100644 --- a/nova/flags.py +++ b/nova/flags.py @@ -370,9 +370,6 @@ global_opts = [ default=False, help='Allow destination machine to match source for resize. ' 'Useful when testing in single-host environments.'), - cfg.BoolOpt('stub_network', - default=False, - help='Stub network related code'), cfg.IntOpt('reclaim_instance_interval', default=0, help='Interval in seconds for reclaiming deleted instances'), diff --git a/nova/tests/test_volume_utils.py b/nova/tests/test_volume_utils.py index cd81e67f..66b00d48 100644 --- a/nova/tests/test_volume_utils.py +++ b/nova/tests/test_volume_utils.py @@ -25,6 +25,7 @@ from nova.openstack.common import log as logging from nova.openstack.common.notifier import api as notifier_api from nova.openstack.common.notifier import test_notifier from nova import test +from nova.tests import fake_network from nova.volume import utils as volume_utils @@ -37,10 +38,11 @@ class UsageInfoTestCase(test.TestCase): def setUp(self): super(UsageInfoTestCase, self).setUp() self.flags(compute_driver='nova.virt.fake.FakeDriver', - stub_network=True, host='fake') self.stubs.Set(flags.FLAGS, 'notification_driver', ['nova.openstack.common.notifier.test_notifier']) + fake_network.set_stub_network_methods(self.stubs) + self.volume = importutils.import_object(FLAGS.volume_manager) self.user_id = 'fake' self.project_id = 'fake'