From 7f501121e7d199101a7abedc7ecf6333d2c33cf6 Mon Sep 17 00:00:00 2001 From: Ross Brattain Date: Wed, 28 Feb 2018 18:17:04 -0800 Subject: heat: replace neutronclient with shade neutronclient is deprecated and also has bunches of issues with SSL and such. JIRA: YARDSTICK-890 JIRA: YARDSTICK-1032 Change-Id: I41c9aac0ea69e1307560a001f7dc34178fcd7e71 Signed-off-by: Ross Brattain --- yardstick/benchmark/contexts/heat.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/yardstick/benchmark/contexts/heat.py b/yardstick/benchmark/contexts/heat.py index 77ac24899..44078892b 100644 --- a/yardstick/benchmark/contexts/heat.py +++ b/yardstick/benchmark/contexts/heat.py @@ -25,7 +25,7 @@ from yardstick.benchmark.contexts.model import PlacementGroup, ServerGroup from yardstick.benchmark.contexts.model import Server from yardstick.benchmark.contexts.model import update_scheduler_hints from yardstick.common import exceptions as y_exc -from yardstick.common.openstack_utils import get_neutron_client +from yardstick.common.openstack_utils import get_shade_client from yardstick.orchestrator.heat import HeatStack from yardstick.orchestrator.heat import HeatTemplate from yardstick.common import constants as consts @@ -68,7 +68,7 @@ class HeatContext(Context): self._user = None self.template_file = None self.heat_parameters = None - self.neutron_client = None + self.shade_client = None self.heat_timeout = None self.key_filename = None super(HeatContext, self).__init__() @@ -290,13 +290,12 @@ class HeatContext(Context): scheduler_hints) def get_neutron_info(self): - if not self.neutron_client: - self.neutron_client = get_neutron_client() + if not self.shade_client: + self.shade_client = get_shade_client() - networks = self.neutron_client.list_networks() + networks = self.shade_client.list_networks() for network in self.networks.values(): - for neutron_net in networks['networks']: - if neutron_net['name'] == network.stack_name: + for neutron_net in (net for net in networks if net.name == network.stack_name): network.segmentation_id = neutron_net.get('provider:segmentation_id') # we already have physical_network # network.physical_network = neutron_net.get('provider:physical_network') -- cgit 1.2.3-korg