aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/cmd/commands/scenario.py
diff options
context:
space:
mode:
Diffstat (limited to 'yardstick/cmd/commands/scenario.py')
-rw-r--r--yardstick/cmd/commands/scenario.py18
1 files changed, 6 insertions, 12 deletions
diff --git a/yardstick/cmd/commands/scenario.py b/yardstick/cmd/commands/scenario.py
index 00d46cf11..6aa3a451a 100644
--- a/yardstick/cmd/commands/scenario.py
+++ b/yardstick/cmd/commands/scenario.py
@@ -9,9 +9,9 @@
""" Handler for yardstick command 'scenario' """
-from yardstick.benchmark.scenarios.base import Scenario
+from yardstick.benchmark.core.scenario import Scenarios
from yardstick.common.utils import cliargs
-from yardstick.cmd import print_hbar
+from yardstick.cmd.commands import change_osloobj_to_paras
class ScenarioCommands(object):
@@ -22,17 +22,11 @@ class ScenarioCommands(object):
def do_list(self, args):
'''List existing scenario types'''
- types = Scenario.get_types()
- print_hbar(78)
- print("| %-16s | %-60s" % ("Type", "Description"))
- print_hbar(78)
- for stype in types:
- print("| %-16s | %-60s" % (stype.__scenario_type__,
- stype.__doc__.split("\n")[0]))
- print_hbar(78)
+ param = change_osloobj_to_paras(args)
+ Scenarios().list_all(param)
@cliargs("type", type=str, help="runner type", nargs=1)
def do_show(self, args):
'''Show details of a specific scenario type'''
- stype = Scenario.get_cls(args.type[0])
- print stype.__doc__
+ param = change_osloobj_to_paras(args)
+ Scenarios().show(param)