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 yardstick.benchmark.core.plugin import Plugin
13 from yardstick.common.utils import cliargs
14 from yardstick.cmd.commands import change_osloobj_to_paras
17 class PluginCommands(object):
20 Set of commands to manage plugins.
23 @cliargs("input_file", type=str, help="path to plugin configuration file",
25 def do_install(self, args):
26 '''Install a plugin.'''
27 param = change_osloobj_to_paras(args)
28 Plugin().install(param)
30 @cliargs("input_file", type=str, help="path to plugin configuration file",
32 def do_remove(self, args):
33 '''Remove a plugin.'''
34 param = change_osloobj_to_paras(args)
35 Plugin().remove(param)