Merge "Make VM machine type as a user configuration"
[yardstick.git] / yardstick / cmd / commands / runner.py
1 ##############################################################################
2 # Copyright (c) 2015 Ericsson AB and others.
3 #
4 # All rights reserved. This program and the accompanying materials
5 # are made available under the terms of the Apache License, Version 2.0
6 # which accompanies this distribution, and is available at
7 # http://www.apache.org/licenses/LICENSE-2.0
8 ##############################################################################
9
10 """ Handler for yardstick command 'runner' """
11
12 from __future__ import print_function
13
14 from __future__ import absolute_import
15 from yardstick.benchmark.core.runner import Runners
16 from yardstick.common.utils import cliargs
17 from yardstick.cmd.commands import change_osloobj_to_paras
18
19
20 class RunnerCommands(object):   # pragma: no cover
21     """Runner commands.
22
23        Set of commands to discover and display runner types.
24     """
25
26     def do_list(self, args):
27         """List existing runner types"""
28         param = change_osloobj_to_paras(args)
29         Runners().list_all(param)
30
31     @cliargs("type", type=str, help="runner type", nargs=1)
32     def do_show(self, args):
33         """Show details of a specific runner type"""
34         param = change_osloobj_to_paras(args)
35         Runners().show(param)