Merge "remove failing influx testcases"
[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 __future__ import print_function
12
13 from __future__ import absolute_import
14 from yardstick.benchmark.core.testcase import Testcase
15 from yardstick.common.utils import cliargs
16 from yardstick.cmd.commands import change_osloobj_to_paras
17
18
19 class TestcaseCommands(object):
20     '''Testcase commands.
21
22        Set of commands to discover and display test cases.
23     '''
24
25     def do_list(self, args):
26         '''List existing test cases'''
27         param = change_osloobj_to_paras(args)
28         Testcase().list_all(param)
29
30     @cliargs("casename", type=str, help="test case name", nargs=1)
31     def do_show(self, args):
32         '''Show details of a specific test case'''
33         param = change_osloobj_to_paras(args)
34         Testcase().show(param)