Merge "Don't use hypervisor_hostname as compute hostname" into mcp/queens
diff --git a/tempest/api/compute/base.py b/tempest/api/compute/base.py
index 9759be7..760e356 100644
--- a/tempest/api/compute/base.py
+++ b/tempest/api/compute/base.py
@@ -532,10 +532,10 @@
def get_host_other_than(self, server_id):
source_host = self.get_host_for_server(server_id)
- hypers = self.os_admin.hypervisor_client.list_hypervisors(
- )['hypervisors']
- hosts = [hyper['hypervisor_hostname'] for hyper in hypers
- if hyper['state'] == 'up' and hyper['status'] == 'enabled']
+ svcs = self.os_admin.services_client.list_services(
+ binary='nova-compute')['services']
+ hosts = [svc['host'] for svc in svcs
+ if svc['state'] == 'up' and svc['status'] == 'enabled']
for target_host in hosts:
if source_host != target_host: