From 7e2be1dd25c03b76765cbaa0cfa615210a4efc73 Mon Sep 17 00:00:00 2001 From: imarom Date: Mon, 8 Feb 2016 11:11:52 -0500 Subject: fixed examples to new model --- .../automation/trex_control_plane/stl/examples/stl_bi_dir_flows.py | 2 +- scripts/automation/trex_control_plane/stl/examples/stl_imix.py | 5 +++-- scripts/automation/trex_control_plane/stl/examples/stl_path.py | 2 +- .../automation/trex_control_plane/stl/examples/stl_run_udp_simple.py | 2 +- .../automation/trex_control_plane/stl/examples/stl_simple_burst.py | 2 +- 5 files changed, 7 insertions(+), 6 deletions(-) (limited to 'scripts/automation/trex_control_plane') diff --git a/scripts/automation/trex_control_plane/stl/examples/stl_bi_dir_flows.py b/scripts/automation/trex_control_plane/stl/examples/stl_bi_dir_flows.py index 46b84c6e..2382f2f4 100644 --- a/scripts/automation/trex_control_plane/stl/examples/stl_bi_dir_flows.py +++ b/scripts/automation/trex_control_plane/stl/examples/stl_bi_dir_flows.py @@ -1,5 +1,5 @@ import stl_path -from trex_control_plane.stl.api import * +from trex_stl_lib.api import * import time import json diff --git a/scripts/automation/trex_control_plane/stl/examples/stl_imix.py b/scripts/automation/trex_control_plane/stl/examples/stl_imix.py index c083a207..ad329e16 100644 --- a/scripts/automation/trex_control_plane/stl/examples/stl_imix.py +++ b/scripts/automation/trex_control_plane/stl/examples/stl_imix.py @@ -1,5 +1,5 @@ import stl_path -from trex_control_plane.stl.api import * +from trex_stl_lib.api import * import time import json @@ -35,7 +35,7 @@ def imix_test (): dir_1 = table['dir'][1] # load IMIX profile - streams = c.load_profile('../../../stl/profiles/imix.py') + streams = c.load_profile('../../../../stl/profiles/imix.py') # add both streams to ports c.add_streams(streams, ports = dir_0) @@ -83,6 +83,7 @@ def imix_test (): else: passed = False + except STLError as e: passed = False print e diff --git a/scripts/automation/trex_control_plane/stl/examples/stl_path.py b/scripts/automation/trex_control_plane/stl/examples/stl_path.py index a5b8102b..17a8bddf 100644 --- a/scripts/automation/trex_control_plane/stl/examples/stl_path.py +++ b/scripts/automation/trex_control_plane/stl/examples/stl_path.py @@ -1,4 +1,4 @@ import sys # FIXME to the write path for trex_control_plane -sys.path.insert(0, "../../../automation") +sys.path.insert(0, "../") diff --git a/scripts/automation/trex_control_plane/stl/examples/stl_run_udp_simple.py b/scripts/automation/trex_control_plane/stl/examples/stl_run_udp_simple.py index 47db1b5a..388e42e7 100644 --- a/scripts/automation/trex_control_plane/stl/examples/stl_run_udp_simple.py +++ b/scripts/automation/trex_control_plane/stl/examples/stl_run_udp_simple.py @@ -11,7 +11,7 @@ Compare Rx-pkts to TX-pkts assuming ports are loopback """ import stl_path -from trex_control_plane.stl.api import * +from trex_stl_lib.api import * H_VER = "trex-x v0.1 " diff --git a/scripts/automation/trex_control_plane/stl/examples/stl_simple_burst.py b/scripts/automation/trex_control_plane/stl/examples/stl_simple_burst.py index 1e3e7695..5e17018c 100644 --- a/scripts/automation/trex_control_plane/stl/examples/stl_simple_burst.py +++ b/scripts/automation/trex_control_plane/stl/examples/stl_simple_burst.py @@ -1,5 +1,5 @@ import stl_path -from trex_control_plane.stl.api import * +from trex_stl_lib.api import * import time -- cgit 1.2.3-korg