diff options
Diffstat (limited to 'scripts/stl_test_example.py')
-rw-r--r-- | scripts/stl_test_example.py | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/scripts/stl_test_example.py b/scripts/stl_test_example.py index e9202ca6..9a296bec 100644 --- a/scripts/stl_test_example.py +++ b/scripts/stl_test_example.py @@ -1,20 +1,29 @@ import os import sys +import time api_path = os.path.dirname(os.path.abspath(__file__)) sys.path.insert(0, os.path.join(api_path, 'automation/trex_control_plane/client/')) -from trex_stateless_client import CTRexStatelessClient, STLFailure +from trex_stateless_client import CTRexStatelessClient, STLError c = CTRexStatelessClient() try: c.connect() + c.stop() #before_ipackets = x.get_stats().get_rel('ipackets') - c.start(profiles = 'stl/imix_3pkt.yaml', ports = [1]) + + c.start(profiles = 'stl/imix_3pkt.yaml', ports = [0,1], mult = "1gbps") + + for i in xrange(0, 10): + time.sleep(5) + c.update(ports = [0,1], mult = "1gbps+") + #c.cmd_wait_on_traffic() + #c.stop() -except STLFailure as e: +except STLError as e: print e finally: c.teardown() |