From c7fe212c3bdffc5a9ecbdafb026bb493603d22aa Mon Sep 17 00:00:00 2001 From: Santhosh Edukulla Date: Fri, 8 Nov 2013 16:33:43 +0530 Subject: [PATCH] CLOUDSTACK-5099: Utils.py-has-wrong-reference, cleaned it. As well added Uniform naming convention Signed-off-by: SrikanteswaraRao Talluri --- .../test_egress_rules_host_maintenance.py | 2 +- .../component/maint/test_high_availability.py | 2 +- .../maint/test_vpc_host_maintenance.py | 2 +- test/integration/component/test_accounts.py | 2 +- .../component/test_affinity_groups.py | 2 +- .../integration/component/test_asa1000v_fw.py | 2 +- test/integration/component/test_baremetal.py | 2 +- .../component/test_deploy_vm_userdata_reg.py | 2 +- .../component/test_egress_fw_rules.py | 4 +-- .../component/test_egress_rules.py | 2 +- test/integration/component/test_eip_elb.py | 18 +++++------ .../component/test_explicit_dedication.py | 2 +- test/integration/component/test_haproxy.py | 4 +-- .../component/test_implicit_planner.py | 2 +- .../component/test_netscaler_configs.py | 16 +++++----- .../component/test_netscaler_lb.py | 20 ++++++------ .../component/test_netscaler_lb_algo.py | 32 +++++++++---------- .../component/test_netscaler_lb_sticky.py | 20 ++++++------ .../component/test_netscaler_nw_off.py | 2 +- .../component/test_network_offering.py | 2 +- .../integration/component/test_portable_ip.py | 6 ++-- .../component/test_project_configs.py | 2 +- .../component/test_project_resources.py | 2 +- .../component/test_project_usage.py | 2 +- test/integration/component/test_projects.py | 2 +- .../component/test_security_groups.py | 6 ++-- .../component/test_snapshot_limits.py | 2 +- test/integration/component/test_stopped_vm.py | 2 +- .../component/test_storage_motion.py | 2 +- test/integration/component/test_templates.py | 2 +- test/integration/component/test_usage.py | 2 +- .../component/test_vm_passwdenabled.py | 2 +- .../integration/component/test_vpc_network.py | 2 +- .../component/test_vpc_offerings.py | 2 +- .../integration/component/test_vpc_routers.py | 2 +- .../component/test_vpc_vm_life_cycle.py | 2 +- .../component/test_vpc_vms_deployment.py | 2 +- .../integration/smoke/test_affinity_groups.py | 2 +- test/integration/smoke/test_loadbalance.py | 4 +-- test/integration/smoke/test_network.py | 10 +++--- test/integration/smoke/test_nic.py | 2 +- test/integration/smoke/test_pvlan.py | 2 +- .../integration/smoke/test_resource_detail.py | 2 +- test/integration/smoke/test_routers.py | 2 +- test/integration/smoke/test_ssvm.py | 2 +- test/integration/smoke/test_templates.py | 2 +- test/integration/smoke/test_volumes.py | 2 +- tools/marvin/marvin/integration/lib/utils.py | 6 ++-- .../{remoteSSHClient.py => sshClient.py} | 10 +++--- 49 files changed, 114 insertions(+), 114 deletions(-) rename tools/marvin/marvin/{remoteSSHClient.py => sshClient.py} (96%) diff --git a/test/integration/component/maint/test_egress_rules_host_maintenance.py b/test/integration/component/maint/test_egress_rules_host_maintenance.py index 6f0f768d37c..2b817879c4b 100644 --- a/test/integration/component/maint/test_egress_rules_host_maintenance.py +++ b/test/integration/component/maint/test_egress_rules_host_maintenance.py @@ -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 * diff --git a/test/integration/component/maint/test_high_availability.py b/test/integration/component/maint/test_high_availability.py index 7b0f78e2446..6ada659cd4f 100644 --- a/test/integration/component/maint/test_high_availability.py +++ b/test/integration/component/maint/test_high_availability.py @@ -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 diff --git a/test/integration/component/maint/test_vpc_host_maintenance.py b/test/integration/component/maint/test_vpc_host_maintenance.py index 0946cebdb7e..57dfb4be8d0 100644 --- a/test/integration/component/maint/test_vpc_host_maintenance.py +++ b/test/integration/component/maint/test_vpc_host_maintenance.py @@ -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 diff --git a/test/integration/component/test_accounts.py b/test/integration/component/test_accounts.py index 4c73c3acc84..650a595936e 100644 --- a/test/integration/component/test_accounts.py +++ b/test/integration/component/test_accounts.py @@ -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 diff --git a/test/integration/component/test_affinity_groups.py b/test/integration/component/test_affinity_groups.py index ae53e399df9..7e4fabe5475 100644 --- a/test/integration/component/test_affinity_groups.py +++ b/test/integration/component/test_affinity_groups.py @@ -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: diff --git a/test/integration/component/test_asa1000v_fw.py b/test/integration/component/test_asa1000v_fw.py index 0d8cad09802..c8a11ab1701 100644 --- a/test/integration/component/test_asa1000v_fw.py +++ b/test/integration/component/test_asa1000v_fw.py @@ -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 diff --git a/test/integration/component/test_baremetal.py b/test/integration/component/test_baremetal.py index c6a877eca6e..2439d0d2132 100644 --- a/test/integration/component/test_baremetal.py +++ b/test/integration/component/test_baremetal.py @@ -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 * diff --git a/test/integration/component/test_deploy_vm_userdata_reg.py b/test/integration/component/test_deploy_vm_userdata_reg.py index ca9179d77d2..b282a860816 100755 --- a/test/integration/component/test_deploy_vm_userdata_reg.py +++ b/test/integration/component/test_deploy_vm_userdata_reg.py @@ -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 diff --git a/test/integration/component/test_egress_fw_rules.py b/test/integration/component/test_egress_fw_rules.py index 253cc46cab9..0aed95742ec 100644 --- a/test/integration/component/test_egress_fw_rules.py +++ b/test/integration/component/test_egress_fw_rules.py @@ -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"]) diff --git a/test/integration/component/test_egress_rules.py b/test/integration/component/test_egress_rules.py index f8e8e790248..34995ffd1a0 100644 --- a/test/integration/component/test_egress_rules.py +++ b/test/integration/component/test_egress_rules.py @@ -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 * diff --git a/test/integration/component/test_eip_elb.py b/test/integration/component/test_eip_elb.py index 42a5148762e..d639d82d9f5 100644 --- a/test/integration/component/test_eip_elb.py +++ b/test/integration/component/test_eip_elb.py @@ -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"], diff --git a/test/integration/component/test_explicit_dedication.py b/test/integration/component/test_explicit_dedication.py index bd97551b5c6..7aefc21a1fb 100644 --- a/test/integration/component/test_explicit_dedication.py +++ b/test/integration/component/test_explicit_dedication.py @@ -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 * diff --git a/test/integration/component/test_haproxy.py b/test/integration/component/test_haproxy.py index 799cfa3e925..c7340126b36 100644 --- a/test/integration/component/test_haproxy.py +++ b/test/integration/component/test_haproxy.py @@ -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"], diff --git a/test/integration/component/test_implicit_planner.py b/test/integration/component/test_implicit_planner.py index f233ba9791e..2b656d9f2c6 100644 --- a/test/integration/component/test_implicit_planner.py +++ b/test/integration/component/test_implicit_planner.py @@ -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 * diff --git a/test/integration/component/test_netscaler_configs.py b/test/integration/component/test_netscaler_configs.py index c10f6882334..98c47485e34 100644 --- a/test/integration/component/test_netscaler_configs.py +++ b/test/integration/component/test_netscaler_configs.py @@ -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"], diff --git a/test/integration/component/test_netscaler_lb.py b/test/integration/component/test_netscaler_lb.py index 4b380e904e1..5a8d6a4f6b5 100644 --- a/test/integration/component/test_netscaler_lb.py +++ b/test/integration/component/test_netscaler_lb.py @@ -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"], diff --git a/test/integration/component/test_netscaler_lb_algo.py b/test/integration/component/test_netscaler_lb_algo.py index 4df7b897a5b..a5e1fe80b7b 100644 --- a/test/integration/component/test_netscaler_lb_algo.py +++ b/test/integration/component/test_netscaler_lb_algo.py @@ -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"], diff --git a/test/integration/component/test_netscaler_lb_sticky.py b/test/integration/component/test_netscaler_lb_sticky.py index 56964a9fd9e..6c27a08052a 100644 --- a/test/integration/component/test_netscaler_lb_sticky.py +++ b/test/integration/component/test_netscaler_lb_sticky.py @@ -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"], diff --git a/test/integration/component/test_netscaler_nw_off.py b/test/integration/component/test_netscaler_nw_off.py index b94d47ea164..3372612abab 100644 --- a/test/integration/component/test_netscaler_nw_off.py +++ b/test/integration/component/test_netscaler_nw_off.py @@ -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 diff --git a/test/integration/component/test_network_offering.py b/test/integration/component/test_network_offering.py index 335f8592ff0..04777b0c2a8 100644 --- a/test/integration/component/test_network_offering.py +++ b/test/integration/component/test_network_offering.py @@ -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 diff --git a/test/integration/component/test_portable_ip.py b/test/integration/component/test_portable_ip.py index 917e7f2d1a9..a532b362751 100644 --- a/test/integration/component/test_portable_ip.py +++ b/test/integration/component/test_portable_ip.py @@ -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, diff --git a/test/integration/component/test_project_configs.py b/test/integration/component/test_project_configs.py index a9654c82f57..be6cf1ce279 100644 --- a/test/integration/component/test_project_configs.py +++ b/test/integration/component/test_project_configs.py @@ -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 diff --git a/test/integration/component/test_project_resources.py b/test/integration/component/test_project_resources.py index 131a9e21050..9b9b2e6ac2e 100644 --- a/test/integration/component/test_project_resources.py +++ b/test/integration/component/test_project_resources.py @@ -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 diff --git a/test/integration/component/test_project_usage.py b/test/integration/component/test_project_usage.py index e836768591b..ba0a63c97e8 100644 --- a/test/integration/component/test_project_usage.py +++ b/test/integration/component/test_project_usage.py @@ -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 diff --git a/test/integration/component/test_projects.py b/test/integration/component/test_projects.py index e4c2180dd42..4b82fc2639c 100644 --- a/test/integration/component/test_projects.py +++ b/test/integration/component/test_projects.py @@ -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 diff --git a/test/integration/component/test_security_groups.py b/test/integration/component/test_security_groups.py index 5ec3ffb00d5..c90ccf6ee28 100644 --- a/test/integration/component/test_security_groups.py +++ b/test/integration/component/test_security_groups.py @@ -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, diff --git a/test/integration/component/test_snapshot_limits.py b/test/integration/component/test_snapshot_limits.py index 2af77c3923d..e52a893587c 100644 --- a/test/integration/component/test_snapshot_limits.py +++ b/test/integration/component/test_snapshot_limits.py @@ -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 diff --git a/test/integration/component/test_stopped_vm.py b/test/integration/component/test_stopped_vm.py index 3be915166ee..5a5c2981e2f 100644 --- a/test/integration/component/test_stopped_vm.py +++ b/test/integration/component/test_stopped_vm.py @@ -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 * diff --git a/test/integration/component/test_storage_motion.py b/test/integration/component/test_storage_motion.py index 36376f373bc..bae5acf5514 100644 --- a/test/integration/component/test_storage_motion.py +++ b/test/integration/component/test_storage_motion.py @@ -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 * diff --git a/test/integration/component/test_templates.py b/test/integration/component/test_templates.py index ea4b27755ca..af86d32a3bd 100644 --- a/test/integration/component/test_templates.py +++ b/test/integration/component/test_templates.py @@ -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 diff --git a/test/integration/component/test_usage.py b/test/integration/component/test_usage.py index 75326f70a75..5979a0a495c 100644 --- a/test/integration/component/test_usage.py +++ b/test/integration/component/test_usage.py @@ -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 diff --git a/test/integration/component/test_vm_passwdenabled.py b/test/integration/component/test_vm_passwdenabled.py index a6b45acc9d9..5cfa52556f7 100644 --- a/test/integration/component/test_vm_passwdenabled.py +++ b/test/integration/component/test_vm_passwdenabled.py @@ -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 * diff --git a/test/integration/component/test_vpc_network.py b/test/integration/component/test_vpc_network.py index b9b4f0049f6..9f5e6f623f0 100644 --- a/test/integration/component/test_vpc_network.py +++ b/test/integration/component/test_vpc_network.py @@ -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 diff --git a/test/integration/component/test_vpc_offerings.py b/test/integration/component/test_vpc_offerings.py index 109c8d13687..4f5802285f2 100644 --- a/test/integration/component/test_vpc_offerings.py +++ b/test/integration/component/test_vpc_offerings.py @@ -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 diff --git a/test/integration/component/test_vpc_routers.py b/test/integration/component/test_vpc_routers.py index 9b772e41c67..8ed99ca3c36 100644 --- a/test/integration/component/test_vpc_routers.py +++ b/test/integration/component/test_vpc_routers.py @@ -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 diff --git a/test/integration/component/test_vpc_vm_life_cycle.py b/test/integration/component/test_vpc_vm_life_cycle.py index 5893cc35bc5..cc65eedff8a 100644 --- a/test/integration/component/test_vpc_vm_life_cycle.py +++ b/test/integration/component/test_vpc_vm_life_cycle.py @@ -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 diff --git a/test/integration/component/test_vpc_vms_deployment.py b/test/integration/component/test_vpc_vms_deployment.py index b01137b1ccd..ebf3b317d2b 100644 --- a/test/integration/component/test_vpc_vms_deployment.py +++ b/test/integration/component/test_vpc_vms_deployment.py @@ -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 diff --git a/test/integration/smoke/test_affinity_groups.py b/test/integration/smoke/test_affinity_groups.py index db11adabe16..c96a580f199 100644 --- a/test/integration/smoke/test_affinity_groups.py +++ b/test/integration/smoke/test_affinity_groups.py @@ -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: diff --git a/test/integration/smoke/test_loadbalance.py b/test/integration/smoke/test_loadbalance.py index 3e48158442a..5f80c38303a 100644 --- a/test/integration/smoke/test_loadbalance.py +++ b/test/integration/smoke/test_loadbalance.py @@ -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, diff --git a/test/integration/smoke/test_network.py b/test/integration/smoke/test_network.py index f2045959697..09d6437cd86 100644 --- a/test/integration/smoke/test_network.py +++ b/test/integration/smoke/test_network.py @@ -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, diff --git a/test/integration/smoke/test_nic.py b/test/integration/smoke/test_nic.py index 583fc29c2c1..ac95685f37a 100644 --- a/test/integration/smoke/test_nic.py +++ b/test/integration/smoke/test_nic.py @@ -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 * diff --git a/test/integration/smoke/test_pvlan.py b/test/integration/smoke/test_pvlan.py index 0a427ba229d..aeb47f953c4 100644 --- a/test/integration/smoke/test_pvlan.py +++ b/test/integration/smoke/test_pvlan.py @@ -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 * diff --git a/test/integration/smoke/test_resource_detail.py b/test/integration/smoke/test_resource_detail.py index 93bc2ffc1f1..00a7b5c4171 100644 --- a/test/integration/smoke/test_resource_detail.py +++ b/test/integration/smoke/test_resource_detail.py @@ -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 * diff --git a/test/integration/smoke/test_routers.py b/test/integration/smoke/test_routers.py index 0f32e274338..7d324136e89 100644 --- a/test/integration/smoke/test_routers.py +++ b/test/integration/smoke/test_routers.py @@ -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 * diff --git a/test/integration/smoke/test_ssvm.py b/test/integration/smoke/test_ssvm.py index 9fa59a94d3f..a2b9eabc13c 100644 --- a/test/integration/smoke/test_ssvm.py +++ b/test/integration/smoke/test_ssvm.py @@ -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 * diff --git a/test/integration/smoke/test_templates.py b/test/integration/smoke/test_templates.py index 9478440f77e..e371ad436a8 100644 --- a/test/integration/smoke/test_templates.py +++ b/test/integration/smoke/test_templates.py @@ -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 * diff --git a/test/integration/smoke/test_volumes.py b/test/integration/smoke/test_volumes.py index b60b70e86ed..816ae03f267 100644 --- a/test/integration/smoke/test_volumes.py +++ b/test/integration/smoke/test_volumes.py @@ -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 * diff --git a/tools/marvin/marvin/integration/lib/utils.py b/tools/marvin/marvin/integration/lib/utils.py index 58a9bf9ae99..a106fc0e2f8 100644 --- a/tools/marvin/marvin/integration/lib/utils.py +++ b/tools/marvin/marvin/integration/lib/utils.py @@ -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 diff --git a/tools/marvin/marvin/remoteSSHClient.py b/tools/marvin/marvin/sshClient.py similarity index 96% rename from tools/marvin/marvin/remoteSSHClient.py rename to tools/marvin/marvin/sshClient.py index c9720e39e40..58f2602107b 100644 --- a/tools/marvin/marvin/remoteSSHClient.py +++ b/tools/marvin/marvin/sshClient.py @@ -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")