Merge "Remove stub_network flag"
This commit is contained in:
@@ -370,9 +370,6 @@ global_opts = [
|
|||||||
default=False,
|
default=False,
|
||||||
help='Allow destination machine to match source for resize. '
|
help='Allow destination machine to match source for resize. '
|
||||||
'Useful when testing in single-host environments.'),
|
'Useful when testing in single-host environments.'),
|
||||||
cfg.BoolOpt('stub_network',
|
|
||||||
default=False,
|
|
||||||
help='Stub network related code'),
|
|
||||||
cfg.IntOpt('reclaim_instance_interval',
|
cfg.IntOpt('reclaim_instance_interval',
|
||||||
default=0,
|
default=0,
|
||||||
help='Interval in seconds for reclaiming deleted instances'),
|
help='Interval in seconds for reclaiming deleted instances'),
|
||||||
|
|||||||
@@ -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 api as notifier_api
|
||||||
from nova.openstack.common.notifier import test_notifier
|
from nova.openstack.common.notifier import test_notifier
|
||||||
from nova import test
|
from nova import test
|
||||||
|
from nova.tests import fake_network
|
||||||
from nova.volume import utils as volume_utils
|
from nova.volume import utils as volume_utils
|
||||||
|
|
||||||
|
|
||||||
@@ -37,10 +38,11 @@ class UsageInfoTestCase(test.TestCase):
|
|||||||
def setUp(self):
|
def setUp(self):
|
||||||
super(UsageInfoTestCase, self).setUp()
|
super(UsageInfoTestCase, self).setUp()
|
||||||
self.flags(compute_driver='nova.virt.fake.FakeDriver',
|
self.flags(compute_driver='nova.virt.fake.FakeDriver',
|
||||||
stub_network=True,
|
|
||||||
host='fake')
|
host='fake')
|
||||||
self.stubs.Set(flags.FLAGS, 'notification_driver',
|
self.stubs.Set(flags.FLAGS, 'notification_driver',
|
||||||
['nova.openstack.common.notifier.test_notifier'])
|
['nova.openstack.common.notifier.test_notifier'])
|
||||||
|
fake_network.set_stub_network_methods(self.stubs)
|
||||||
|
|
||||||
self.volume = importutils.import_object(FLAGS.volume_manager)
|
self.volume = importutils.import_object(FLAGS.volume_manager)
|
||||||
self.user_id = 'fake'
|
self.user_id = 'fake'
|
||||||
self.project_id = 'fake'
|
self.project_id = 'fake'
|
||||||
|
|||||||
Reference in New Issue
Block a user