Merge "Implement get_hypervisor_hostname for libvirt."

This commit is contained in:
Jenkins
2012-05-18 18:12:24 +00:00
committed by Gerrit Code Review
2 changed files with 7 additions and 0 deletions

View File

@@ -507,6 +507,9 @@ class Connection(object):
def getVersion(self):
return 14000
def getHostname(self):
return 'compute1'
def getCapabilities(self):
return '''<capabilities>
<host>

View File

@@ -1696,6 +1696,9 @@ class HostStateTestCase(test.TestCase):
def get_hypervisor_version(self):
return 13091
def get_hypervisor_hostname(self):
return 'compute1'
def get_disk_available_least(self):
return 13091
@@ -1722,6 +1725,7 @@ class HostStateTestCase(test.TestCase):
self.assertEquals(stats["host_memory_free"], 409)
self.assertEquals(stats["hypervisor_type"], 'QEMU')
self.assertEquals(stats["hypervisor_version"], 13091)
self.assertEquals(stats["hypervisor_hostname"], 'compute1')
class NWFilterFakes: