test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH V1] add a fuction to support ixia sending fixed number of packets
@ 2017-09-08 11:58 wang fei
  0 siblings, 0 replies; only message in thread
From: wang fei @ 2017-09-08 11:58 UTC (permalink / raw)
  To: dts; +Cc: wang fei

Signed-off-by: wang fei <feix.y.wang@intel.com>
---
 framework/tester.py | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/framework/tester.py b/framework/tester.py
index e7fb6bc..84f254f 100644
--- a/framework/tester.py
+++ b/framework/tester.py
@@ -490,6 +490,16 @@ class Tester(Crb):
         self.logger.info('SCAPY Result:\n' + out + '\n\n\n')
 
         return out.rpartition('[')[0]
+    
+    def traffic_generator_send_packets(self,portList,ratePercent,packetNum,delay=5,runTime=60):
+        """
+        send fixed number of packets on specified ports
+        """
+        if self.check_port_list(portList, 'ixia'):
+            return self.ixia_packet_gen.send_packets(portList, ratePercent, packetNum,delay,runTime)
+        if not self.check_port_list(portList):
+            self.logger.warning("exception by mixed port types")
+            return None
 
     def traffic_generator_throughput(self, portList, rate_percent=100, delay=5):
         """
-- 
2.7.4

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-09-08  9:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-08 11:58 [dts] [PATCH V1] add a fuction to support ixia sending fixed number of packets wang fei

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).