blob: 90b3d686c4a98f732449aacf412d41ba3e70da59 [file] [log] [blame]
Moshe0bb532c2018-02-26 13:39:57 +02001##############################################################################
2# Copyright 2018 EuropeanSoftwareMarketingLtd.
3# ===================================================================
4# Licensed under the ApacheLicense, Version2.0 (the"License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# software distributed under the License is distributed on an "AS IS" BASIS,
10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11# See the License for the specific language governing permissions and limitations under
12# the License
13##############################################################################
14# vnftest comment: this is a modified copy of
15# yardstick/cmd/commands/step.py
16""" Handler for vnftest command 'step' """
17
18from __future__ import print_function
19from __future__ import absolute_import
Moshe30497ac2018-03-14 14:22:13 +020020from vnftest.core.step import Steps
Moshe0bb532c2018-02-26 13:39:57 +020021from vnftest.common.utils import cliargs
22from vnftest.cmd.commands import change_osloobj_to_paras
23
24
25class StepCommands(object): # pragma: no cover
26 """Step commands.
27
28 Set of commands to discover and display step types.
29 """
30
31 def do_list(self, args):
32 """List existing step types"""
33 param = change_osloobj_to_paras(args)
34 Steps().list_all(param)
35
36 @cliargs("type", type=str, help="runner type", nargs=1)
37 def do_show(self, args):
38 """Show details of a specific step type"""
39 param = change_osloobj_to_paras(args)
40 Steps().show(param)