diff options
| author | Johannes Erdfelt <johannes.erdfelt@rackspace.com> | 2012-04-19 21:51:40 +0000 |
|---|---|---|
| committer | Johannes Erdfelt <johannes.erdfelt@rackspace.com> | 2012-04-19 23:21:01 +0000 |
| commit | 4c4c77925c5df36643b4f91cbe3b220e3551431e (patch) | |
| tree | bf566912a72747d9b49d0664ad83506cbaadc038 /nova | |
| parent | 2d8ebfeda8db3b3232506c6b142c4004bb206092 (diff) | |
| download | nova-4c4c77925c5df36643b4f91cbe3b220e3551431e.tar.gz nova-4c4c77925c5df36643b4f91cbe3b220e3551431e.tar.xz nova-4c4c77925c5df36643b4f91cbe3b220e3551431e.zip | |
Remove unused time keyword arg
It's not used anywhere, it aliases the imported time module and is
broken at best if given since we want to use the eventlet sleep
anyway (which is monkey patched into time.sleep)
Change-Id: I7322ab5b5526afd3c02f48eb85066570b556bb75
Diffstat (limited to 'nova')
| -rw-r--r-- | nova/compute/manager.py | 5 | ||||
| -rw-r--r-- | nova/tests/test_compute.py | 11 |
2 files changed, 3 insertions, 13 deletions
diff --git a/nova/compute/manager.py b/nova/compute/manager.py index fd4b18c16..1e2fce695 100644 --- a/nova/compute/manager.py +++ b/nova/compute/manager.py @@ -1870,7 +1870,7 @@ class ComputeManager(manager.SchedulerDependentManager): """ return self.driver.get_instance_disk_info(instance_name) - def pre_live_migration(self, context, instance_id, time=None, + def pre_live_migration(self, context, instance_id, block_migration=False, disk=None): """Preparations for live migration at dest host. @@ -1879,9 +1879,6 @@ class ComputeManager(manager.SchedulerDependentManager): :param block_migration: if true, prepare for block migration """ - if not time: - time = greenthread - # Getting instance info instance_ref = self.db.instance_get(context, instance_id) diff --git a/nova/tests/test_compute.py b/nova/tests/test_compute.py index 27fadc321..e8b37ce99 100644 --- a/nova/tests/test_compute.py +++ b/nova/tests/test_compute.py @@ -58,14 +58,6 @@ flags.DECLARE('stub_network', 'nova.compute.manager') flags.DECLARE('live_migration_retry_count', 'nova.compute.manager') -class FakeTime(object): - def __init__(self): - self.counter = 0 - - def sleep(self, t): - self.counter += t - - orig_rpc_call = rpc.call orig_rpc_cast = rpc.cast @@ -1244,9 +1236,10 @@ class ComputeTestCase(BaseTestCase): c = context.get_admin_context() # start test + self.stubs.Set(time, 'sleep', lambda t: None) self.assertRaises(exception.FixedIpNotFoundForInstance, self.compute.pre_live_migration, - c, inst_ref['id'], time=FakeTime()) + c, inst_ref['id']) # cleanup db.instance_destroy(c, inst_ref['id']) |
