From ce653c7fc777a77eaf1ec244409cea894777a9e7 Mon Sep 17 00:00:00 2001 From: chenke Date: Thu, 11 Apr 2019 15:54:59 +0800 Subject: [PATCH] Remove the use of os-hosts API that will be deprecated The os-hosts API is deprecated as of the 2.43 microversion. Requests made with microversion >= 2.43 will result in a 404 error. To list and show host details, use the Hypervisors (os-hypervisors) API. Reference docs: https://developer.openstack.org/api-ref/compute/?expanded= list-hypervisors-details-detail,list-hosts-detail,list-compute-services-detail Change-Id: I325731e930e314f8c9204d8ef954702338589e93 --- watcher_tempest_plugin/tests/scenario/base.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/watcher_tempest_plugin/tests/scenario/base.py b/watcher_tempest_plugin/tests/scenario/base.py index af7822c..c3d5f5d 100644 --- a/watcher_tempest_plugin/tests/scenario/base.py +++ b/watcher_tempest_plugin/tests/scenario/base.py @@ -173,9 +173,7 @@ class BaseInfraOptimScenarioTest(manager.ScenarioTest): :param metrics: The metrics add to resource when using Gnocchi """ - host_client = self.mgr.hosts_client - all_hosts = host_client.list_hosts()['hosts'] - compute_nodes = [x for x in all_hosts if x['service'] == 'compute'] + compute_nodes = self.get_compute_nodes_setup() created_instances = [] for _ in compute_nodes[:CONF.compute.min_compute_nodes]: