aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKubi <jean.gaoliang@huawei.com>2017-03-17 09:06:19 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-03-17 09:06:19 +0000
commit9229d66abb1a2266bd8bbabc1e79f0ee46632bcf (patch)
tree11f7a97603c399880f9d6d5b82e4abdb713248f8
parent31f80d135d464f08b9fad59475bc735f15ccecd3 (diff)
parent1365e88a55a8649e33d11f3d27f2fb1964bfae00 (diff)
Merge "Bug Fix: force the network to attacht to trex to start the traffic"
-rw-r--r--yardstick/network_services/traffic_profile/fixed.py3
-rw-r--r--yardstick/network_services/vnf_generic/vnf/tg_trex.py2
2 files changed, 4 insertions, 1 deletions
diff --git a/yardstick/network_services/traffic_profile/fixed.py b/yardstick/network_services/traffic_profile/fixed.py
index a456c2bd7..ebc1e61f2 100644
--- a/yardstick/network_services/traffic_profile/fixed.py
+++ b/yardstick/network_services/traffic_profile/fixed.py
@@ -43,7 +43,8 @@ class FixedProfile(TrafficProfile):
self._create_stream(src_ip, dst_ip),
ports=[ports])
- traffic_generator.client.start(ports=traffic_generator.my_ports)
+ traffic_generator.client.start(ports=traffic_generator.my_ports,
+ force=True)
self.first_run = False
def _create_stream(self, src_ip, dst_ip):
diff --git a/yardstick/network_services/vnf_generic/vnf/tg_trex.py b/yardstick/network_services/vnf_generic/vnf/tg_trex.py
index 2731476e0..1e751bfce 100644
--- a/yardstick/network_services/vnf_generic/vnf/tg_trex.py
+++ b/yardstick/network_services/vnf_generic/vnf/tg_trex.py
@@ -31,6 +31,7 @@ from stl.trex_stl_lib.trex_stl_exceptions import STLError
LOG = logging.getLogger(__name__)
DURATION = 30
+WAIT_QUEUE = 1
TREX_SYNC_PORT = 4500
TREX_ASYNC_PORT = 4501
@@ -259,6 +260,7 @@ class TrexTrafficGen(GenericTrafficGen):
"tx_throughput_mbps": float(xe_value.get("tx_bps", 0.0)),
"in_packets": xe_value.get("ipackets", 0),
"out_packets": xe_value.get("opackets", 0)}
+ time.sleep(WAIT_QUEUE)
queue.put(samples)
self.client.disconnect()