Fix test_show_host_detail to support installation with ironic
When OpenStack cloud is installed with Ironic using Kolla-Ansible
there will be additional "сompute" hosts named '*-ironic'.
Proposed fix removes such hosts from hosts list used to create VM
Closes-Bug: 2038802
Change-Id: Ib5c6b816ee8f0d3bafcbfe4b72596da60849e1a3
diff --git a/tempest/api/compute/admin/test_hosts.py b/tempest/api/compute/admin/test_hosts.py
index 30f3388..0d79570 100644
--- a/tempest/api/compute/admin/test_hosts.py
+++ b/tempest/api/compute/admin/test_hosts.py
@@ -68,7 +68,9 @@
"""Showing nova host details"""
hosts = self.client.list_hosts()['hosts']
- hosts = [host for host in hosts if host['service'] == 'compute']
+ hosts = [host for host in hosts if (
+ host['service'] == 'compute' and
+ not host['host_name'].endswith('-ironic'))]
self.assertNotEmpty(hosts)
for host in hosts: