summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAbhijit Sinha <abhijit.sinha@intel.com>2018-11-05 14:24:48 +0000
committerGerrit Code Review <gerrit@opnfv.org>2018-11-05 14:24:48 +0000
commit0d06af45d73df649afdabcd9a0b710295b0ea051 (patch)
tree70a3f5a719ee7e3f6348111a1549bcbc1ed584ec
parente13f82dc70084480611bab5aa04ac126c0b1ff0e (diff)
parent376720a9ff56a9e71b6bc63b1d621f0c600088e1 (diff)
Merge "Fix python lib path for ixload control subprocess"
-rw-r--r--yardstick/network_services/traffic_profile/http_ixload.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/yardstick/network_services/traffic_profile/http_ixload.py b/yardstick/network_services/traffic_profile/http_ixload.py
index 3ccec637d..9210f3c6d 100644
--- a/yardstick/network_services/traffic_profile/http_ixload.py
+++ b/yardstick/network_services/traffic_profile/http_ixload.py
@@ -16,6 +16,14 @@ import sys
import os
import logging
import collections
+import subprocess
+try:
+ libs = subprocess.check_output(
+ 'python -c "import site; print(site.getsitepackages())"', shell=True)
+
+ sys.path.extend(libs[1:-1].replace("'", "").split(','))
+except subprocess.CalledProcessError:
+ pass
# ixload uses its own py2. So importing jsonutils fails. So adding below
# workaround to support call from yardstick
@@ -24,7 +32,7 @@ try:
except ImportError:
import json as jsonutils
-from yardstick.common import exceptions
+from yardstick.common import exceptions #pylint: disable=wrong-import-position
try:
from IxLoad import IxLoad, StatCollectorUtils