diff --git a/tools/marvin/marvin/integration/lib/common.py b/tools/marvin/marvin/integration/lib/common.py index 1386eaf7d96..6c2bb2aced1 100644 --- a/tools/marvin/marvin/integration/lib/common.py +++ b/tools/marvin/marvin/integration/lib/common.py @@ -19,7 +19,7 @@ #Import Local Modules from marvin.cloudstackAPI import * -from marvin.remoteSSHClient import remoteSSHClient +from marvin.sshClient import SshClient from utils import * from base import * from marvin.codes import PASS @@ -217,7 +217,7 @@ def download_systemplates_sec_storage(server, services): try: # Login to management server - ssh = remoteSSHClient( + ssh = SshClient( server["ipaddress"], server["port"], server["username"], diff --git a/tools/marvin/marvin/integration/lib/utils.py b/tools/marvin/marvin/integration/lib/utils.py index df3ca8aac9c..0fe3c26adbf 100644 --- a/tools/marvin/marvin/integration/lib/utils.py +++ b/tools/marvin/marvin/integration/lib/utils.py @@ -29,7 +29,7 @@ import socket import urlparse import datetime from marvin.cloudstackAPI import * -from marvin.remoteSSHClient import remoteSSHClient +from marvin.sshClient import SshClient from marvin.codes import * @@ -124,7 +124,7 @@ def is_server_ssh_ready(ipaddress, port, username, password, retries=20, retryin ''' try: - ssh = remoteSSHClient( + ssh = SshClient( host=ipaddress, port=port, user=username, @@ -190,7 +190,7 @@ def get_process_status(hostip, port, username, password, linklocalip, process, h """Double hop and returns a process status""" #SSH to the machine - ssh = remoteSSHClient(hostip, port, username, password) + ssh = SshClient(hostip, port, username, password) if str(hypervisor).lower() == 'vmware': ssh_command = "ssh -i /var/cloudstack/management/.ssh/id_rsa -ostricthostkeychecking=no " else: @@ -296,7 +296,7 @@ def is_snapshot_on_nfs(apiclient, dbconn, config, zoneid, snapshotid): mgtSvr, user, passwd = config.mgtSvr[0].mgtSvrIp, config.mgtSvr[0].user, config.mgtSvr[0].passwd try: - ssh_client = remoteSSHClient( + ssh_client = SshClient( mgtSvr, 22, user, diff --git a/tools/marvin/marvin/sandbox/demo/live/testSshDeployVM.py b/tools/marvin/marvin/sandbox/demo/live/testSshDeployVM.py index 5438e40d6c8..38351861de7 100644 --- a/tools/marvin/marvin/sandbox/demo/live/testSshDeployVM.py +++ b/tools/marvin/marvin/sandbox/demo/live/testSshDeployVM.py @@ -20,7 +20,7 @@ import marvin from marvin.cloudstackTestCase import * -from marvin.remoteSSHClient import remoteSSHClient +from marvin.sshClient import SshClient @UserName('demo', 'ROOT', '0') @@ -84,7 +84,7 @@ class TestSshDeployVm(cloudstackTestCase): # SSH login and compare hostname self.debug("Attempting to SSH into %s over %s of %s"%(nattedip, "22", vm.name)) - ssh_client = remoteSSHClient(nattedip, "22", "root", "password") + ssh_client = SshClient(nattedip, "22", "root", "password") stdout = ssh_client.execute("hostname") self.assertEqual(hostname, stdout[0], "cloudstack VM name and hostname \ diff --git a/tools/marvin/marvin/sandbox/demo/simulator/testcase/libs/common.py b/tools/marvin/marvin/sandbox/demo/simulator/testcase/libs/common.py index fc184016d43..e0c452741b1 100644 --- a/tools/marvin/marvin/sandbox/demo/simulator/testcase/libs/common.py +++ b/tools/marvin/marvin/sandbox/demo/simulator/testcase/libs/common.py @@ -22,7 +22,7 @@ #Import Local Modules from marvin.cloudstackTestCase import * from marvin.cloudstackAPI import * -import marvin.remoteSSHClient +import marvin.sshClient from utils import * from base import * @@ -102,7 +102,7 @@ def download_systemplates_sec_storage(server, services): try: # Login to management server - ssh = marvin.remoteSSHClient.remoteSSHClient( + ssh = marvin.sshClient.SshClient( server["ipaddress"], server["port"], server["username"], diff --git a/tools/marvin/marvin/sandbox/demo/simulator/testcase/libs/utils.py b/tools/marvin/marvin/sandbox/demo/simulator/testcase/libs/utils.py index 8abed18b99d..f26d2c0212b 100644 --- a/tools/marvin/marvin/sandbox/demo/simulator/testcase/libs/utils.py +++ b/tools/marvin/marvin/sandbox/demo/simulator/testcase/libs/utils.py @@ -20,10 +20,10 @@ """ import time -import marvin.remoteSSHClient +import marvin.sshClient from marvin.cloudstackAPI import * import marvin.cloudstackConnection -from marvin.remoteSSHClient import remoteSSHClient +from marvin.sshClient import SshClient #from marvin.cloudstackConnection import cloudConnection import marvin.configGenerator import logging @@ -44,7 +44,7 @@ def is_server_ssh_ready(ipaddress, port, username, password, retries=50): loop_cnt = retries while True: try: - ssh = marvin.remoteSSHClient.remoteSSHClient( + ssh = marvin.sshClient.SshClient( ipaddress, port, username, @@ -89,7 +89,7 @@ def get_process_status(hostip, port, username, password, linklocalip, process): """Double hop and returns a process status""" #SSH to the machine - ssh = marvin.remoteSSHClient.remoteSSHClient( + ssh = marvin.sshClient.SshClient( hostip, port, username, diff --git a/tools/marvin/marvin/sandbox/demo/simulator/testcase/test_vm_life_cycle.py b/tools/marvin/marvin/sandbox/demo/simulator/testcase/test_vm_life_cycle.py index 9bc7e149f97..2e612021f6c 100644 --- a/tools/marvin/marvin/sandbox/demo/simulator/testcase/test_vm_life_cycle.py +++ b/tools/marvin/marvin/sandbox/demo/simulator/testcase/test_vm_life_cycle.py @@ -22,7 +22,7 @@ import marvin from marvin.cloudstackTestCase import * from marvin.cloudstackAPI import * -from marvin.remoteSSHClient import remoteSSHClient +from marvin.sshClient import SshClient from testcase.libs.utils import * from testcase.libs.base import * diff --git a/tools/marvin/marvin/sshClient.py b/tools/marvin/marvin/sshClient.py index 58f2602107b..fd8726cee37 100644 --- a/tools/marvin/marvin/sshClient.py +++ b/tools/marvin/marvin/sshClient.py @@ -178,5 +178,5 @@ class SshClient(object): if __name__ == "__main__": with contextlib.closing(SshClient("10.223.75.10", 22, "root", - "password")) as ssh: + "password")) as ssh: print ssh.execute("ls -l")