diff options
Diffstat (limited to 'yardstick/benchmark/scenarios/compute/cpuload.py')
-rw-r--r-- | yardstick/benchmark/scenarios/compute/cpuload.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/yardstick/benchmark/scenarios/compute/cpuload.py b/yardstick/benchmark/scenarios/compute/cpuload.py index f45313e91..9d71038ef 100644 --- a/yardstick/benchmark/scenarios/compute/cpuload.py +++ b/yardstick/benchmark/scenarios/compute/cpuload.py @@ -67,10 +67,12 @@ class CPULoad(base.Scenario): host = self.context_cfg['host'] user = host.get('user', 'ubuntu') ip = host.get('ip', None) + ssh_port = host.get("ssh_port", ssh.DEFAULT_PORT) key_filename = host.get('key_filename', '~/.ssh/id_rsa') LOG.info("user:%s, host:%s", user, ip) - self.client = ssh.SSH(user, ip, key_filename=key_filename) + self.client = ssh.SSH(user, ip, key_filename=key_filename, + port=ssh_port) self.client.wait(timeout=600) # Check if mpstat prog is installed @@ -94,7 +96,7 @@ class CPULoad(base.Scenario): def _execute_command(self, cmd): """Execute a command on server.""" - LOG.info("Executing: %s" % cmd) + LOG.info("Executing: %s", cmd) status, stdout, stderr = self.client.execute(cmd) if status != 0: raise RuntimeError("Failed executing command: ", |