1 ##############################################################################
2 # Copyright (c) 2015 Ericsson AB 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 'scenario' """
12 from __future__ import absolute_import
15 from yardstick.benchmark.scenarios.base import Scenario
18 class Scenarios(object): # pragma: no cover
21 Set of commands to discover and display scenario types.
24 def list_all(self, *args):
25 """List existing scenario types"""
26 types = Scenario.get_types()
27 scenario_table = prettytable.PrettyTable(['Type', 'Description'])
28 scenario_table.align = 'l'
29 for scenario_class in types:
30 scenario_table.add_row([scenario_class.get_scenario_type(),
31 scenario_class.get_description()])
35 """Show details of a specific scenario type"""
36 stype = Scenario.get_cls(args.type[0])