Skip to content

Commit

Permalink
fix flow metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
ajbalogh committed Nov 19, 2020
1 parent 8982f90 commit a6f7930
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.0.59
0.0.60
15 changes: 8 additions & 7 deletions ixnetwork_open_traffic_generator/trafficitem.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,10 +162,7 @@ def config(self):
self._update(ixn_traffic_item, **args)
self._configure_endpoint(ixn_traffic_item.EndpointSet,
flow.tx_rx)
if flow.tx_rx.choice == 'device':
tx_dist = ixn_traffic_item.TransmissionDistribution.find()
tx_dist.Distributions = ['srcDestEndpointPair0']
self._configure_tracking(ixn_traffic_item.Tracking)
self._configure_tracking(flow, ixn_traffic_item.Tracking)
ixn_ce = ixn_traffic_item.ConfigElement.find()
hl_stream_count = len(ixn_traffic_item.HighLevelStream.find())
self._configure_stack(ixn_ce, flow.packet)
Expand All @@ -174,10 +171,14 @@ def config(self):
self._configure_tx_control(ixn_ce, hl_stream_count, flow.duration)
self._configure_options(flow)

def _configure_tracking(self, ixn_tracking):
def _configure_tracking(self, flow, ixn_tracking):
"""Set tracking options"""
ixn_tracking.find()
if 'trackingenabled0' not in ixn_tracking.TrackBy:
ixn_tracking.TrackBy = ['trackingenabled0']
tracking_options = ['trackingenabled0']
if flow.tx_rx.choice == 'device':
tracking_options.append('sourceDestPortPair0')
if set(tracking_options) != set(ixn_tracking.TrackBy):
ixn_tracking.update(TrackBy=tracking_options)

def _configure_options(self, flow):
enable_min_frame_size = False
Expand Down

0 comments on commit a6f7930

Please sign in to comment.