summaryrefslogtreecommitdiffstats
path: root/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_port.py
diff options
context:
space:
mode:
authorimarom <imarom@cisco.com>2016-12-19 08:52:08 +0200
committerimarom <imarom@cisco.com>2016-12-19 08:52:37 +0200
commitf51c210af7b067a36e6750d94b48ae366a48dd5c (patch)
tree4d72169f38e0dc4a91dda8a678aa67ca1cf112c9 /scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_port.py
parent3859a48b255bf4254f7897b5525a330a856bfad4 (diff)
verify L2/L3 configuration cannot be done under traffic
also ping and arp Signed-off-by: imarom <imarom@cisco.com>
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.py8
1 files changed, 4 insertions, 4 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 487f3055..66d8be2b 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
@@ -114,7 +114,7 @@ class Port(object):
return port.err("{0} - port is not owned".format(func.__name__))
if not port.is_writeable():
- return port.err("{0} - port is not in a writeable state".format(func.__name__))
+ return port.err("{0} - port is active, please stop the port before executing command".format(func.__name__))
return func(*args, **kwargs)
@@ -123,7 +123,7 @@ class Port(object):
def err(self, msg):
- return RC_ERR("port {0} : {1}\n".format(self.port_id, msg))
+ return RC_ERR("port {0} : *** {1}".format(self.port_id, msg))
def ok(self, data = ""):
return RC_OK(data)
@@ -519,7 +519,7 @@ class Port(object):
return self.ok()
- @owned
+ @writeable
def set_l2_mode (self, dst_mac):
if not self.is_service_mode_on():
return self.err('port service mode must be enabled for configuring L2 mode. Please enable service mode')
@@ -535,7 +535,7 @@ class Port(object):
return self.sync()
- @owned
+ @writeable
def set_l3_mode (self, src_addr, dest_addr, resolved_mac = None):
if not self.is_service_mode_on():
return self.err('port service mode must be enabled for configuring L3 mode. Please enable service mode')