summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2017-03-23 12:15:36 +0000
committerGerrit Code Review <review@openstack.org>2017-03-23 12:15:36 +0000
commit0bcbdc402c64b33c81f45fb8fb7c13b943250ff2 (patch)
tree1f69fdf2fdffdd93b8629ca99daffdbdf84d569f
parentde4f27cf532d6af48efacb34bfb25fc27dc0ddf7 (diff)
parent162e992c8b866acfb97863cc7fb2bbfcabee284b (diff)
Merge "Use SSH manager instead a direct call of devops ssh client"
-rw-r--r--fuelweb_test/helpers/utils.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/fuelweb_test/helpers/utils.py b/fuelweb_test/helpers/utils.py
index 75f5473..c9a5856 100644
--- a/fuelweb_test/helpers/utils.py
+++ b/fuelweb_test/helpers/utils.py
@@ -241,14 +241,15 @@ def get_node_packages(remote, func_name, node_role,
241 241
242@logwrap 242@logwrap
243def store_packages_json(env): 243def store_packages_json(env):
244 ssh_manager = SSHManager()
244 func_name = "".join(get_test_method_name()) 245 func_name = "".join(get_test_method_name())
245 packages = {func_name: {}} 246 packages = {func_name: {}}
246 cluster_id = env.fuel_web.get_last_created_cluster() 247 cluster_id = env.fuel_web.get_last_created_cluster()
247 for nailgun_node in env.fuel_web.client.list_cluster_nodes(cluster_id): 248 for nailgun_node in env.fuel_web.client.list_cluster_nodes(cluster_id):
248 role = '_'.join(nailgun_node['roles']) 249 role = '_'.join(nailgun_node['roles'])
249 logger.debug('role is {0}'.format(role)) 250 logger.debug('role is {0}'.format(role))
250 with env.d_env.get_ssh_to_remote(nailgun_node['ip']) as remote: 251 remote = ssh_manager.get_remote(nailgun_node['ip'])
251 packages = get_node_packages(remote, func_name, role, packages) 252 packages = get_node_packages(remote, func_name, role, packages)
252 packages_file = '{0}/packages.json'.format(settings.LOGS_DIR) 253 packages_file = '{0}/packages.json'.format(settings.LOGS_DIR)
253 if os.path.isfile(packages_file): 254 if os.path.isfile(packages_file):
254 with open(packages_file, 'r') as outfile: 255 with open(packages_file, 'r') as outfile: