diff options
author | Ido Barnea <ibarnea@cisco.com> | 2016-02-08 11:25:07 +0200 |
---|---|---|
committer | Ido Barnea <ibarnea@cisco.com> | 2016-02-24 14:21:29 +0200 |
commit | f0ab9eba97221e491cf7b3dd846eb8c23d920ec2 (patch) | |
tree | caf0b2f4f9cc0874a53bb3af813d5bae8d644914 /scripts/automation/trex_control_plane/stl | |
parent | 252b8ab3f41a18af8561cece71cf07bc9872f39f (diff) |
Rx stat per flow. Low level working for xl710, and partly for i350.
added full clone (with CP VM) to stream
Diffstat (limited to 'scripts/automation/trex_control_plane/stl')
-rw-r--r-- | scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_streams.py | 19 |
1 files changed, 16 insertions, 3 deletions
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 90dd9657..adbb88a6 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 @@ -121,7 +121,21 @@ STLStreamDstMAC_CFG_FILE=0 STLStreamDstMAC_PKT =1 STLStreamDstMAC_ARP =2 +# RX stats class +class STLRxStats(object): + def __init__ (self, user_id): + self.fields = {} + self.fields['stream_id'] = user_id + self.fields['enabled'] = True + self.fields['seq_enabled'] = False + self.fields['latency_enabled'] = False + def to_json (self): + return dict(self.fields) + + @staticmethod + def defaults (): + return {'enabled' : False} class STLStream(object): @@ -216,10 +230,9 @@ class STLStream(object): self.packet_desc = None if not rx_stats: - self.fields['rx_stats'] = {} - self.fields['rx_stats']['enabled'] = False + self.fields['rx_stats'] = STLRxStats.defaults() else: - self.fields['rx_stats'] = rx_stats + self.fields['rx_stats'] = rx_stats.to_json() def __str__ (self): |