summaryrefslogtreecommitdiffstats
path: root/nova/virt
diff options
context:
space:
mode:
authorSoren Hansen <soren@linux2go.dk>2011-03-24 10:01:22 +0000
committerTarmac <>2011-03-24 10:01:22 +0000
commit2434138bbc73a8dbaee44c66cb7bed9f1fa40b2b (patch)
tree9bbc2582741d3dab8a05cc50b24b1e5421b6d838 /nova/virt
parent08fd7016db5b0e435b8d9728345739afcf3cb152 (diff)
parent03257f78a8006e1e8e7e080af85163427cee7c5c (diff)
downloadnova-2434138bbc73a8dbaee44c66cb7bed9f1fa40b2b.tar.gz
nova-2434138bbc73a8dbaee44c66cb7bed9f1fa40b2b.tar.xz
nova-2434138bbc73a8dbaee44c66cb7bed9f1fa40b2b.zip
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/virt')
-rw-r--r--nova/virt/libvirt_conn.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/nova/virt/libvirt_conn.py b/nova/virt/libvirt_conn.py
index 96f42a8f8..e1a0a6f29 100644
--- a/nova/virt/libvirt_conn.py
+++ b/nova/virt/libvirt_conn.py
@@ -42,7 +42,6 @@ import shutil
import sys
import random
import subprocess
-import time
import uuid
from xml.dom import minidom
@@ -1172,7 +1171,8 @@ class LibvirtConnection(driver.ComputeDriver):
return
- def ensure_filtering_rules_for_instance(self, instance_ref):
+ def ensure_filtering_rules_for_instance(self, instance_ref,
+ time=None):
"""Setting up filtering rules and waiting for its completion.
To migrate an instance, filtering rules to hypervisors
@@ -1196,6 +1196,9 @@ class LibvirtConnection(driver.ComputeDriver):
"""
+ if not time:
+ time = greenthread
+
# If any instances never launch at destination host,
# basic-filtering must be set here.
self.firewall_driver.setup_basic_filtering(instance_ref)