From 88d3665465bc279ebfc4ec66aa0d0b2e9b2dab54 Mon Sep 17 00:00:00 2001 From: Ilya Popov Date: Mon, 9 Oct 2023 13:25:08 +0300 Subject: [PATCH] Fix test_show_host_detail to support installation with ironic MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- tempest/api/compute/admin/test_hosts.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tempest/api/compute/admin/test_hosts.py b/tempest/api/compute/admin/test_hosts.py index 30f3388635..0d79570e9c 100644 --- a/tempest/api/compute/admin/test_hosts.py +++ b/tempest/api/compute/admin/test_hosts.py @@ -68,7 +68,9 @@ class HostsAdminTestJSON(base.BaseV2ComputeAdminTest): """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: