summaryrefslogtreecommitdiffstats
path: root/api/stl/trex_stl_api.py
diff options
context:
space:
mode:
Diffstat (limited to 'api/stl/trex_stl_api.py')
-rw-r--r--api/stl/trex_stl_api.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/api/stl/trex_stl_api.py b/api/stl/trex_stl_api.py
new file mode 100644
index 00000000..aad39916
--- /dev/null
+++ b/api/stl/trex_stl_api.py
@@ -0,0 +1,17 @@
+import os
+import sys
+import time
+
+
+# update the import path to include the stateless client
+root_path = os.path.dirname(os.path.abspath(__file__))
+
+sys.path.insert(0, os.path.join(root_path, '../../scripts/automation/trex_control_plane/client/'))
+sys.path.insert(0, os.path.join(root_path, '../../scripts/automation/trex_control_plane/client_utils/'))
+sys.path.insert(0, os.path.join(root_path, '../../scripts/automation/trex_control_plane/client_utils/'))
+
+# aliasing
+import trex_stateless_client
+STLClient = trex_stateless_client.STLClient
+STLError = trex_stateless_client.STLError
+