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-12 19:26:24 +0200
committerimarom <imarom@cisco.com>2016-12-12 19:26:24 +0200
commit0c45815234abbb79b147b8093eb19e274ee65f52 (patch)
treea604b3865f201e1fe841bca3a10e8f86e3248186 /scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_port.py
parentaf9f439b2bf768f9168cecac2488b4c718ab783f (diff)
grat 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.py18
1 files changed, 17 insertions, 1 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 9309ad0c..5ec1f852 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
@@ -519,7 +519,23 @@ class Port(object):
return self.ok()
-
+
+ @owned
+ def set_source_addr (self, addr):
+ if not self.is_service_mode_on():
+ return self.err('port service mode must be enabled for configuring source address. Please enable service mode')
+
+ return self.set_attr(ipv4 = addr)
+
+
+ @owned
+ def set_dest_addr (self, addr):
+ if not self.is_service_mode_on():
+ return self.err('port service mode must be enabled for configuring destination address. Please enable service mode')
+
+ return self.set_attr(dest = addr)
+
+
@owned
def set_arp_resolution (self, ipv4, mac):