diff options
author | imarom <imarom@cisco.com> | 2016-04-18 15:18:59 +0300 |
---|---|---|
committer | imarom <imarom@cisco.com> | 2016-04-18 15:19:46 +0300 |
commit | b12cc7fda4f8c488800696abdb2fba7c3cfc82a4 (patch) | |
tree | cad3edb1805210cb9cbb598d100332ad30a7cdbc | |
parent | 7e5993941829e5fd1bb9ab3c6ac624d9aa800c37 (diff) |
minor fix
-rwxr-xr-x | scripts/automation/trex_control_plane/stl/console/trex_console.py | 3 | ||||
-rwxr-xr-x | scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_client.py | 13 |
2 files changed, 15 insertions, 1 deletions
diff --git a/scripts/automation/trex_control_plane/stl/console/trex_console.py b/scripts/automation/trex_control_plane/stl/console/trex_console.py index 589f1d35..a126bf35 100755 --- a/scripts/automation/trex_control_plane/stl/console/trex_console.py +++ b/scripts/automation/trex_control_plane/stl/console/trex_console.py @@ -431,6 +431,9 @@ class TRexConsole(TRexGeneralCmd): def help_release (self): self.do_release("-h") + def help_reacquire (self): + self.do_reacquire("-h") + ############### start def complete_start(self, text, line, begidx, endidx): 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() |