diff options
author | imarom <imarom@cisco.com> | 2016-08-10 17:45:36 +0300 |
---|---|---|
committer | imarom <imarom@cisco.com> | 2016-08-15 16:03:59 +0300 |
commit | ba7b5dff853a3b11b0cc2e7b29cfc1cd99e606f7 (patch) | |
tree | 25a2d72756217ef5d364a4c9b5a6e5e9a9d165a7 /scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_port.py | |
parent | ce1de344579505665b88c2d548ca8d2acc135988 (diff) |
core mask - first phase
Diffstat (limited to 'scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_port.py')
-rw-r--r-- | scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_port.py | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_port.py b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_port.py index d239fc57..556a14d8 100644 --- a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_port.py +++ b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_port.py @@ -100,7 +100,7 @@ class Port(object): # decorator to check server is readable (port not down and etc.) def writeable(func): - def func_wrapper(*args): + def func_wrapper(*args, **kwargs): port = args[0] if not port.is_up(): @@ -112,7 +112,7 @@ class Port(object): if not port.is_writeable(): return port.err("{0} - port is not in a writeable state".format(func.__name__)) - return func(*args) + return func(*args, **kwargs) return func_wrapper @@ -396,16 +396,17 @@ class Port(object): @writeable - def start (self, mul, duration, force): + def start (self, mul, duration, force, mask): if self.state == self.STATE_IDLE: return self.err("unable to start traffic - no streams attached to port") - params = {"handler": self.handler, - "port_id": self.port_id, - "mul": mul, - "duration": duration, - "force": force} + params = {"handler": self.handler, + "port_id": self.port_id, + "mul": mul, + "duration": duration, + "force": force, + "core_mask": mask if mask is not None else ((1 << 64) - 1)} # must set this before to avoid race with the async response last_state = self.state |