From 1783336927c38d4fc87f510a1816ece2cc318321 Mon Sep 17 00:00:00 2001
From: imarom <imarom@cisco.com>
Date: Wed, 30 Nov 2016 17:54:54 +0200
Subject: minor bugs

Signed-off-by: imarom <imarom@cisco.com>
---
 scripts/automation/trex_control_plane/stl/console/trex_console.py       | 1 +
 .../automation/trex_control_plane/stl/trex_stl_lib/trex_stl_client.py   | 1 +
 .../trex_control_plane/stl/trex_stl_lib/trex_stl_rx_features.py         | 2 +-
 3 files changed, 3 insertions(+), 1 deletion(-)

(limited to 'scripts/automation')

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 f1635b97..e4321b87 100755
--- a/scripts/automation/trex_control_plane/stl/console/trex_console.py
+++ b/scripts/automation/trex_control_plane/stl/console/trex_console.py
@@ -320,6 +320,7 @@ class TRexConsole(TRexGeneralCmd):
     def help_push (self):
         self.do_push("-h")
 
+    @verify_connected
     def do_portattr (self, line):
         '''Change/show port(s) attributes\n'''
         self.stateless_client.set_port_attr_line(line)
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 0425c207..feb6ef45 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
@@ -1403,6 +1403,7 @@ class STLClient(object):
 
 
     # get stats
+    @__api_check(True)
     def get_stats (self, ports = None, sync_now = True):
         """
         Return dictionary containing statistics information gathered from the server.
diff --git a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_rx_features.py b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_rx_features.py
index 5c2fd9af..3754e608 100644
--- a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_rx_features.py
+++ b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_rx_features.py
@@ -139,7 +139,7 @@ class ARPResolver(Resolver):
         self.src = self.port.get_src_addr()
         
         if self.dst['ipv4'] is None:
-            return self.port.err("Port has a non-IPv4 destination: '{0}'".format(dst['mac']))
+            return self.port.err("Port has a non-IPv4 destination: '{0}'".format(self.dst['mac']))
             
         if self.src['ipv4'] is None:
             return self.port.err('Port must have an IPv4 source address configured')
-- 
cgit