summaryrefslogtreecommitdiffstats
path: root/scripts/automation/trex_control_plane/stl/examples/stl_simple_burst.py
diff options
context:
space:
mode:
authorimarom <imarom@cisco.com>2016-03-21 17:22:06 +0200
committerimarom <imarom@cisco.com>2016-03-21 17:22:06 +0200
commit738da2c0cd38f13a3cf7ae726f7698959ebf1ff0 (patch)
tree8be6fb021cbf6039cb91ce991e22254bdfb8cff7 /scripts/automation/trex_control_plane/stl/examples/stl_simple_burst.py
parentc59a02f8036bbdc488f286412e990a16e3aa1df9 (diff)
python 3 - examples working
Diffstat (limited to 'scripts/automation/trex_control_plane/stl/examples/stl_simple_burst.py')
-rw-r--r--scripts/automation/trex_control_plane/stl/examples/stl_simple_burst.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/scripts/automation/trex_control_plane/stl/examples/stl_simple_burst.py b/scripts/automation/trex_control_plane/stl/examples/stl_simple_burst.py
index ed0cb93a..29341674 100644
--- a/scripts/automation/trex_control_plane/stl/examples/stl_simple_burst.py
+++ b/scripts/automation/trex_control_plane/stl/examples/stl_simple_burst.py
@@ -33,7 +33,7 @@ def simple_burst ():
stream_ids = c.add_streams([s1, s2], ports = [0, 3])
# run 5 times
- for i in xrange(1, 6):
+ for i in range(1, 6):
c.clear_stats()
c.start(ports = [0, 3], mult = "1gbps")
c.wait_on_traffic(ports = [0, 3])
@@ -41,22 +41,22 @@ def simple_burst ():
stats = c.get_stats()
ipackets = stats['total']['ipackets']
- print "Test iteration {0} - Packets Received: {1} ".format(i, ipackets)
+ print("Test iteration {0} - Packets Received: {1} ".format(i, ipackets))
# (5000 + 3000) * 2 ports = 16,000
if (ipackets != (16000)):
passed = False
except STLError as e:
passed = False
- print e
+ print(e)
finally:
c.disconnect()
if passed:
- print "\nTest has passed :-)\n"
+ print("\nTest has passed :-)\n")
else:
- print "\nTest has failed :-(\n"
+ print("\nTest has failed :-(\n")
# run the tests