Hoststack perf infrastructure refactoring
[csit.git] / resources / libraries / python / VatExecutor.py
index 2d6a033..1de32a2 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (c) 2019 Cisco and/or its affiliates.
+# Copyright (c) 2020 Cisco and/or its affiliates.
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
 # You may obtain a copy of the License at:
@@ -20,6 +20,8 @@ from os import remove
 from paramiko.ssh_exception import SSHException
 from robot.api import logger
 
+import resources.libraries.python.DUTSetup as PidLib
+
 from resources.libraries.python.Constants import Constants
 from resources.libraries.python.PapiHistory import PapiHistory
 from resources.libraries.python.ssh import SSH, SSHTimeout
@@ -60,9 +62,7 @@ def get_vpp_pid(node):
         running on the DUT node.
     :rtype: int or list
     """
-    # pylint: disable=import-outside-toplevel
-    import resources.libraries.python.DUTSetup as PidLib
-    pid = PidLib.DUTSetup.get_vpp_pid(node)
+    pid = PidLib.DUTSetup.get_pid(node, u"vpp")
     return pid
 
 
@@ -251,7 +251,8 @@ class VatTerminal:
             self._tty = self._ssh.interactive_terminal_open()
         except Exception:
             raise RuntimeError(
-                f"Cannot open interactive terminal on node {self._node}"
+                f"Cannot open interactive terminal on node "
+                f"{self._node[u'host']}"
             )
 
         for _ in range(3):