aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoss Brattain <ross.b.brattain@intel.com>2018-02-28 18:17:04 -0800
committerRoss Brattain <ross.b.brattain@intel.com>2018-03-02 14:22:22 -0800
commit7f501121e7d199101a7abedc7ecf6333d2c33cf6 (patch)
tree55e7f36f0ae1977ecfd835bef83130af8348b4cb
parent5e327a9910231917580b073fd3bbf56697e2139d (diff)
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 <ross.b.brattain@intel.com>
-rw-r--r--yardstick/benchmark/contexts/heat.py13
1 files 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')