mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Modified remoteSSHClient references to SshClient
This commit is contained in:
parent
a2117d46f9
commit
1e57f1cee7
@ -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"],
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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 \
|
||||
|
||||
@ -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"],
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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 *
|
||||
|
||||
@ -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")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user