add option to connect to non-standard ssh port
[yardstick.git] / yardstick / benchmark / scenarios / storage / fio.py
index a8d27fa..0e41536 100644 (file)
@@ -60,11 +60,13 @@ class Fio(base.Scenario):
             Fio.TARGET_SCRIPT)
         host = self.context_cfg["host"]
         user = host.get("user", "root")
+        ssh_port = host.get("ssh_port", ssh.DEFAULT_PORT)
         ip = host.get("ip", None)
         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)
 
         # copy script to host