Bugfix: task_id parameter from API can not pass to yardstick core
[yardstick.git] / yardstick / cmd / commands / testcase.py
1 ##############################################################################
2 # Copyright (c) 2015 Huawei Technologies Co.,Ltd 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 'testcase' """
11 from yardstick.benchmark.core.testcase import Testcase
12 from yardstick.common.utils import cliargs
13 from yardstick.cmd.commands import change_osloobj_to_paras
14
15
16 class TestcaseCommands(object):
17     '''Testcase commands.
18
19        Set of commands to discover and display test cases.
20     '''
21
22     def do_list(self, args):
23         '''List existing test cases'''
24         param = change_osloobj_to_paras(args)
25         Testcase().list_all(param)
26
27     @cliargs("casename", type=str, help="test case name", nargs=1)
28     def do_show(self, args):
29         '''Show details of a specific test case'''
30         param = change_osloobj_to_paras(args)
31         Testcase().show(param)