summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xdocs/userguide/testusage.rst1
-rw-r--r--testcases/testcase.py10
-rwxr-xr-xvsperf3
3 files changed, 13 insertions, 1 deletions
diff --git a/docs/userguide/testusage.rst b/docs/userguide/testusage.rst
index 06583d83..824ae6fc 100755
--- a/docs/userguide/testusage.rst
+++ b/docs/userguide/testusage.rst
@@ -393,6 +393,7 @@ Mode of operation is driven by configuration parameter -m or --mode
"normal" - execute vSwitch, VNF and traffic generator
"trafficgen" - execute only traffic generator
"trafficgen-off" - execute vSwitch and VNF
+ "trafficgen-pause" - execute vSwitch and VNF but wait before traffic transmission
In case, that VSPERF is executed in "trafficgen" mode, then configuration
of traffic generator should be configured through --test-param option.
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)
diff --git a/vsperf b/vsperf
index 63913c77..d141227c 100755
--- a/vsperf
+++ b/vsperf
@@ -145,7 +145,8 @@ def parse_arguments():
group.add_argument('-m', '--mode', help='vsperf mode of operation;\
Values: "normal" - execute vSwitch, VNF and traffic generator;\
"trafficgen" - execute only traffic generator; "trafficgen-off" \
- - execute vSwitch and VNF', default='normal')
+ - execute vSwitch and VNF; trafficgen-pause - execute vSwitch \
+ and VNF but pause before traffic transmission ', default='normal')
group.add_argument('-f', '--test-spec', help='test specification file')
group.add_argument('-d', '--test-dir', help='directory containing tests')