From 8fdfd0f7ae809966e946b9425838e5c2c2fad215 Mon Sep 17 00:00:00 2001 From: chenjiankun Date: Mon, 20 Feb 2017 16:05:29 +0000 Subject: Add common method of openstack in openstack_utils JIRA: YARDSTICK-569 We have much redundancy code when using nova/neutron/glance... python client. So I write this code in openstack_utils for calling. Change-Id: I322b7577de4933246a15e6742ae5a28bea16eb02 Signed-off-by: chenjiankun --- api/resources/env_action.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'api') diff --git a/api/resources/env_action.py b/api/resources/env_action.py index 2d3496cbc..ea94bc123 100644 --- a/api/resources/env_action.py +++ b/api/resources/env_action.py @@ -27,6 +27,7 @@ from api.utils.common import result_handler from docker import Client from yardstick.common import constants as config from yardstick.common import utils as yardstick_utils +from yardstick.common import openstack_utils from yardstick.common.httpClient import HttpClient logger = logging.getLogger(__name__) @@ -263,7 +264,7 @@ def _get_remote_rc_file(rc_file, installer_ip, installer_type): def _append_external_network(rc_file): - neutron_client = yardstick_utils.get_neutron_client() + neutron_client = openstack_utils.get_neutron_client() networks = neutron_client.list_networks()['networks'] try: ext_network = next(n['name'] for n in networks if n['router:external']) -- cgit 1.2.3-korg