summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Lindgren <hanlind@kth.se>2013-05-08 15:43:32 +0200
committerHans Lindgren <hanlind@kth.se>2013-05-08 15:49:45 +0200
commit8b79ac24a83854de9f57bb3526a2edbd0b6d64d2 (patch)
tree930997c13e7932eb6800a7b920e0776a429c7c9b
parent4ce8f2a6a9d4644153b4ba532ca1b78665507d6a (diff)
downloadnova-8b79ac24a83854de9f57bb3526a2edbd0b6d64d2.tar.gz
nova-8b79ac24a83854de9f57bb3526a2edbd0b6d64d2.tar.xz
nova-8b79ac24a83854de9f57bb3526a2edbd0b6d64d2.zip
Make sure that hypervisor nodename is set correctly in FakeDriver
This resolves an issue where the wrong host name is used when executing some sample_api tests individually. Resolves bug 1177802. Change-Id: I29af026e29ff8c70bb6b4c81f1bdf28cdea11140
-rwxr-xr-xnova/virt/fake.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/nova/virt/fake.py b/nova/virt/fake.py
index 18774245f..c38dc9ed6 100755
--- a/nova/virt/fake.py
+++ b/nova/virt/fake.py
@@ -41,7 +41,7 @@ CONF.import_opt('host', 'nova.netconf')
LOG = logging.getLogger(__name__)
-_FAKE_NODES = [CONF.host]
+_FAKE_NODES = None
def set_nodes(nodes):
@@ -107,6 +107,8 @@ class FakeDriver(driver.ComputeDriver):
}
self._mounts = {}
self._interfaces = {}
+ if not _FAKE_NODES:
+ set_nodes([CONF.host])
def init_host(self, host):
return