diff options
author | 2016-02-09 11:11:08 -0500 | |
---|---|---|
committer | 2016-02-09 11:11:08 -0500 | |
commit | c07bd86f8c0a150f743c985dbef5e2bce857e0d9 (patch) | |
tree | 038d10e67fc24d61217522dd914bfc2ee531f5e1 /scripts/automation/trex_control_plane | |
parent | 0aa48dc740012b94cdd0cea3e49c1cb0258d9ce9 (diff) |
minor fixes
Diffstat (limited to 'scripts/automation/trex_control_plane')
6 files changed, 21 insertions, 12 deletions
diff --git a/scripts/automation/trex_control_plane/client/trex_hltapi.py b/scripts/automation/trex_control_plane/client/trex_hltapi.py index 5d3f506c..c2a08306 100755 --- a/scripts/automation/trex_control_plane/client/trex_hltapi.py +++ b/scripts/automation/trex_control_plane/client/trex_hltapi.py @@ -108,11 +108,22 @@ traffic_stats_kwargs = { } -#import trex_root_path -import client_utils.scapy_packet_builder as pkt_bld -from client_utils.scapy_packet_builder import CTRexVmDescFlowVar, CTRexVmDescWrFlowVar -from trex_stateless_client import STLClient -from common.trex_streams import * +#HACK FIX ME START +import sys +import os + +CURRENT_PATH = os.path.dirname(os.path.realpath(__file__)) +sys.path.append(os.path.join(CURRENT_PATH, '../stl/')) +#HACK FIX ME END + +from trex_stl_lib.api import * +import trex_stl_lib.api as pkt_bld +#import trex_stl_lib.trex_stl_packet_builder_scapy as pkt_bld +#from trex_stl_lib.trex_stl_packet_builder_scapy import import CTRexVmDescFlowVar, CTRexVmDescWrFlowVar +#from trex_stl_lib.trex_stl_client import STLClient +#from common.trex_streams import * + +import trex_root_path from client_utils.general_utils import get_integer import socket import copy @@ -523,7 +534,7 @@ class CTRexHltApiPktBuilder: debug_filename = kwargs.get('save_to_yaml') if type(debug_filename) is str: - stream_obj.dump_to_yaml(debug_filename, stream_obj) + STLProfile(stream_obj).dump_to_yaml(debug_filename) return stream_obj @staticmethod 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 17a8bddf..8f400d23 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 +# FIXME to the write path for trex_stl_lib sys.path.insert(0, "../") diff --git a/scripts/automation/trex_control_plane/stl/trex_stl_lib/__init__.py b/scripts/automation/trex_control_plane/stl/trex_stl_lib/__init__.py index e69de29b..60bf7be8 100644 --- a/scripts/automation/trex_control_plane/stl/trex_stl_lib/__init__.py +++ b/scripts/automation/trex_control_plane/stl/trex_stl_lib/__init__.py @@ -0,0 +1 @@ +import trex_stl_ext diff --git a/scripts/automation/trex_control_plane/stl/trex_stl_lib/api.py b/scripts/automation/trex_control_plane/stl/trex_stl_lib/api.py index 4c0c10fa..a9e99178 100644 --- a/scripts/automation/trex_control_plane/stl/trex_stl_lib/api.py +++ b/scripts/automation/trex_control_plane/stl/trex_stl_lib/api.py @@ -1,7 +1,4 @@ -# get external libs -import trex_stl_ext - # client and exceptions from trex_stl_exceptions import * from trex_stl_client import STLClient, LoggerApi diff --git a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_port.py b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_port.py index b2cf1c90..732cfc1e 100644 --- a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_port.py +++ b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_port.py @@ -519,7 +519,7 @@ class Port(object): meta_dict['stream_sum'] = OrderedDict([("id", stream.get_id()), ("packet_type", "FIXME!!!"), - ("length", "FIXME!!!"), + ("L2 len", "FIXME!!! +++4"), ("mode", "FIXME!!!"), ("rate_pps", "FIXME!!!"), ("next_stream", "FIXME!!!") diff --git a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_streams.py b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_streams.py index 9c190dad..abfa32cd 100644 --- a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_streams.py +++ b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_streams.py @@ -372,7 +372,7 @@ class STLProfile(object): return profile - def to_yaml (self, yaml_file = None): + def dump_to_yaml (self, yaml_file = None): yaml_list = [stream.to_yaml() for stream in self.streams] yaml_str = yaml.dump(yaml_list, default_flow_style = False) |