1 ##############################################################################
2 # Copyright (c) 2016 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 'plugin' """
12 from __future__ import print_function
14 from __future__ import absolute_import
15 from yardstick.benchmark.core.plugin import Plugin
16 from yardstick.common.utils import cliargs
17 from yardstick.cmd.commands import change_osloobj_to_paras
20 class PluginCommands(object):
23 Set of commands to manage plugins.
26 @cliargs("input_file", type=str, help="path to plugin configuration file",
28 def do_install(self, args):
29 '''Install a plugin.'''
30 param = change_osloobj_to_paras(args)
31 Plugin().install(param)
33 @cliargs("input_file", type=str, help="path to plugin configuration file",
35 def do_remove(self, args):
36 '''Remove a plugin.'''
37 param = change_osloobj_to_paras(args)
38 Plugin().remove(param)