You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ta...@apache.org on 2013/11/08 12:37:44 UTC

git commit: updated refs/heads/4.2 to 91669ea

Updated Branches:
  refs/heads/4.2 9495fbc87 -> 91669ea62


CLOUDSTACK-5099: Utils.py-has-wrong-reference, cleaned it. As well added Uniform naming convention
Signed-off-by: SrikanteswaraRao Talluri <ta...@apache.org>

Conflicts:
	test/integration/component/test_portable_ip.py


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/91669ea6
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/91669ea6
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/91669ea6

Branch: refs/heads/4.2
Commit: 91669ea6279c7c15d424ae3c9b72ff179a82a56b
Parents: 9495fbc
Author: Santhosh Edukulla <Sa...@citrix.com>
Authored: Fri Nov 8 16:33:43 2013 +0530
Committer: SrikanteswaraRao Talluri <ta...@apache.org>
Committed: Fri Nov 8 17:06:52 2013 +0530

----------------------------------------------------------------------
 .../maint/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 +-
 test/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 +-
 test/integration/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 +-
 test/integration/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 +-
 test/integration/component/test_portable_ip.py  |   4 +-
 .../component/test_project_configs.py           |   2 +-
 .../component/test_project_resources.py         |   2 +-
 .../integration/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 +-
 test/integration/component/test_vpc_network.py  |   2 +-
 .../integration/component/test_vpc_offerings.py |   2 +-
 test/integration/component/test_vpc_routers.py  |   2 +-
 .../component/test_vpc_vm_life_cycle.py         |   2 +-
 .../component/test_vpc_vms_deployment.py        |   2 +-
 test/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 +-
 test/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 +-
 tools/marvin/marvin/remoteSSHClient.py          | 182 -------------------
 tools/marvin/marvin/sshClient.py                | 182 +++++++++++++++++++
 50 files changed, 290 insertions(+), 290 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/91669ea6/test/integration/component/maint/test_egress_rules_host_maintenance.py
----------------------------------------------------------------------
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 6f0f768..2b81787 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 *

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/91669ea6/test/integration/component/maint/test_high_availability.py
----------------------------------------------------------------------
diff --git a/test/integration/component/maint/test_high_availability.py b/test/integration/component/maint/test_high_availability.py
index 7b0f78e..6ada659 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
 
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/91669ea6/test/integration/component/maint/test_vpc_host_maintenance.py
----------------------------------------------------------------------
diff --git a/test/integration/component/maint/test_vpc_host_maintenance.py b/test/integration/component/maint/test_vpc_host_maintenance.py
index 0946ceb..57dfb4b 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
 
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/91669ea6/test/integration/component/test_accounts.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_accounts.py b/test/integration/component/test_accounts.py
index 4c73c3a..650a595 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
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/91669ea6/test/integration/component/test_affinity_groups.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_affinity_groups.py b/test/integration/component/test_affinity_groups.py
index ae53e39..7e4fabe 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:

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/91669ea6/test/integration/component/test_asa1000v_fw.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_asa1000v_fw.py b/test/integration/component/test_asa1000v_fw.py
index 0d8cad0..c8a11ab 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
 
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/91669ea6/test/integration/component/test_baremetal.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_baremetal.py b/test/integration/component/test_baremetal.py
index c6a877e..2439d0d 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 *

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/91669ea6/test/integration/component/test_deploy_vm_userdata_reg.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_deploy_vm_userdata_reg.py b/test/integration/component/test_deploy_vm_userdata_reg.py
index ca9179d..b282a86 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

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/91669ea6/test/integration/component/test_egress_fw_rules.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_egress_fw_rules.py b/test/integration/component/test_egress_fw_rules.py
index 253cc46..0aed957 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"])

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/91669ea6/test/integration/component/test_egress_rules.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_egress_rules.py b/test/integration/component/test_egress_rules.py
index f8e8e79..34995ff 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 *

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/91669ea6/test/integration/component/test_eip_elb.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_eip_elb.py b/test/integration/component/test_eip_elb.py
index 42a5148..d639d82 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"],

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/91669ea6/test/integration/component/test_explicit_dedication.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_explicit_dedication.py b/test/integration/component/test_explicit_dedication.py
index bd97551..7aefc21 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 *

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/91669ea6/test/integration/component/test_haproxy.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_haproxy.py b/test/integration/component/test_haproxy.py
index 799cfa3..c734012 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"],

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/91669ea6/test/integration/component/test_implicit_planner.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_implicit_planner.py b/test/integration/component/test_implicit_planner.py
index f233ba9..2b656d9 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 *

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/91669ea6/test/integration/component/test_netscaler_configs.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_netscaler_configs.py b/test/integration/component/test_netscaler_configs.py
index c10f688..98c4748 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"],

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/91669ea6/test/integration/component/test_netscaler_lb.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_netscaler_lb.py b/test/integration/component/test_netscaler_lb.py
index 4b380e9..5a8d6a4 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"],

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/91669ea6/test/integration/component/test_netscaler_lb_algo.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_netscaler_lb_algo.py b/test/integration/component/test_netscaler_lb_algo.py
index 4df7b89..a5e1fe8 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"],

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/91669ea6/test/integration/component/test_netscaler_lb_sticky.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_netscaler_lb_sticky.py b/test/integration/component/test_netscaler_lb_sticky.py
index 56964a9..6c27a08 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"],

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/91669ea6/test/integration/component/test_netscaler_nw_off.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_netscaler_nw_off.py b/test/integration/component/test_netscaler_nw_off.py
index b94d47e..3372612 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
 
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/91669ea6/test/integration/component/test_network_offering.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_network_offering.py b/test/integration/component/test_network_offering.py
index 335f859..04777b0 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
 
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/91669ea6/test/integration/component/test_portable_ip.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_portable_ip.py b/test/integration/component/test_portable_ip.py
index 55de60d..ffcbf2a 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
 
@@ -776,7 +776,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,

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/91669ea6/test/integration/component/test_project_configs.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_project_configs.py b/test/integration/component/test_project_configs.py
index a9654c8..be6cf1c 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
 
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/91669ea6/test/integration/component/test_project_resources.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_project_resources.py b/test/integration/component/test_project_resources.py
index 131a9e2..9b9b2e6 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
 
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/91669ea6/test/integration/component/test_project_usage.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_project_usage.py b/test/integration/component/test_project_usage.py
index e836768..ba0a63c 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
 
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/91669ea6/test/integration/component/test_projects.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_projects.py b/test/integration/component/test_projects.py
index e4c2180..4b82fc2 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
 
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/91669ea6/test/integration/component/test_security_groups.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_security_groups.py b/test/integration/component/test_security_groups.py
index 5ec3ffb..c90ccf6 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,

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/91669ea6/test/integration/component/test_snapshot_limits.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_snapshot_limits.py b/test/integration/component/test_snapshot_limits.py
index 2af77c3..e52a893 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
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/91669ea6/test/integration/component/test_stopped_vm.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_stopped_vm.py b/test/integration/component/test_stopped_vm.py
index 3be9151..5a5c298 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 *

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/91669ea6/test/integration/component/test_storage_motion.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_storage_motion.py b/test/integration/component/test_storage_motion.py
index 36376f3..bae5acf 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 *

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/91669ea6/test/integration/component/test_templates.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_templates.py b/test/integration/component/test_templates.py
index ea4b277..af86d32 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

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/91669ea6/test/integration/component/test_usage.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_usage.py b/test/integration/component/test_usage.py
index 75326f7..5979a0a 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
 
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/91669ea6/test/integration/component/test_vm_passwdenabled.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_vm_passwdenabled.py b/test/integration/component/test_vm_passwdenabled.py
index a6b45ac..5cfa525 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 *

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/91669ea6/test/integration/component/test_vpc_network.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_vpc_network.py b/test/integration/component/test_vpc_network.py
index b9b4f00..9f5e6f6 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

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/91669ea6/test/integration/component/test_vpc_offerings.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_vpc_offerings.py b/test/integration/component/test_vpc_offerings.py
index 109c8d1..4f58022 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
 
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/91669ea6/test/integration/component/test_vpc_routers.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_vpc_routers.py b/test/integration/component/test_vpc_routers.py
index 9b772e4..8ed99ca 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
 
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/91669ea6/test/integration/component/test_vpc_vm_life_cycle.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_vpc_vm_life_cycle.py b/test/integration/component/test_vpc_vm_life_cycle.py
index 5893cc3..cc65eed 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

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/91669ea6/test/integration/component/test_vpc_vms_deployment.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_vpc_vms_deployment.py b/test/integration/component/test_vpc_vms_deployment.py
index b01137b..ebf3b31 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
 
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/91669ea6/test/integration/smoke/test_affinity_groups.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_affinity_groups.py b/test/integration/smoke/test_affinity_groups.py
index db11ada..c96a580 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:

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/91669ea6/test/integration/smoke/test_loadbalance.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_loadbalance.py b/test/integration/smoke/test_loadbalance.py
index 3e48158..5f80c38 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,

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/91669ea6/test/integration/smoke/test_network.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_network.py b/test/integration/smoke/test_network.py
index f204595..09d6437 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,

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/91669ea6/test/integration/smoke/test_nic.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_nic.py b/test/integration/smoke/test_nic.py
index 583fc29..ac95685 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 *

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/91669ea6/test/integration/smoke/test_pvlan.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_pvlan.py b/test/integration/smoke/test_pvlan.py
index 0a427ba..aeb47f9 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 *

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/91669ea6/test/integration/smoke/test_resource_detail.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_resource_detail.py b/test/integration/smoke/test_resource_detail.py
index 93bc2ff..00a7b5c 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 *

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/91669ea6/test/integration/smoke/test_routers.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_routers.py b/test/integration/smoke/test_routers.py
index 0f32e27..7d32413 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 *

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/91669ea6/test/integration/smoke/test_ssvm.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_ssvm.py b/test/integration/smoke/test_ssvm.py
index 9fa59a9..a2b9eab 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 *

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/91669ea6/test/integration/smoke/test_templates.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_templates.py b/test/integration/smoke/test_templates.py
index 9478440..e371ad4 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 *

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/91669ea6/test/integration/smoke/test_volumes.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_volumes.py b/test/integration/smoke/test_volumes.py
index b60b70e..816ae03 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 *

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/91669ea6/tools/marvin/marvin/integration/lib/utils.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/integration/lib/utils.py b/tools/marvin/marvin/integration/lib/utils.py
index 3decd31..9f5ea12 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
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/91669ea6/tools/marvin/marvin/remoteSSHClient.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/remoteSSHClient.py b/tools/marvin/marvin/remoteSSHClient.py
deleted file mode 100644
index c9720e3..0000000
--- a/tools/marvin/marvin/remoteSSHClient.py
+++ /dev/null
@@ -1,182 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-import paramiko
-import time
-import cloudstackException
-import contextlib
-import logging
-from marvin.codes import (
-    SUCCESS, FAIL, INVALID_INPUT, EXCEPTION_OCCURRED
-    )
-from contextlib import closing
-
-
-class remoteSSHClient(object):
-    '''
-    Added timeout flag for ssh connect calls.Default to 3.0 seconds
-    '''
-    def __init__(self, host, port, user, passwd, retries=20, delay=30,
-                 log_lvl=logging.INFO, keyPairFiles=None, timeout=10.0):
-        self.host = None
-        self.port = 22
-        self.user = user
-        self.passwd = passwd
-        self.keyPairFiles = keyPairFiles
-        self.ssh = paramiko.SSHClient()
-        self.ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
-        self.logger = logging.getLogger('sshClient')
-        self.retryCnt = 0
-        self.delay = 0
-        self.timeout = 3.0
-        ch = logging.StreamHandler()
-        ch.setLevel(log_lvl)
-        self.logger.addHandler(ch)
-
-        #Check invalid host value and raise exception
-        #Atleast host is required for connection
-        if host is not None and host != '':
-            self.host = host
-        if retries is not None and retries > 0:
-            self.retryCnt = retries
-        if delay is not None and delay > 0:
-            self.delay = delay
-        if timeout is not None and timeout > 0:
-            self.timeout = timeout
-        if port is not None or port >= 0:
-            self.port = port
-        if self.createConnection() == FAIL:
-            raise cloudstackException.\
-                internalError("Connection Failed")
-
-    def execute(self, command):
-        stdin, stdout, stderr = self.ssh.exec_command(command)
-        output = stdout.readlines()
-        errors = stderr.readlines()
-        results = []
-        if output is not None and len(output) == 0:
-            if errors is not None and len(errors) > 0:
-                for error in errors:
-                    results.append(error.rstrip())
-
-        else:
-            for strOut in output:
-                results.append(strOut.rstrip())
-        self.logger.debug("{Cmd: %s via Host: %s} {returns: %s}" %
-                          (command, str(self.host), results))
-        return results
-
-    def createConnection(self):
-        '''
-        @Name: createConnection
-        @Desc: Creates an ssh connection for
-               retries mentioned,along with sleep mentioned
-        @Output: SUCCESS on successful connection
-                 FAIL If connection through ssh failed
-        '''
-        ret = FAIL
-        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)))
-                if self.keyPairFiles is None:
-                    self.ssh.connect(hostname=self.host,
-                                     port=self.port,
-                                     username=self.user,
-                                     password=self.passwd,
-                                     timeout=self.timeout)
-                else:
-                    self.ssh.connect(hostname=self.host,
-                                     port=self.port,
-                                     username=self.user,
-                                     password=self.passwd,
-                                     key_filename=self.keyPairFiles,
-                                     timeout=self.timeout,
-                                     look_for_keys=False
-                                     )
-                ret = SUCCESS
-                break
-            except Exception as se:
-                self.retryCnt = self.retryCnt - 1
-                if self.retryCnt == 0:
-                    break
-                time.sleep(self.delay)
-        return ret
-
-    def runCommand(self, command):
-        '''
-        @Name: runCommand
-        @Desc: Runs a command over ssh and
-               returns the result along with status code
-        @Input: command to execute
-        @Output: 1: status of command executed.
-                 Default to None
-                 SUCCESS : If command execution is successful
-                 FAIL    : If command execution has failed
-                 EXCEPTION_OCCURRED: Exception occurred while executing
-                                     command
-                 INVALID_INPUT : If invalid value for command is passed
-                 2: stdin,stdout,stderr values of command output
-        '''
-        excep_msg = ''
-        ret = {"status": None, "stdin": None, "stdout": None, "stderr": None}
-        if command is None or command == '':
-            ret["status"] = INVALID_INPUT
-            return ret
-        try:
-            status_check = 1
-            stdin, stdout, stderr = self.ssh.exec_command(command)
-            output = stdout.readlines()
-            errors = stderr.readlines()
-            inp = stdin.readlines()
-            ret["stdin"] = inp
-            ret["stdout"] = output
-            ret["stderr"] = errors
-            if stdout is not None:
-                status_check = stdout.channel.recv_exit_status()
-            if status_check == 0:
-                ret["status"] = SUCCESS
-            else:
-                ret["status"] = FAIL
-        except Exception as e:
-            excep_msg = str(e)
-            ret["status"] = EXCEPTION_OCCURRED
-        finally:
-            self.logger.debug(" Host: %s Cmd: %s Output:%s Exception: %s" %
-                              (self.host, command, str(ret), excep_msg))
-            return ret
-
-    def scp(self, srcFile, destPath):
-        transport = paramiko.Transport((self.host, int(self.port)))
-        transport.connect(username=self.user, password=self.passwd)
-        sftp = paramiko.SFTPClient.from_transport(transport)
-        try:
-            sftp.put(srcFile, destPath)
-        except IOError, e:
-            raise e
-
-    def close(self):
-            if self.ssh is not None:
-                self.ssh.close()
-
-
-if __name__ == "__main__":
-    with contextlib.closing(remoteSSHClient("10.223.75.10", 22, "root",
-                                            "password")) as ssh:
-        print ssh.execute("ls -l")

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/91669ea6/tools/marvin/marvin/sshClient.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/sshClient.py b/tools/marvin/marvin/sshClient.py
new file mode 100644
index 0000000..58f2602
--- /dev/null
+++ b/tools/marvin/marvin/sshClient.py
@@ -0,0 +1,182 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+import paramiko
+import time
+import cloudstackException
+import contextlib
+import logging
+from marvin.codes import (
+    SUCCESS, FAIL, INVALID_INPUT, EXCEPTION_OCCURRED
+    )
+from contextlib import closing
+
+
+class SshClient(object):
+    '''
+    Added timeout flag for ssh connect calls.Default to 3.0 seconds
+    '''
+    def __init__(self, host, port, user, passwd, retries=20, delay=30,
+                 log_lvl=logging.INFO, keyPairFiles=None, timeout=10.0):
+        self.host = None
+        self.port = 22
+        self.user = user
+        self.passwd = passwd
+        self.keyPairFiles = keyPairFiles
+        self.ssh = paramiko.SSHClient()
+        self.ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
+        self.logger = logging.getLogger('sshClient')
+        self.retryCnt = 0
+        self.delay = 0
+        self.timeout = 3.0
+        ch = logging.StreamHandler()
+        ch.setLevel(log_lvl)
+        self.logger.addHandler(ch)
+
+        #Check invalid host value and raise exception
+        #Atleast host is required for connection
+        if host is not None and host != '':
+            self.host = host
+        if retries is not None and retries > 0:
+            self.retryCnt = retries
+        if delay is not None and delay > 0:
+            self.delay = delay
+        if timeout is not None and timeout > 0:
+            self.timeout = timeout
+        if port is not None or port >= 0:
+            self.port = port
+        if self.createConnection() == FAIL:
+            raise cloudstackException.\
+                internalError("Connection Failed")
+
+    def execute(self, command):
+        stdin, stdout, stderr = self.ssh.exec_command(command)
+        output = stdout.readlines()
+        errors = stderr.readlines()
+        results = []
+        if output is not None and len(output) == 0:
+            if errors is not None and len(errors) > 0:
+                for error in errors:
+                    results.append(error.rstrip())
+
+        else:
+            for strOut in output:
+                results.append(strOut.rstrip())
+        self.logger.debug("{Cmd: %s via Host: %s} {returns: %s}" %
+                          (command, str(self.host), results))
+        return results
+
+    def createConnection(self):
+        '''
+        @Name: createConnection
+        @Desc: Creates an ssh connection for
+               retries mentioned,along with sleep mentioned
+        @Output: SUCCESS on successful connection
+                 FAIL If connection through ssh failed
+        '''
+        ret = FAIL
+        while self.retryCnt >= 0:
+            try:
+                self.logger.debug("SSH Connection: Host:%s User:%s\
+                                   Port:%s" %
+                                  (self.host, self.user, str(self.port)
+                                   ))
+                if self.keyPairFiles is None:
+                    self.ssh.connect(hostname=self.host,
+                                     port=self.port,
+                                     username=self.user,
+                                     password=self.passwd,
+                                     timeout=self.timeout)
+                else:
+                    self.ssh.connect(hostname=self.host,
+                                     port=self.port,
+                                     username=self.user,
+                                     password=self.passwd,
+                                     key_filename=self.keyPairFiles,
+                                     timeout=self.timeout,
+                                     look_for_keys=False
+                                     )
+                ret = SUCCESS
+                break
+            except Exception as se:
+                self.retryCnt = self.retryCnt - 1
+                if self.retryCnt == 0:
+                    break
+                time.sleep(self.delay)
+        return ret
+
+    def runCommand(self, command):
+        '''
+        @Name: runCommand
+        @Desc: Runs a command over ssh and
+               returns the result along with status code
+        @Input: command to execute
+        @Output: 1: status of command executed.
+                 Default to None
+                 SUCCESS : If command execution is successful
+                 FAIL    : If command execution has failed
+                 EXCEPTION_OCCURRED: Exception occurred while executing
+                                     command
+                 INVALID_INPUT : If invalid value for command is passed
+                 2: stdin,stdout,stderr values of command output
+        '''
+        excep_msg = ''
+        ret = {"status": None, "stdin": None, "stdout": None, "stderr": None}
+        if command is None or command == '':
+            ret["status"] = INVALID_INPUT
+            return ret
+        try:
+            status_check = 1
+            stdin, stdout, stderr = self.ssh.exec_command(command)
+            output = stdout.readlines()
+            errors = stderr.readlines()
+            inp = stdin.readlines()
+            ret["stdin"] = inp
+            ret["stdout"] = output
+            ret["stderr"] = errors
+            if stdout is not None:
+                status_check = stdout.channel.recv_exit_status()
+            if status_check == 0:
+                ret["status"] = SUCCESS
+            else:
+                ret["status"] = FAIL
+        except Exception as e:
+            excep_msg = str(e)
+            ret["status"] = EXCEPTION_OCCURRED
+        finally:
+            self.logger.debug(" Host: %s Cmd: %s Output:%s Exception: %s" %
+                              (self.host, command, str(ret), excep_msg))
+            return ret
+
+    def scp(self, srcFile, destPath):
+        transport = paramiko.Transport((self.host, int(self.port)))
+        transport.connect(username=self.user, password=self.passwd)
+        sftp = paramiko.SFTPClient.from_transport(transport)
+        try:
+            sftp.put(srcFile, destPath)
+        except IOError, e:
+            raise e
+
+    def close(self):
+            if self.ssh is not None:
+                self.ssh.close()
+
+
+if __name__ == "__main__":
+    with contextlib.closing(SshClient("10.223.75.10", 22, "root",
+                                            "password")) as ssh:
+        print ssh.execute("ls -l")