summaryrefslogtreecommitdiffstats
path: root/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_sim.py
diff options
context:
space:
mode:
authorimarom <imarom@cisco.com>2016-04-03 18:19:20 +0300
committerimarom <imarom@cisco.com>2016-04-04 09:49:54 +0300
commit4eacb570cf24927de536d23671f50609f1a9ffa5 (patch)
tree83b8dcd86994c7668a054413d0ba0449a1cf2816 /scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_sim.py
parent0eb15b2e851b5f50669633678143c5a1d3a7d95b (diff)
API classes (versions)
Diffstat (limited to 'scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_sim.py')
-rw-r--r--scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_sim.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_sim.py b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_sim.py
index 18678e3e..1d89a599 100644
--- a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_sim.py
+++ b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_sim.py
@@ -39,7 +39,7 @@ class BpSimException(Exception):
# stateless simulation
class STLSim(object):
- def __init__ (self, bp_sim_path = None, handler = 0, port_id = 0):
+ def __init__ (self, bp_sim_path = None, handler = 0, port_id = 0, api_h = "dummy"):
if not bp_sim_path:
# auto find scripts
@@ -54,6 +54,7 @@ class STLSim(object):
# dummies
self.handler = handler
+ self.api_h = api_h
self.port_id = port_id
@@ -62,6 +63,7 @@ class STLSim(object):
"jsonrpc": "2.0",
"method": "start_traffic",
"params": {"handler": self.handler,
+ "api_h" : self.api_h,
"force": force,
"port_id": self.port_id,
"mul": parsing_opts.decode_multiplier(mult),
@@ -168,6 +170,7 @@ class STLSim(object):
"jsonrpc": "2.0",
"method": "add_stream",
"params": {"handler": self.handler,
+ "api_h": self.api_h,
"port_id": self.port_id,
"stream_id": stream_id,
"stream": stream_json}