Merge "Remove unused time keyword arg"
This commit is contained in:
commit
2c786ff3ad
@ -1881,7 +1881,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.
|
||||
|
||||
@ -1890,9 +1890,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)
|
||||
|
||||
|
@ -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'])
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user