X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=yardstick%2Fcmd%2Fcommands%2Fplugin.py;h=9936942d83152001254274f2abafb65cf15eef01;hb=refs%2Fchanges%2F75%2F18375%2F5;hp=0ab24fcfce846b28a3789f38b2923daad021ea84;hpb=271d5a1bca3e7c8c22280bc564e2f4ab0722c860;p=yardstick.git diff --git a/yardstick/cmd/commands/plugin.py b/yardstick/cmd/commands/plugin.py index 0ab24fcfc..9936942d8 100644 --- a/yardstick/cmd/commands/plugin.py +++ b/yardstick/cmd/commands/plugin.py @@ -41,8 +41,10 @@ class PluginCommands(object): plugin_name = plugins.get("name") print("Installing plugin: %s" % plugin_name) + LOG.info("Executing _install_setup()") self._install_setup(plugin_name, deployment) + LOG.info("Executing _run()") self._run(plugin_name) total_end_time = time.time() @@ -61,10 +63,12 @@ class PluginCommands(object): plugins, deployment = parser.parse_plugin() plugin_name = plugins.get("name") - print("Remove plugin: %s" % plugin_name) + print("Removing plugin: %s" % plugin_name) + LOG.info("Executing _remove_setup()") self._remove_setup(plugin_name, deployment) + LOG.info("Executing _run()") self._run(plugin_name) total_end_time = time.time() @@ -86,18 +90,20 @@ class PluginCommands(object): if deployment_ip == "local": installer_ip = os.environ.get("INSTALLER_IP", None) - LOG.debug("user:%s, host:%s", deployment_user, installer_ip) + LOG.info("user:%s, host:%s", deployment_user, installer_ip) self.client = ssh.SSH(deployment_user, installer_ip, password=deployment_password) self.client.wait(timeout=600) else: - LOG.debug("user:%s, host:%s", deployment_user, deployment_ip) + LOG.info("user:%s, host:%s", deployment_user, deployment_ip) self.client = ssh.SSH(deployment_user, deployment_ip, password=deployment_password) self.client.wait(timeout=600) # copy script to host cmd = "cat > ~/%s.sh" % plugin_name + + LOG.info("copying script to host: %s", cmd) self.client.run(cmd, stdin=open(self.script, 'rb')) def _remove_setup(self, plugin_name, deployment): @@ -113,25 +119,27 @@ class PluginCommands(object): if deployment_ip == "local": installer_ip = os.environ.get("INSTALLER_IP", None) - LOG.debug("user:%s, host:%s", deployment_user, installer_ip) + LOG.info("user:%s, host:%s", deployment_user, installer_ip) self.client = ssh.SSH(deployment_user, installer_ip, password=deployment_password) self.client.wait(timeout=600) else: - LOG.debug("user:%s, host:%s", deployment_user, deployment_ip) + LOG.info("user:%s, host:%s", deployment_user, deployment_ip) self.client = ssh.SSH(deployment_user, deployment_ip, password=deployment_password) self.client.wait(timeout=600) # copy script to host cmd = "cat > ~/%s.sh" % plugin_name + + LOG.info("copying script to host: %s", cmd) self.client.run(cmd, stdin=open(self.script, 'rb')) def _run(self, plugin_name): '''Run installation script ''' cmd = "sudo bash %s" % plugin_name + ".sh" - LOG.debug("Executing command: %s", cmd) + LOG.info("Executing command: %s", cmd) status, stdout, stderr = self.client.execute(cmd)