From 4eacb570cf24927de536d23671f50609f1a9ffa5 Mon Sep 17 00:00:00 2001 From: imarom Date: Sun, 3 Apr 2016 18:19:20 +0300 Subject: API classes (versions) --- .../automation/trex_control_plane/stl/trex_stl_lib/trex_stl_sim.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_sim.py') 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} -- cgit 1.2.3-korg