X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=yardstick%2Fbenchmark%2Fcore%2Fplugin.py;h=56ecd29d9fa007dfa7aa096265300d2bc2df6a38;hb=refs%2Fchanges%2F35%2F41835%2F5;hp=7f67a04b39652050cfe13d5d3b70a32e8b4ea171;hpb=87559e992c1f68559950b258146a530c49db9df0;p=yardstick.git diff --git a/yardstick/benchmark/core/plugin.py b/yardstick/benchmark/core/plugin.py index 7f67a04b3..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.""" @@ -84,8 +84,8 @@ class Plugin(object): if deployment_ip == "local": self.client = ssh.SSH.from_node(deployment, overrides={ - # host can't be None, fail if no INSTALLER_IP - 'ip': os.environ["INSTALLER_IP"], + # host can't be None, fail if no JUMP_HOST_IP + 'ip': os.environ["JUMP_HOST_IP"], }) else: self.client = ssh.SSH.from_node(deployment) @@ -107,8 +107,8 @@ class Plugin(object): if deployment_ip == "local": self.client = ssh.SSH.from_node(deployment, overrides={ - # host can't be None, fail if no INSTALLER_IP - 'ip': os.environ["INSTALLER_IP"], + # host can't be None, fail if no JUMP_HOST_IP + 'ip': os.environ["JUMP_HOST_IP"], }) else: self.client = ssh.SSH.from_node(deployment) @@ -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)