summaryrefslogtreecommitdiffstats
path: root/testcases
diff options
context:
space:
mode:
authorMaryam Tahhan <maryam.tahhan@intel.com>2016-02-21 14:29:32 +0000
committerMaryam Tahhan <maryam.tahhan@intel.com>2016-02-23 11:35:53 +0000
commit9d4b0644730076007490afe0ca7ddddc3bc6b3ef (patch)
tree5be808852857ba23051d95bc1722a88260a73944 /testcases
parent3456f7b0aebd7509c0de4a2e850572cbf0e8d600 (diff)
trafficgen: pause trafficgenerator
Add a mode to pause the traffic generator before transmission to bypass manual setup if required. Change-Id: Iad62a5e7cb83a311e2814d8a9ee2bc9b2d2ed4de Signed-off-by: Maryam Tahhan <maryam.tahhan@intel.com> Reviewed-by: Christian Trautman <ctrautma@redhat.com> Reviewed-by: Martin Klozik <martinx.klozik@intel.com> Reviewed-by: Al Morton <acmorton@att.com>
Diffstat (limited to 'testcases')
-rw-r--r--testcases/testcase.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/testcases/testcase.py b/testcases/testcase.py
index 6fa1092e..c79e4d0f 100644
--- a/testcases/testcase.py
+++ b/testcases/testcase.py
@@ -199,6 +199,16 @@ class TestCase(object):
self._logger.debug("All is set. Please run traffic generator manually.")
input(os.linesep + "Press Enter to terminate vswitchperf..." + os.linesep + os.linesep)
else:
+ if S.getValue('mode') == 'trafficgen-pause':
+ time.sleep(2)
+ true_vals = ('yes', 'y', 'ye', None)
+ while True:
+ choice = input(os.linesep + 'Transmission paused, should'
+ ' transmission be resumed? ' + os.linesep).lower()
+ if not choice or choice not in true_vals:
+ print('Please respond with \'yes\' or \'y\' ', end='')
+ else:
+ break
with traffic_ctl:
traffic_ctl.send_traffic(self._traffic)