Browse Source

Merge "Use SSH manager instead a direct call of devops ssh client"

Jenkins 2 years ago
parent
commit
0bcbdc402c
1 changed files with 3 additions and 2 deletions
  1. 3
    2
      fuelweb_test/helpers/utils.py

+ 3
- 2
fuelweb_test/helpers/utils.py View File

@@ -241,14 +241,15 @@ def get_node_packages(remote, func_name, node_role,
241 241
 
242 242
 @logwrap
243 243
 def store_packages_json(env):
244
+    ssh_manager = SSHManager()
244 245
     func_name = "".join(get_test_method_name())
245 246
     packages = {func_name: {}}
246 247
     cluster_id = env.fuel_web.get_last_created_cluster()
247 248
     for nailgun_node in env.fuel_web.client.list_cluster_nodes(cluster_id):
248 249
         role = '_'.join(nailgun_node['roles'])
249 250
         logger.debug('role is {0}'.format(role))
250
-        with env.d_env.get_ssh_to_remote(nailgun_node['ip']) as remote:
251
-            packages = get_node_packages(remote, func_name, role, packages)
251
+        remote = ssh_manager.get_remote(nailgun_node['ip'])
252
+        packages = get_node_packages(remote, func_name, role, packages)
252 253
     packages_file = '{0}/packages.json'.format(settings.LOGS_DIR)
253 254
     if os.path.isfile(packages_file):
254 255
         with open(packages_file, 'r') as outfile:

Loading…
Cancel
Save