1 ##############################################################################
2 # Copyright (c) 2015 Huawei Technologies Co.,Ltd and others.
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 ##############################################################################
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
16 class TestcaseCommands(object):
19 Set of commands to discover and display test cases.
22 def do_list(self, args):
23 '''List existing test cases'''
24 param = change_osloobj_to_paras(args)
25 Testcase().list_all(param)
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)