diff options
author | JingLu5 <lvjing5@huawei.com> | 2016-08-01 16:13:01 +0800 |
---|---|---|
committer | JingLu5 <lvjing5@huawei.com> | 2016-08-03 08:30:28 +0800 |
commit | c90a6b6209038814d0d2763dfd287e5e2f1de121 (patch) | |
tree | a93c6bc62afd5ca62ac1555dce580f267e6b4ae0 /yardstick/cmd/commands/plugin.py | |
parent | c89fda5b5e7ae1ce501fba9e506ff3528c7d6f92 (diff) |
Add Storperf in CI [work in progress]
Add task configration file for TC074_Storperf and update test suite file
Add test case description for TC074_Storperf
Update Dockerfile to add ubuntu image used by Storperf
Update yardstick-verify to load ubuntu image and install Storperf
Modify plugin.py to support local installation
Change-Id: I4de764c7924aac98de6e6a8664f9d5c0b58cf31b
Signed-off-by: JingLu5 <lvjing5@huawei.com>
Diffstat (limited to 'yardstick/cmd/commands/plugin.py')
-rw-r--r-- | yardstick/cmd/commands/plugin.py | 37 |
1 files changed, 27 insertions, 10 deletions
diff --git a/yardstick/cmd/commands/plugin.py b/yardstick/cmd/commands/plugin.py index 8e3ddb5a5..0ab24fcfc 100644 --- a/yardstick/cmd/commands/plugin.py +++ b/yardstick/cmd/commands/plugin.py @@ -9,6 +9,7 @@ """ Handler for yardstick command 'plugin' """ +import os import sys import yaml import time @@ -80,12 +81,20 @@ class PluginCommands(object): deployment_user = deployment.get("user") deployment_ip = deployment.get("ip") - deployment_password = deployment.get("password") - LOG.debug("user:%s, host:%s", deployment_user, deployment_ip) - self.client = ssh.SSH(deployment_user, deployment_ip, - password=deployment_password) - self.client.wait(timeout=600) + + if deployment_ip == "local": + installer_ip = os.environ.get("INSTALLER_IP", None) + + LOG.debug("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) + 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 @@ -99,12 +108,20 @@ class PluginCommands(object): deployment_user = deployment.get("user") deployment_ip = deployment.get("ip") - deployment_password = deployment.get("password") - LOG.debug("user:%s, host:%s", deployment_user, deployment_ip) - self.client = ssh.SSH(deployment_user, deployment_ip, - password=deployment_password) - self.client.wait(timeout=600) + + if deployment_ip == "local": + installer_ip = os.environ.get("INSTALLER_IP", None) + + LOG.debug("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) + 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 |