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
This commit is contained in:
Johannes Erdfelt 2012-04-19 21:51:40 +00:00
parent 2d8ebfeda8
commit 4c4c77925c
2 changed files with 3 additions and 13 deletions

View File

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

View File

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