You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ke...@apache.org on 2012/06/10 21:11:05 UTC
git commit: Adding support for file copy to marvin's remoteSSHClient
Updated Branches:
refs/heads/master 724d40df7 -> d4d0950d7
Adding support for file copy to marvin's remoteSSHClient
Signed-off-by: Prasanna Santhanam <Pr...@citrix.com>
Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/d4d0950d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/d4d0950d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/d4d0950d
Branch: refs/heads/master
Commit: d4d0950d7157720c719aa4cceac69b36df20edee
Parents: 724d40d
Author: Prasanna Santhanam <Pr...@citrix.com>
Authored: Tue Jun 5 16:08:11 2012 +0530
Committer: David Nalley <da...@gnsa.us>
Committed: Sun Jun 10 15:01:50 2012 -0400
----------------------------------------------------------------------
tools/marvin/marvin/remoteSSHClient.py | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/d4d0950d/tools/marvin/marvin/remoteSSHClient.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/remoteSSHClient.py b/tools/marvin/marvin/remoteSSHClient.py
index 8836844..4063b33 100644
--- a/tools/marvin/marvin/remoteSSHClient.py
+++ b/tools/marvin/marvin/remoteSSHClient.py
@@ -52,7 +52,16 @@ class remoteSSHClient(object):
results.append(strOut.rstrip())
return results
-
+
+ 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
+
if __name__ == "__main__":
ssh = remoteSSHClient("192.168.137.2", 22, "root", "password")