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
This commit is contained in:
Hans Lindgren 2013-05-08 15:43:32 +02:00
parent 4ce8f2a6a9
commit 8b79ac24a8
1 changed files with 3 additions and 1 deletions

View File

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