mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
CLOUDSTACK-5099: Utils.py-has-wrong-reference, cleaned it. As well added Uniform naming convention
Signed-off-by: SrikanteswaraRao Talluri <talluri@apache.org>
This commit is contained in:
parent
39c201a593
commit
c7fe212c3b
@ -22,7 +22,7 @@ import marvin
|
||||
from nose.plugins.attrib import attr
|
||||
from marvin.cloudstackTestCase import *
|
||||
from marvin.cloudstackAPI import *
|
||||
from marvin.remoteSSHClient import remoteSSHClient
|
||||
from marvin.sshClient import SshClient
|
||||
from marvin.integration.lib.utils import *
|
||||
from marvin.integration.lib.base import *
|
||||
from marvin.integration.lib.common import *
|
||||
|
||||
@ -26,7 +26,7 @@ from marvin.cloudstackAPI import *
|
||||
from marvin.integration.lib.utils import *
|
||||
from marvin.integration.lib.base import *
|
||||
from marvin.integration.lib.common import *
|
||||
from marvin import remoteSSHClient
|
||||
from marvin.sshClient import SshClient
|
||||
import datetime
|
||||
|
||||
|
||||
|
||||
@ -25,7 +25,7 @@ from marvin.cloudstackAPI import *
|
||||
from marvin.integration.lib.utils import *
|
||||
from marvin.integration.lib.base import *
|
||||
from marvin.integration.lib.common import *
|
||||
from marvin.remoteSSHClient import remoteSSHClient
|
||||
from marvin.sshClient import SshClient
|
||||
import datetime
|
||||
|
||||
|
||||
|
||||
@ -22,7 +22,7 @@ from marvin.cloudstackAPI import *
|
||||
from marvin.integration.lib.utils import *
|
||||
from marvin.integration.lib.base import *
|
||||
from marvin.integration.lib.common import *
|
||||
from marvin import remoteSSHClient
|
||||
from marvin.sshClient import SshClient
|
||||
from nose.plugins.attrib import attr
|
||||
from marvin.cloudstackException import cloudstackAPIException
|
||||
|
||||
|
||||
@ -20,7 +20,7 @@ from marvin.cloudstackAPI import *
|
||||
from marvin.integration.lib.utils import *
|
||||
from marvin.integration.lib.base import *
|
||||
from marvin.integration.lib.common import *
|
||||
from marvin import remoteSSHClient
|
||||
from marvin.sshClient import SshClient
|
||||
from nose.plugins.attrib import attr
|
||||
|
||||
class Services:
|
||||
|
||||
@ -25,7 +25,7 @@ from marvin.cloudstackAPI import *
|
||||
from marvin.integration.lib.utils import *
|
||||
from marvin.integration.lib.base import *
|
||||
from marvin.integration.lib.common import *
|
||||
from marvin.remoteSSHClient import remoteSSHClient
|
||||
from marvin.sshClient import SshClient
|
||||
import datetime
|
||||
|
||||
|
||||
|
||||
@ -20,7 +20,7 @@
|
||||
import marvin
|
||||
from marvin.cloudstackTestCase import *
|
||||
from marvin.cloudstackAPI import *
|
||||
from marvin import remoteSSHClient
|
||||
from marvin.sshClient import SshClient
|
||||
from marvin.integration.lib.utils import *
|
||||
from marvin.integration.lib.base import *
|
||||
from marvin.integration.lib.common import *
|
||||
|
||||
@ -23,7 +23,7 @@ from marvin.integration.lib.base import *
|
||||
from marvin.integration.lib.utils import *
|
||||
from marvin.integration.lib.common import *
|
||||
from nose.plugins.attrib import attr
|
||||
from marvin import remoteSSHClient
|
||||
from marvin.sshClient import SshClient
|
||||
import unittest
|
||||
import random
|
||||
import string
|
||||
|
||||
@ -39,7 +39,7 @@ from marvin.integration.lib.common import (get_domain,
|
||||
from marvin.cloudstackAPI.createEgressFirewallRule import createEgressFirewallRuleCmd
|
||||
from marvin.cloudstackAPI.deleteEgressFirewallRule import deleteEgressFirewallRuleCmd
|
||||
|
||||
from marvin.remoteSSHClient import remoteSSHClient
|
||||
from marvin.sshClient import SshClient
|
||||
import time
|
||||
|
||||
class Services:
|
||||
@ -270,7 +270,7 @@ class TestEgressFWRules(cloudstackTestCase):
|
||||
fd.write(expect_script)
|
||||
fd.close()
|
||||
|
||||
ssh = remoteSSHClient(host=sourceip,
|
||||
ssh = SshClient(host=sourceip,
|
||||
port=22,
|
||||
user='root',
|
||||
passwd=self.services["host_password"])
|
||||
|
||||
@ -22,7 +22,7 @@ import marvin
|
||||
from nose.plugins.attrib import attr
|
||||
from marvin.cloudstackTestCase import *
|
||||
from marvin.cloudstackAPI import *
|
||||
from marvin.remoteSSHClient import remoteSSHClient
|
||||
from marvin.sshClient import SshClient
|
||||
from marvin.integration.lib.utils import *
|
||||
from marvin.integration.lib.base import *
|
||||
from marvin.integration.lib.common import *
|
||||
|
||||
@ -25,7 +25,7 @@ from marvin.cloudstackAPI import *
|
||||
from marvin.integration.lib.utils import *
|
||||
from marvin.integration.lib.base import *
|
||||
from marvin.integration.lib.common import *
|
||||
from marvin.remoteSSHClient import remoteSSHClient
|
||||
from marvin.sshClient import SshClient
|
||||
import datetime
|
||||
|
||||
|
||||
@ -314,7 +314,7 @@ class TestEIP(cloudstackTestCase):
|
||||
self.debug("SSH into netscaler: %s" %
|
||||
self.services["netscaler"]["ipaddress"])
|
||||
try:
|
||||
ssh_client = remoteSSHClient(
|
||||
ssh_client = SshClient(
|
||||
self.services["netscaler"]["ipaddress"],
|
||||
22,
|
||||
self.services["netscaler"]["username"],
|
||||
@ -458,7 +458,7 @@ class TestEIP(cloudstackTestCase):
|
||||
self.debug("SSH into netscaler: %s" %
|
||||
self.services["netscaler"]["ipaddress"])
|
||||
try:
|
||||
ssh_client = remoteSSHClient(
|
||||
ssh_client = SshClient(
|
||||
self.services["netscaler"]["ipaddress"],
|
||||
22,
|
||||
self.services["netscaler"]["username"],
|
||||
@ -657,7 +657,7 @@ class TestEIP(cloudstackTestCase):
|
||||
self.debug("SSH into netscaler: %s" %
|
||||
self.services["netscaler"]["ipaddress"])
|
||||
try:
|
||||
ssh_client = remoteSSHClient(
|
||||
ssh_client = SshClient(
|
||||
self.services["netscaler"]["ipaddress"],
|
||||
22,
|
||||
self.services["netscaler"]["username"],
|
||||
@ -871,7 +871,7 @@ class TestEIP(cloudstackTestCase):
|
||||
self.debug("SSH into netscaler: %s" %
|
||||
self.services["netscaler"]["ipaddress"])
|
||||
try:
|
||||
ssh_client = remoteSSHClient(
|
||||
ssh_client = SshClient(
|
||||
self.services["netscaler"]["ipaddress"],
|
||||
22,
|
||||
self.services["netscaler"]["username"],
|
||||
@ -1138,7 +1138,7 @@ class TestELB(cloudstackTestCase):
|
||||
self.debug("SSH into netscaler: %s" %
|
||||
self.services["netscaler"]["ipaddress"])
|
||||
try:
|
||||
ssh_client = remoteSSHClient(
|
||||
ssh_client = SshClient(
|
||||
self.services["netscaler"]["ipaddress"],
|
||||
22,
|
||||
self.services["netscaler"]["username"],
|
||||
@ -1287,7 +1287,7 @@ class TestELB(cloudstackTestCase):
|
||||
self.debug("SSH into netscaler: %s" %
|
||||
self.services["netscaler"]["ipaddress"])
|
||||
try:
|
||||
ssh_client = remoteSSHClient(
|
||||
ssh_client = SshClient(
|
||||
self.services["netscaler"]["ipaddress"],
|
||||
22,
|
||||
self.services["netscaler"]["username"],
|
||||
@ -1366,7 +1366,7 @@ class TestELB(cloudstackTestCase):
|
||||
self.debug("SSH into netscaler: %s" %
|
||||
self.services["netscaler"]["ipaddress"])
|
||||
try:
|
||||
ssh_client = remoteSSHClient(
|
||||
ssh_client = SshClient(
|
||||
self.services["netscaler"]["ipaddress"],
|
||||
22,
|
||||
self.services["netscaler"]["username"],
|
||||
@ -1512,7 +1512,7 @@ class TestELB(cloudstackTestCase):
|
||||
self.debug("SSH into netscaler: %s" %
|
||||
self.services["netscaler"]["ipaddress"])
|
||||
try:
|
||||
ssh_client = remoteSSHClient(
|
||||
ssh_client = SshClient(
|
||||
self.services["netscaler"]["ipaddress"],
|
||||
22,
|
||||
self.services["netscaler"]["username"],
|
||||
|
||||
@ -20,7 +20,7 @@
|
||||
import marvin
|
||||
from marvin.cloudstackTestCase import *
|
||||
from marvin.cloudstackAPI import *
|
||||
from marvin.remoteSSHClient import remoteSSHClient
|
||||
from marvin.sshClient import SshClient
|
||||
from marvin.integration.lib.utils import *
|
||||
from marvin.integration.lib.base import *
|
||||
from marvin.integration.lib.common import *
|
||||
|
||||
@ -38,7 +38,7 @@ from marvin.integration.lib.common import (get_domain,
|
||||
random_gen
|
||||
)
|
||||
from marvin.cloudstackAPI import createLBStickinessPolicy
|
||||
from marvin.remoteSSHClient import remoteSSHClient
|
||||
from marvin.sshClient import SshClient
|
||||
|
||||
|
||||
class Services:
|
||||
@ -383,7 +383,7 @@ class TestHAProxyStickyness(cloudstackTestCase):
|
||||
# If Round Robin Algorithm is chosen,
|
||||
# each ssh command should alternate between VMs
|
||||
|
||||
ssh_1 = remoteSSHClient(
|
||||
ssh_1 = SshClient(
|
||||
ip_addr,
|
||||
22,
|
||||
self.services["natrule"]["username"],
|
||||
|
||||
@ -20,7 +20,7 @@
|
||||
import marvin
|
||||
from marvin.cloudstackTestCase import *
|
||||
from marvin.cloudstackAPI import *
|
||||
from marvin.remoteSSHClient import remoteSSHClient
|
||||
from marvin.sshClient import SshClient
|
||||
from marvin.integration.lib.utils import *
|
||||
from marvin.integration.lib.base import *
|
||||
from marvin.integration.lib.common import *
|
||||
|
||||
@ -25,7 +25,7 @@ from marvin.cloudstackAPI import *
|
||||
from marvin.integration.lib.utils import *
|
||||
from marvin.integration.lib.base import *
|
||||
from marvin.integration.lib.common import *
|
||||
from marvin.remoteSSHClient import remoteSSHClient
|
||||
from marvin.sshClient import SshClient
|
||||
import datetime
|
||||
|
||||
|
||||
@ -1745,7 +1745,7 @@ class TestGuestNetworkWithNetScaler(cloudstackTestCase):
|
||||
self.debug("SSH into netscaler: %s" %
|
||||
self.services["netscaler"]["ipaddress"])
|
||||
try:
|
||||
ssh_client = remoteSSHClient(
|
||||
ssh_client = SshClient(
|
||||
self.services["netscaler"]["ipaddress"],
|
||||
self.services["netscaler"]["port"],
|
||||
self.services["netscaler"]["username"],
|
||||
@ -1891,7 +1891,7 @@ class TestGuestNetworkWithNetScaler(cloudstackTestCase):
|
||||
listall=True
|
||||
)
|
||||
nw = network_list[0]
|
||||
ssh_client = remoteSSHClient(
|
||||
ssh_client = SshClient(
|
||||
self.services["netscaler"]["ipaddress"],
|
||||
self.services["netscaler"]["port"],
|
||||
self.services["netscaler"]["username"],
|
||||
@ -2051,7 +2051,7 @@ class TestGuestNetworkWithNetScaler(cloudstackTestCase):
|
||||
self.debug("SSH into netscaler: %s" %
|
||||
self.services["netscaler"]["ipaddress"])
|
||||
try:
|
||||
ssh_client = remoteSSHClient(
|
||||
ssh_client = SshClient(
|
||||
self.services["netscaler"]["ipaddress"],
|
||||
self.services["netscaler"]["port"],
|
||||
self.services["netscaler"]["username"],
|
||||
@ -2249,7 +2249,7 @@ class TestGuestNetworkShutDown(cloudstackTestCase):
|
||||
self.debug("SSH into netscaler: %s" %
|
||||
self.services["netscaler"]["ipaddress"])
|
||||
try:
|
||||
ssh_client = remoteSSHClient(
|
||||
ssh_client = SshClient(
|
||||
self.services["netscaler"]["ipaddress"],
|
||||
self.services["netscaler"]["port"],
|
||||
self.services["netscaler"]["username"],
|
||||
@ -2334,7 +2334,7 @@ class TestGuestNetworkShutDown(cloudstackTestCase):
|
||||
listall=True
|
||||
)
|
||||
nw = network_list[0]
|
||||
ssh_client = remoteSSHClient(
|
||||
ssh_client = SshClient(
|
||||
self.services["netscaler"]["ipaddress"],
|
||||
self.services["netscaler"]["port"],
|
||||
self.services["netscaler"]["username"],
|
||||
@ -2396,7 +2396,7 @@ class TestGuestNetworkShutDown(cloudstackTestCase):
|
||||
listall=True
|
||||
)
|
||||
nw = network_list[0]
|
||||
ssh_client = remoteSSHClient(
|
||||
ssh_client = SshClient(
|
||||
self.services["netscaler"]["ipaddress"],
|
||||
self.services["netscaler"]["port"],
|
||||
self.services["netscaler"]["username"],
|
||||
@ -2458,7 +2458,7 @@ class TestGuestNetworkShutDown(cloudstackTestCase):
|
||||
listall=True
|
||||
)
|
||||
nw = network_list[0]
|
||||
ssh_client = remoteSSHClient(
|
||||
ssh_client = SshClient(
|
||||
self.services["netscaler"]["ipaddress"],
|
||||
self.services["netscaler"]["port"],
|
||||
self.services["netscaler"]["username"],
|
||||
|
||||
@ -25,7 +25,7 @@ from marvin.cloudstackAPI import *
|
||||
from marvin.integration.lib.utils import *
|
||||
from marvin.integration.lib.base import *
|
||||
from marvin.integration.lib.common import *
|
||||
from marvin.remoteSSHClient import remoteSSHClient
|
||||
from marvin.sshClient import SshClient
|
||||
import datetime
|
||||
|
||||
|
||||
@ -1228,7 +1228,7 @@ class TestAddMultipleVmsLb(cloudstackTestCase):
|
||||
self.debug("SSH into netscaler: %s" %
|
||||
self.services["netscaler"]["ipaddress"])
|
||||
try:
|
||||
ssh_client = remoteSSHClient(
|
||||
ssh_client = SshClient(
|
||||
self.services["netscaler"]["ipaddress"],
|
||||
22,
|
||||
self.services["netscaler"]["username"],
|
||||
@ -2104,7 +2104,7 @@ class TestLoadBalancingRule(cloudstackTestCase):
|
||||
|
||||
self.debug("SSH into Netscaler to verify other resources are deleted")
|
||||
try:
|
||||
ssh_client = remoteSSHClient(
|
||||
ssh_client = SshClient(
|
||||
self.services["netscaler"]["ipaddress"],
|
||||
self.services["netscaler"]["port"],
|
||||
self.services["netscaler"]["username"],
|
||||
@ -2430,7 +2430,7 @@ class TestVmWithLb(cloudstackTestCase):
|
||||
)
|
||||
self.debug("SSH into Netscaler to verify other resources are deleted")
|
||||
try:
|
||||
ssh_client = remoteSSHClient(
|
||||
ssh_client = SshClient(
|
||||
self.services["netscaler"]["ipaddress"],
|
||||
self.services["netscaler"]["port"],
|
||||
self.services["netscaler"]["username"],
|
||||
@ -2523,7 +2523,7 @@ class TestVmWithLb(cloudstackTestCase):
|
||||
e))
|
||||
self.debug("SSH into Netscaler to rules still persist")
|
||||
try:
|
||||
ssh_client = remoteSSHClient(
|
||||
ssh_client = SshClient(
|
||||
self.services["netscaler"]["ipaddress"],
|
||||
self.services["netscaler"]["port"],
|
||||
self.services["netscaler"]["username"],
|
||||
@ -2596,7 +2596,7 @@ class TestVmWithLb(cloudstackTestCase):
|
||||
e))
|
||||
self.debug("SSH into Netscaler to rules still persist")
|
||||
try:
|
||||
ssh_client = remoteSSHClient(
|
||||
ssh_client = SshClient(
|
||||
self.services["netscaler"]["ipaddress"],
|
||||
self.services["netscaler"]["port"],
|
||||
self.services["netscaler"]["username"],
|
||||
@ -2709,7 +2709,7 @@ class TestVmWithLb(cloudstackTestCase):
|
||||
e))
|
||||
self.debug("SSH into Netscaler to rules still persist")
|
||||
try:
|
||||
ssh_client = remoteSSHClient(
|
||||
ssh_client = SshClient(
|
||||
self.services["netscaler"]["ipaddress"],
|
||||
self.services["netscaler"]["port"],
|
||||
self.services["netscaler"]["username"],
|
||||
@ -2797,7 +2797,7 @@ class TestVmWithLb(cloudstackTestCase):
|
||||
e))
|
||||
self.debug("SSH into Netscaler to rules still persist")
|
||||
try:
|
||||
ssh_client = remoteSSHClient(
|
||||
ssh_client = SshClient(
|
||||
self.services["netscaler"]["ipaddress"],
|
||||
self.services["netscaler"]["port"],
|
||||
self.services["netscaler"]["username"],
|
||||
@ -2880,7 +2880,7 @@ class TestVmWithLb(cloudstackTestCase):
|
||||
time.sleep(int(delay[0].value) + int(wait[0].value))
|
||||
self.debug("SSH into Netscaler to rules still persist")
|
||||
try:
|
||||
ssh_client = remoteSSHClient(
|
||||
ssh_client = SshClient(
|
||||
self.services["netscaler"]["ipaddress"],
|
||||
self.services["netscaler"]["port"],
|
||||
self.services["netscaler"]["username"],
|
||||
@ -2936,7 +2936,7 @@ class TestVmWithLb(cloudstackTestCase):
|
||||
)
|
||||
self.debug("SSH into Netscaler to verify other resources are deleted")
|
||||
try:
|
||||
ssh_client = remoteSSHClient(
|
||||
ssh_client = SshClient(
|
||||
self.services["netscaler"]["ipaddress"],
|
||||
self.services["netscaler"]["port"],
|
||||
self.services["netscaler"]["username"],
|
||||
|
||||
@ -25,7 +25,7 @@ from marvin.cloudstackAPI import *
|
||||
from marvin.integration.lib.utils import *
|
||||
from marvin.integration.lib.base import *
|
||||
from marvin.integration.lib.common import *
|
||||
from marvin.remoteSSHClient import remoteSSHClient
|
||||
from marvin.sshClient import SshClient
|
||||
import datetime
|
||||
|
||||
|
||||
@ -300,7 +300,7 @@ class TestLbWithRoundRobin(cloudstackTestCase):
|
||||
self.debug("SSH into netscaler: %s" %
|
||||
self.services["netscaler"]["ipaddress"])
|
||||
try:
|
||||
ssh_client = remoteSSHClient(
|
||||
ssh_client = SshClient(
|
||||
self.services["netscaler"]["ipaddress"],
|
||||
self.services["netscaler"]["port"],
|
||||
self.services["netscaler"]["username"],
|
||||
@ -524,7 +524,7 @@ class TestLbWithLeastConn(cloudstackTestCase):
|
||||
self.debug("SSH into netscaler: %s" %
|
||||
self.services["netscaler"]["ipaddress"])
|
||||
try:
|
||||
ssh_client = remoteSSHClient(
|
||||
ssh_client = SshClient(
|
||||
self.services["netscaler"]["ipaddress"],
|
||||
self.services["netscaler"]["port"],
|
||||
self.services["netscaler"]["username"],
|
||||
@ -739,7 +739,7 @@ class TestLbWithSourceIp(cloudstackTestCase):
|
||||
self.debug("SSH into netscaler: %s" %
|
||||
self.services["netscaler"]["ipaddress"])
|
||||
try:
|
||||
ssh_client = remoteSSHClient(
|
||||
ssh_client = SshClient(
|
||||
self.services["netscaler"]["ipaddress"],
|
||||
self.services["netscaler"]["port"],
|
||||
self.services["netscaler"]["username"],
|
||||
@ -912,7 +912,7 @@ class TestLbAlgoRrLc(cloudstackTestCase):
|
||||
self.debug("SSH into netscaler: %s" %
|
||||
self.services["netscaler"]["ipaddress"])
|
||||
try:
|
||||
ssh_client = remoteSSHClient(
|
||||
ssh_client = SshClient(
|
||||
self.services["netscaler"]["ipaddress"],
|
||||
self.services["netscaler"]["port"],
|
||||
self.services["netscaler"]["username"],
|
||||
@ -945,7 +945,7 @@ class TestLbAlgoRrLc(cloudstackTestCase):
|
||||
self.debug("SSH into netscaler: %s" %
|
||||
self.services["netscaler"]["ipaddress"])
|
||||
try:
|
||||
ssh_client = remoteSSHClient(
|
||||
ssh_client = SshClient(
|
||||
self.services["netscaler"]["ipaddress"],
|
||||
self.services["netscaler"]["port"],
|
||||
self.services["netscaler"]["username"],
|
||||
@ -1115,7 +1115,7 @@ class TestLbAlgoLcRr(cloudstackTestCase):
|
||||
self.debug("SSH into netscaler: %s" %
|
||||
self.services["netscaler"]["ipaddress"])
|
||||
try:
|
||||
ssh_client = remoteSSHClient(
|
||||
ssh_client = SshClient(
|
||||
self.services["netscaler"]["ipaddress"],
|
||||
self.services["netscaler"]["port"],
|
||||
self.services["netscaler"]["username"],
|
||||
@ -1147,7 +1147,7 @@ class TestLbAlgoLcRr(cloudstackTestCase):
|
||||
self.debug("SSH into netscaler: %s" %
|
||||
self.services["netscaler"]["ipaddress"])
|
||||
try:
|
||||
ssh_client = remoteSSHClient(
|
||||
ssh_client = SshClient(
|
||||
self.services["netscaler"]["ipaddress"],
|
||||
self.services["netscaler"]["port"],
|
||||
self.services["netscaler"]["username"],
|
||||
@ -1318,7 +1318,7 @@ class TestLbAlgoRrSb(cloudstackTestCase):
|
||||
self.debug("SSH into netscaler: %s" %
|
||||
self.services["netscaler"]["ipaddress"])
|
||||
try:
|
||||
ssh_client = remoteSSHClient(
|
||||
ssh_client = SshClient(
|
||||
self.services["netscaler"]["ipaddress"],
|
||||
self.services["netscaler"]["port"],
|
||||
self.services["netscaler"]["username"],
|
||||
@ -1351,7 +1351,7 @@ class TestLbAlgoRrSb(cloudstackTestCase):
|
||||
self.debug("SSH into netscaler: %s" %
|
||||
self.services["netscaler"]["ipaddress"])
|
||||
try:
|
||||
ssh_client = remoteSSHClient(
|
||||
ssh_client = SshClient(
|
||||
self.services["netscaler"]["ipaddress"],
|
||||
self.services["netscaler"]["port"],
|
||||
self.services["netscaler"]["username"],
|
||||
@ -1526,7 +1526,7 @@ class TestLbAlgoSbRr(cloudstackTestCase):
|
||||
self.debug("SSH into netscaler: %s" %
|
||||
self.services["netscaler"]["ipaddress"])
|
||||
try:
|
||||
ssh_client = remoteSSHClient(
|
||||
ssh_client = SshClient(
|
||||
self.services["netscaler"]["ipaddress"],
|
||||
self.services["netscaler"]["port"],
|
||||
self.services["netscaler"]["username"],
|
||||
@ -1560,7 +1560,7 @@ class TestLbAlgoSbRr(cloudstackTestCase):
|
||||
self.debug("SSH into netscaler: %s" %
|
||||
self.services["netscaler"]["ipaddress"])
|
||||
try:
|
||||
ssh_client = remoteSSHClient(
|
||||
ssh_client = SshClient(
|
||||
self.services["netscaler"]["ipaddress"],
|
||||
self.services["netscaler"]["port"],
|
||||
self.services["netscaler"]["username"],
|
||||
@ -1734,7 +1734,7 @@ class TestLbAlgoSbLc(cloudstackTestCase):
|
||||
self.debug("SSH into netscaler: %s" %
|
||||
self.services["netscaler"]["ipaddress"])
|
||||
try:
|
||||
ssh_client = remoteSSHClient(
|
||||
ssh_client = SshClient(
|
||||
self.services["netscaler"]["ipaddress"],
|
||||
self.services["netscaler"]["port"],
|
||||
self.services["netscaler"]["username"],
|
||||
@ -1767,7 +1767,7 @@ class TestLbAlgoSbLc(cloudstackTestCase):
|
||||
self.debug("SSH into netscaler: %s" %
|
||||
self.services["netscaler"]["ipaddress"])
|
||||
try:
|
||||
ssh_client = remoteSSHClient(
|
||||
ssh_client = SshClient(
|
||||
self.services["netscaler"]["ipaddress"],
|
||||
self.services["netscaler"]["port"],
|
||||
self.services["netscaler"]["username"],
|
||||
@ -1939,7 +1939,7 @@ class TestLbAlgoLcSb(cloudstackTestCase):
|
||||
self.debug("SSH into netscaler: %s" %
|
||||
self.services["netscaler"]["ipaddress"])
|
||||
try:
|
||||
ssh_client = remoteSSHClient(
|
||||
ssh_client = SshClient(
|
||||
self.services["netscaler"]["ipaddress"],
|
||||
self.services["netscaler"]["port"],
|
||||
self.services["netscaler"]["username"],
|
||||
@ -1972,7 +1972,7 @@ class TestLbAlgoLcSb(cloudstackTestCase):
|
||||
self.debug("SSH into netscaler: %s" %
|
||||
self.services["netscaler"]["ipaddress"])
|
||||
try:
|
||||
ssh_client = remoteSSHClient(
|
||||
ssh_client = SshClient(
|
||||
self.services["netscaler"]["ipaddress"],
|
||||
self.services["netscaler"]["port"],
|
||||
self.services["netscaler"]["username"],
|
||||
|
||||
@ -25,7 +25,7 @@ from marvin.cloudstackAPI import *
|
||||
from marvin.integration.lib.utils import *
|
||||
from marvin.integration.lib.base import *
|
||||
from marvin.integration.lib.common import *
|
||||
from marvin.remoteSSHClient import remoteSSHClient
|
||||
from marvin.sshClient import SshClient
|
||||
import datetime
|
||||
|
||||
|
||||
@ -267,7 +267,7 @@ class TestLbStickyPolicy(cloudstackTestCase):
|
||||
self.debug("SSH into netscaler: %s" %
|
||||
self.services["netscaler"]["ipaddress"])
|
||||
try:
|
||||
ssh_client = remoteSSHClient(
|
||||
ssh_client = SshClient(
|
||||
self.services["netscaler"]["ipaddress"],
|
||||
self.services["netscaler"]["port"],
|
||||
self.services["netscaler"]["username"],
|
||||
@ -356,7 +356,7 @@ class TestLbStickyPolicy(cloudstackTestCase):
|
||||
self.debug("SSH into netscaler: %s" %
|
||||
self.services["netscaler"]["ipaddress"])
|
||||
try:
|
||||
ssh_client = remoteSSHClient(
|
||||
ssh_client = SshClient(
|
||||
self.services["netscaler"]["ipaddress"],
|
||||
self.services["netscaler"]["port"],
|
||||
self.services["netscaler"]["username"],
|
||||
@ -445,7 +445,7 @@ class TestLbStickyPolicy(cloudstackTestCase):
|
||||
self.debug("SSH into netscaler: %s" %
|
||||
self.services["netscaler"]["ipaddress"])
|
||||
try:
|
||||
ssh_client = remoteSSHClient(
|
||||
ssh_client = SshClient(
|
||||
self.services["netscaler"]["ipaddress"],
|
||||
self.services["netscaler"]["port"],
|
||||
self.services["netscaler"]["username"],
|
||||
@ -536,7 +536,7 @@ class TestLbStickyPolicy(cloudstackTestCase):
|
||||
self.debug("SSH into netscaler: %s" %
|
||||
self.services["netscaler"]["ipaddress"])
|
||||
try:
|
||||
ssh_client = remoteSSHClient(
|
||||
ssh_client = SshClient(
|
||||
self.services["netscaler"]["ipaddress"],
|
||||
self.services["netscaler"]["port"],
|
||||
self.services["netscaler"]["username"],
|
||||
@ -627,7 +627,7 @@ class TestLbStickyPolicy(cloudstackTestCase):
|
||||
self.debug("SSH into netscaler: %s" %
|
||||
self.services["netscaler"]["ipaddress"])
|
||||
try:
|
||||
ssh_client = remoteSSHClient(
|
||||
ssh_client = SshClient(
|
||||
self.services["netscaler"]["ipaddress"],
|
||||
self.services["netscaler"]["port"],
|
||||
self.services["netscaler"]["username"],
|
||||
@ -718,7 +718,7 @@ class TestLbStickyPolicy(cloudstackTestCase):
|
||||
self.debug("SSH into netscaler: %s" %
|
||||
self.services["netscaler"]["ipaddress"])
|
||||
try:
|
||||
ssh_client = remoteSSHClient(
|
||||
ssh_client = SshClient(
|
||||
self.services["netscaler"]["ipaddress"],
|
||||
self.services["netscaler"]["port"],
|
||||
self.services["netscaler"]["username"],
|
||||
@ -809,7 +809,7 @@ class TestLbStickyPolicy(cloudstackTestCase):
|
||||
self.debug("SSH into netscaler: %s" %
|
||||
self.services["netscaler"]["ipaddress"])
|
||||
try:
|
||||
ssh_client = remoteSSHClient(
|
||||
ssh_client = SshClient(
|
||||
self.services["netscaler"]["ipaddress"],
|
||||
self.services["netscaler"]["port"],
|
||||
self.services["netscaler"]["username"],
|
||||
@ -900,7 +900,7 @@ class TestLbStickyPolicy(cloudstackTestCase):
|
||||
self.debug("SSH into netscaler: %s" %
|
||||
self.services["netscaler"]["ipaddress"])
|
||||
try:
|
||||
ssh_client = remoteSSHClient(
|
||||
ssh_client = SshClient(
|
||||
self.services["netscaler"]["ipaddress"],
|
||||
self.services["netscaler"]["port"],
|
||||
self.services["netscaler"]["username"],
|
||||
@ -991,7 +991,7 @@ class TestLbStickyPolicy(cloudstackTestCase):
|
||||
self.debug("SSH into netscaler: %s" %
|
||||
self.services["netscaler"]["ipaddress"])
|
||||
try:
|
||||
ssh_client = remoteSSHClient(
|
||||
ssh_client = SshClient(
|
||||
self.services["netscaler"]["ipaddress"],
|
||||
self.services["netscaler"]["port"],
|
||||
self.services["netscaler"]["username"],
|
||||
|
||||
@ -25,7 +25,7 @@ from marvin.cloudstackAPI import *
|
||||
from marvin.integration.lib.utils import *
|
||||
from marvin.integration.lib.base import *
|
||||
from marvin.integration.lib.common import *
|
||||
from marvin.remoteSSHClient import remoteSSHClient
|
||||
from marvin.sshClient import SshClient
|
||||
import datetime
|
||||
|
||||
|
||||
|
||||
@ -25,7 +25,7 @@ from marvin.cloudstackAPI import *
|
||||
from marvin.integration.lib.utils import *
|
||||
from marvin.integration.lib.base import *
|
||||
from marvin.integration.lib.common import *
|
||||
from marvin.remoteSSHClient import remoteSSHClient
|
||||
from marvin.sshClient import SshClient
|
||||
import datetime
|
||||
|
||||
|
||||
|
||||
@ -23,7 +23,7 @@ from marvin.integration.lib.utils import *
|
||||
from marvin.integration.lib.base import *
|
||||
from marvin.integration.lib.common import *
|
||||
from netaddr import *
|
||||
from marvin.remoteSSHClient import remoteSSHClient
|
||||
from marvin.sshClient import SshClient
|
||||
|
||||
from nose.plugins.attrib import attr
|
||||
|
||||
@ -808,7 +808,7 @@ class TestAssociatePublicIp(cloudstackTestCase):
|
||||
|
||||
self.debug("Trying to SSH to ip: %s" % portableip.ipaddress.ipaddress)
|
||||
|
||||
remoteSSHClient(
|
||||
SshClient(
|
||||
portableip.ipaddress.ipaddress,
|
||||
self.services['natrule']["publicport"],
|
||||
self.virtual_machine.username,
|
||||
@ -1533,7 +1533,7 @@ class TestPortableIpTransferAcrossNetworks(cloudstackTestCase):
|
||||
|
||||
self.debug("Trying to SSH to ip: %s" % portableip.ipaddress.ipaddress)
|
||||
|
||||
remoteSSHClient(
|
||||
SshClient(
|
||||
portableip.ipaddress.ipaddress,
|
||||
self.services['natrule']["publicport"],
|
||||
self.virtual_machine2.username,
|
||||
|
||||
@ -24,7 +24,7 @@ from marvin.cloudstackAPI import *
|
||||
from marvin.integration.lib.utils import *
|
||||
from marvin.integration.lib.base import *
|
||||
from marvin.integration.lib.common import *
|
||||
from marvin.remoteSSHClient import remoteSSHClient
|
||||
from marvin.sshClient import SshClient
|
||||
import datetime
|
||||
|
||||
|
||||
|
||||
@ -24,7 +24,7 @@ from marvin.cloudstackAPI import *
|
||||
from marvin.integration.lib.utils import *
|
||||
from marvin.integration.lib.base import *
|
||||
from marvin.integration.lib.common import *
|
||||
from marvin.remoteSSHClient import remoteSSHClient
|
||||
from marvin.sshClient import SshClient
|
||||
import datetime
|
||||
|
||||
|
||||
|
||||
@ -24,7 +24,7 @@ from marvin.cloudstackAPI import *
|
||||
from marvin.integration.lib.utils import *
|
||||
from marvin.integration.lib.base import *
|
||||
from marvin.integration.lib.common import *
|
||||
from marvin.remoteSSHClient import remoteSSHClient
|
||||
from marvin.sshClient import SshClient
|
||||
import datetime
|
||||
|
||||
|
||||
|
||||
@ -24,7 +24,7 @@ from marvin.cloudstackAPI import *
|
||||
from marvin.integration.lib.utils import *
|
||||
from marvin.integration.lib.base import *
|
||||
from marvin.integration.lib.common import *
|
||||
from marvin.remoteSSHClient import remoteSSHClient
|
||||
from marvin.sshClient import SshClient
|
||||
import datetime
|
||||
|
||||
|
||||
|
||||
@ -25,7 +25,7 @@ from marvin.cloudstackAPI import *
|
||||
from marvin.integration.lib.utils import *
|
||||
from marvin.integration.lib.base import *
|
||||
from marvin.integration.lib.common import *
|
||||
from marvin.remoteSSHClient import remoteSSHClient
|
||||
from marvin.sshClient import SshClient
|
||||
|
||||
#Import System modules
|
||||
import time
|
||||
@ -361,7 +361,7 @@ class TestDefaultSecurityGroup(cloudstackTestCase):
|
||||
# SSH Attempt to VM should fail
|
||||
with self.assertRaises(Exception):
|
||||
self.debug("SSH into VM: %s" % self.virtual_machine.ssh_ip)
|
||||
ssh = remoteSSHClient.remoteSSHClient(
|
||||
ssh = SshClient(
|
||||
self.virtual_machine.ssh_ip,
|
||||
self.virtual_machine.ssh_port,
|
||||
self.virtual_machine.username,
|
||||
@ -656,7 +656,7 @@ class TestRevokeIngressRule(cloudstackTestCase):
|
||||
# SSH Attempt to VM should fail
|
||||
with self.assertRaises(Exception):
|
||||
self.debug("SSH into VM: %s" % self.virtual_machine.id)
|
||||
remoteSSHClient.remoteSSHClient(
|
||||
SshClient(
|
||||
self.virtual_machine.ssh_ip,
|
||||
self.virtual_machine.ssh_port,
|
||||
self.virtual_machine.username,
|
||||
|
||||
@ -21,7 +21,7 @@ from marvin.cloudstackAPI import *
|
||||
from marvin.integration.lib.utils import *
|
||||
from marvin.integration.lib.base import *
|
||||
from marvin.integration.lib.common import *
|
||||
from marvin.remoteSSHClient import remoteSSHClient
|
||||
from marvin.sshClient import SshClient
|
||||
from marvin.integration.lib.utils import is_snapshot_on_nfs
|
||||
import os
|
||||
|
||||
|
||||
@ -22,7 +22,7 @@ import marvin
|
||||
from nose.plugins.attrib import attr
|
||||
from marvin.cloudstackTestCase import *
|
||||
from marvin.cloudstackAPI import *
|
||||
from marvin.remoteSSHClient import remoteSSHClient
|
||||
from marvin.sshClient import SshClient
|
||||
from marvin.integration.lib.utils import *
|
||||
from marvin.integration.lib.base import *
|
||||
from marvin.integration.lib.common import *
|
||||
|
||||
@ -20,7 +20,7 @@
|
||||
import marvin
|
||||
from marvin.cloudstackTestCase import *
|
||||
from marvin.cloudstackAPI import *
|
||||
from marvin.remoteSSHClient import remoteSSHClient
|
||||
from marvin.sshClient import SshClient
|
||||
from marvin.integration.lib.utils import *
|
||||
from marvin.integration.lib.base import *
|
||||
from marvin.integration.lib.common import *
|
||||
|
||||
@ -24,7 +24,7 @@ from marvin.cloudstackAPI import *
|
||||
from marvin.integration.lib.utils import *
|
||||
from marvin.integration.lib.base import *
|
||||
from marvin.integration.lib.common import *
|
||||
from marvin.remoteSSHClient import remoteSSHClient
|
||||
from marvin.sshClient import SshClient
|
||||
import urllib
|
||||
from random import random
|
||||
#Import System modules
|
||||
|
||||
@ -24,7 +24,7 @@ from marvin.cloudstackAPI import *
|
||||
from marvin.integration.lib.utils import *
|
||||
from marvin.integration.lib.base import *
|
||||
from marvin.integration.lib.common import *
|
||||
from marvin.remoteSSHClient import remoteSSHClient
|
||||
from marvin.sshClient import SshClient
|
||||
import datetime
|
||||
|
||||
|
||||
|
||||
@ -17,7 +17,7 @@
|
||||
import marvin
|
||||
from marvin.cloudstackTestCase import *
|
||||
from marvin.cloudstackAPI import *
|
||||
from marvin.remoteSSHClient import remoteSSHClient
|
||||
from marvin.sshClient import SshClient
|
||||
from marvin.integration.lib.utils import *
|
||||
from marvin.integration.lib.base import *
|
||||
from marvin.integration.lib.common import *
|
||||
|
||||
@ -25,7 +25,7 @@ from marvin.cloudstackAPI import *
|
||||
from marvin.integration.lib.utils import *
|
||||
from marvin.integration.lib.base import *
|
||||
from marvin.integration.lib.common import *
|
||||
from marvin.remoteSSHClient import remoteSSHClient
|
||||
from marvin.sshClient import SshClient
|
||||
import datetime
|
||||
# For more info on ddt refer to http://ddt.readthedocs.org/en/latest/api.html#module-ddt
|
||||
from ddt import ddt, data
|
||||
|
||||
@ -26,7 +26,7 @@ from marvin.cloudstackAPI import *
|
||||
from marvin.integration.lib.utils import *
|
||||
from marvin.integration.lib.base import *
|
||||
from marvin.integration.lib.common import *
|
||||
from marvin.remoteSSHClient import remoteSSHClient
|
||||
from marvin.sshClient import SshClient
|
||||
import datetime
|
||||
|
||||
|
||||
|
||||
@ -25,7 +25,7 @@ from marvin.cloudstackAPI import *
|
||||
from marvin.integration.lib.utils import *
|
||||
from marvin.integration.lib.base import *
|
||||
from marvin.integration.lib.common import *
|
||||
from marvin.remoteSSHClient import remoteSSHClient
|
||||
from marvin.sshClient import SshClient
|
||||
import datetime
|
||||
|
||||
|
||||
|
||||
@ -25,7 +25,7 @@ from marvin.cloudstackAPI import *
|
||||
from marvin.integration.lib.utils import *
|
||||
from marvin.integration.lib.base import *
|
||||
from marvin.integration.lib.common import *
|
||||
from marvin.remoteSSHClient import remoteSSHClient
|
||||
from marvin.sshClient import SshClient
|
||||
from marvin.codes import PASS
|
||||
|
||||
import time
|
||||
|
||||
@ -25,7 +25,7 @@ from marvin.cloudstackAPI import *
|
||||
from marvin.integration.lib.utils import *
|
||||
from marvin.integration.lib.base import *
|
||||
from marvin.integration.lib.common import *
|
||||
from marvin.remoteSSHClient import remoteSSHClient
|
||||
from marvin.sshClient import SshClient
|
||||
import datetime
|
||||
|
||||
|
||||
|
||||
@ -21,7 +21,7 @@ from marvin.cloudstackAPI import *
|
||||
from marvin.integration.lib.utils import *
|
||||
from marvin.integration.lib.base import *
|
||||
from marvin.integration.lib.common import *
|
||||
from marvin import remoteSSHClient
|
||||
from marvin.sshClient import SshClient
|
||||
from nose.plugins.attrib import attr
|
||||
|
||||
class Services:
|
||||
|
||||
@ -17,7 +17,7 @@
|
||||
|
||||
from marvin.cloudstackTestCase import *
|
||||
from marvin.cloudstackAPI import *
|
||||
from marvin import remoteSSHClient
|
||||
from marvin.sshClient import SshClient
|
||||
from marvin.integration.lib.utils import *
|
||||
from marvin.integration.lib.base import *
|
||||
from marvin.integration.lib.common import *
|
||||
@ -197,7 +197,7 @@ class TestLoadBalance(cloudstackTestCase):
|
||||
# If Round Robin Algorithm is chosen,
|
||||
# each ssh command should alternate between VMs
|
||||
|
||||
ssh_1 = remoteSSHClient(
|
||||
ssh_1 = SshClient(
|
||||
ip_addr,
|
||||
self.services['lbrule']["publicport"],
|
||||
self.vm_1.username,
|
||||
|
||||
@ -21,7 +21,7 @@ import marvin
|
||||
from marvin.cloudstackException import cloudstackAPIException
|
||||
from marvin.cloudstackTestCase import *
|
||||
from marvin.cloudstackAPI import *
|
||||
from marvin import remoteSSHClient
|
||||
from marvin.sshClient import SshClient
|
||||
from marvin.integration.lib.utils import *
|
||||
from marvin.integration.lib.base import *
|
||||
from marvin.integration.lib.common import *
|
||||
@ -460,7 +460,7 @@ class TestPortForwarding(cloudstackTestCase):
|
||||
"SSHing into VM with IP address %s after NAT rule deletion" %
|
||||
self.virtual_machine.ipaddress)
|
||||
|
||||
remoteSSHClient(
|
||||
SshClient(
|
||||
src_nat_ip_addr.ipaddress,
|
||||
self.virtual_machine.ssh_port,
|
||||
self.virtual_machine.username,
|
||||
@ -578,7 +578,7 @@ class TestPortForwarding(cloudstackTestCase):
|
||||
"SSHing into VM with IP address %s after NAT rule deletion" %
|
||||
self.virtual_machine.ipaddress)
|
||||
|
||||
remoteSSHClient(
|
||||
SshClient(
|
||||
ip_address.ipaddress.ipaddress,
|
||||
self.virtual_machine.ssh_port,
|
||||
self.virtual_machine.username,
|
||||
@ -741,7 +741,7 @@ class TestRebootRouter(cloudstackTestCase):
|
||||
try:
|
||||
self.debug("SSH into VM (ID : %s ) after reboot" % self.vm_1.id)
|
||||
|
||||
remoteSSHClient(
|
||||
SshClient(
|
||||
self.public_ip.ipaddress.ipaddress,
|
||||
self.services["natrule"]["publicport"],
|
||||
self.vm_1.username,
|
||||
@ -883,7 +883,7 @@ class TestReleaseIP(cloudstackTestCase):
|
||||
|
||||
# SSH Attempt though public IP should fail
|
||||
with self.assertRaises(Exception):
|
||||
ssh_2 = remoteSSHClient(
|
||||
ssh_2 = SshClient(
|
||||
self.ip_addr.ipaddress,
|
||||
self.services["natrule"]["publicport"],
|
||||
self.virtual_machine.username,
|
||||
|
||||
@ -18,7 +18,7 @@
|
||||
import marvin
|
||||
from marvin.cloudstackTestCase import *
|
||||
from marvin.cloudstackAPI import *
|
||||
from marvin.remoteSSHClient import remoteSSHClient
|
||||
from marvin.sshClient import SshClient
|
||||
from marvin.integration.lib.utils import *
|
||||
from marvin.integration.lib.base import *
|
||||
from marvin.integration.lib.common import *
|
||||
|
||||
@ -20,7 +20,7 @@
|
||||
import marvin
|
||||
from marvin.cloudstackTestCase import *
|
||||
from marvin.cloudstackAPI import *
|
||||
from marvin import remoteSSHClient
|
||||
from marvin.sshClient import SshClient
|
||||
from marvin.integration.lib.utils import *
|
||||
from marvin.integration.lib.base import *
|
||||
from marvin.integration.lib.common import *
|
||||
|
||||
@ -20,7 +20,7 @@
|
||||
import marvin
|
||||
from marvin.cloudstackTestCase import *
|
||||
from marvin.cloudstackAPI import *
|
||||
from marvin.remoteSSHClient import remoteSSHClient
|
||||
from marvin.sshClient import SshClient
|
||||
from marvin.integration.lib.utils import *
|
||||
from marvin.integration.lib.base import *
|
||||
from marvin.integration.lib.common import *
|
||||
|
||||
@ -20,7 +20,7 @@
|
||||
import marvin
|
||||
from marvin.cloudstackTestCase import *
|
||||
from marvin.cloudstackAPI import *
|
||||
from marvin import remoteSSHClient
|
||||
from marvin.sshClient import SshClient
|
||||
from marvin.integration.lib.utils import *
|
||||
from marvin.integration.lib.base import *
|
||||
from marvin.integration.lib.common import *
|
||||
|
||||
@ -20,7 +20,7 @@
|
||||
import marvin
|
||||
from marvin.cloudstackTestCase import *
|
||||
from marvin.cloudstackAPI import *
|
||||
from marvin import remoteSSHClient
|
||||
from marvin.sshClient import SshClient
|
||||
from marvin.integration.lib.utils import *
|
||||
from marvin.integration.lib.base import *
|
||||
from marvin.integration.lib.common import *
|
||||
|
||||
@ -20,7 +20,7 @@
|
||||
import marvin
|
||||
from marvin.cloudstackTestCase import *
|
||||
from marvin.cloudstackAPI import *
|
||||
from marvin.remoteSSHClient import remoteSSHClient
|
||||
from marvin.sshClient import SshClient
|
||||
from marvin.integration.lib.utils import *
|
||||
from marvin.integration.lib.base import *
|
||||
from marvin.integration.lib.common import *
|
||||
|
||||
@ -21,7 +21,7 @@ import marvin
|
||||
from marvin.cloudstackTestCase import *
|
||||
from marvin.cloudstackException import *
|
||||
from marvin.cloudstackAPI import *
|
||||
from marvin.remoteSSHClient import remoteSSHClient
|
||||
from marvin.sshClient import SshClient
|
||||
from marvin.integration.lib.utils import *
|
||||
from marvin.integration.lib.base import *
|
||||
from marvin.integration.lib.common import *
|
||||
|
||||
@ -118,7 +118,7 @@ def is_server_ssh_ready(ipaddress, port, username, password, retries=20, retryin
|
||||
@Name: is_server_ssh_ready
|
||||
@Input: timeout: tcp connection timeout flag,
|
||||
others information need to be added
|
||||
@Output:object for remoteSSHClient
|
||||
@Output:object for SshClient
|
||||
Name of the function is little misnomer and is not
|
||||
verifying anything as such mentioned
|
||||
'''
|
||||
@ -129,12 +129,12 @@ def is_server_ssh_ready(ipaddress, port, username, password, retries=20, retryin
|
||||
port=port,
|
||||
user=username,
|
||||
passwd=password,
|
||||
keyPairFileLocation=keyPairFileLocation,
|
||||
keyPairFiles=keyPairFileLocation,
|
||||
retries=retries,
|
||||
delay=retryinterv,
|
||||
timeout=timeout)
|
||||
except Exception, e:
|
||||
raise Exception("SSH connection has Failed. Waited %ss. Error is %s" % (retries * retryinterv, e))
|
||||
raise Exception("SSH connection has Failed. Waited %ss. Error is %s" % (retries * retryinterv, str(e)))
|
||||
else:
|
||||
return ssh
|
||||
|
||||
|
||||
@ -26,7 +26,7 @@ from marvin.codes import (
|
||||
from contextlib import closing
|
||||
|
||||
|
||||
class remoteSSHClient(object):
|
||||
class SshClient(object):
|
||||
'''
|
||||
Added timeout flag for ssh connect calls.Default to 3.0 seconds
|
||||
'''
|
||||
@ -92,9 +92,9 @@ class remoteSSHClient(object):
|
||||
while self.retryCnt >= 0:
|
||||
try:
|
||||
self.logger.debug("SSH Connection: Host:%s User:%s\
|
||||
Port:%s KeyPairFile: %s" %
|
||||
(self.host, self.user, str(self.port),
|
||||
str(self.keyPairFiles)))
|
||||
Port:%s" %
|
||||
(self.host, self.user, str(self.port)
|
||||
))
|
||||
if self.keyPairFiles is None:
|
||||
self.ssh.connect(hostname=self.host,
|
||||
port=self.port,
|
||||
@ -177,6 +177,6 @@ class remoteSSHClient(object):
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
with contextlib.closing(remoteSSHClient("10.223.75.10", 22, "root",
|
||||
with contextlib.closing(SshClient("10.223.75.10", 22, "root",
|
||||
"password")) as ssh:
|
||||
print ssh.execute("ls -l")
|
||||
Loading…
x
Reference in New Issue
Block a user