summaryrefslogtreecommitdiffstats
path: root/vsperf
diff options
context:
space:
mode:
Diffstat (limited to 'vsperf')
-rwxr-xr-xvsperf15
1 files changed, 15 insertions, 0 deletions
diff --git a/vsperf b/vsperf
index 6efe53da..46b6b416 100755
--- a/vsperf
+++ b/vsperf
@@ -147,6 +147,8 @@ def parse_arguments():
help='list all system forwarding applications and exit')
parser.add_argument('--list-vnfs', action='store_true',
help='list all system vnfs and exit')
+ parser.add_argument('--list-loadgens', action='store_true',
+ help='list all background load generators')
parser.add_argument('--list-settings', action='store_true',
help='list effective settings configuration and exit')
parser.add_argument('exact_test_name', nargs='*', help='Exact names of\
@@ -174,6 +176,7 @@ def parse_arguments():
group.add_argument('--vswitch', help='vswitch implementation to use')
group.add_argument('--fwdapp', help='packet forwarding application to use')
group.add_argument('--vnf', help='vnf to use')
+ group.add_argument('--loadgen', help='loadgen to use')
group.add_argument('--sysmetrics', help='system metrics logger to use')
group = parser.add_argument_group('test behavior options')
group.add_argument('--xunit', action='store_true',
@@ -439,6 +442,10 @@ def handle_list_options(args):
print(Loader().get_pktfwds_printable())
sys.exit(0)
+ if args['list_loadgens']:
+ print(Loader().get_loadgens_printable())
+ sys.exit(0)
+
if args['list_settings']:
print(str(settings))
sys.exit(0)
@@ -591,6 +598,14 @@ def main():
settings.getValue('VNF_DIR'))
sys.exit(1)
+ if args['loadgen']:
+ loadgens = Loader().get_loadgens()
+ if args['loadgen'] not in loadgens:
+ _LOGGER.error('There are no loadgens matching \'%s\' found in'
+ ' \'%s\'. Exiting...', args['loadgen'],
+ settings.getValue('LOADGEN_DIR'))
+ sys.exit(1)
+
if args['exact_test_name'] and args['tests']:
_LOGGER.error("Cannot specify tests with both positional args and --test.")
sys.exit(1)