Merge "bugfix: enable vlan and physical netwok able to set"
[yardstick.git] / yardstick / cmd / commands / report.py
1 ##############################################################################
2 # Copyright (c) 2017 Rajesh Kudaka.
3 #
4 # Author: Rajesh Kudaka (4k.rajesh@gmail.com)
5 # All rights reserved. This program and the accompanying materials
6 # are made available under the terms of the Apache License, Version 2.0
7 # which accompanies this distribution, and is available at
8 # http://www.apache.org/licenses/LICENSE-2.0
9 ##############################################################################
10
11 """ Handler for yardstick command 'report' """
12
13 from __future__ import print_function
14
15 from __future__ import absolute_import
16
17 from yardstick.benchmark.core.report import Report
18 from yardstick.cmd.commands import change_osloobj_to_paras
19 from yardstick.common.utils import cliargs
20
21
22 class ReportCommands(object):   # pragma: no cover
23     """Report commands.
24
25     Set of commands to manage benchmark tasks.
26     """
27
28     @cliargs("task_id", type=str, help=" task id", nargs=1)
29     @cliargs("yaml_name", type=str, help=" Yaml file Name", nargs=1)
30     def do_generate(self, args):
31         """Start a benchmark scenario."""
32         param = change_osloobj_to_paras(args)
33         Report().generate(param)