diff options
Diffstat (limited to 'yardstick/network_services/traffic_profile/traffic_profile.py')
-rw-r--r-- | yardstick/network_services/traffic_profile/traffic_profile.py | 61 |
1 files changed, 29 insertions, 32 deletions
diff --git a/yardstick/network_services/traffic_profile/traffic_profile.py b/yardstick/network_services/traffic_profile/traffic_profile.py index fcec04fed..7bbe89268 100644 --- a/yardstick/network_services/traffic_profile/traffic_profile.py +++ b/yardstick/network_services/traffic_profile/traffic_profile.py @@ -21,17 +21,17 @@ from random import SystemRandom import six from yardstick.network_services.traffic_profile.base import TrafficProfile -from stl.trex_stl_lib.trex_stl_client import STLStream -from stl.trex_stl_lib.trex_stl_streams import STLFlowLatencyStats -from stl.trex_stl_lib.trex_stl_streams import STLTXCont -from stl.trex_stl_lib.trex_stl_streams import STLProfile -from stl.trex_stl_lib.trex_stl_packet_builder_scapy import STLVmWrFlowVar -from stl.trex_stl_lib.trex_stl_packet_builder_scapy import STLVmFlowVarRepeatableRandom -from stl.trex_stl_lib.trex_stl_packet_builder_scapy import STLVmFlowVar -from stl.trex_stl_lib.trex_stl_packet_builder_scapy import STLPktBuilder -from stl.trex_stl_lib.trex_stl_packet_builder_scapy import STLScVmRaw -from stl.trex_stl_lib.trex_stl_packet_builder_scapy import STLVmFixIpv4 -from stl.trex_stl_lib import api as Pkt +from trex_stl_lib.trex_stl_client import STLStream +from trex_stl_lib.trex_stl_streams import STLFlowLatencyStats +from trex_stl_lib.trex_stl_streams import STLTXCont +from trex_stl_lib.trex_stl_streams import STLProfile +from trex_stl_lib.trex_stl_packet_builder_scapy import STLVmWrFlowVar +from trex_stl_lib.trex_stl_packet_builder_scapy import STLVmFlowVarRepeatableRandom +from trex_stl_lib.trex_stl_packet_builder_scapy import STLVmFlowVar +from trex_stl_lib.trex_stl_packet_builder_scapy import STLPktBuilder +from trex_stl_lib.trex_stl_packet_builder_scapy import STLScVmRaw +from trex_stl_lib.trex_stl_packet_builder_scapy import STLVmFixIpv4 +from trex_stl_lib import api as Pkt class TrexProfile(TrafficProfile): @@ -142,13 +142,12 @@ class TrexProfile(TrafficProfile): src_ip4 = min_value self._set_ip_fields(src=src_ip4) else: - stl_vm_flow_var = \ - STLVmFlowVarRepeatableRandom(name="ip4_src", - min_value=min_value, - max_value=max_value, - size=4, - limit=int(count), - seed=0x1235) + stl_vm_flow_var = STLVmFlowVarRepeatableRandom(name="ip4_src", + min_value=min_value, + max_value=max_value, + size=4, + limit=int(count), + seed=0x1235) self.vm_flow_vars.append(stl_vm_flow_var) stl_vm_wr_flow_var = STLVmWrFlowVar(fv_name='ip4_src', pkt_offset='IP.src') @@ -165,13 +164,12 @@ class TrexProfile(TrafficProfile): dst_ip4 = min_value self._set_ip_fields(dst=dst_ip4) else: - stl_vm_flow_var = \ - STLVmFlowVarRepeatableRandom(name="dst_ip4", - min_value=min_value, - max_value=max_value, - size=4, - limit=int(count), - seed=0x1235) + stl_vm_flow_var = STLVmFlowVarRepeatableRandom(name="dst_ip4", + min_value=min_value, + max_value=max_value, + size=4, + limit=int(count), + seed=0x1235) self.vm_flow_vars.append(stl_vm_flow_var) stl_vm_wr_flow_var = STLVmWrFlowVar(fv_name='dst_ip4', pkt_offset='IP.dst') @@ -253,13 +251,12 @@ class TrexProfile(TrafficProfile): self._set_udp_fields(sport=src_port) else: max_value = int(src_ports[1]) - stl_vm_flow_var = \ - STLVmFlowVarRepeatableRandom(name="port_src", - min_value=min_value, - max_value=max_value, - size=2, - limit=int(count), - seed=0x1235) + stl_vm_flow_var = STLVmFlowVarRepeatableRandom(name="port_src", + min_value=min_value, + max_value=max_value, + size=2, + limit=int(count), + seed=0x1235) self.vm_flow_vars.append(stl_vm_flow_var) stl_vm_wr_flow_var = STLVmWrFlowVar(fv_name='port_src', pkt_offset=self.udp_sport) |