> -----Original Message----- > From: David Nalley [mailto:da...@gnsa.us] > Sent: Tuesday, June 05, 2012 8:27 AM > To: cloudstack-dev@incubator.apache.org > Subject: Re: [PATCH] Adding support for file copy to marvin's > remoteSSHClient > > On Tue, Jun 5, 2012 at 6:38 AM, Prasanna Santhanam > <prasanna.santha...@citrix.com> wrote: > > > > Signed-off-by: Prasanna Santhanam <prasanna.santha...@citrix.com> > > --- > > tools/marvin/marvin/remoteSSHClient.py | 11 ++++++++++- > > 1 file changed, 10 insertions(+), 1 deletion(-) > > > > 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") > > -- > > 1.7.9.5 > > > > > > -- > > Prasanna., > > Prasanna: > > This inherently looks ok, but Paramiko that you use in the above patch > is licensed LGPLv2 - and needs to be removed[1]. Before we perpetuate > its use, would you take a look at: > > http://bugs.cloudstack.org/browse/CS-14998 > http://bugs.cloudstack.org/browse/CS-14999 > http://bugs.cloudstack.org/browse/CS-15001 > http://bugs.cloudstack.org/browse/CS-15002 > > Since FWIU, the test client is the only place python-paramiko is > currently used it should be simple to eradicate that and just add a > dependency in the RPM/deb (or egg).
Test client doesn't include the paramkio source code into its directory, the migration tool(tools/migration) does. > > Thoughts? > > --David > > [1]http://wiki.cloudstack.org/display/dev/Moving+dependencies+to+ASF+ap > proved+licenses