-# 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:
from random import choice
from string import letters
-from trex_stl_lib.api import *
+from trex.stl.api import *
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