diff options
author | 2016-04-18 15:12:05 +0300 | |
---|---|---|
committer | 2016-04-18 15:12:05 +0300 | |
commit | 7e5993941829e5fd1bb9ab3c6ac624d9aa800c37 (patch) | |
tree | 5e41c7f91ff77427be2731ff55f6cadfc6fb05e8 /scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_port.py | |
parent | 1fa7b64c13e6c485926eba5c40bd198af738e365 (diff) |
support for reacquire command
also better sync with the server about ownership of ports
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 | 12 |
1 files changed, 9 insertions, 3 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 6f6f50b1..16e55d73 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 @@ -96,9 +96,12 @@ class Port(object): "handler": self.handler} rc = self.transmit("release", params) - self.handler = None - + if rc.good(): + + self.handler = None + self.owner = '' + return self.ok() else: return self.err(rc.err()) @@ -679,7 +682,10 @@ class Port(object): if not self.is_acquired(): self.state = self.STATE_TX - def async_event_forced_acquired (self, who): + def async_event_acquired (self, who): self.handler = None self.owner = who + def async_event_released (self): + self.owner = '' + |