test suite reviews and discussions
 help / color / mirror / Atom feed
From: "Liu, Yong" <yong.liu@intel.com>
To: "Qiu, Michael" <michael.qiu@intel.com>, "dts@dpdk.org" <dts@dpdk.org>
Subject: Re: [dts] [PATCH 2/2] framework/ssh: Add destination available for file	copy function
Date: Thu, 12 Feb 2015 01:25:27 +0000	[thread overview]
Message-ID: <86228AFD5BCD8E4EBFD2B90117B5E81E10D7AE15@SHSMSX103.ccr.corp.intel.com> (raw)
In-Reply-To: <1423657585-13429-1-git-send-email-michael.qiu@intel.com>

Applied, thanks michael.

> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Michael Qiu
> Sent: Wednesday, February 11, 2015 8:26 PM
> To: dts@dpdk.org
> Subject: [dts] [PATCH 2/2] framework/ssh: Add destination available for
> file copy function
> 
> For file copy in ssh module, the destination is fixed.
> This patch make it configurable.
> 
> Signed-off-by: Michael Qiu <michael.qiu@intel.com>
> ---
>  framework/ssh_connection.py | 8 ++++----
>  framework/ssh_pexpect.py    | 8 ++++----
>  2 files changed, 8 insertions(+), 8 deletions(-)
> 
> diff --git a/framework/ssh_connection.py b/framework/ssh_connection.py
> index 25f249a..f86b3b5 100644
> --- a/framework/ssh_connection.py
> +++ b/framework/ssh_connection.py
> @@ -61,8 +61,8 @@ class SSHConnection(object):
>      def isalive(self):
>          return self.session.isalive()
> 
> -    def copy_file_from(self, filename, password=''):
> -        self.session.copy_file_from(filename, password)
> +    def copy_file_from(self, src, dst = ".", password=''):
> +        self.session.copy_file_from(src, dst, password)
> 
> -    def copy_file_to(self, filename, password=''):
> -        self.session.copy_file_to(filename, password)
> +    def copy_file_to(self, src, dst = "~/", password=''):
> +        self.session.copy_file_to(src, dst, password)
> diff --git a/framework/ssh_pexpect.py b/framework/ssh_pexpect.py
> index 9c353e7..8f8c982 100644
> --- a/framework/ssh_pexpect.py
> +++ b/framework/ssh_pexpect.py
> @@ -66,21 +66,21 @@ class SSHPexpect(object):
>      def isalive(self):
>          return self.session.isalive()
> 
> -    def copy_file_from(self, filename, password=''):
> +    def copy_file_from(self, src, dst = ".", password=''):
>          """
>          Copies a file from a remote place into local.
>          """
> -        command = 'scp {0}@{1}:{2} .'.format(self.username, self.host,
> filename)
> +        command = 'scp {0}@{1}:{2} {3}'.format(self.username, self.host,
> src, dst)
>          if password == '':
>              self._spawn_scp(command, self.password)
>          else:
>              self._spawn_scp(command, password)
> 
> -    def copy_file_to(self, filename, password=''):
> +    def copy_file_to(self, src, dst = "~/", password=''):
>          """
>          Sends a local file to a remote place.
>          """
> -        command = 'scp {0} {1}@{2}:'.format(filename, self.username,
> self.host)
> +        command = 'scp {0} {1}@{2}:{3}'.format(src, self.username,
> self.host, dst)
>          if password == '':
>              self._spawn_scp(command, self.password)
>          else:
> --
> 1.9.3

      reply	other threads:[~2015-02-12  1:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-11 12:26 Michael Qiu
2015-02-12  1:25 ` Liu, Yong [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86228AFD5BCD8E4EBFD2B90117B5E81E10D7AE15@SHSMSX103.ccr.corp.intel.com \
    --to=yong.liu@intel.com \
    --cc=dts@dpdk.org \
    --cc=michael.qiu@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).