diff options
author | 2016-04-18 15:18:59 +0300 | |
---|---|---|
committer | 2016-04-18 15:19:46 +0300 | |
commit | b12cc7fda4f8c488800696abdb2fba7c3cfc82a4 (patch) | |
tree | cad3edb1805210cb9cbb598d100332ad30a7cdbc /scripts/automation/trex_control_plane/stl/trex_stl_lib | |
parent | 7e5993941829e5fd1bb9ab3c6ac624d9aa800c37 (diff) |
minor fix
Diffstat (limited to 'scripts/automation/trex_control_plane/stl/trex_stl_lib')
-rwxr-xr-x | scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_client.py | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_client.py b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_client.py index 76fbf3b8..63d77637 100755 --- a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_client.py +++ b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_client.py @@ -2158,7 +2158,17 @@ class STLClient(object): @__console def reacquire_line (self, line): - '''reacquire all the ports under your username''' + '''reacquire all the ports under your username which are not acquired by your session''' + + parser = parsing_opts.gen_parser(self, + "reacquire", + self.reacquire_line.__doc__) + + opts = parser.parse_args(line.split()) + if opts is None: + return + + # find all the on-owned ports under your name my_unowned_ports = list_difference([k for k, v in self.ports.items() if v.get_owner() == self.username], self.get_acquired_ports()) if not my_unowned_ports: self.logger.log("reacquire - no unowned ports under '{0}'".format(self.username)) @@ -2167,6 +2177,7 @@ class STLClient(object): self.acquire(ports = my_unowned_ports, force = True) return True + @__console def disconnect_line (self, line): self.disconnect() |