summaryrefslogtreecommitdiffstats
path: root/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_std.py
diff options
context:
space:
mode:
authorimarom <imarom@cisco.com>2016-12-25 12:54:09 +0200
committerimarom <imarom@cisco.com>2016-12-25 13:50:56 +0200
commit34cb66c9f06c7a43e68a17b4a8802f8d34298a65 (patch)
treeaa6b081213e5715cf09a18503cc7b0a20168c6fc /scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_std.py
parent549f2750ab22db5695a8d29575c136ab06e37235 (diff)
refactor layer config on prot attributes
added guard against unconfigured MAC when going up with empty config file Signed-off-by: imarom <imarom@cisco.com>
Diffstat (limited to 'scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_std.py')
-rw-r--r--scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_std.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_std.py b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_std.py
index 30fdb2dd..16f10026 100644
--- a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_std.py
+++ b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_std.py
@@ -1,5 +1,6 @@
from .trex_stl_streams import *
from .trex_stl_packet_builder_scapy import *
+from .utils.common import *
# map ports
# will destroy all streams/data on the ports
@@ -8,6 +9,10 @@ def stl_map_ports (client, ports = None):
if ports is None:
ports = client.get_all_ports()
+ unresolved_ports = list_difference(ports, client.get_resolved_ports())
+ if unresolved_ports:
+ raise STLError("Port(s) {0} have unresolved destination addresses".format(unresolved_ports))
+
stl_send_3_pkts(client, ports)
tx_pkts = {}