X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=yardstick%2Fbenchmark%2Fcore%2Fplugin.py;h=56ecd29d9fa007dfa7aa096265300d2bc2df6a38;hb=b2552579f300ec9f4c2b516eb44cac0efb3d4dd6;hp=c8d0865d14fb10c1b5bf1e3975bfe0e72db24576;hpb=d184d8714e543e4f2497db682154820f7eecf1de;p=yardstick.git diff --git a/yardstick/benchmark/core/plugin.py b/yardstick/benchmark/core/plugin.py index c8d0865d1..56ecd29d9 100644 --- a/yardstick/benchmark/core/plugin.py +++ b/yardstick/benchmark/core/plugin.py @@ -13,13 +13,13 @@ from __future__ import print_function from __future__ import absolute_import import os import sys -import yaml import time import logging import pkg_resources import yardstick.ssh as ssh from yardstick.common.task_template import TaskTemplate +from yardstick.common.yaml_loader import yaml_load LOG = logging.getLogger(__name__) @@ -38,19 +38,19 @@ class Plugin(object): plugins, deployment = parser.parse_plugin() plugin_name = plugins.get("name") - print("Installing plugin: %s" % plugin_name) + LOG.info("Installing plugin: %s", plugin_name) - LOG.info("Executing _install_setup()") + LOG.debug("Executing _install_setup()") self._install_setup(plugin_name, deployment) - LOG.info("Executing _run()") + LOG.debug("Executing _run()") self._run(plugin_name) total_end_time = time.time() - LOG.info("total finished in %d secs", + LOG.info("Total finished in %d secs", total_end_time - total_start_time) - print("Done, exiting") + LOG.info("Plugin %s Done, exiting", plugin_name) def remove(self, args): """Remove a plugin.""" @@ -153,7 +153,7 @@ class PluginParser(object): raise e print("Input plugin is:\n%s\n" % rendered_plugin) - cfg = yaml.load(rendered_plugin) + cfg = yaml_load(rendered_plugin) except IOError as ioerror: sys.exit(ioerror)