summaryrefslogtreecommitdiffstats
path: root/scripts/automation/trex_control_plane/server/outer_packages.py
diff options
context:
space:
mode:
authorYaroslav Brustinov <ybrustin@cisco.com>2017-02-05 10:03:25 +0200
committerYaroslav Brustinov <ybrustin@cisco.com>2017-02-05 10:03:25 +0200
commit78c0502f5935ae575d0d89d201c1de83afd05fae (patch)
tree9dc22c0e0800ea8401389b20805eff11db8f81cf /scripts/automation/trex_control_plane/server/outer_packages.py
parent9808fce2b0b3b5b7c9b28303e99486501a1cc10d (diff)
trex_daemon_server: check ZMQ port matches between the server and TRex platform config file.
Change-Id: I1a6d6dc45513e4ba5f7c50f11f4730c8996c7731 Signed-off-by: Yaroslav Brustinov <ybrustin@cisco.com>
Diffstat (limited to 'scripts/automation/trex_control_plane/server/outer_packages.py')
-rwxr-xr-xscripts/automation/trex_control_plane/server/outer_packages.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/scripts/automation/trex_control_plane/server/outer_packages.py b/scripts/automation/trex_control_plane/server/outer_packages.py
index c21c8cbd..004c2f7d 100755
--- a/scripts/automation/trex_control_plane/server/outer_packages.py
+++ b/scripts/automation/trex_control_plane/server/outer_packages.py
@@ -8,7 +8,8 @@ ucs_ver = 'ucs2' if sys.maxunicode == 65535 else 'ucs4'
CURRENT_PATH = os.path.dirname(os.path.realpath(__file__))
ROOT_PATH = os.path.abspath(os.path.join(CURRENT_PATH, os.pardir)) # path to trex_control_plane directory
PATH_TO_PYTHON_LIB = os.path.abspath(os.path.join(ROOT_PATH, os.pardir, os.pardir, 'external_libs'))
-ZMQ_PATH = os.path.abspath(os.path.join(PATH_TO_PYTHON_LIB, 'pyzmq-14.5.0', python_ver, ucs_ver, '64bit'))
+ZMQ_PATH = os.path.abspath(os.path.join(PATH_TO_PYTHON_LIB, 'pyzmq-14.5.0', python_ver, ucs_ver, '64bit'))
+YAML_PATH = os.path.abspath(os.path.join(PATH_TO_PYTHON_LIB, 'pyyaml-3.11', python_ver))
SERVER_MODULES = ['enum34-1.0.4',
'zmq',
@@ -23,10 +24,9 @@ def import_server_modules():
# must be in a higher priority
if PATH_TO_PYTHON_LIB not in sys.path:
sys.path.insert(0, PATH_TO_PYTHON_LIB)
- if ZMQ_PATH not in sys.path:
- sys.path.insert(0, ZMQ_PATH)
- if ROOT_PATH not in sys.path:
- sys.path.append(ROOT_PATH)
+ for path in (ROOT_PATH, ZMQ_PATH, YAML_PATH):
+ if path not in sys.path:
+ sys.path.insert(0, path)
import_module_list(SERVER_MODULES)