summaryrefslogtreecommitdiffstats
path: root/scripts/automation/trex_control_plane
diff options
context:
space:
mode:
authorYaroslav Brustinov <ybrustin@cisco.com>2016-10-30 16:10:59 +0200
committerYaroslav Brustinov <ybrustin@cisco.com>2016-10-30 21:00:40 +0200
commitf5817145486df18f92072212117a713cec1e4219 (patch)
treee15cc4f8cf54eaaa9d166b6d750c002dffda7a1f /scripts/automation/trex_control_plane
parent599f4ecd1a2e9fdbe53a848b1dad71a08a67e048 (diff)
add ifdef guard to .h file
remove UUID from TUI STF Python API: show newlines instead of "\n\n\n" in Exception message STF Python API: remove "During handling of the above exception, another exception occurred:" in Python3.3+ dpdk_nic_bind.py: ensure needed PATH exists for lspci etc. t-rex-64: remove "stty: standard input: Inappropriate ioctl for device" t-rex-64: remove "cat: write error: Broken pipe" Signed-off-by: Yaroslav Brustinov <ybrustin@cisco.com>
Diffstat (limited to 'scripts/automation/trex_control_plane')
-rwxr-xr-xscripts/automation/trex_control_plane/stf/trex_stf_lib/trex_client.py4
-rwxr-xr-xscripts/automation/trex_control_plane/stf/trex_stf_lib/trex_exceptions.py5
-rw-r--r--scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_stats.py3
3 files changed, 7 insertions, 5 deletions
diff --git a/scripts/automation/trex_control_plane/stf/trex_stf_lib/trex_client.py b/scripts/automation/trex_control_plane/stf/trex_stf_lib/trex_client.py
index ecf6083b..e9d2b8a0 100755
--- a/scripts/automation/trex_control_plane/stf/trex_stf_lib/trex_client.py
+++ b/scripts/automation/trex_control_plane/stf/trex_stf_lib/trex_client.py
@@ -1087,7 +1087,9 @@ class CTRexClient(object):
"""
# handle known exceptions based on known error codes.
# if error code is not known, raise ProtocolError
- raise exception_handler.gen_exception(err)
+ exc = exception_handler.gen_exception(err)
+ exc.__cause__ = None # remove "During handling of the above exception, another exception occurred:" in Python3.3+
+ raise exc
class CTRexResult(object):
diff --git a/scripts/automation/trex_control_plane/stf/trex_stf_lib/trex_exceptions.py b/scripts/automation/trex_control_plane/stf/trex_stf_lib/trex_exceptions.py
index 0de38411..89134e7f 100755
--- a/scripts/automation/trex_control_plane/stf/trex_stf_lib/trex_exceptions.py
+++ b/scripts/automation/trex_control_plane/stf/trex_stf_lib/trex_exceptions.py
@@ -19,11 +19,12 @@ class RPCError(Exception):
def __str__(self):
return self.__repr__()
+
def __repr__(self):
if self.args[2] is not None:
- return u"[errcode:%r] %r. Extended data: %r" % (self.args[0], self.args[1], self.args[2])
+ return u"[errcode:%s] %s. Extended data: %s" % self.args
else:
- return u"[errcode:%r] %r" % (self.args[0], self.args[1])
+ return u"[errcode:%s] %s" % self.args[:2]
class TRexException(RPCError):
"""
diff --git a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_stats.py b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_stats.py
index 875ad24e..9f601484 100644
--- a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_stats.py
+++ b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_stats.py
@@ -217,8 +217,7 @@ class CTRexInfoGenerator(object):
stats_data_left = OrderedDict([("connection", "{host}, Port {port}".format(host=global_stats.connection_info.get("server"),
port=global_stats.connection_info.get("sync_port"))),
- ("version", "{ver}, UUID: {uuid}".format(ver=global_stats.server_version.get("version", "N/A"),
- uuid="N/A")),
+ ("version", "{ver}".format(ver=global_stats.server_version.get("version", "N/A"))),
("cpu_util.", "{0}% @ {2} cores ({3} per port) {1}".format( format_threshold(round_float(global_stats.get("m_cpu_util")), [85, 100], [0, 85]),
global_stats.get_trend_gui("m_cpu_util", use_raw = True),