diff options
author | imarom <imarom@cisco.com> | 2016-12-11 10:22:06 +0200 |
---|---|---|
committer | imarom <imarom@cisco.com> | 2016-12-11 10:22:06 +0200 |
commit | 20bb36572e006147d1ee6767b46d803bdb0926df (patch) | |
tree | 8296bc2ffbeb147fd56e4d252d892ab591926832 /scripts/automation/trex_control_plane/stl | |
parent | 0074ceeed2aa9ecafbbd8a71dc42d4bee1b34ffb (diff) |
few tweaks
Signed-off-by: imarom <imarom@cisco.com>
Diffstat (limited to 'scripts/automation/trex_control_plane/stl')
3 files changed, 11 insertions, 7 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 5ea959ac..eb8a0443 100755 --- a/scripts/automation/trex_control_plane/stl/console/trex_console.py +++ b/scripts/automation/trex_control_plane/stl/console/trex_console.py @@ -342,9 +342,12 @@ class TRexConsole(TRexGeneralCmd): '''Resolve ARP for ports''' self.stateless_client.resolve_line(line) - def help_sniffer (self): + def help_resolve (self): self.do_resolve("-h") + do_arp = do_resolve + help_arp = help_resolve + @verify_connected def do_map (self, line): '''Maps ports topology\n''' 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 fd41491e..fe691fb0 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 @@ -3878,18 +3878,19 @@ class STLClient(object): return "{0}(read-only)>".format(prefix) elif self.is_all_ports_acquired(): + p = prefix if self.get_service_enabled_ports(): if self.get_service_enabled_ports() == self.get_acquired_ports(): p += '(service)' else: - p += '(service: {0})'.format(self.get_service_enabled_ports()) + p += '(service: {0})'.format(', '.join(map(str, self.get_service_enabled_ports()))) return "{0}>".format(p) else: - return "{0} {1}>".format(prefix, self.get_acquired_ports()) + return "{0} (ports: {1})>".format(prefix, ', '.join(map(str, self.get_acquired_ports()))) 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 4ac31fba..ebb716d1 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 @@ -490,7 +490,7 @@ class Port(object): def set_rx_sniffer (self, pcap_filename, limit): if not self.is_service_mode_on(): - return self.err('port service mode must be enabled for performing RX capturing') + return self.err('port service mode must be enabled for performing RX capturing. Please enable service mode') params = {"handler": self.handler, "port_id": self.port_id, @@ -934,14 +934,14 @@ class Port(object): @writeable def arp_resolve (self, retries): if not self.is_service_mode_on(): - return self.err('port service mode must be enabled for performing ARP resolution') + return self.err('port service mode must be enabled for performing ARP resolution. Please enable service mode') return ARPResolver(self).resolve(retries) @writeable def ping (self, ping_ipv4, pkt_size): if not self.is_service_mode_on(): - return self.err('port service mode must be enabled for performing ping') + return self.err('port service mode must be enabled for performing ping. Please enable service mode') return PingResolver(self, ping_ipv4, pkt_size).resolve() @@ -966,7 +966,7 @@ class Port(object): "---": "", "----": "", "-----": "", - "link speed": info['speed'], + "link speed": "%g Gb/s" % info['speed'], "port status": info['status'], "link status": info['link'], "promiscuous" : info['prom'], |