diff options
author | Martin Klozik <martinx.klozik@intel.com> | 2015-07-23 08:30:19 +0100 |
---|---|---|
committer | Maryam Tahhan <maryam.tahhan@intel.com> | 2015-08-04 11:48:40 +0000 |
commit | 37f74b50178fc458d9e1bc9fff1cd8bcdd9ada8d (patch) | |
tree | 833b7502c260f9b3bc18c29cd662d6b4ef587981 /vsperf | |
parent | 211eb7443e6cdc66c9657399be983184cd16bba7 (diff) |
Support vswitch selection from the command line.
New command line argument '--vswitch' was introduced to override
vswitch implementation selected in configuration file.
Modified file:
* vsperf
JIRA: VSPERF-27
Change-Id: Ia0070ea9f998349dcca697a0fe9519a009479477
Signed-off-by: Martin Klozik (martinx.klozik@intel.com)
Reviewed-by: Maryam Tahhan <maryamtahhan@intel.com>
Diffstat (limited to 'vsperf')
-rwxr-xr-x | vsperf | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -130,6 +130,7 @@ def parse_arguments(): group.add_argument('--verbosity', choices=list_logging_levels(), help='debug level') group.add_argument('--trafficgen', help='traffic generator to use') + group.add_argument('--vswitch', help='vswitch implementation 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', @@ -301,6 +302,16 @@ def main(): settings.getValue('TRAFFICGEN_DIR')) sys.exit(1) + # configure vswitch + if args['vswitch']: + vswitches = Loader().get_vswitches() + if args['vswitch'] not in vswitches: + logging.error('There are no vswitches matching \'%s\' found in' + ' \'%s\'. Exiting...', args['vswitch'], + settings.getValue('VSWITCH_DIR')) + sys.exit(1) + + # generate results directory name date = datetime.datetime.fromtimestamp(time.time()) |