summaryrefslogtreecommitdiffstats
path: root/scripts/automation/trex_control_plane
diff options
context:
space:
mode:
authorimarom <imarom@cisco.com>2016-03-23 11:55:07 +0200
committerimarom <imarom@cisco.com>2016-03-23 13:01:11 +0200
commit2bcbca455b063e3ef6f90e85a1fac4994a0e6a51 (patch)
tree7b7c22e4c1529dd9aeee4401caf504177515c1fc /scripts/automation/trex_control_plane
parent89a2be8247936e2d3d8323c0e51a86c198a879a2 (diff)
python 3 - regression
Diffstat (limited to 'scripts/automation/trex_control_plane')
-rw-r--r--scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_streams.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_streams.py b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_streams.py
index eed20485..4f8ce3e6 100644
--- a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_streams.py
+++ b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_streams.py
@@ -534,15 +534,17 @@ class STLStream(object):
else:
new_data = ''.join([chr(c) if chr(c) in good_printable else r'\x{0:02x}'.format(c) for c in data])
- payload_start = packet_command.find("Raw(load='")
+ payload_start = packet_command.find("Raw(load=")
if payload_start != -1:
packet_command = packet_command[:payload_start-1]
layers = packet_command.split('/')
+
if payload:
if len(new_data) and new_data == new_data[0] * len(new_data):
layers.append("Raw(load='%s' * %s)" % (new_data[0], len(new_data)))
else:
layers.append("Raw(load='%s')" % new_data)
+
packet_code = 'packet = (' + (' / \n ').join(layers) + ')'
vm_list = []
for inst in self.fields['vm']['instructions']: