diff options
author | Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com> | 2017-12-12 16:18:28 +0000 |
---|---|---|
committer | Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com> | 2018-02-15 12:12:10 +0000 |
commit | 306c2408c3ea30dc53d5883cebc3550f8cb7ebbc (patch) | |
tree | 537d0926f3cbe1c558d17d301017b369fa31fbfb /yardstick/cmd/cli.py | |
parent | 479d06e896d421bcd18ebc4b207faf7400533e93 (diff) |
Prohibit the importation of a list of libraries
Some modules can't be imported and used in Yardstick. For example,
"ansible" has GPLv3 license and can't be used as a library in this
project without modifying Yardstick license.
JIRA: YARDSTICK-896
Change-Id: I9d6bec0493ac50f1051235cc77e81059dfc3e01c
Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
Diffstat (limited to 'yardstick/cmd/cli.py')
-rw-r--r-- | yardstick/cmd/cli.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/yardstick/cmd/cli.py b/yardstick/cmd/cli.py index 67ce11451..0bc7c1617 100644 --- a/yardstick/cmd/cli.py +++ b/yardstick/cmd/cli.py @@ -28,6 +28,8 @@ from yardstick.cmd.commands import testcase from yardstick.cmd.commands import plugin from yardstick.cmd.commands import env from yardstick.cmd.commands import report +from yardstick.common import import_tools + CONF = cfg.CONF cli_opts = [ @@ -53,7 +55,8 @@ def find_config_files(path_list): return None -class YardstickCLI(): # pragma: no cover +@import_tools.decorator_banned_modules +class YardstickCLI(object): # pragma: no cover """Command-line interface to yardstick""" # Command categories @@ -108,7 +111,7 @@ class YardstickCLI(): # pragma: no cover # register subcommands to parse additional command line arguments def parser(subparsers): - self._add_command_parsers(YardstickCLI.categories, subparsers) + self._add_command_parsers(self.categories, subparsers) category_opt = cfg.SubCommandOpt("category", title="Command categories", |