summaryrefslogtreecommitdiffstats
path: root/yardstick
diff options
context:
space:
mode:
authorliang gao <jean.gaoliang@huawei.com>2016-08-09 09:40:14 +0000
committerGerrit Code Review <gerrit@172.30.200.206>2016-08-09 09:40:14 +0000
commit4b4b0d41040fbd66be92a4aa4d53c6e7692f0c77 (patch)
tree1f168fcaf6c707414d73fc4a394c085a44d687ad /yardstick
parentdbff89e9145a4841561da858b5de9df7609748f7 (diff)
parentc90a6b6209038814d0d2763dfd287e5e2f1de121 (diff)
Merge "Add Storperf in CI [work in progress]"
Diffstat (limited to 'yardstick')
-rw-r--r--yardstick/cmd/commands/plugin.py37
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