aboutsummaryrefslogtreecommitdiffstats
path: root/vsperf
diff options
context:
space:
mode:
authorMartin Klozik <martinx.klozik@intel.com>2017-11-07 09:10:43 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-11-07 09:10:43 +0000
commit1653f5d6a12febed50f138076dcf8c191d9f24e6 (patch)
tree522d94038ac6eaa262a8b3ca2c6fa4704db12d79 /vsperf
parent1cfdb4bfbdd1ee02e6ab8bce691084d5319d5410 (diff)
parent485ac777fd9cded7c145917bfcbe701276f3c855 (diff)
Merge "load_gen: Supporting loading of load_gen via loader."
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)