diff options
| author | Soren Hansen <soren@linux2go.dk> | 2011-03-24 10:01:22 +0000 |
|---|---|---|
| committer | Tarmac <> | 2011-03-24 10:01:22 +0000 |
| commit | 2434138bbc73a8dbaee44c66cb7bed9f1fa40b2b (patch) | |
| tree | 9bbc2582741d3dab8a05cc50b24b1e5421b6d838 /nova/compute | |
| parent | 08fd7016db5b0e435b8d9728345739afcf3cb152 (diff) | |
| parent | 03257f78a8006e1e8e7e080af85163427cee7c5c (diff) | |
Pass a fake timing source to live_migration_pre in every test that expectes it to fail, shaving off a whole minute of test run time.
Diffstat (limited to 'nova/compute')
| -rw-r--r-- | nova/compute/manager.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/nova/compute/manager.py b/nova/compute/manager.py index 9591a6c19..7316d1510 100644 --- a/nova/compute/manager.py +++ b/nova/compute/manager.py @@ -42,9 +42,10 @@ import string import socket import sys import tempfile -import time import functools +from eventlet import greenthread + from nova import exception from nova import flags from nova import log as logging @@ -844,7 +845,7 @@ class ComputeManager(manager.Manager): return self.driver.update_available_resource(context, self.host) - def pre_live_migration(self, context, instance_id): + def pre_live_migration(self, context, instance_id, time=None): """Preparations for live migration at dest host. :param context: security context @@ -852,6 +853,9 @@ class ComputeManager(manager.Manager): """ + if not time: + time = greenthread + # Getting instance info instance_ref = self.db.instance_get(context, instance_id) ec2_id = instance_ref['hostname'] |
