if self.vpp_instance:
return
cls = self.__class__ # Shorthand for setting class fields.
- tmp_dir = tempfile.mkdtemp(dir="/tmp")
package_path = None
+ tmp_dir = tempfile.mkdtemp(dir="/tmp")
try:
# Pack, copy and unpack Python part of VPP installation from _node.
# TODO: Use rsync or recursive version of ssh.scp_node instead?
# Package path has to be one level above the vpp_papi directory.
package_path = package_path.rsplit('/', 1)[0]
sys.path.append(package_path)
+ # pylint: disable=import-error
from vpp_papi.vpp_papi import VPPApiClient as vpp_class
vpp_class.apidir = api_json_directory
# We need to create instance before removing from sys.path.