diff options
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.py | 18 |
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): |