summaryrefslogtreecommitdiffstats
path: root/scripts/automation/trex_control_plane/client/trex_stateless_client.py
diff options
context:
space:
mode:
authorimarom <imarom@cisco.com>2016-01-24 04:01:30 -0500
committerimarom <imarom@cisco.com>2016-01-24 06:02:46 -0500
commit6f4a51c126b7a78ee8e37d396ed2b61b05fa506c (patch)
treee8b1c20e0d02cb40fa1539f2896f07345625b6f3 /scripts/automation/trex_control_plane/client/trex_stateless_client.py
parentdb5b9d6085b3e5cf71e1abf42c7a745cb723e00e (diff)
added example
Diffstat (limited to 'scripts/automation/trex_control_plane/client/trex_stateless_client.py')
-rwxr-xr-xscripts/automation/trex_control_plane/client/trex_stateless_client.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/scripts/automation/trex_control_plane/client/trex_stateless_client.py b/scripts/automation/trex_control_plane/client/trex_stateless_client.py
index c5d7e053..c1a4d1d1 100755
--- a/scripts/automation/trex_control_plane/client/trex_stateless_client.py
+++ b/scripts/automation/trex_control_plane/client/trex_stateless_client.py
@@ -419,8 +419,8 @@ class CCommLink(object):
############################ #############################
############################ #############################
-class CTRexStatelessClient(object):
- """docstring for CTRexStatelessClient"""
+class STLClient(object):
+ """docstring for STLClient"""
def __init__(self,
username = general_utils.get_current_user(),
@@ -968,6 +968,7 @@ class CTRexStatelessClient(object):
stats_obj = {}
for stats_type in stats_opts:
stats_obj.update(self.stats_generator.generate_single_statistic(port_id_list, stats_type))
+
return stats_obj
def _get_streams(self, port_id_list, streams_mask=set()):
@@ -1244,9 +1245,11 @@ class CTRexStatelessClient(object):
# pings the server on the RPC channel
@__api_check(True)
def ping(self):
- rc = self.__ping()
self.logger.pre_cmd( "Pinging the server on '{0}' port '{1}': ".format(self.connection_info['server'],
- self.connection_info['sync_port']))
+ self.connection_info['sync_port']))
+ rc = self.__ping()
+
+ self.logger.post_cmd(rc)
if not rc:
raise STLError(rc)