CSIT-1425 Upgrade TRex to v2.54
[csit.git] / resources / traffic_profiles / trex / profile_trex_stateless_base_class.py
index a6cb974..1decc40 100755 (executable)
@@ -1,4 +1,4 @@
-# Copyright (c) 2017 Cisco and/or its affiliates.
+# Copyright (c) 2019 Cisco and/or its affiliates.
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
 # You may obtain a copy of the License at:
@@ -21,7 +21,7 @@ import struct
 from random import choice
 from string import letters
 
-from trex_stl_lib.api import *
+from trex.stl.api import *
 
 
 class TrafficStreamsBaseClass(object):
@@ -130,20 +130,18 @@ class TrafficStreamsBaseClass(object):
 
             # Direction 0 --> 1
             pkt_a = STLPktBuilder(
-                pkt=base_pkt_a / self._gen_payload(payload_len),
-                vm=vm1)
+                pkt=base_pkt_a / self._gen_payload(payload_len), vm=vm1)
             # Direction 1 --> 0
             pkt_b = STLPktBuilder(
-                pkt=base_pkt_b / self._gen_payload(payload_len),
-                vm=vm2)
+                pkt=base_pkt_b / self._gen_payload(payload_len), vm=vm2)
 
             # Packets for latency measurement:
             # Direction 0 --> 1
             pkt_lat_a = STLPktBuilder(
-                pkt=base_pkt_a / self._gen_payload(payload_len))
+                pkt=base_pkt_a / self._gen_payload(payload_len), vm=vm1)
             # Direction 1 --> 0
             pkt_lat_b = STLPktBuilder(
-                pkt=base_pkt_b / self._gen_payload(payload_len))
+                pkt=base_pkt_b / self._gen_payload(payload_len), vm=vm2)
 
             # Create the streams:
             # Direction 0 --> 1